[INFO] cloning repository https://github.com/rubenzuurman/python-script-analyser [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/rubenzuurman/python-script-analyser" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Frubenzuurman%2Fpython-script-analyser", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Frubenzuurman%2Fpython-script-analyser'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 5821f3e1358105656176310ad459ceaba398b105 [INFO] linting rubenzuurman/python-script-analyser against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Frubenzuurman%2Fpython-script-analyser" "/workspace/builds/worker-0-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-0-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/rubenzuurman/python-script-analyser [INFO] finished tweaking git repo https://github.com/rubenzuurman/python-script-analyser [INFO] tweaked toml for git repo https://github.com/rubenzuurman/python-script-analyser written to /workspace/builds/worker-0-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/rubenzuurman/python-script-analyser on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/rubenzuurman/python-script-analyser already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded regex-automata v0.3.2 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 5a2b7ff3ddeaa67c2a14f358f670ea9482b34dddebfceb3667aba461aef3133e [INFO] running `Command { std: "docker" "start" "-a" "5a2b7ff3ddeaa67c2a14f358f670ea9482b34dddebfceb3667aba461aef3133e", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "5a2b7ff3ddeaa67c2a14f358f670ea9482b34dddebfceb3667aba461aef3133e", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "5a2b7ff3ddeaa67c2a14f358f670ea9482b34dddebfceb3667aba461aef3133e", kill_on_drop: false }` [INFO] [stdout] 5a2b7ff3ddeaa67c2a14f358f670ea9482b34dddebfceb3667aba461aef3133e [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] c2fde1465db48dff0bfec0f756c0e8f92fe84cc8e64577cdcd72f768af4dba8d [INFO] running `Command { std: "docker" "start" "-a" "c2fde1465db48dff0bfec0f756c0e8f92fe84cc8e64577cdcd72f768af4dba8d", kill_on_drop: false }` [INFO] [stderr] Checking aho-corasick v1.0.2 [INFO] [stderr] Checking regex-syntax v0.7.3 [INFO] [stderr] Checking regex-automata v0.3.2 [INFO] [stderr] Checking regex v1.9.1 [INFO] [stderr] Checking python-script-analyser v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lib.rs:35:13 [INFO] [stdout] | [INFO] [stdout] 35 | number: number, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `number` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lib.rs:574:13 [INFO] [stdout] | [INFO] [stdout] 574 | imports: imports, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `imports` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lib.rs:576:13 [INFO] [stdout] | [INFO] [stdout] 576 | functions: functions, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `functions` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lib.rs:577:13 [INFO] [stdout] | [INFO] [stdout] 577 | classes: classes [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `classes` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lib.rs:1012:13 [INFO] [stdout] | [INFO] [stdout] 1012 | name: name, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lib.rs:1013:13 [INFO] [stdout] | [INFO] [stdout] 1013 | parameters: parameters, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `parameters` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lib.rs:1014:13 [INFO] [stdout] | [INFO] [stdout] 1014 | functions: functions, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `functions` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lib.rs:1468:13 [INFO] [stdout] | [INFO] [stdout] 1468 | name: name, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lib.rs:1469:13 [INFO] [stdout] | [INFO] [stdout] 1469 | parent: parent, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `parent` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lib.rs:1470:13 [INFO] [stdout] | [INFO] [stdout] 1470 | variables: variables, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `variables` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lib.rs:1471:13 [INFO] [stdout] | [INFO] [stdout] 1471 | methods: methods, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `methods` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lib.rs:1472:13 [INFO] [stdout] | [INFO] [stdout] 1472 | classes: classes [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `classes` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lib.rs:35:13 [INFO] [stdout] | [INFO] [stdout] 35 | number: number, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `number` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lib.rs:574:13 [INFO] [stdout] | [INFO] [stdout] 574 | imports: imports, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `imports` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lib.rs:576:13 [INFO] [stdout] | [INFO] [stdout] 576 | functions: functions, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `functions` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lib.rs:577:13 [INFO] [stdout] | [INFO] [stdout] 577 | classes: classes [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `classes` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lib.rs:1012:13 [INFO] [stdout] | [INFO] [stdout] 1012 | name: name, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lib.rs:1013:13 [INFO] [stdout] | [INFO] [stdout] 1013 | parameters: parameters, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `parameters` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lib.rs:1014:13 [INFO] [stdout] | [INFO] [stdout] 1014 | functions: functions, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `functions` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lib.rs:1468:13 [INFO] [stdout] | [INFO] [stdout] 1468 | name: name, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lib.rs:1469:13 [INFO] [stdout] | [INFO] [stdout] 1469 | parent: parent, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `parent` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lib.rs:1470:13 [INFO] [stdout] | [INFO] [stdout] 1470 | variables: variables, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `variables` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lib.rs:1471:13 [INFO] [stdout] | [INFO] [stdout] 1471 | methods: methods, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `methods` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/lib.rs:1472:13 [INFO] [stdout] | [INFO] [stdout] 1472 | classes: classes [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `classes` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this is a decimal constant [INFO] [stdout] --> src/lib.rs:5624:41 [INFO] [stdout] | [INFO] [stdout] 5624 | let warning_sig: Vec = vec![087, 065, 082, 078, 073, 078, 071, 058, 032]; [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_prefixed_literal [INFO] [stdout] = note: `#[warn(clippy::zero_prefixed_literal)]` on by default [INFO] [stdout] help: if you mean to use a decimal constant, remove the `0` to avoid confusion [INFO] [stdout] | [INFO] [stdout] 5624 - let warning_sig: Vec = vec![087, 065, 082, 078, 073, 078, 071, 058, 032]; [INFO] [stdout] 5624 + let warning_sig: Vec = vec![87, 065, 082, 078, 073, 078, 071, 058, 032]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this is a decimal constant [INFO] [stdout] --> src/lib.rs:5624:46 [INFO] [stdout] | [INFO] [stdout] 5624 | let warning_sig: Vec = vec![087, 065, 082, 078, 073, 078, 071, 058, 032]; [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_prefixed_literal [INFO] [stdout] help: if you mean to use a decimal constant, remove the `0` to avoid confusion [INFO] [stdout] | [INFO] [stdout] 5624 - let warning_sig: Vec = vec![087, 065, 082, 078, 073, 078, 071, 058, 032]; [INFO] [stdout] 5624 + let warning_sig: Vec = vec![087, 65, 082, 078, 073, 078, 071, 058, 032]; [INFO] [stdout] | [INFO] [stdout] help: if you mean to use an octal constant, use `0o` [INFO] [stdout] | [INFO] [stdout] 5624 | let warning_sig: Vec = vec![087, 0o65, 082, 078, 073, 078, 071, 058, 032]; [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this is a decimal constant [INFO] [stdout] --> src/lib.rs:5624:51 [INFO] [stdout] | [INFO] [stdout] 5624 | let warning_sig: Vec = vec![087, 065, 082, 078, 073, 078, 071, 058, 032]; [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_prefixed_literal [INFO] [stdout] help: if you mean to use a decimal constant, remove the `0` to avoid confusion [INFO] [stdout] | [INFO] [stdout] 5624 - let warning_sig: Vec = vec![087, 065, 082, 078, 073, 078, 071, 058, 032]; [INFO] [stdout] 5624 + let warning_sig: Vec = vec![087, 065, 82, 078, 073, 078, 071, 058, 032]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this is a decimal constant [INFO] [stdout] --> src/lib.rs:5624:56 [INFO] [stdout] | [INFO] [stdout] 5624 | let warning_sig: Vec = vec![087, 065, 082, 078, 073, 078, 071, 058, 032]; [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_prefixed_literal [INFO] [stdout] help: if you mean to use a decimal constant, remove the `0` to avoid confusion [INFO] [stdout] | [INFO] [stdout] 5624 - let warning_sig: Vec = vec![087, 065, 082, 078, 073, 078, 071, 058, 032]; [INFO] [stdout] 5624 + let warning_sig: Vec = vec![087, 065, 082, 78, 073, 078, 071, 058, 032]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this is a decimal constant [INFO] [stdout] --> src/lib.rs:5624:61 [INFO] [stdout] | [INFO] [stdout] 5624 | let warning_sig: Vec = vec![087, 065, 082, 078, 073, 078, 071, 058, 032]; [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_prefixed_literal [INFO] [stdout] help: if you mean to use a decimal constant, remove the `0` to avoid confusion [INFO] [stdout] | [INFO] [stdout] 5624 - let warning_sig: Vec = vec![087, 065, 082, 078, 073, 078, 071, 058, 032]; [INFO] [stdout] 5624 + let warning_sig: Vec = vec![087, 065, 082, 078, 73, 078, 071, 058, 032]; [INFO] [stdout] | [INFO] [stdout] help: if you mean to use an octal constant, use `0o` [INFO] [stdout] | [INFO] [stdout] 5624 | let warning_sig: Vec = vec![087, 065, 082, 078, 0o73, 078, 071, 058, 032]; [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this is a decimal constant [INFO] [stdout] --> src/lib.rs:5624:66 [INFO] [stdout] | [INFO] [stdout] 5624 | let warning_sig: Vec = vec![087, 065, 082, 078, 073, 078, 071, 058, 032]; [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_prefixed_literal [INFO] [stdout] help: if you mean to use a decimal constant, remove the `0` to avoid confusion [INFO] [stdout] | [INFO] [stdout] 5624 - let warning_sig: Vec = vec![087, 065, 082, 078, 073, 078, 071, 058, 032]; [INFO] [stdout] 5624 + let warning_sig: Vec = vec![087, 065, 082, 078, 073, 78, 071, 058, 032]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this is a decimal constant [INFO] [stdout] --> src/lib.rs:5624:71 [INFO] [stdout] | [INFO] [stdout] 5624 | let warning_sig: Vec = vec![087, 065, 082, 078, 073, 078, 071, 058, 032]; [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_prefixed_literal [INFO] [stdout] help: if you mean to use a decimal constant, remove the `0` to avoid confusion [INFO] [stdout] | [INFO] [stdout] 5624 - let warning_sig: Vec = vec![087, 065, 082, 078, 073, 078, 071, 058, 032]; [INFO] [stdout] 5624 + let warning_sig: Vec = vec![087, 065, 082, 078, 073, 078, 71, 058, 032]; [INFO] [stdout] | [INFO] [stdout] help: if you mean to use an octal constant, use `0o` [INFO] [stdout] | [INFO] [stdout] 5624 | let warning_sig: Vec = vec![087, 065, 082, 078, 073, 078, 0o71, 058, 032]; [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this is a decimal constant [INFO] [stdout] --> src/lib.rs:5624:76 [INFO] [stdout] | [INFO] [stdout] 5624 | let warning_sig: Vec = vec![087, 065, 082, 078, 073, 078, 071, 058, 032]; [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_prefixed_literal [INFO] [stdout] help: if you mean to use a decimal constant, remove the `0` to avoid confusion [INFO] [stdout] | [INFO] [stdout] 5624 - let warning_sig: Vec = vec![087, 065, 082, 078, 073, 078, 071, 058, 032]; [INFO] [stdout] 5624 + let warning_sig: Vec = vec![087, 065, 082, 078, 073, 078, 071, 58, 032]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this is a decimal constant [INFO] [stdout] --> src/lib.rs:5624:81 [INFO] [stdout] | [INFO] [stdout] 5624 | let warning_sig: Vec = vec![087, 065, 082, 078, 073, 078, 071, 058, 032]; [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_prefixed_literal [INFO] [stdout] help: if you mean to use a decimal constant, remove the `0` to avoid confusion [INFO] [stdout] | [INFO] [stdout] 5624 - let warning_sig: Vec = vec![087, 065, 082, 078, 073, 078, 071, 058, 032]; [INFO] [stdout] 5624 + let warning_sig: Vec = vec![087, 065, 082, 078, 073, 078, 071, 058, 32]; [INFO] [stdout] | [INFO] [stdout] help: if you mean to use an octal constant, use `0o` [INFO] [stdout] | [INFO] [stdout] 5624 | let warning_sig: Vec = vec![087, 065, 082, 078, 073, 078, 071, 058, 0o32]; [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:34:9 [INFO] [stdout] | [INFO] [stdout] 34 | / return Line { [INFO] [stdout] 35 | | number: number, [INFO] [stdout] 36 | | text: text.to_string() [INFO] [stdout] 37 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 34 ~ Line { [INFO] [stdout] 35 + number: number, [INFO] [stdout] 36 + text: text.to_string() [INFO] [stdout] 37 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:41:9 [INFO] [stdout] | [INFO] [stdout] 41 | return self.number; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 41 - return self.number; [INFO] [stdout] 41 + self.number [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:45:9 [INFO] [stdout] | [INFO] [stdout] 45 | return &self.text; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 45 - return &self.text; [INFO] [stdout] 45 + &self.text [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lib.rs:72:28 [INFO] [stdout] | [INFO] [stdout] 72 | if !(self.get_text().chars().nth(index - 1).unwrap() == '\\') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(self.get_text().chars().nth(index - 1).unwrap() != '\\')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lib.rs:81:28 [INFO] [stdout] | [INFO] [stdout] 81 | if !(self.get_text().chars().nth(index - 1).unwrap() == '\\') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(self.get_text().chars().nth(index - 1).unwrap() != '\\')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:156:22 [INFO] [stdout] | [INFO] [stdout] 156 | true => return None, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 156 - true => return None, [INFO] [stdout] 156 + true => None, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:157:22 [INFO] [stdout] | [INFO] [stdout] 157 | false => return Some(equals_index), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 157 - false => return Some(equals_index), [INFO] [stdout] 157 + false => Some(equals_index), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:87:21 [INFO] [stdout] | [INFO] [stdout] 87 | / if !(in_single_quotations || in_double_quotations) { [INFO] [stdout] 88 | | in_brackets_depth += 1; [INFO] [stdout] 89 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 86 ~ '(' [INFO] [stdout] 87 ~ if !(in_single_quotations || in_double_quotations) => { [INFO] [stdout] 88 | in_brackets_depth += 1; [INFO] [stdout] 89 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:92:21 [INFO] [stdout] | [INFO] [stdout] 92 | / if !(in_single_quotations || in_double_quotations) { [INFO] [stdout] 93 | | if in_brackets_depth > 0 { [INFO] [stdout] 94 | | in_brackets_depth -= 1; [INFO] [stdout] 95 | | } [INFO] [stdout] 96 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 91 ~ ')' [INFO] [stdout] 92 ~ if !(in_single_quotations || in_double_quotations) => { [INFO] [stdout] 93 | if in_brackets_depth > 0 { [INFO] [stdout] 94 | in_brackets_depth -= 1; [INFO] [stdout] 95 | } [INFO] [stdout] 96 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:99:21 [INFO] [stdout] | [INFO] [stdout] 99 | / if !(in_single_quotations || in_double_quotations) { [INFO] [stdout] 100 | | in_square_brackets_depth += 1; [INFO] [stdout] 101 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 98 ~ '[' [INFO] [stdout] 99 ~ if !(in_single_quotations || in_double_quotations) => { [INFO] [stdout] 100 | in_square_brackets_depth += 1; [INFO] [stdout] 101 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:104:21 [INFO] [stdout] | [INFO] [stdout] 104 | / if !(in_single_quotations || in_double_quotations) { [INFO] [stdout] 105 | | if in_square_brackets_depth > 0 { [INFO] [stdout] 106 | | in_square_brackets_depth -= 1; [INFO] [stdout] 107 | | } [INFO] [stdout] 108 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 103 ~ ']' [INFO] [stdout] 104 ~ if !(in_single_quotations || in_double_quotations) => { [INFO] [stdout] 105 | if in_square_brackets_depth > 0 { [INFO] [stdout] 106 | in_square_brackets_depth -= 1; [INFO] [stdout] 107 | } [INFO] [stdout] 108 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:111:21 [INFO] [stdout] | [INFO] [stdout] 111 | / if !(in_single_quotations || in_double_quotations) { [INFO] [stdout] 112 | | in_curly_brackets_depth += 1; [INFO] [stdout] 113 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 110 ~ '{' [INFO] [stdout] 111 ~ if !(in_single_quotations || in_double_quotations) => { [INFO] [stdout] 112 | in_curly_brackets_depth += 1; [INFO] [stdout] 113 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:116:21 [INFO] [stdout] | [INFO] [stdout] 116 | / if !(in_single_quotations || in_double_quotations) { [INFO] [stdout] 117 | | if in_curly_brackets_depth > 0 { [INFO] [stdout] 118 | | in_curly_brackets_depth -= 1; [INFO] [stdout] 119 | | } [INFO] [stdout] 120 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 115 ~ '}' [INFO] [stdout] 116 ~ if !(in_single_quotations || in_double_quotations) => { [INFO] [stdout] 117 | if in_curly_brackets_depth > 0 { [INFO] [stdout] 118 | in_curly_brackets_depth -= 1; [INFO] [stdout] 119 | } [INFO] [stdout] 120 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:148:21 [INFO] [stdout] | [INFO] [stdout] 148 | / if !(in_single_quotations || in_double_quotations) { [INFO] [stdout] 149 | | break; [INFO] [stdout] 150 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 146 ~ '#' [INFO] [stdout] 147 | // Check if not in quotations or brackets. [INFO] [stdout] 148 ~ if !(in_single_quotations || in_double_quotations) => { [INFO] [stdout] 149 | break; [INFO] [stdout] 150 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lib.rs:92:21 [INFO] [stdout] | [INFO] [stdout] 92 | / if !(in_single_quotations || in_double_quotations) { [INFO] [stdout] 93 | | if in_brackets_depth > 0 { [INFO] [stdout] 94 | | in_brackets_depth -= 1; [INFO] [stdout] 95 | | } [INFO] [stdout] 96 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 92 ~ if !(in_single_quotations || in_double_quotations) [INFO] [stdout] 93 ~ && in_brackets_depth > 0 { [INFO] [stdout] 94 | in_brackets_depth -= 1; [INFO] [stdout] 95 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lib.rs:104:21 [INFO] [stdout] | [INFO] [stdout] 104 | / if !(in_single_quotations || in_double_quotations) { [INFO] [stdout] 105 | | if in_square_brackets_depth > 0 { [INFO] [stdout] 106 | | in_square_brackets_depth -= 1; [INFO] [stdout] 107 | | } [INFO] [stdout] 108 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 104 ~ if !(in_single_quotations || in_double_quotations) [INFO] [stdout] 105 ~ && in_square_brackets_depth > 0 { [INFO] [stdout] 106 | in_square_brackets_depth -= 1; [INFO] [stdout] 107 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lib.rs:116:21 [INFO] [stdout] | [INFO] [stdout] 116 | / if !(in_single_quotations || in_double_quotations) { [INFO] [stdout] 117 | | if in_curly_brackets_depth > 0 { [INFO] [stdout] 118 | | in_curly_brackets_depth -= 1; [INFO] [stdout] 119 | | } [INFO] [stdout] 120 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 116 ~ if !(in_single_quotations || in_double_quotations) [INFO] [stdout] 117 ~ && in_curly_brackets_depth > 0 { [INFO] [stdout] 118 | in_curly_brackets_depth -= 1; [INFO] [stdout] 119 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:177:9 [INFO] [stdout] | [INFO] [stdout] 177 | return format!("{}Line{}{}: {}\n", spaces, line_space, self.get_number(), self.get_text()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 177 - return format!("{}Line{}{}: {}\n", spaces, line_space, self.get_number(), self.get_text()); [INFO] [stdout] 177 + format!("{}Line{}{}: {}\n", spaces, line_space, self.get_number(), self.get_text()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:185:9 [INFO] [stdout] | [INFO] [stdout] 185 | / return self.number == other.number [INFO] [stdout] 186 | | && self.text == other.text; [INFO] [stdout] | |______________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 185 ~ self.number == other.number [INFO] [stdout] 186 ~ && self.text == other.text [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:207:21 [INFO] [stdout] | [INFO] [stdout] 207 | None => return None, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 207 - None => return None, [INFO] [stdout] 207 + None => None, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:229:21 [INFO] [stdout] | [INFO] [stdout] 229 | / return Some(Assignment { [INFO] [stdout] 230 | | name: name.trim().to_string(), [INFO] [stdout] 231 | | value: val.trim().to_string(), [INFO] [stdout] 232 | | source: line.clone() [INFO] [stdout] 233 | | }); [INFO] [stdout] | |______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 229 ~ Some(Assignment { [INFO] [stdout] 230 + name: name.trim().to_string(), [INFO] [stdout] 231 + value: val.trim().to_string(), [INFO] [stdout] 232 + source: line.clone() [INFO] [stdout] 233 ~ }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:250:21 [INFO] [stdout] | [INFO] [stdout] 250 | / return Some(Assignment { [INFO] [stdout] 251 | | name: var_trim.trim().to_string(), [INFO] [stdout] 252 | | value: val_trim.trim().to_string(), [INFO] [stdout] 253 | | source: line.clone() [INFO] [stdout] 254 | | }); [INFO] [stdout] | |______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 250 ~ Some(Assignment { [INFO] [stdout] 251 + name: var_trim.trim().to_string(), [INFO] [stdout] 252 + value: val_trim.trim().to_string(), [INFO] [stdout] 253 + source: line.clone() [INFO] [stdout] 254 ~ }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:204:83 [INFO] [stdout] | [INFO] [stdout] 204 | let dummy_line: Line = Line::new(1, &remove_single_line_comment_from_line(&line)); [INFO] [stdout] | ^^^^^ help: change this to: `line` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:261:9 [INFO] [stdout] | [INFO] [stdout] 261 | return &self.name; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 261 - return &self.name; [INFO] [stdout] 261 + &self.name [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:265:9 [INFO] [stdout] | [INFO] [stdout] 265 | return &self.value; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 265 - return &self.value; [INFO] [stdout] 265 + &self.value [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:269:9 [INFO] [stdout] | [INFO] [stdout] 269 | return &self.source; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 269 - return &self.source; [INFO] [stdout] 269 + &self.source [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:279:9 [INFO] [stdout] | [INFO] [stdout] 279 | return format!("{}Assignment({} = {})\n", spaces, self.get_name(), self.get_value()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 279 - return format!("{}Assignment({} = {})\n", spaces, self.get_name(), self.get_value()); [INFO] [stdout] 279 + format!("{}Assignment({} = {})\n", spaces, self.get_name(), self.get_value()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:287:9 [INFO] [stdout] | [INFO] [stdout] 287 | / return self.get_name() == other.get_name() [INFO] [stdout] 288 | | && self.get_value() == other.get_value() [INFO] [stdout] 289 | | && self.get_source() == other.get_source(); [INFO] [stdout] | |______________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 287 ~ self.get_name() == other.get_name() [INFO] [stdout] 288 + && self.get_value() == other.get_value() [INFO] [stdout] 289 ~ && self.get_source() == other.get_source() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `StructureTracker` [INFO] [stdout] --> src/lib.rs:303:5 [INFO] [stdout] | [INFO] [stdout] 303 | / pub fn new() -> Self { [INFO] [stdout] 304 | | return StructureTracker { [INFO] [stdout] 305 | | active: false, [INFO] [stdout] 306 | | indentation_length: 0, [INFO] [stdout] ... | [INFO] [stdout] 309 | | }; [INFO] [stdout] 310 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 301 + impl Default for StructureTracker { [INFO] [stdout] 302 + fn default() -> Self { [INFO] [stdout] 303 + Self::new() [INFO] [stdout] 304 + } [INFO] [stdout] 305 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:304:9 [INFO] [stdout] | [INFO] [stdout] 304 | / return StructureTracker { [INFO] [stdout] 305 | | active: false, [INFO] [stdout] 306 | | indentation_length: 0, [INFO] [stdout] 307 | | indentation_set: false, [INFO] [stdout] 308 | | source: Vec::new() [INFO] [stdout] 309 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 304 ~ StructureTracker { [INFO] [stdout] 305 + active: false, [INFO] [stdout] 306 + indentation_length: 0, [INFO] [stdout] 307 + indentation_set: false, [INFO] [stdout] 308 + source: Vec::new() [INFO] [stdout] 309 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:324:9 [INFO] [stdout] | [INFO] [stdout] 324 | return self.active; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 324 - return self.active; [INFO] [stdout] 324 + self.active [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:328:9 [INFO] [stdout] | [INFO] [stdout] 328 | return self.indentation_length; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 328 - return self.indentation_length; [INFO] [stdout] 328 + self.indentation_length [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:337:9 [INFO] [stdout] | [INFO] [stdout] 337 | return self.indentation_set; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 337 - return self.indentation_set; [INFO] [stdout] 337 + self.indentation_set [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:341:9 [INFO] [stdout] | [INFO] [stdout] 341 | return &self.source; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 341 - return &self.source; [INFO] [stdout] 341 + &self.source [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:357:9 [INFO] [stdout] | [INFO] [stdout] 357 | / return MultilineCommentTracker { [INFO] [stdout] 358 | | active: false [INFO] [stdout] 359 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 357 ~ MultilineCommentTracker { [INFO] [stdout] 358 + active: false [INFO] [stdout] 359 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:371:9 [INFO] [stdout] | [INFO] [stdout] 371 | return self.active; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 371 - return self.active; [INFO] [stdout] 371 + self.active [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:383:17 [INFO] [stdout] | [INFO] [stdout] 383 | return false; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 383 - return false; [INFO] [stdout] 383 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:385:17 [INFO] [stdout] | [INFO] [stdout] 385 | return true; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 385 - return true; [INFO] [stdout] 385 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:389:13 [INFO] [stdout] | [INFO] [stdout] 389 | return true; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 389 - return true; [INFO] [stdout] 389 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:392:13 [INFO] [stdout] | [INFO] [stdout] 392 | return false; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 392 - return false; [INFO] [stdout] 392 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:377:73 [INFO] [stdout] | [INFO] [stdout] 377 | let is_ml_comment_start: bool = line_is_multiline_comment_start(&line); [INFO] [stdout] | ^^^^^ help: change this to: `line` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:378:69 [INFO] [stdout] | [INFO] [stdout] 378 | let is_ml_comment_end: bool = line_is_multiline_comment_end(&line); [INFO] [stdout] | ^^^^^ help: change this to: `line` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/lib.rs:382:13 [INFO] [stdout] | [INFO] [stdout] 382 | / if line.get_text().matches("\"").count() >= 6 || line.get_text().matches("\'").count() >= 6 { [INFO] [stdout] 383 | | return false; [INFO] [stdout] 384 | | } else { [INFO] [stdout] 385 | | return true; [INFO] [stdout] 386 | | } [INFO] [stdout] | |_____________^ help: you can reduce it to: `return !(line.get_text().matches("\"").count() >= 6 || line.get_text().matches("\'").count() >= 6)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] = note: `#[warn(clippy::needless_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:399:9 [INFO] [stdout] | [INFO] [stdout] 399 | return line_is_multiline_comment_end(&line); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 399 - return line_is_multiline_comment_end(&line); [INFO] [stdout] 399 + line_is_multiline_comment_end(&line) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:399:46 [INFO] [stdout] | [INFO] [stdout] 399 | return line_is_multiline_comment_end(&line); [INFO] [stdout] | ^^^^^ help: change this to: `line` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:572:9 [INFO] [stdout] | [INFO] [stdout] 572 | / return File { [INFO] [stdout] 573 | | name: name.to_string(), [INFO] [stdout] 574 | | imports: imports, [INFO] [stdout] 575 | | global_variables: global_vars, [INFO] [stdout] 576 | | functions: functions, [INFO] [stdout] 577 | | classes: classes [INFO] [stdout] 578 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 572 ~ File { [INFO] [stdout] 573 + name: name.to_string(), [INFO] [stdout] 574 + imports: imports, [INFO] [stdout] 575 + global_variables: global_vars, [INFO] [stdout] 576 + functions: functions, [INFO] [stdout] 577 + classes: classes [INFO] [stdout] 578 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/lib.rs:416:40 [INFO] [stdout] | [INFO] [stdout] 416 | pub fn new(filepath: &str, source: &Vec, writer: &mut BufWriter>) -> Self { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 416 ~ pub fn new(filepath: &str, source: &[Line], writer: &mut BufWriter>) -> Self { [INFO] [stdout] 417 | // Get filename from path. [INFO] [stdout] ... [INFO] [stdout] 442 | // Get clone of source. [INFO] [stdout] 443 ~ let mut source: Vec = source.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:473:47 [INFO] [stdout] | [INFO] [stdout] 473 | function_tracker.add_line(&line); [INFO] [stdout] | ^^^^^ help: change this to: `line` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:478:51 [INFO] [stdout] | [INFO] [stdout] 478 | function_tracker.add_line(&line); [INFO] [stdout] | ^^^^^ help: change this to: `line` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:492:44 [INFO] [stdout] | [INFO] [stdout] 492 | class_tracker.add_line(&line); [INFO] [stdout] | ^^^^^ help: change this to: `line` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:497:48 [INFO] [stdout] | [INFO] [stdout] 497 | class_tracker.add_line(&line); [INFO] [stdout] | ^^^^^ help: change this to: `line` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:514:67 [INFO] [stdout] | [INFO] [stdout] 514 | if ml_comment_tracker.is_end_of_multiline_comment(&line) { [INFO] [stdout] | ^^^^^ help: change this to: `line` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:518:69 [INFO] [stdout] | [INFO] [stdout] 518 | if ml_comment_tracker.is_begin_of_multiline_comment(&line) { [INFO] [stdout] | ^^^^^ help: change this to: `line` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lib.rs:527:13 [INFO] [stdout] | [INFO] [stdout] 527 | / match line_is_import(&line, writer) { [INFO] [stdout] 528 | | Some(a) => { [INFO] [stdout] 529 | | for module in a.iter() { [INFO] [stdout] 530 | | imports.push(module.clone()); [INFO] [stdout] ... | [INFO] [stdout] 533 | | None => () [INFO] [stdout] 534 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 527 ~ if let Some(a) = line_is_import(&line, writer) { [INFO] [stdout] 528 + for module in a.iter() { [INFO] [stdout] 529 + imports.push(module.clone()); [INFO] [stdout] 530 + } [INFO] [stdout] 531 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:527:34 [INFO] [stdout] | [INFO] [stdout] 527 | match line_is_import(&line, writer) { [INFO] [stdout] | ^^^^^ help: change this to: `line` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/lib.rs:537:20 [INFO] [stdout] | [INFO] [stdout] 537 | if let Some(_) = line.is_assignment() { [INFO] [stdout] | -------^^^^^^^----------------------- help: try: `if line.is_assignment().is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:545:39 [INFO] [stdout] | [INFO] [stdout] 545 | if line_is_function_start(&line) { [INFO] [stdout] | ^^^^^ help: change this to: `line` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:548:43 [INFO] [stdout] | [INFO] [stdout] 548 | function_tracker.add_line(&line); [INFO] [stdout] | ^^^^^ help: change this to: `line` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:552:36 [INFO] [stdout] | [INFO] [stdout] 552 | if line_is_class_start(&line) { [INFO] [stdout] | ^^^^^ help: change this to: `line` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:555:40 [INFO] [stdout] | [INFO] [stdout] 555 | class_tracker.add_line(&line); [INFO] [stdout] | ^^^^^ help: change this to: `line` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:589:13 [INFO] [stdout] | [INFO] [stdout] 589 | return false; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 589 - return false; [INFO] [stdout] 589 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the method `scan` doesn't need a mutable reference [INFO] [stdout] --> src/lib.rs:639:35 [INFO] [stdout] | [INFO] [stdout] 639 | function.scan(writer, &mut scope); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] = note: `#[warn(clippy::unnecessary_mut_passed)]` on by default [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 639 - function.scan(writer, &mut scope); [INFO] [stdout] 639 + function.scan(writer, &scope); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the method `scan` doesn't need a mutable reference [INFO] [stdout] --> src/lib.rs:644:32 [INFO] [stdout] | [INFO] [stdout] 644 | class.scan(writer, &mut scope); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 644 - class.scan(writer, &mut scope); [INFO] [stdout] 644 + class.scan(writer, &scope); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:649:9 [INFO] [stdout] | [INFO] [stdout] 649 | return &self.name; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 649 - return &self.name; [INFO] [stdout] 649 + &self.name [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:653:9 [INFO] [stdout] | [INFO] [stdout] 653 | return &self.imports; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 653 - return &self.imports; [INFO] [stdout] 653 + &self.imports [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:657:9 [INFO] [stdout] | [INFO] [stdout] 657 | return &self.global_variables; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 657 - return &self.global_variables; [INFO] [stdout] 657 + &self.global_variables [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:661:9 [INFO] [stdout] | [INFO] [stdout] 661 | return &self.functions; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 661 - return &self.functions; [INFO] [stdout] 661 + &self.functions [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:665:9 [INFO] [stdout] | [INFO] [stdout] 665 | return &self.classes; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 665 - return &self.classes; [INFO] [stdout] 665 + &self.classes [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:718:9 [INFO] [stdout] | [INFO] [stdout] 718 | return string; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 718 - return string; [INFO] [stdout] 718 + string [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/lib.rs:684:12 [INFO] [stdout] | [INFO] [stdout] 684 | if self.get_global_variables().len() > 0{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.get_global_variables().is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/lib.rs:695:12 [INFO] [stdout] | [INFO] [stdout] 695 | if self.get_functions().len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.get_functions().is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/lib.rs:706:12 [INFO] [stdout] | [INFO] [stdout] 706 | if self.get_classes().len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.get_classes().is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:726:9 [INFO] [stdout] | [INFO] [stdout] 726 | / return self.get_name() == other.get_name() [INFO] [stdout] 727 | | && self.get_imports() == other.get_imports() [INFO] [stdout] 728 | | && self.get_global_variables() == other.get_global_variables() [INFO] [stdout] 729 | | && self.get_functions() == other.get_functions() [INFO] [stdout] 730 | | && self.get_classes() == other.get_classes(); [INFO] [stdout] | |________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 726 ~ self.get_name() == other.get_name() [INFO] [stdout] 727 + && self.get_imports() == other.get_imports() [INFO] [stdout] 728 + && self.get_global_variables() == other.get_global_variables() [INFO] [stdout] 729 + && self.get_functions() == other.get_functions() [INFO] [stdout] 730 ~ && self.get_classes() == other.get_classes() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lib.rs:798:28 [INFO] [stdout] | [INFO] [stdout] 798 | if !(params.chars().nth(index - 1).unwrap() == '\\') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(params.chars().nth(index - 1).unwrap() != '\\')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lib.rs:807:28 [INFO] [stdout] | [INFO] [stdout] 807 | if !(params.chars().nth(index - 1).unwrap() == '\\') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(params.chars().nth(index - 1).unwrap() != '\\')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lib.rs:866:32 [INFO] [stdout] | [INFO] [stdout] 866 | ... if !(param.chars().nth(index - 1).unwrap() == '\\') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(param.chars().nth(index - 1).unwrap() != '\\')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lib.rs:876:32 [INFO] [stdout] | [INFO] [stdout] 876 | ... if !(param.chars().nth(index - 1).unwrap() == '\\') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(param.chars().nth(index - 1).unwrap() != '\\')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lib.rs:908:32 [INFO] [stdout] | [INFO] [stdout] 908 | ... if !(string_builder.chars().nth(index - 1).unwrap() == '\\') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(string_builder.chars().nth(index - 1).unwrap() != '\\')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lib.rs:918:32 [INFO] [stdout] | [INFO] [stdout] 918 | ... if !(string_builder.chars().nth(index - 1).unwrap() == '\\') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(string_builder.chars().nth(index - 1).unwrap() != '\\')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:1011:9 [INFO] [stdout] | [INFO] [stdout] 1011 | / return Function { [INFO] [stdout] 1012 | | name: name, [INFO] [stdout] 1013 | | parameters: parameters, [INFO] [stdout] 1014 | | functions: functions, [INFO] [stdout] 1015 | | source: remove_empty_lines(source.to_vec()) [INFO] [stdout] 1016 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1011 ~ Function { [INFO] [stdout] 1012 + name: name, [INFO] [stdout] 1013 + parameters: parameters, [INFO] [stdout] 1014 + functions: functions, [INFO] [stdout] 1015 + source: remove_empty_lines(source.to_vec()) [INFO] [stdout] 1016 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/lib.rs:745:24 [INFO] [stdout] | [INFO] [stdout] 745 | pub fn new(source: &Vec, writer: &mut BufWriter>) -> Self { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 745 ~ pub fn new(source: &[Line], writer: &mut BufWriter>) -> Self { [INFO] [stdout] 746 | // Get clone of source. [INFO] [stdout] 747 ~ let mut source: Vec = source.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `source.get(0)` [INFO] [stdout] --> src/lib.rs:761:70 [INFO] [stdout] | [INFO] [stdout] 761 | let first_line: &str = &remove_single_line_comment_from_line(source.get(0).unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `source.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:813:21 [INFO] [stdout] | [INFO] [stdout] 813 | / if !(in_quotations || in_double_quotations) { [INFO] [stdout] 814 | | in_brackets_depth += 1; [INFO] [stdout] 815 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 812 ~ '(' [INFO] [stdout] 813 ~ if !(in_quotations || in_double_quotations) => { [INFO] [stdout] 814 | in_brackets_depth += 1; [INFO] [stdout] 815 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:818:21 [INFO] [stdout] | [INFO] [stdout] 818 | / if !(in_quotations || in_double_quotations) { [INFO] [stdout] 819 | | in_brackets_depth -= 1; [INFO] [stdout] 820 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 817 ~ ')' [INFO] [stdout] 818 ~ if !(in_quotations || in_double_quotations) => { [INFO] [stdout] 819 | in_brackets_depth -= 1; [INFO] [stdout] 820 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:823:21 [INFO] [stdout] | [INFO] [stdout] 823 | / if !(in_quotations || in_double_quotations) { [INFO] [stdout] 824 | | in_square_brackets_depth += 1; [INFO] [stdout] 825 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 822 ~ '[' [INFO] [stdout] 823 ~ if !(in_quotations || in_double_quotations) => { [INFO] [stdout] 824 | in_square_brackets_depth += 1; [INFO] [stdout] 825 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:828:21 [INFO] [stdout] | [INFO] [stdout] 828 | / if !(in_quotations || in_double_quotations) { [INFO] [stdout] 829 | | in_square_brackets_depth -= 1; [INFO] [stdout] 830 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 827 ~ ']' [INFO] [stdout] 828 ~ if !(in_quotations || in_double_quotations) => { [INFO] [stdout] 829 | in_square_brackets_depth -= 1; [INFO] [stdout] 830 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:833:21 [INFO] [stdout] | [INFO] [stdout] 833 | / if !(in_quotations || in_double_quotations) { [INFO] [stdout] 834 | | in_curly_brackets_depth += 1; [INFO] [stdout] 835 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 832 ~ '{' [INFO] [stdout] 833 ~ if !(in_quotations || in_double_quotations) => { [INFO] [stdout] 834 | in_curly_brackets_depth += 1; [INFO] [stdout] 835 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:838:21 [INFO] [stdout] | [INFO] [stdout] 838 | / if !(in_quotations || in_double_quotations) { [INFO] [stdout] 839 | | in_curly_brackets_depth -= 1; [INFO] [stdout] 840 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 837 ~ '}' [INFO] [stdout] 838 ~ if !(in_quotations || in_double_quotations) => { [INFO] [stdout] 839 | in_curly_brackets_depth -= 1; [INFO] [stdout] 840 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:844:21 [INFO] [stdout] | [INFO] [stdout] 844 | / ... if !(in_quotations || in_double_quotations || in_brackets_depth > 0 || in_square_brackets_depth > 0 || in_curly_brackets_de... [INFO] [stdout] 845 | | ... parameters.push("".to_string()); [INFO] [stdout] 846 | | ... } [INFO] [stdout] | |_______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 842 ~ ',' [INFO] [stdout] 843 | // Check if not in quotations or brackets. [INFO] [stdout] 844 ~ if !(in_quotations || in_double_quotations || in_brackets_depth > 0 || in_square_brackets_depth > 0 || in_curly_brackets_depth > 0) => { [INFO] [stdout] 845 | parameters.push("".to_string()); [INFO] [stdout] 846 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:956:47 [INFO] [stdout] | [INFO] [stdout] 956 | function_tracker.add_line(&line); [INFO] [stdout] | ^^^^^ help: change this to: `line` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:961:51 [INFO] [stdout] | [INFO] [stdout] 961 | function_tracker.add_line(&line); [INFO] [stdout] | ^^^^^ help: change this to: `line` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:978:67 [INFO] [stdout] | [INFO] [stdout] 978 | if ml_comment_tracker.is_end_of_multiline_comment(&line) { [INFO] [stdout] | ^^^^^ help: change this to: `line` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:982:69 [INFO] [stdout] | [INFO] [stdout] 982 | if ml_comment_tracker.is_begin_of_multiline_comment(&line) { [INFO] [stdout] | ^^^^^ help: change this to: `line` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:991:39 [INFO] [stdout] | [INFO] [stdout] 991 | if line_is_function_start(&line) { [INFO] [stdout] | ^^^^^ help: change this to: `line` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:999:43 [INFO] [stdout] | [INFO] [stdout] 999 | function_tracker.add_line(&line); [INFO] [stdout] | ^^^^^ help: change this to: `line` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `default` can be confused for the standard trait method `std::default::Default::default` [INFO] [stdout] --> src/lib.rs:1019:5 [INFO] [stdout] | [INFO] [stdout] 1019 | / pub fn default() -> Self { [INFO] [stdout] 1020 | | return Function { [INFO] [stdout] 1021 | | name: "".to_string(), [INFO] [stdout] 1022 | | parameters: Vec::new(), [INFO] [stdout] ... | [INFO] [stdout] 1025 | | }; [INFO] [stdout] 1026 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::default::Default` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] = note: `#[warn(clippy::should_implement_trait)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:1020:9 [INFO] [stdout] | [INFO] [stdout] 1020 | / return Function { [INFO] [stdout] 1021 | | name: "".to_string(), [INFO] [stdout] 1022 | | parameters: Vec::new(), [INFO] [stdout] 1023 | | functions: Vec::new(), [INFO] [stdout] 1024 | | source: Vec::new() [INFO] [stdout] 1025 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1020 ~ Function { [INFO] [stdout] 1021 + name: "".to_string(), [INFO] [stdout] 1022 + parameters: Vec::new(), [INFO] [stdout] 1023 + functions: Vec::new(), [INFO] [stdout] 1024 + source: Vec::new() [INFO] [stdout] 1025 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/lib.rs:1028:71 [INFO] [stdout] | [INFO] [stdout] 1028 | pub fn scan(&self, writer: &mut BufWriter>, scope: &Vec<(usize, String)>) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 1028 ~ pub fn scan(&self, writer: &mut BufWriter>, scope: &[(usize, String)]) { [INFO] [stdout] 1029 | // Define function to check if the scope contains a variable name. [INFO] [stdout] ... [INFO] [stdout] 1039 | // Clone scope (everything inside this function is local to this scope). [INFO] [stdout] 1040 ~ let mut scope: Vec<(usize, String)> = scope.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:1036:13 [INFO] [stdout] | [INFO] [stdout] 1036 | return false; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1036 - return false; [INFO] [stdout] 1036 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:1069:69 [INFO] [stdout] | [INFO] [stdout] 1069 | let current_indentation: usize = get_indentation_length(&line); [INFO] [stdout] | ^^^^^ help: change this to: `line` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` branch is empty [INFO] [stdout] --> src/lib.rs:1107:13 [INFO] [stdout] | [INFO] [stdout] 1107 | if line.get_text().trim() == "else:" {} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can remove it: `line.get_text().trim() == "else:";` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_ifs [INFO] [stdout] = note: `#[warn(clippy::needless_ifs)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_string` [INFO] [stdout] --> src/lib.rs:1114:41 [INFO] [stdout] | [INFO] [stdout] 1114 | let itervar: &str = &a["itervar"].trim().to_string(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `a["itervar"].trim()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] = note: `#[warn(clippy::unnecessary_to_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_string` [INFO] [stdout] --> src/lib.rs:1126:42 [INFO] [stdout] | [INFO] [stdout] 1126 | let iterator: &str = &a["iterator"].trim().to_string(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `a["iterator"].trim()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_string` [INFO] [stdout] --> src/lib.rs:1141:51 [INFO] [stdout] | [INFO] [stdout] 1141 | ... let condition: &str = &b["condition"].trim().to_string(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `b["condition"].trim()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:1157:72 [INFO] [stdout] | [INFO] [stdout] 1157 | ... let capt_with = re_with_statement.captures(&line.get_text()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `line.get_text()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:1173:59 [INFO] [stdout] | [INFO] [stdout] 1173 | ... match Assignment::new(&line) { [INFO] [stdout] | ^^^^^ help: change this to: `line` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:1218:9 [INFO] [stdout] | [INFO] [stdout] 1218 | return &self.name; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1218 - return &self.name; [INFO] [stdout] 1218 + &self.name [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:1222:9 [INFO] [stdout] | [INFO] [stdout] 1222 | return &self.parameters; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1222 - return &self.parameters; [INFO] [stdout] 1222 + &self.parameters [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:1226:9 [INFO] [stdout] | [INFO] [stdout] 1226 | return &self.functions; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1226 - return &self.functions; [INFO] [stdout] 1226 + &self.functions [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:1230:9 [INFO] [stdout] | [INFO] [stdout] 1230 | return &self.source; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1230 - return &self.source; [INFO] [stdout] 1230 + &self.source [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:1272:9 [INFO] [stdout] | [INFO] [stdout] 1272 | return string; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1272 - return string; [INFO] [stdout] 1272 + string [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/lib.rs:1249:12 [INFO] [stdout] | [INFO] [stdout] 1249 | if self.get_functions().len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.get_functions().is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/lib.rs:1252:33 [INFO] [stdout] | [INFO] [stdout] 1252 | string.push_str(format!("{}", function.as_string(indentation_length + 8)).as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `function.as_string(indentation_length + 8).to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/lib.rs:1260:12 [INFO] [stdout] | [INFO] [stdout] 1260 | if self.get_source().len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.get_source().is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/lib.rs:1263:33 [INFO] [stdout] | [INFO] [stdout] 1263 | string.push_str(format!("{}", line.as_string(indentation_length + 8)).as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `line.as_string(indentation_length + 8).to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:1280:9 [INFO] [stdout] | [INFO] [stdout] 1280 | / return self.get_name() == other.get_name() [INFO] [stdout] 1281 | | && self.get_parameters() == other.get_parameters() [INFO] [stdout] 1282 | | && self.get_functions() == other.get_functions() [INFO] [stdout] 1283 | | && self.get_source() == other.get_source(); [INFO] [stdout] | |______________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1280 ~ self.get_name() == other.get_name() [INFO] [stdout] 1281 + && self.get_parameters() == other.get_parameters() [INFO] [stdout] 1282 + && self.get_functions() == other.get_functions() [INFO] [stdout] 1283 ~ && self.get_source() == other.get_source() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:1467:9 [INFO] [stdout] | [INFO] [stdout] 1467 | / return Class { [INFO] [stdout] 1468 | | name: name, [INFO] [stdout] 1469 | | parent: parent, [INFO] [stdout] 1470 | | variables: variables, [INFO] [stdout] 1471 | | methods: methods, [INFO] [stdout] 1472 | | classes: classes [INFO] [stdout] 1473 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1467 ~ Class { [INFO] [stdout] 1468 + name: name, [INFO] [stdout] 1469 + parent: parent, [INFO] [stdout] 1470 + variables: variables, [INFO] [stdout] 1471 + methods: methods, [INFO] [stdout] 1472 + classes: classes [INFO] [stdout] 1473 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/lib.rs:1299:24 [INFO] [stdout] | [INFO] [stdout] 1299 | pub fn new(source: &Vec, writer: &mut BufWriter>) -> Self { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 1299 ~ pub fn new(source: &[Line], writer: &mut BufWriter>) -> Self { [INFO] [stdout] 1300 | // Get clone of source. [INFO] [stdout] 1301 ~ let mut source: Vec = source.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `source.get(0)` [INFO] [stdout] --> src/lib.rs:1315:70 [INFO] [stdout] | [INFO] [stdout] 1315 | let first_line: &str = &remove_single_line_comment_from_line(source.get(0).unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `source.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:1321:56 [INFO] [stdout] | [INFO] [stdout] 1321 | let class_start_capt = re_class_start.captures(&first_line); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `first_line` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:1362:45 [INFO] [stdout] | [INFO] [stdout] 1362 | method_tracker.add_line(&line); [INFO] [stdout] | ^^^^^ help: change this to: `line` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:1367:49 [INFO] [stdout] | [INFO] [stdout] 1367 | method_tracker.add_line(&line); [INFO] [stdout] | ^^^^^ help: change this to: `line` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:1382:44 [INFO] [stdout] | [INFO] [stdout] 1382 | class_tracker.add_line(&line); [INFO] [stdout] | ^^^^^ help: change this to: `line` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:1387:48 [INFO] [stdout] | [INFO] [stdout] 1387 | class_tracker.add_line(&line); [INFO] [stdout] | ^^^^^ help: change this to: `line` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:1405:67 [INFO] [stdout] | [INFO] [stdout] 1405 | if ml_comment_tracker.is_end_of_multiline_comment(&line) { [INFO] [stdout] | ^^^^^ help: change this to: `line` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:1409:69 [INFO] [stdout] | [INFO] [stdout] 1409 | if ml_comment_tracker.is_begin_of_multiline_comment(&line) { [INFO] [stdout] | ^^^^^ help: change this to: `line` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:1418:74 [INFO] [stdout] | [INFO] [stdout] 1418 | let line_text: String = remove_single_line_comment_from_line(&line); [INFO] [stdout] | ^^^^^ help: change this to: `line` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:1423:45 [INFO] [stdout] | [INFO] [stdout] 1423 | method_tracker.add_line(&line); [INFO] [stdout] | ^^^^^ help: change this to: `line` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:1436:52 [INFO] [stdout] | [INFO] [stdout] 1436 | ... class_tracker.add_line(&line); [INFO] [stdout] | ^^^^^ help: change this to: `line` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `default` can be confused for the standard trait method `std::default::Default::default` [INFO] [stdout] --> src/lib.rs:1476:5 [INFO] [stdout] | [INFO] [stdout] 1476 | / pub fn default() -> Self { [INFO] [stdout] 1477 | | return Class { [INFO] [stdout] 1478 | | name: "".to_string(), [INFO] [stdout] 1479 | | parent: "".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 1483 | | }; [INFO] [stdout] 1484 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::default::Default` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:1477:9 [INFO] [stdout] | [INFO] [stdout] 1477 | / return Class { [INFO] [stdout] 1478 | | name: "".to_string(), [INFO] [stdout] 1479 | | parent: "".to_string(), [INFO] [stdout] 1480 | | variables: Vec::new(), [INFO] [stdout] 1481 | | methods: Vec::new(), [INFO] [stdout] 1482 | | classes: Vec::new() [INFO] [stdout] 1483 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1477 ~ Class { [INFO] [stdout] 1478 + name: "".to_string(), [INFO] [stdout] 1479 + parent: "".to_string(), [INFO] [stdout] 1480 + variables: Vec::new(), [INFO] [stdout] 1481 + methods: Vec::new(), [INFO] [stdout] 1482 + classes: Vec::new() [INFO] [stdout] 1483 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/lib.rs:1486:71 [INFO] [stdout] | [INFO] [stdout] 1486 | pub fn scan(&self, writer: &mut BufWriter>, scope: &Vec<(usize, String)>) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 1486 ~ pub fn scan(&self, writer: &mut BufWriter>, scope: &[(usize, String)]) { [INFO] [stdout] 1487 | // Define function to check if the scope contains a variable name. [INFO] [stdout] ... [INFO] [stdout] 1497 | // Clone scope (everything inside this class is local to this scope). [INFO] [stdout] 1498 ~ let mut scope: Vec<(usize, String)> = scope.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:1494:13 [INFO] [stdout] | [INFO] [stdout] 1494 | return false; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1494 - return false; [INFO] [stdout] 1494 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `self.get_methods().get(0).unwrap().get_source().get(0)` [INFO] [stdout] --> src/lib.rs:1506:63 [INFO] [stdout] | [INFO] [stdout] 1506 | let class_indentation: usize = get_indentation_length(self.get_methods().get(0).unwrap().get_source().get(0).unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.get_methods().get(0).unwrap().get_source().first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `self.get_methods().get(0)` [INFO] [stdout] --> src/lib.rs:1506:63 [INFO] [stdout] | [INFO] [stdout] 1506 | let class_indentation: usize = get_indentation_length(self.get_methods().get(0).unwrap().get_source().get(0).unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.get_methods().first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the method `scan` doesn't need a mutable reference [INFO] [stdout] --> src/lib.rs:1527:33 [INFO] [stdout] | [INFO] [stdout] 1527 | method.scan(writer, &mut scope); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 1527 - method.scan(writer, &mut scope); [INFO] [stdout] 1527 + method.scan(writer, &scope); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:1532:9 [INFO] [stdout] | [INFO] [stdout] 1532 | return &self.name; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1532 - return &self.name; [INFO] [stdout] 1532 + &self.name [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:1536:9 [INFO] [stdout] | [INFO] [stdout] 1536 | return &self.parent; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1536 - return &self.parent; [INFO] [stdout] 1536 + &self.parent [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:1540:9 [INFO] [stdout] | [INFO] [stdout] 1540 | return &self.variables; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1540 - return &self.variables; [INFO] [stdout] 1540 + &self.variables [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:1544:9 [INFO] [stdout] | [INFO] [stdout] 1544 | return &self.methods; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1544 - return &self.methods; [INFO] [stdout] 1544 + &self.methods [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:1548:9 [INFO] [stdout] | [INFO] [stdout] 1548 | return &self.classes; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1548 - return &self.classes; [INFO] [stdout] 1548 + &self.classes [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:1589:9 [INFO] [stdout] | [INFO] [stdout] 1589 | return lines; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1589 - return lines; [INFO] [stdout] 1589 + lines [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `lines.get(0)` [INFO] [stdout] --> src/lib.rs:1577:57 [INFO] [stdout] | [INFO] [stdout] 1577 | let indentation: usize = get_indentation_length(lines.get(0).unwrap()) - 4; [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `lines.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/lib.rs:1580:13 [INFO] [stdout] | [INFO] [stdout] 1580 | indentation_str.push_str(" "); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `indentation_str.push(' ')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] = note: `#[warn(clippy::single_char_add_str)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `lines.get(0)` [INFO] [stdout] --> src/lib.rs:1584:48 [INFO] [stdout] | [INFO] [stdout] 1584 | ... let class_definition: Line = Line::new(lines.get(0).unwrap().get_number() - 1, format!("{}class {}({}): [FABICATED LINE]", i... [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `lines.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:1642:9 [INFO] [stdout] | [INFO] [stdout] 1642 | return string; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1642 - return string; [INFO] [stdout] 1642 + string [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/lib.rs:1608:12 [INFO] [stdout] | [INFO] [stdout] 1608 | if self.get_variables().len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.get_variables().is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/lib.rs:1619:12 [INFO] [stdout] | [INFO] [stdout] 1619 | if self.get_methods().len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.get_methods().is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/lib.rs:1630:12 [INFO] [stdout] | [INFO] [stdout] 1630 | if self.get_classes().len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.get_classes().is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:1650:9 [INFO] [stdout] | [INFO] [stdout] 1650 | / return self.get_name() == other.get_name() [INFO] [stdout] 1651 | | && self.get_parent() == other.get_parent() [INFO] [stdout] 1652 | | && self.get_variables() == other.get_variables() [INFO] [stdout] 1653 | | && self.get_methods() == other.get_methods() [INFO] [stdout] 1654 | | && self.get_classes() == other.get_classes(); [INFO] [stdout] | |________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1650 ~ self.get_name() == other.get_name() [INFO] [stdout] 1651 + && self.get_parent() == other.get_parent() [INFO] [stdout] 1652 + && self.get_variables() == other.get_variables() [INFO] [stdout] 1653 + && self.get_methods() == other.get_methods() [INFO] [stdout] 1654 ~ && self.get_classes() == other.get_classes() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:1665:5 [INFO] [stdout] | [INFO] [stdout] 1665 | return indentation_capt.unwrap()["indentation"].to_string().len(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1665 - return indentation_capt.unwrap()["indentation"].to_string().len(); [INFO] [stdout] 1665 + indentation_capt.unwrap()["indentation"].to_string().len() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:1705:22 [INFO] [stdout] | [INFO] [stdout] 1705 | 0 => return None, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1705 - 0 => return None, [INFO] [stdout] 1705 + 0 => None, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:1706:22 [INFO] [stdout] | [INFO] [stdout] 1706 | _ => return Some(modules_vec), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1706 - _ => return Some(modules_vec), [INFO] [stdout] 1706 + _ => Some(modules_vec), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:1737:30 [INFO] [stdout] | [INFO] [stdout] 1737 | 0 => return None, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1737 - 0 => return None, [INFO] [stdout] 1737 + 0 => None, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:1738:30 [INFO] [stdout] | [INFO] [stdout] 1738 | _ => return Some(objects_vec), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1738 - _ => return Some(objects_vec), [INFO] [stdout] 1738 + _ => Some(objects_vec), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:1741:25 [INFO] [stdout] | [INFO] [stdout] 1741 | None => return None [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1741 - None => return None [INFO] [stdout] 1741 + None => None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:1674:66 [INFO] [stdout] | [INFO] [stdout] 1674 | let line_text: String = remove_single_line_comment_from_line(&line); [INFO] [stdout] | ^^^^^ help: change this to: `line` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing last element with `module_split.get(module_split.len() - 1)` [INFO] [stdout] --> src/lib.rs:1686:34 [INFO] [stdout] | [INFO] [stdout] 1686 | modules_vec.push(module_split.get(module_split.len() - 1).unwrap().trim().to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `module_split.last()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_last_with_len [INFO] [stdout] = note: `#[warn(clippy::get_last_with_len)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing last element with `object_split.get(object_split.len() - 1)` [INFO] [stdout] --> src/lib.rs:1718:42 [INFO] [stdout] | [INFO] [stdout] 1718 | objects_vec.push(object_split.get(object_split.len() - 1).unwrap().trim().to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `object_split.last()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_last_with_len [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:1754:20 [INFO] [stdout] | [INFO] [stdout] 1754 | Some(_) => return true, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1754 - Some(_) => return true, [INFO] [stdout] 1754 + Some(_) => true, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:1755:17 [INFO] [stdout] | [INFO] [stdout] 1755 | None => return false [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1755 - None => return false [INFO] [stdout] 1755 + None => false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:1750:66 [INFO] [stdout] | [INFO] [stdout] 1750 | let line_text: String = remove_single_line_comment_from_line(&line); [INFO] [stdout] | ^^^^^ help: change this to: `line` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:1766:20 [INFO] [stdout] | [INFO] [stdout] 1766 | Some(_) => return true, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1766 - Some(_) => return true, [INFO] [stdout] 1766 + Some(_) => true, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:1767:17 [INFO] [stdout] | [INFO] [stdout] 1767 | None => return false [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1767 - None => return false [INFO] [stdout] 1767 + None => false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lib.rs:1786:28 [INFO] [stdout] | [INFO] [stdout] 1786 | if !(prev_char == '\\') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `(prev_char != '\\')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lib.rs:1794:32 [INFO] [stdout] | [INFO] [stdout] 1794 | ... if !(prev_char == '\\') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `(prev_char != '\\')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lib.rs:1807:28 [INFO] [stdout] | [INFO] [stdout] 1807 | if !(prev_char == '\\') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `(prev_char != '\\')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lib.rs:1815:32 [INFO] [stdout] | [INFO] [stdout] 1815 | ... if !(prev_char == '\\') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `(prev_char != '\\')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:1832:5 [INFO] [stdout] | [INFO] [stdout] 1832 | return result; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1832 - return result; [INFO] [stdout] 1832 + result [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:1781:17 [INFO] [stdout] | [INFO] [stdout] 1781 | / if !in_double_quotations { [INFO] [stdout] 1782 | | if index == 0 { [INFO] [stdout] 1783 | | in_single_quotations = !in_single_quotations; [INFO] [stdout] 1784 | | } else if index == 1 { [INFO] [stdout] ... | [INFO] [stdout] 1799 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1780 ~ '\'' [INFO] [stdout] 1781 ~ if !in_double_quotations => { [INFO] [stdout] 1782 | if index == 0 { [INFO] [stdout] ... [INFO] [stdout] 1798 | } [INFO] [stdout] 1799 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:1802:17 [INFO] [stdout] | [INFO] [stdout] 1802 | / if !in_single_quotations { [INFO] [stdout] 1803 | | if index == 0 { [INFO] [stdout] 1804 | | in_double_quotations = !in_double_quotations; [INFO] [stdout] 1805 | | } else if index == 1 { [INFO] [stdout] ... | [INFO] [stdout] 1820 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1801 ~ '\"' [INFO] [stdout] 1802 ~ if !in_single_quotations => { [INFO] [stdout] 1803 | if index == 0 { [INFO] [stdout] ... [INFO] [stdout] 1819 | } [INFO] [stdout] 1820 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:1823:17 [INFO] [stdout] | [INFO] [stdout] 1823 | / if !(in_single_quotations || in_double_quotations) { [INFO] [stdout] 1824 | | return result; [INFO] [stdout] 1825 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1822 ~ '#' [INFO] [stdout] 1823 ~ if !(in_single_quotations || in_double_quotations) => { [INFO] [stdout] 1824 | return result; [INFO] [stdout] 1825 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lib.rs:1793:25 [INFO] [stdout] | [INFO] [stdout] 1793 | / if !(prev_char == '\'' && prev_prev_char == '\'') { [INFO] [stdout] 1794 | | if !(prev_char == '\\') { [INFO] [stdout] 1795 | | in_single_quotations = !in_single_quotations; [INFO] [stdout] 1796 | | } [INFO] [stdout] 1797 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1793 ~ if !(prev_char == '\'' && prev_prev_char == '\'') [INFO] [stdout] 1794 ~ && !(prev_char == '\\') { [INFO] [stdout] 1795 | in_single_quotations = !in_single_quotations; [INFO] [stdout] 1796 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lib.rs:1814:25 [INFO] [stdout] | [INFO] [stdout] 1814 | / if !(prev_char == '\"' && prev_prev_char == '\"') { [INFO] [stdout] 1815 | | if !(prev_char == '\\') { [INFO] [stdout] 1816 | | in_double_quotations = !in_double_quotations; [INFO] [stdout] 1817 | | } [INFO] [stdout] 1818 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1814 ~ if !(prev_char == '\"' && prev_prev_char == '\"') [INFO] [stdout] 1815 ~ && !(prev_char == '\\') { [INFO] [stdout] 1816 | in_double_quotations = !in_double_quotations; [INFO] [stdout] 1817 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:1836:5 [INFO] [stdout] | [INFO] [stdout] 1836 | / return line.get_text().trim_start().starts_with("\"\"\"") [INFO] [stdout] 1837 | | || line.get_text().trim_start().starts_with("\'\'\'"); [INFO] [stdout] | |_____________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1836 ~ line.get_text().trim_start().starts_with("\"\"\"") [INFO] [stdout] 1837 ~ || line.get_text().trim_start().starts_with("\'\'\'") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:1852:5 [INFO] [stdout] | [INFO] [stdout] 1852 | return condition1 || condition2; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1852 - return condition1 || condition2; [INFO] [stdout] 1852 + condition1 || condition2 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:1844:72 [INFO] [stdout] | [INFO] [stdout] 1844 | let text_no_comment: String = remove_single_line_comment_from_line(&line); [INFO] [stdout] | ^^^^^ help: change this to: `line` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:1903:5 [INFO] [stdout] | [INFO] [stdout] 1903 | return result; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1903 - return result; [INFO] [stdout] 1903 + result [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:1895:50 [INFO] [stdout] | [INFO] [stdout] 1895 | if result.get("check").unwrap().contains(&value) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:1926:5 [INFO] [stdout] | [INFO] [stdout] 1926 | return result; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1926 - return result; [INFO] [stdout] 1926 + result [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:1949:5 [INFO] [stdout] | [INFO] [stdout] 1949 | return result; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1949 - return result; [INFO] [stdout] 1949 + result [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:1987:5 [INFO] [stdout] | [INFO] [stdout] 1987 | return result; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1987 - return result; [INFO] [stdout] 1987 + result [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/lib.rs:1960:12 [INFO] [stdout] | [INFO] [stdout] 1960 | if let Some(_) = capt { [INFO] [stdout] | -------^^^^^^^------- help: try: `if capt.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lib.rs:1976:9 [INFO] [stdout] | [INFO] [stdout] 1976 | / if index != 0 && value.len() == 1 { [INFO] [stdout] 1977 | | if value.get(0).unwrap() == subelement { [INFO] [stdout] 1978 | | continue; [INFO] [stdout] 1979 | | } [INFO] [stdout] 1980 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1976 ~ if index != 0 && value.len() == 1 [INFO] [stdout] 1977 ~ && value.get(0).unwrap() == subelement { [INFO] [stdout] 1978 | continue; [INFO] [stdout] 1979 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `value.get(0)` [INFO] [stdout] --> src/lib.rs:1977:16 [INFO] [stdout] | [INFO] [stdout] 1977 | if value.get(0).unwrap() == subelement { [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `value.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert` to construct default value [INFO] [stdout] --> src/lib.rs:1983:51 [INFO] [stdout] | [INFO] [stdout] 1983 | result.entry("check".to_string()).or_insert(Vec::new()).push(string); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:2009:5 [INFO] [stdout] | [INFO] [stdout] 2009 | return result; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 2009 - return result; [INFO] [stdout] 2009 + result [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:2519:5 [INFO] [stdout] | [INFO] [stdout] 2519 | return result; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 2519 - return result; [INFO] [stdout] 2519 + result [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lib.rs:2052:17 [INFO] [stdout] | [INFO] [stdout] 2052 | / if in_single_quotations || in_double_quotations { [INFO] [stdout] 2053 | | if !space_added { [INFO] [stdout] 2054 | | string_single_spaces.push(c); [INFO] [stdout] 2055 | | space_added = true; [INFO] [stdout] 2056 | | } [INFO] [stdout] 2057 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2052 ~ if (in_single_quotations || in_double_quotations) { [INFO] [stdout] 2053 ~ && !space_added { [INFO] [stdout] 2054 | string_single_spaces.push(c); [INFO] [stdout] 2055 | space_added = true; [INFO] [stdout] 2056 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:2086:17 [INFO] [stdout] | [INFO] [stdout] 2086 | / if !(in_single_quotations || in_double_quotations) { [INFO] [stdout] 2087 | | // Check if the previous and next character are not both \w characters. If they are, do not remove the space. [INFO] [stdout] 2088 | | if index == 0 { [INFO] [stdout] 2089 | | continue; [INFO] [stdout] ... | [INFO] [stdout] 2123 | | string_no_spaces.push(c); [INFO] [stdout] 2124 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2085 ~ ' ' [INFO] [stdout] 2086 ~ if !(in_single_quotations || in_double_quotations) => { [INFO] [stdout] 2087 | // Check if the previous and next character are not both \w characters. If they are, do not remove the space. [INFO] [stdout] ... [INFO] [stdout] 2121 | } [INFO] [stdout] 2122 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lib.rs:2095:21 [INFO] [stdout] | [INFO] [stdout] 2095 | / match prev_char { [INFO] [stdout] 2096 | | Some(a) => { [INFO] [stdout] 2097 | | match next_char { [INFO] [stdout] 2098 | | Some(b) => { [INFO] [stdout] ... | [INFO] [stdout] 2120 | | None => () [INFO] [stdout] 2121 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 2095 ~ if let Some(a) = prev_char { [INFO] [stdout] 2096 + match next_char { [INFO] [stdout] 2097 + Some(b) => { [INFO] [stdout] 2098 + let re = Regex::new(r"^\w$").unwrap(); [INFO] [stdout] 2099 + let a_str = &a.to_string(); [INFO] [stdout] 2100 + let b_str = &b.to_string(); [INFO] [stdout] 2101 + let capt_a = re.captures(a_str); [INFO] [stdout] 2102 + let capt_b = re.captures(b_str); [INFO] [stdout] 2103 + [INFO] [stdout] 2104 + match capt_a { [INFO] [stdout] 2105 + Some(_) => { [INFO] [stdout] 2106 + match capt_b { [INFO] [stdout] 2107 + Some(_) => { [INFO] [stdout] 2108 + string_no_spaces.push(c); [INFO] [stdout] 2109 + }, [INFO] [stdout] 2110 + None => () [INFO] [stdout] 2111 + } [INFO] [stdout] 2112 + }, [INFO] [stdout] 2113 + None => () [INFO] [stdout] 2114 + } [INFO] [stdout] 2115 + }, [INFO] [stdout] 2116 + None => () [INFO] [stdout] 2117 + } [INFO] [stdout] 2118 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lib.rs:2097:29 [INFO] [stdout] | [INFO] [stdout] 2097 | / ... match next_char { [INFO] [stdout] 2098 | | ... Some(b) => { [INFO] [stdout] 2099 | | ... let re = Regex::new(r"^\w$").unwrap(); [INFO] [stdout] 2100 | | ... let a_str = &a.to_string(); [INFO] [stdout] ... | [INFO] [stdout] 2117 | | ... None => () [INFO] [stdout] 2118 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 2097 ~ if let Some(b) = next_char { [INFO] [stdout] 2098 + let re = Regex::new(r"^\w$").unwrap(); [INFO] [stdout] 2099 + let a_str = &a.to_string(); [INFO] [stdout] 2100 + let b_str = &b.to_string(); [INFO] [stdout] 2101 + let capt_a = re.captures(a_str); [INFO] [stdout] 2102 + let capt_b = re.captures(b_str); [INFO] [stdout] 2103 + [INFO] [stdout] 2104 + match capt_a { [INFO] [stdout] 2105 + Some(_) => { [INFO] [stdout] 2106 + match capt_b { [INFO] [stdout] 2107 + Some(_) => { [INFO] [stdout] 2108 + string_no_spaces.push(c); [INFO] [stdout] 2109 + }, [INFO] [stdout] 2110 + None => () [INFO] [stdout] 2111 + } [INFO] [stdout] 2112 + }, [INFO] [stdout] 2113 + None => () [INFO] [stdout] 2114 + } [INFO] [stdout] 2115 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: compiling a regex in a loop [INFO] [stdout] --> src/lib.rs:2099:46 [INFO] [stdout] | [INFO] [stdout] 2099 | ... let re = Regex::new(r"^\w$").unwrap(); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: move the regex construction outside this loop [INFO] [stdout] --> src/lib.rs:2071:5 [INFO] [stdout] | [INFO] [stdout] 2071 | for (index, c) in element.chars().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#regex_creation_in_loops [INFO] [stdout] = note: `#[warn(clippy::regex_creation_in_loops)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lib.rs:2105:37 [INFO] [stdout] | [INFO] [stdout] 2105 | / ... match capt_a { [INFO] [stdout] 2106 | | ... Some(_) => { [INFO] [stdout] 2107 | | ... match capt_b { [INFO] [stdout] 2108 | | ... Some(_) => { [INFO] [stdout] ... | [INFO] [stdout] 2114 | | ... None => () [INFO] [stdout] 2115 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 2105 ~ if let Some(_) = capt_a { [INFO] [stdout] 2106 + match capt_b { [INFO] [stdout] 2107 + Some(_) => { [INFO] [stdout] 2108 + string_no_spaces.push(c); [INFO] [stdout] 2109 + }, [INFO] [stdout] 2110 + None => () [INFO] [stdout] 2111 + } [INFO] [stdout] 2112 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lib.rs:2107:45 [INFO] [stdout] | [INFO] [stdout] 2107 | / ... match capt_b { [INFO] [stdout] 2108 | | ... Some(_) => { [INFO] [stdout] 2109 | | ... string_no_spaces.push(c); [INFO] [stdout] 2110 | | ... }, [INFO] [stdout] 2111 | | ... None => () [INFO] [stdout] 2112 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 2107 ~ if let Some(_) = capt_b { [INFO] [stdout] 2108 + string_no_spaces.push(c); [INFO] [stdout] 2109 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/lib.rs:2178:12 [INFO] [stdout] | [INFO] [stdout] 2178 | if let Some(_) = capt { [INFO] [stdout] | -------^^^^^^^------- help: try: `if capt.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `split_by_dot.get(0)` [INFO] [stdout] --> src/lib.rs:2211:9 [INFO] [stdout] | [INFO] [stdout] 2211 | if (split_by_dot.get(0).unwrap() != &string_no_spaces || split_by_dot.len() > 1) && !string_contains_arithmetic { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `split_by_dot.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:2307:17 [INFO] [stdout] | [INFO] [stdout] 2307 | / ... if !(in_single_quotations || in_double_quotations || bracket_depth > 0 || square_bracket_depth > 0 || curly_bracket_depth ... [INFO] [stdout] 2308 | | ... if !parts.contains(¤t_string) { [INFO] [stdout] 2309 | | ... parts.push(current_string); [INFO] [stdout] ... | [INFO] [stdout] 2313 | | ... current_string.push(c); [INFO] [stdout] 2314 | | ... } [INFO] [stdout] | |_______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2306 ~ '+'|'-'|'%'|'^'|'&'|'|' [INFO] [stdout] 2307 ~ if !(in_single_quotations || in_double_quotations || bracket_depth > 0 || square_bracket_depth > 0 || curly_bracket_depth > 0) => { [INFO] [stdout] 2308 | if !parts.contains(¤t_string) { [INFO] [stdout] ... [INFO] [stdout] 2311 | current_string = "".to_string(); [INFO] [stdout] 2312 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:2318:17 [INFO] [stdout] | [INFO] [stdout] 2318 | / ... if !(in_single_quotations || in_double_quotations || bracket_depth > 0 || square_bracket_depth > 0 || curly_bracket_depth ... [INFO] [stdout] 2319 | | ... if index < string_no_spaces.len() - 1 { [INFO] [stdout] 2320 | | ... let next_char: char = string_no_spaces.chars().nth(index + 1).unwrap(); [INFO] [stdout] 2321 | | ... if next_char == '*' || next_char == '/' { [INFO] [stdout] ... | [INFO] [stdout] 2334 | | ... current_string.push(c); [INFO] [stdout] 2335 | | ... } [INFO] [stdout] | |_______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2316 ~ '*'|'/' [INFO] [stdout] 2317 | // Check if next character is * or /. [INFO] [stdout] 2318 ~ if !(in_single_quotations || in_double_quotations || bracket_depth > 0 || square_bracket_depth > 0 || curly_bracket_depth > 0) => { [INFO] [stdout] 2319 | if index < string_no_spaces.len() - 1 { [INFO] [stdout] ... [INFO] [stdout] 2332 | current_string = "".to_string(); [INFO] [stdout] 2333 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:2339:17 [INFO] [stdout] | [INFO] [stdout] 2339 | / ... if !(in_single_quotations || in_double_quotations || bracket_depth > 0 || square_bracket_depth > 0 || curly_bracket_depth ... [INFO] [stdout] 2340 | | ... if !parts.contains(¤t_string) { [INFO] [stdout] 2341 | | ... parts.push(current_string); [INFO] [stdout] ... | [INFO] [stdout] 2355 | | ... current_string.push(c); [INFO] [stdout] 2356 | | ... } [INFO] [stdout] | |_______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2337 ~ '<'|'>'|'!'|'=' [INFO] [stdout] 2338 | // Check if the next character is '='. [INFO] [stdout] 2339 ~ if !(in_single_quotations || in_double_quotations || bracket_depth > 0 || square_bracket_depth > 0 || curly_bracket_depth > 0) => { [INFO] [stdout] 2340 | if !parts.contains(¤t_string) { [INFO] [stdout] ... [INFO] [stdout] 2353 | } [INFO] [stdout] 2354 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:2360:17 [INFO] [stdout] | [INFO] [stdout] 2360 | / ... if !(in_single_quotations || in_double_quotations || bracket_depth > 0 || square_bracket_depth > 0 || curly_bracket_depth ... [INFO] [stdout] 2361 | | ... let mut prev_char: Option = Some('?'); [INFO] [stdout] 2362 | | ... if index > 0 { [INFO] [stdout] 2363 | | ... prev_char = string_no_spaces.chars().nth(index - 1); [INFO] [stdout] ... | [INFO] [stdout] 2419 | | ... current_string.push(c); [INFO] [stdout] 2420 | | ... } [INFO] [stdout] | |_______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2358 ~ 'a' [INFO] [stdout] 2359 | // Check if the next characters are 'nd' and the 'and' is surrounded by non-word characters. [INFO] [stdout] 2360 ~ if !(in_single_quotations || in_double_quotations || bracket_depth > 0 || square_bracket_depth > 0 || curly_bracket_depth > 0) => { [INFO] [stdout] 2361 | let mut prev_char: Option = Some('?'); [INFO] [stdout] ... [INFO] [stdout] 2417 | } [INFO] [stdout] 2418 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:2424:17 [INFO] [stdout] | [INFO] [stdout] 2424 | / ... if !(in_single_quotations || in_double_quotations || bracket_depth > 0 || square_bracket_depth > 0 || curly_bracket_depth ... [INFO] [stdout] 2425 | | ... let mut prev_char: Option = Some('?'); [INFO] [stdout] 2426 | | ... if index > 0 { [INFO] [stdout] 2427 | | ... prev_char = string_no_spaces.chars().nth(index - 1); [INFO] [stdout] ... | [INFO] [stdout] 2475 | | ... current_string.push(c); [INFO] [stdout] 2476 | | ... } [INFO] [stdout] | |_______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2422 ~ 'o' [INFO] [stdout] 2423 | // Check if the next character is 'r' and the 'or' is surrounded by non-word characters. [INFO] [stdout] 2424 ~ if !(in_single_quotations || in_double_quotations || bracket_depth > 0 || square_bracket_depth > 0 || curly_bracket_depth > 0) => { [INFO] [stdout] 2425 | let mut prev_char: Option = Some('?'); [INFO] [stdout] ... [INFO] [stdout] 2473 | } [INFO] [stdout] 2474 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lib.rs:2253:17 [INFO] [stdout] | [INFO] [stdout] 2253 | / if !(in_single_quotations || in_double_quotations) { [INFO] [stdout] 2254 | | if square_bracket_depth == 0 && curly_bracket_depth == 0 { [INFO] [stdout] 2255 | | bracket_depth += 1; [INFO] [stdout] 2256 | | } [INFO] [stdout] 2257 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2253 ~ if !(in_single_quotations || in_double_quotations) [INFO] [stdout] 2254 ~ && square_bracket_depth == 0 && curly_bracket_depth == 0 { [INFO] [stdout] 2255 | bracket_depth += 1; [INFO] [stdout] 2256 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lib.rs:2261:17 [INFO] [stdout] | [INFO] [stdout] 2261 | / if !(in_single_quotations || in_double_quotations) { [INFO] [stdout] 2262 | | if square_bracket_depth == 0 && curly_bracket_depth == 0 { [INFO] [stdout] 2263 | | if bracket_depth > 0 { [INFO] [stdout] 2264 | | bracket_depth -= 1; [INFO] [stdout] ... | [INFO] [stdout] 2267 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2261 ~ if !(in_single_quotations || in_double_quotations) [INFO] [stdout] 2262 ~ && square_bracket_depth == 0 && curly_bracket_depth == 0 { [INFO] [stdout] 2263 | if bracket_depth > 0 { [INFO] [stdout] 2264 | bracket_depth -= 1; [INFO] [stdout] 2265 | } [INFO] [stdout] 2266 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lib.rs:2262:21 [INFO] [stdout] | [INFO] [stdout] 2262 | / if square_bracket_depth == 0 && curly_bracket_depth == 0 { [INFO] [stdout] 2263 | | if bracket_depth > 0 { [INFO] [stdout] 2264 | | bracket_depth -= 1; [INFO] [stdout] 2265 | | } [INFO] [stdout] 2266 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2262 ~ if square_bracket_depth == 0 && curly_bracket_depth == 0 [INFO] [stdout] 2263 ~ && bracket_depth > 0 { [INFO] [stdout] 2264 | bracket_depth -= 1; [INFO] [stdout] 2265 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lib.rs:2271:17 [INFO] [stdout] | [INFO] [stdout] 2271 | / if !(in_single_quotations || in_double_quotations) { [INFO] [stdout] 2272 | | if bracket_depth == 0 && curly_bracket_depth == 0 { [INFO] [stdout] 2273 | | square_bracket_depth += 1; [INFO] [stdout] 2274 | | } [INFO] [stdout] 2275 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2271 ~ if !(in_single_quotations || in_double_quotations) [INFO] [stdout] 2272 ~ && bracket_depth == 0 && curly_bracket_depth == 0 { [INFO] [stdout] 2273 | square_bracket_depth += 1; [INFO] [stdout] 2274 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lib.rs:2279:17 [INFO] [stdout] | [INFO] [stdout] 2279 | / if !(in_single_quotations || in_double_quotations) { [INFO] [stdout] 2280 | | if bracket_depth == 0 && curly_bracket_depth == 0 { [INFO] [stdout] 2281 | | if square_bracket_depth > 0 { [INFO] [stdout] 2282 | | square_bracket_depth -= 1; [INFO] [stdout] ... | [INFO] [stdout] 2285 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2279 ~ if !(in_single_quotations || in_double_quotations) [INFO] [stdout] 2280 ~ && bracket_depth == 0 && curly_bracket_depth == 0 { [INFO] [stdout] 2281 | if square_bracket_depth > 0 { [INFO] [stdout] 2282 | square_bracket_depth -= 1; [INFO] [stdout] 2283 | } [INFO] [stdout] 2284 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lib.rs:2280:21 [INFO] [stdout] | [INFO] [stdout] 2280 | / if bracket_depth == 0 && curly_bracket_depth == 0 { [INFO] [stdout] 2281 | | if square_bracket_depth > 0 { [INFO] [stdout] 2282 | | square_bracket_depth -= 1; [INFO] [stdout] 2283 | | } [INFO] [stdout] 2284 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2280 ~ if bracket_depth == 0 && curly_bracket_depth == 0 [INFO] [stdout] 2281 ~ && square_bracket_depth > 0 { [INFO] [stdout] 2282 | square_bracket_depth -= 1; [INFO] [stdout] 2283 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lib.rs:2289:17 [INFO] [stdout] | [INFO] [stdout] 2289 | / if !(in_single_quotations || in_double_quotations) { [INFO] [stdout] 2290 | | if bracket_depth == 0 && square_bracket_depth == 0 { [INFO] [stdout] 2291 | | curly_bracket_depth += 1; [INFO] [stdout] 2292 | | } [INFO] [stdout] 2293 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2289 ~ if !(in_single_quotations || in_double_quotations) [INFO] [stdout] 2290 ~ && bracket_depth == 0 && square_bracket_depth == 0 { [INFO] [stdout] 2291 | curly_bracket_depth += 1; [INFO] [stdout] 2292 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lib.rs:2297:17 [INFO] [stdout] | [INFO] [stdout] 2297 | / if !(in_single_quotations || in_double_quotations) { [INFO] [stdout] 2298 | | if bracket_depth == 0 && square_bracket_depth == 0 { [INFO] [stdout] 2299 | | if curly_bracket_depth > 0 { [INFO] [stdout] 2300 | | curly_bracket_depth -= 1; [INFO] [stdout] ... | [INFO] [stdout] 2303 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2297 ~ if !(in_single_quotations || in_double_quotations) [INFO] [stdout] 2298 ~ && bracket_depth == 0 && square_bracket_depth == 0 { [INFO] [stdout] 2299 | if curly_bracket_depth > 0 { [INFO] [stdout] 2300 | curly_bracket_depth -= 1; [INFO] [stdout] 2301 | } [INFO] [stdout] 2302 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lib.rs:2298:21 [INFO] [stdout] | [INFO] [stdout] 2298 | / if bracket_depth == 0 && square_bracket_depth == 0 { [INFO] [stdout] 2299 | | if curly_bracket_depth > 0 { [INFO] [stdout] 2300 | | curly_bracket_depth -= 1; [INFO] [stdout] 2301 | | } [INFO] [stdout] 2302 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2298 ~ if bracket_depth == 0 && square_bracket_depth == 0 [INFO] [stdout] 2299 ~ && curly_bracket_depth > 0 { [INFO] [stdout] 2300 | curly_bracket_depth -= 1; [INFO] [stdout] 2301 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:2348:29 [INFO] [stdout] | [INFO] [stdout] 2348 | / ... if a == '=' { [INFO] [stdout] 2349 | | ... chars_to_skip += 1; [INFO] [stdout] 2350 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2347 ~ Some(a) [INFO] [stdout] 2348 ~ if a == '=' => { [INFO] [stdout] 2349 | chars_to_skip += 1; [INFO] [stdout] 2350 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lib.rs:2346:21 [INFO] [stdout] | [INFO] [stdout] 2346 | / match next_char { [INFO] [stdout] 2347 | | Some(a) => { [INFO] [stdout] 2348 | | if a == '=' { [INFO] [stdout] 2349 | | chars_to_skip += 1; [INFO] [stdout] ... | [INFO] [stdout] 2352 | | None => () [INFO] [stdout] 2353 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 2346 ~ if let Some(a) = next_char { [INFO] [stdout] 2347 + if a == '=' { [INFO] [stdout] 2348 + chars_to_skip += 1; [INFO] [stdout] 2349 + } [INFO] [stdout] 2350 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: compiling a regex in a loop [INFO] [stdout] --> src/lib.rs:2368:44 [INFO] [stdout] | [INFO] [stdout] 2368 | let re_not_word_char = Regex::new(r"^\W$").unwrap(); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: move the regex construction outside this loop [INFO] [stdout] --> src/lib.rs:2234:5 [INFO] [stdout] | [INFO] [stdout] 2234 | for (index, c) in string_no_spaces.chars().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#regex_creation_in_loops [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:2377:45 [INFO] [stdout] | [INFO] [stdout] 2377 | / ... if nc == 'n' && nnc == 'd' { [INFO] [stdout] 2378 | | ... match next_next_next_char { [INFO] [stdout] 2379 | | ... Some(nnnc) => { [INFO] [stdout] 2380 | | ... let nnnc_string: String = nnnc.to_string(); [INFO] [stdout] ... | [INFO] [stdout] 2401 | | ... current_string.push(c); [INFO] [stdout] 2402 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2376 ~ Some(nnc) [INFO] [stdout] 2377 ~ if nc == 'n' && nnc == 'd' => { [INFO] [stdout] 2378 | match next_next_next_char { [INFO] [stdout] ... [INFO] [stdout] 2399 | } [INFO] [stdout] 2400 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/lib.rs:2382:64 [INFO] [stdout] | [INFO] [stdout] 2382 | ... if let Some(_) = pc_not_word_char { [INFO] [stdout] | -------^^^^^^^------------------- help: try: `if pc_not_word_char.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/lib.rs:2383:68 [INFO] [stdout] | [INFO] [stdout] 2383 | ... if let Some(_) = nnnc_not_word_char { [INFO] [stdout] | -------^^^^^^^--------------------- help: try: `if nnnc_not_word_char.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: compiling a regex in a loop [INFO] [stdout] --> src/lib.rs:2431:44 [INFO] [stdout] | [INFO] [stdout] 2431 | let re_not_word_char = Regex::new(r"^\W$").unwrap(); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: move the regex construction outside this loop [INFO] [stdout] --> src/lib.rs:2234:5 [INFO] [stdout] | [INFO] [stdout] 2234 | for (index, c) in string_no_spaces.chars().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#regex_creation_in_loops [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:2438:37 [INFO] [stdout] | [INFO] [stdout] 2438 | / ... if nc == 'r' { [INFO] [stdout] 2439 | | ... match next_next_char { [INFO] [stdout] 2440 | | ... Some(nnc) => { [INFO] [stdout] 2441 | | ... let nnc_string: String = nnc.to_string(); [INFO] [stdout] ... | [INFO] [stdout] 2462 | | ... current_string.push(c); [INFO] [stdout] 2463 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2437 ~ Some(nc) [INFO] [stdout] 2438 ~ if nc == 'r' => { [INFO] [stdout] 2439 | match next_next_char { [INFO] [stdout] ... [INFO] [stdout] 2460 | } [INFO] [stdout] 2461 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/lib.rs:2443:56 [INFO] [stdout] | [INFO] [stdout] 2443 | ... if let Some(_) = pc_not_word_char { [INFO] [stdout] | -------^^^^^^^------------------- help: try: `if pc_not_word_char.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/lib.rs:2444:60 [INFO] [stdout] | [INFO] [stdout] 2444 | ... if let Some(_) = nnc_not_word_char { [INFO] [stdout] | -------^^^^^^^-------------------- help: try: `if nnc_not_word_char.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lib.rs:2483:5 [INFO] [stdout] | [INFO] [stdout] 2483 | / if parts.len() > 0 { [INFO] [stdout] 2484 | | if !parts.contains(¤t_string) { [INFO] [stdout] 2485 | | parts.push(current_string); [INFO] [stdout] 2486 | | } [INFO] [stdout] 2487 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2483 ~ if parts.len() > 0 [INFO] [stdout] 2484 ~ && !parts.contains(¤t_string) { [INFO] [stdout] 2485 | parts.push(current_string); [INFO] [stdout] 2486 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/lib.rs:2483:8 [INFO] [stdout] | [INFO] [stdout] 2483 | if parts.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!parts.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/lib.rs:2491:12 [INFO] [stdout] | [INFO] [stdout] 2491 | if part == "" { [INFO] [stdout] | ^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `part.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] = note: `#[warn(clippy::comparison_to_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:2495:28 [INFO] [stdout] | [INFO] [stdout] 2495 | if result.contains(&part) { [INFO] [stdout] | ^^^^^ help: change this to: `part` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:2590:5 [INFO] [stdout] | [INFO] [stdout] 2590 | return false; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 2590 - return false; [INFO] [stdout] 2590 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:2530:21 [INFO] [stdout] | [INFO] [stdout] 2530 | / if !in_double_quotations { [INFO] [stdout] 2531 | | in_single_quotations = !in_single_quotations; [INFO] [stdout] 2532 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2529 ~ '\'' [INFO] [stdout] 2530 ~ if !in_double_quotations => { [INFO] [stdout] 2531 | in_single_quotations = !in_single_quotations; [INFO] [stdout] 2532 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:2535:21 [INFO] [stdout] | [INFO] [stdout] 2535 | / if !in_single_quotations { [INFO] [stdout] 2536 | | in_double_quotations = !in_double_quotations; [INFO] [stdout] 2537 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2534 ~ '\"' [INFO] [stdout] 2535 ~ if !in_single_quotations => { [INFO] [stdout] 2536 | in_double_quotations = !in_double_quotations; [INFO] [stdout] 2537 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:2540:21 [INFO] [stdout] | [INFO] [stdout] 2540 | / if !(in_single_quotations || in_double_quotations) { [INFO] [stdout] 2541 | | bracket_level += 1; [INFO] [stdout] 2542 | | if index != 0 && bracket_level == 1 { [INFO] [stdout] 2543 | | return false; [INFO] [stdout] 2544 | | } [INFO] [stdout] 2545 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2539 ~ '(' [INFO] [stdout] 2540 ~ if !(in_single_quotations || in_double_quotations) => { [INFO] [stdout] 2541 | bracket_level += 1; [INFO] [stdout] ... [INFO] [stdout] 2544 | } [INFO] [stdout] 2545 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:2548:21 [INFO] [stdout] | [INFO] [stdout] 2548 | / if !(in_single_quotations || in_double_quotations) { [INFO] [stdout] 2549 | | bracket_level -= 1; [INFO] [stdout] 2550 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2547 ~ ')' [INFO] [stdout] 2548 ~ if !(in_single_quotations || in_double_quotations) => { [INFO] [stdout] 2549 | bracket_level -= 1; [INFO] [stdout] 2550 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:2563:21 [INFO] [stdout] | [INFO] [stdout] 2563 | / if !in_double_quotations { [INFO] [stdout] 2564 | | in_single_quotations = !in_single_quotations; [INFO] [stdout] 2565 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2562 ~ '\'' [INFO] [stdout] 2563 ~ if !in_double_quotations => { [INFO] [stdout] 2564 | in_single_quotations = !in_single_quotations; [INFO] [stdout] 2565 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:2568:21 [INFO] [stdout] | [INFO] [stdout] 2568 | / if !in_single_quotations { [INFO] [stdout] 2569 | | in_double_quotations = !in_double_quotations; [INFO] [stdout] 2570 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2567 ~ '\"' [INFO] [stdout] 2568 ~ if !in_single_quotations => { [INFO] [stdout] 2569 | in_double_quotations = !in_double_quotations; [INFO] [stdout] 2570 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:2573:21 [INFO] [stdout] | [INFO] [stdout] 2573 | / if !(in_single_quotations || in_double_quotations) { [INFO] [stdout] 2574 | | bracket_level += 1; [INFO] [stdout] 2575 | | if index != 0 && bracket_level == 1 { [INFO] [stdout] 2576 | | return false; [INFO] [stdout] 2577 | | } [INFO] [stdout] 2578 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2572 ~ '[' [INFO] [stdout] 2573 ~ if !(in_single_quotations || in_double_quotations) => { [INFO] [stdout] 2574 | bracket_level += 1; [INFO] [stdout] ... [INFO] [stdout] 2577 | } [INFO] [stdout] 2578 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:2581:21 [INFO] [stdout] | [INFO] [stdout] 2581 | / if !(in_single_quotations || in_double_quotations) { [INFO] [stdout] 2582 | | bracket_level -= 1; [INFO] [stdout] 2583 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2580 ~ ']' [INFO] [stdout] 2581 ~ if !(in_single_quotations || in_double_quotations) => { [INFO] [stdout] 2582 | bracket_level -= 1; [INFO] [stdout] 2583 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:2667:5 [INFO] [stdout] | [INFO] [stdout] 2667 | / return (in_single_quotations_true_count == 1 && !in_single_quotations) [INFO] [stdout] 2668 | | || (in_double_quotations_true_count == 1 && !in_double_quotations) [INFO] [stdout] 2669 | | || (in_multiline_single_quotations_true_count == 1 && !in_multiline_single_quotations) [INFO] [stdout] 2670 | | || (in_multiline_double_quotations_true_count == 1 && !in_multiline_double_quotations); [INFO] [stdout] | |______________________________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 2667 ~ (in_single_quotations_true_count == 1 && !in_single_quotations) [INFO] [stdout] 2668 + || (in_double_quotations_true_count == 1 && !in_double_quotations) [INFO] [stdout] 2669 + || (in_multiline_single_quotations_true_count == 1 && !in_multiline_single_quotations) [INFO] [stdout] 2670 ~ || (in_multiline_double_quotations_true_count == 1 && !in_multiline_double_quotations) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:2614:17 [INFO] [stdout] | [INFO] [stdout] 2614 | / if !(in_double_quotations || in_multiline_double_quotations) { [INFO] [stdout] 2615 | | if index >= 2 { [INFO] [stdout] 2616 | | let prev_char = string.chars().nth(index - 1).unwrap(); [INFO] [stdout] 2617 | | let prev_prev_char = string.chars().nth(index - 2).unwrap(); [INFO] [stdout] ... | [INFO] [stdout] 2636 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2613 ~ '\'' [INFO] [stdout] 2614 ~ if !(in_double_quotations || in_multiline_double_quotations) => { [INFO] [stdout] 2615 | if index >= 2 { [INFO] [stdout] ... [INFO] [stdout] 2635 | } [INFO] [stdout] 2636 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:2639:17 [INFO] [stdout] | [INFO] [stdout] 2639 | / if !(in_single_quotations || in_multiline_single_quotations) { [INFO] [stdout] 2640 | | if index >= 2 { [INFO] [stdout] 2641 | | let prev_char = string.chars().nth(index - 1).unwrap(); [INFO] [stdout] 2642 | | let prev_prev_char = string.chars().nth(index - 2).unwrap(); [INFO] [stdout] ... | [INFO] [stdout] 2661 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2638 ~ '\"' [INFO] [stdout] 2639 ~ if !(in_single_quotations || in_multiline_single_quotations) => { [INFO] [stdout] 2640 | if index >= 2 { [INFO] [stdout] ... [INFO] [stdout] 2660 | } [INFO] [stdout] 2661 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:2727:5 [INFO] [stdout] | [INFO] [stdout] 2727 | return true; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 2727 - return true; [INFO] [stdout] 2727 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lib.rs:2677:5 [INFO] [stdout] | [INFO] [stdout] 2677 | / match capt { [INFO] [stdout] 2678 | | None => return false, [INFO] [stdout] 2679 | | Some(_) => (), [INFO] [stdout] 2680 | | } [INFO] [stdout] | |_____^ help: try: `if let None = capt { return false }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:2710:17 [INFO] [stdout] | [INFO] [stdout] 2710 | / if !(in_single_quotations || in_double_quotations) { [INFO] [stdout] 2711 | | in_brackets_depth += 1; [INFO] [stdout] 2712 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2709 ~ '(' [INFO] [stdout] 2710 ~ if !(in_single_quotations || in_double_quotations) => { [INFO] [stdout] 2711 | in_brackets_depth += 1; [INFO] [stdout] 2712 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:2715:17 [INFO] [stdout] | [INFO] [stdout] 2715 | / if !(in_single_quotations || in_double_quotations) { [INFO] [stdout] 2716 | | in_brackets_depth -= 1; [INFO] [stdout] 2717 | | if in_brackets_depth == 0 { [INFO] [stdout] 2718 | | if index != string.len() - 1 { [INFO] [stdout] ... | [INFO] [stdout] 2722 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2714 ~ ')' [INFO] [stdout] 2715 ~ if !(in_single_quotations || in_double_quotations) => { [INFO] [stdout] 2716 | in_brackets_depth -= 1; [INFO] [stdout] ... [INFO] [stdout] 2721 | } [INFO] [stdout] 2722 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lib.rs:2717:21 [INFO] [stdout] | [INFO] [stdout] 2717 | / if in_brackets_depth == 0 { [INFO] [stdout] 2718 | | if index != string.len() - 1 { [INFO] [stdout] 2719 | | return false; [INFO] [stdout] 2720 | | } [INFO] [stdout] 2721 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2717 ~ if in_brackets_depth == 0 [INFO] [stdout] 2718 ~ && index != string.len() - 1 { [INFO] [stdout] 2719 | return false; [INFO] [stdout] 2720 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:2784:5 [INFO] [stdout] | [INFO] [stdout] 2784 | return true; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 2784 - return true; [INFO] [stdout] 2784 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lib.rs:2734:5 [INFO] [stdout] | [INFO] [stdout] 2734 | / match capt { [INFO] [stdout] 2735 | | None => return false, [INFO] [stdout] 2736 | | Some(_) => (), [INFO] [stdout] 2737 | | } [INFO] [stdout] | |_____^ help: try: `if let None = capt { return false }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:2767:17 [INFO] [stdout] | [INFO] [stdout] 2767 | / if !(in_single_quotations || in_double_quotations) { [INFO] [stdout] 2768 | | in_brackets_depth += 1; [INFO] [stdout] 2769 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2766 ~ '[' [INFO] [stdout] 2767 ~ if !(in_single_quotations || in_double_quotations) => { [INFO] [stdout] 2768 | in_brackets_depth += 1; [INFO] [stdout] 2769 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:2772:17 [INFO] [stdout] | [INFO] [stdout] 2772 | / if !(in_single_quotations || in_double_quotations) { [INFO] [stdout] 2773 | | in_brackets_depth -= 1; [INFO] [stdout] 2774 | | if in_brackets_depth == 0 { [INFO] [stdout] 2775 | | if index != string.len() - 1 { [INFO] [stdout] ... | [INFO] [stdout] 2779 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2771 ~ ']' [INFO] [stdout] 2772 ~ if !(in_single_quotations || in_double_quotations) => { [INFO] [stdout] 2773 | in_brackets_depth -= 1; [INFO] [stdout] ... [INFO] [stdout] 2778 | } [INFO] [stdout] 2779 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lib.rs:2774:21 [INFO] [stdout] | [INFO] [stdout] 2774 | / if in_brackets_depth == 0 { [INFO] [stdout] 2775 | | if index != string.len() - 1 { [INFO] [stdout] 2776 | | return false; [INFO] [stdout] 2777 | | } [INFO] [stdout] 2778 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2774 ~ if in_brackets_depth == 0 [INFO] [stdout] 2775 ~ && index != string.len() - 1 { [INFO] [stdout] 2776 | return false; [INFO] [stdout] 2777 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:2861:5 [INFO] [stdout] | [INFO] [stdout] 2861 | return false; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 2861 - return false; [INFO] [stdout] 2861 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:2802:17 [INFO] [stdout] | [INFO] [stdout] 2802 | / if !in_double_quotations { [INFO] [stdout] 2803 | | in_single_quotations = !in_single_quotations; [INFO] [stdout] 2804 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2801 ~ '\'' [INFO] [stdout] 2802 ~ if !in_double_quotations => { [INFO] [stdout] 2803 | in_single_quotations = !in_single_quotations; [INFO] [stdout] 2804 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:2807:17 [INFO] [stdout] | [INFO] [stdout] 2807 | / if !in_single_quotations { [INFO] [stdout] 2808 | | in_double_quotations = !in_double_quotations; [INFO] [stdout] 2809 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2806 ~ '\"' [INFO] [stdout] 2807 ~ if !in_single_quotations => { [INFO] [stdout] 2808 | in_double_quotations = !in_double_quotations; [INFO] [stdout] 2809 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:2812:17 [INFO] [stdout] | [INFO] [stdout] 2812 | / if !(in_single_quotations || in_double_quotations) { [INFO] [stdout] 2813 | | if square_bracket_depth == 0 && curly_bracket_depth == 0 { [INFO] [stdout] 2814 | | bracket_depth += 1; [INFO] [stdout] 2815 | | } [INFO] [stdout] 2816 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2811 ~ '(' [INFO] [stdout] 2812 ~ if !(in_single_quotations || in_double_quotations) => { [INFO] [stdout] 2813 | if square_bracket_depth == 0 && curly_bracket_depth == 0 { [INFO] [stdout] 2814 | bracket_depth += 1; [INFO] [stdout] 2815 | } [INFO] [stdout] 2816 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:2819:17 [INFO] [stdout] | [INFO] [stdout] 2819 | / if !(in_single_quotations || in_double_quotations) { [INFO] [stdout] 2820 | | if square_bracket_depth == 0 && curly_bracket_depth == 0 { [INFO] [stdout] 2821 | | bracket_depth -= 1; [INFO] [stdout] 2822 | | } [INFO] [stdout] 2823 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2818 ~ ')' [INFO] [stdout] 2819 ~ if !(in_single_quotations || in_double_quotations) => { [INFO] [stdout] 2820 | if square_bracket_depth == 0 && curly_bracket_depth == 0 { [INFO] [stdout] 2821 | bracket_depth -= 1; [INFO] [stdout] 2822 | } [INFO] [stdout] 2823 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:2826:17 [INFO] [stdout] | [INFO] [stdout] 2826 | / if !(in_single_quotations || in_double_quotations) { [INFO] [stdout] 2827 | | if bracket_depth == 0 && curly_bracket_depth == 0 { [INFO] [stdout] 2828 | | square_bracket_depth += 1; [INFO] [stdout] 2829 | | } [INFO] [stdout] 2830 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2825 ~ '[' [INFO] [stdout] 2826 ~ if !(in_single_quotations || in_double_quotations) => { [INFO] [stdout] 2827 | if bracket_depth == 0 && curly_bracket_depth == 0 { [INFO] [stdout] 2828 | square_bracket_depth += 1; [INFO] [stdout] 2829 | } [INFO] [stdout] 2830 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:2833:17 [INFO] [stdout] | [INFO] [stdout] 2833 | / if !(in_single_quotations || in_double_quotations) { [INFO] [stdout] 2834 | | if bracket_depth == 0 && curly_bracket_depth == 0 { [INFO] [stdout] 2835 | | square_bracket_depth -= 1; [INFO] [stdout] 2836 | | } [INFO] [stdout] 2837 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2832 ~ ']' [INFO] [stdout] 2833 ~ if !(in_single_quotations || in_double_quotations) => { [INFO] [stdout] 2834 | if bracket_depth == 0 && curly_bracket_depth == 0 { [INFO] [stdout] 2835 | square_bracket_depth -= 1; [INFO] [stdout] 2836 | } [INFO] [stdout] 2837 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:2840:17 [INFO] [stdout] | [INFO] [stdout] 2840 | / if !(in_single_quotations || in_double_quotations) { [INFO] [stdout] 2841 | | if bracket_depth == 0 && square_bracket_depth == 0 { [INFO] [stdout] 2842 | | curly_bracket_depth += 1; [INFO] [stdout] 2843 | | } [INFO] [stdout] 2844 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2839 ~ '{' [INFO] [stdout] 2840 ~ if !(in_single_quotations || in_double_quotations) => { [INFO] [stdout] 2841 | if bracket_depth == 0 && square_bracket_depth == 0 { [INFO] [stdout] 2842 | curly_bracket_depth += 1; [INFO] [stdout] 2843 | } [INFO] [stdout] 2844 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:2847:17 [INFO] [stdout] | [INFO] [stdout] 2847 | / if !(in_single_quotations || in_double_quotations) { [INFO] [stdout] 2848 | | if bracket_depth == 0 && square_bracket_depth == 0 { [INFO] [stdout] 2849 | | curly_bracket_depth -= 1; [INFO] [stdout] 2850 | | } [INFO] [stdout] 2851 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2846 ~ '}' [INFO] [stdout] 2847 ~ if !(in_single_quotations || in_double_quotations) => { [INFO] [stdout] 2848 | if bracket_depth == 0 && square_bracket_depth == 0 { [INFO] [stdout] 2849 | curly_bracket_depth -= 1; [INFO] [stdout] 2850 | } [INFO] [stdout] 2851 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:2854:17 [INFO] [stdout] | [INFO] [stdout] 2854 | / ... if !(in_single_quotations || in_double_quotations || bracket_depth > 0 || square_bracket_depth > 0 || curly_bracket_depth ... [INFO] [stdout] 2855 | | ... return true; [INFO] [stdout] 2856 | | ... } [INFO] [stdout] | |_______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2853 ~ '+'|'-'|'%'|'^'|'&'|'|'|'<'|'>'|'!'|'*'|'/'|'=' [INFO] [stdout] 2854 ~ if !(in_single_quotations || in_double_quotations || bracket_depth > 0 || square_bracket_depth > 0 || curly_bracket_depth > 0) => { [INFO] [stdout] 2855 | return true; [INFO] [stdout] 2856 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lib.rs:2812:17 [INFO] [stdout] | [INFO] [stdout] 2812 | / if !(in_single_quotations || in_double_quotations) { [INFO] [stdout] 2813 | | if square_bracket_depth == 0 && curly_bracket_depth == 0 { [INFO] [stdout] 2814 | | bracket_depth += 1; [INFO] [stdout] 2815 | | } [INFO] [stdout] 2816 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2812 ~ if !(in_single_quotations || in_double_quotations) [INFO] [stdout] 2813 ~ && square_bracket_depth == 0 && curly_bracket_depth == 0 { [INFO] [stdout] 2814 | bracket_depth += 1; [INFO] [stdout] 2815 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lib.rs:2819:17 [INFO] [stdout] | [INFO] [stdout] 2819 | / if !(in_single_quotations || in_double_quotations) { [INFO] [stdout] 2820 | | if square_bracket_depth == 0 && curly_bracket_depth == 0 { [INFO] [stdout] 2821 | | bracket_depth -= 1; [INFO] [stdout] 2822 | | } [INFO] [stdout] 2823 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2819 ~ if !(in_single_quotations || in_double_quotations) [INFO] [stdout] 2820 ~ && square_bracket_depth == 0 && curly_bracket_depth == 0 { [INFO] [stdout] 2821 | bracket_depth -= 1; [INFO] [stdout] 2822 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lib.rs:2826:17 [INFO] [stdout] | [INFO] [stdout] 2826 | / if !(in_single_quotations || in_double_quotations) { [INFO] [stdout] 2827 | | if bracket_depth == 0 && curly_bracket_depth == 0 { [INFO] [stdout] 2828 | | square_bracket_depth += 1; [INFO] [stdout] 2829 | | } [INFO] [stdout] 2830 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2826 ~ if !(in_single_quotations || in_double_quotations) [INFO] [stdout] 2827 ~ && bracket_depth == 0 && curly_bracket_depth == 0 { [INFO] [stdout] 2828 | square_bracket_depth += 1; [INFO] [stdout] 2829 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lib.rs:2833:17 [INFO] [stdout] | [INFO] [stdout] 2833 | / if !(in_single_quotations || in_double_quotations) { [INFO] [stdout] 2834 | | if bracket_depth == 0 && curly_bracket_depth == 0 { [INFO] [stdout] 2835 | | square_bracket_depth -= 1; [INFO] [stdout] 2836 | | } [INFO] [stdout] 2837 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2833 ~ if !(in_single_quotations || in_double_quotations) [INFO] [stdout] 2834 ~ && bracket_depth == 0 && curly_bracket_depth == 0 { [INFO] [stdout] 2835 | square_bracket_depth -= 1; [INFO] [stdout] 2836 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lib.rs:2840:17 [INFO] [stdout] | [INFO] [stdout] 2840 | / if !(in_single_quotations || in_double_quotations) { [INFO] [stdout] 2841 | | if bracket_depth == 0 && square_bracket_depth == 0 { [INFO] [stdout] 2842 | | curly_bracket_depth += 1; [INFO] [stdout] 2843 | | } [INFO] [stdout] 2844 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2840 ~ if !(in_single_quotations || in_double_quotations) [INFO] [stdout] 2841 ~ && bracket_depth == 0 && square_bracket_depth == 0 { [INFO] [stdout] 2842 | curly_bracket_depth += 1; [INFO] [stdout] 2843 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lib.rs:2847:17 [INFO] [stdout] | [INFO] [stdout] 2847 | / if !(in_single_quotations || in_double_quotations) { [INFO] [stdout] 2848 | | if bracket_depth == 0 && square_bracket_depth == 0 { [INFO] [stdout] 2849 | | curly_bracket_depth -= 1; [INFO] [stdout] 2850 | | } [INFO] [stdout] 2851 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2847 ~ if !(in_single_quotations || in_double_quotations) [INFO] [stdout] 2848 ~ && bracket_depth == 0 && square_bracket_depth == 0 { [INFO] [stdout] 2849 | curly_bracket_depth -= 1; [INFO] [stdout] 2850 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:2971:5 [INFO] [stdout] | [INFO] [stdout] 2971 | return parts; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 2971 - return parts; [INFO] [stdout] 2971 + parts [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:2941:17 [INFO] [stdout] | [INFO] [stdout] 2941 | / ... if delimiter == ',' { [INFO] [stdout] 2942 | | ... if !(in_single_quotations || in_double_quotations || in_brackets_depth > 0 || in_square_brackets_depth > 0 || in_curly... [INFO] [stdout] 2943 | | ... parts.push(current_string.trim().to_string()); [INFO] [stdout] 2944 | | ... current_string = "".to_string(); [INFO] [stdout] ... | [INFO] [stdout] 2949 | | ... current_string.push(c); [INFO] [stdout] 2950 | | ... } [INFO] [stdout] | |_______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2940 ~ ',' [INFO] [stdout] 2941 ~ if delimiter == ',' => { [INFO] [stdout] 2942 | if !(in_single_quotations || in_double_quotations || in_brackets_depth > 0 || in_square_brackets_depth > 0 || in_curly_brackets_depth > 0) { [INFO] [stdout] ... [INFO] [stdout] 2947 | } [INFO] [stdout] 2948 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:2953:17 [INFO] [stdout] | [INFO] [stdout] 2953 | / ... if delimiter == '.' { [INFO] [stdout] 2954 | | ... if !(in_single_quotations || in_double_quotations || in_brackets_depth > 0 || in_square_brackets_depth > 0 || in_curly... [INFO] [stdout] 2955 | | ... parts.push(current_string.trim().to_string()); [INFO] [stdout] 2956 | | ... current_string = "".to_string(); [INFO] [stdout] ... | [INFO] [stdout] 2961 | | ... current_string.push(c); [INFO] [stdout] 2962 | | ... } [INFO] [stdout] | |_______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2952 ~ '.' [INFO] [stdout] 2953 ~ if delimiter == '.' => { [INFO] [stdout] 2954 | if !(in_single_quotations || in_double_quotations || in_brackets_depth > 0 || in_square_brackets_depth > 0 || in_curly_brackets_depth > 0) { [INFO] [stdout] ... [INFO] [stdout] 2959 | } [INFO] [stdout] 2960 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lib.rs:2905:17 [INFO] [stdout] | [INFO] [stdout] 2905 | / if !(in_single_quotations || in_double_quotations || in_square_brackets_depth > 0 || in_curly_brackets_depth > 0) { [INFO] [stdout] 2906 | | if in_brackets_depth > 0 { [INFO] [stdout] 2907 | | in_brackets_depth -= 1; [INFO] [stdout] 2908 | | } [INFO] [stdout] 2909 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2905 ~ if !(in_single_quotations || in_double_quotations || in_square_brackets_depth > 0 || in_curly_brackets_depth > 0) [INFO] [stdout] 2906 ~ && in_brackets_depth > 0 { [INFO] [stdout] 2907 | in_brackets_depth -= 1; [INFO] [stdout] 2908 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lib.rs:2919:17 [INFO] [stdout] | [INFO] [stdout] 2919 | / if !(in_single_quotations || in_double_quotations || in_brackets_depth > 0 || in_curly_brackets_depth > 0) { [INFO] [stdout] 2920 | | if in_square_brackets_depth > 0 { [INFO] [stdout] 2921 | | in_square_brackets_depth -= 1; [INFO] [stdout] 2922 | | } [INFO] [stdout] 2923 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2919 ~ if !(in_single_quotations || in_double_quotations || in_brackets_depth > 0 || in_curly_brackets_depth > 0) [INFO] [stdout] 2920 ~ && in_square_brackets_depth > 0 { [INFO] [stdout] 2921 | in_square_brackets_depth -= 1; [INFO] [stdout] 2922 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lib.rs:2933:17 [INFO] [stdout] | [INFO] [stdout] 2933 | / if !(in_single_quotations || in_double_quotations || in_square_brackets_depth > 0 || in_curly_brackets_depth > 0) { [INFO] [stdout] 2934 | | if in_curly_brackets_depth > 0 { [INFO] [stdout] 2935 | | in_curly_brackets_depth -= 1; [INFO] [stdout] 2936 | | } [INFO] [stdout] 2937 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2933 ~ if !(in_single_quotations || in_double_quotations || in_square_brackets_depth > 0 || in_curly_brackets_depth > 0) [INFO] [stdout] 2934 ~ && in_curly_brackets_depth > 0 { [INFO] [stdout] 2935 | in_curly_brackets_depth -= 1; [INFO] [stdout] 2936 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:2980:5 [INFO] [stdout] | [INFO] [stdout] 2980 | return Ok(result); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 2980 - return Ok(result); [INFO] [stdout] 2980 + Ok(result) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:2985:22 [INFO] [stdout] | [INFO] [stdout] 2985 | Ok(lines) => return lines, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 2985 - Ok(lines) => return lines, [INFO] [stdout] 2985 + Ok(lines) => lines, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:2998:5 [INFO] [stdout] | [INFO] [stdout] 2998 | return lines; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 2998 - return lines; [INFO] [stdout] 2998 + lines [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/lib.rs:2993:36 [INFO] [stdout] | [INFO] [stdout] 2993 | pub fn vec_str_to_vec_line(source: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 2993 - pub fn vec_str_to_vec_line(source: &Vec) -> Vec { [INFO] [stdout] 2993 + pub fn vec_str_to_vec_line(source: &[String]) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:3016:5 [INFO] [stdout] | [INFO] [stdout] 3016 | return source; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 3016 - return source; [INFO] [stdout] 3016 + source [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:34:9 [INFO] [stdout] | [INFO] [stdout] 34 | / return Line { [INFO] [stdout] 35 | | number: number, [INFO] [stdout] 36 | | text: text.to_string() [INFO] [stdout] 37 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 34 ~ Line { [INFO] [stdout] 35 + number: number, [INFO] [stdout] 36 + text: text.to_string() [INFO] [stdout] 37 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:41:9 [INFO] [stdout] | [INFO] [stdout] 41 | return self.number; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 41 - return self.number; [INFO] [stdout] 41 + self.number [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:45:9 [INFO] [stdout] | [INFO] [stdout] 45 | return &self.text; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 45 - return &self.text; [INFO] [stdout] 45 + &self.text [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lib.rs:72:28 [INFO] [stdout] | [INFO] [stdout] 72 | if !(self.get_text().chars().nth(index - 1).unwrap() == '\\') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(self.get_text().chars().nth(index - 1).unwrap() != '\\')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lib.rs:81:28 [INFO] [stdout] | [INFO] [stdout] 81 | if !(self.get_text().chars().nth(index - 1).unwrap() == '\\') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(self.get_text().chars().nth(index - 1).unwrap() != '\\')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:156:22 [INFO] [stdout] | [INFO] [stdout] 156 | true => return None, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 156 - true => return None, [INFO] [stdout] 156 + true => None, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:157:22 [INFO] [stdout] | [INFO] [stdout] 157 | false => return Some(equals_index), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 157 - false => return Some(equals_index), [INFO] [stdout] 157 + false => Some(equals_index), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:87:21 [INFO] [stdout] | [INFO] [stdout] 87 | / if !(in_single_quotations || in_double_quotations) { [INFO] [stdout] 88 | | in_brackets_depth += 1; [INFO] [stdout] 89 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 86 ~ '(' [INFO] [stdout] 87 ~ if !(in_single_quotations || in_double_quotations) => { [INFO] [stdout] 88 | in_brackets_depth += 1; [INFO] [stdout] 89 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:92:21 [INFO] [stdout] | [INFO] [stdout] 92 | / if !(in_single_quotations || in_double_quotations) { [INFO] [stdout] 93 | | if in_brackets_depth > 0 { [INFO] [stdout] 94 | | in_brackets_depth -= 1; [INFO] [stdout] 95 | | } [INFO] [stdout] 96 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 91 ~ ')' [INFO] [stdout] 92 ~ if !(in_single_quotations || in_double_quotations) => { [INFO] [stdout] 93 | if in_brackets_depth > 0 { [INFO] [stdout] 94 | in_brackets_depth -= 1; [INFO] [stdout] 95 | } [INFO] [stdout] 96 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:99:21 [INFO] [stdout] | [INFO] [stdout] 99 | / if !(in_single_quotations || in_double_quotations) { [INFO] [stdout] 100 | | in_square_brackets_depth += 1; [INFO] [stdout] 101 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 98 ~ '[' [INFO] [stdout] 99 ~ if !(in_single_quotations || in_double_quotations) => { [INFO] [stdout] 100 | in_square_brackets_depth += 1; [INFO] [stdout] 101 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:104:21 [INFO] [stdout] | [INFO] [stdout] 104 | / if !(in_single_quotations || in_double_quotations) { [INFO] [stdout] 105 | | if in_square_brackets_depth > 0 { [INFO] [stdout] 106 | | in_square_brackets_depth -= 1; [INFO] [stdout] 107 | | } [INFO] [stdout] 108 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 103 ~ ']' [INFO] [stdout] 104 ~ if !(in_single_quotations || in_double_quotations) => { [INFO] [stdout] 105 | if in_square_brackets_depth > 0 { [INFO] [stdout] 106 | in_square_brackets_depth -= 1; [INFO] [stdout] 107 | } [INFO] [stdout] 108 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:111:21 [INFO] [stdout] | [INFO] [stdout] 111 | / if !(in_single_quotations || in_double_quotations) { [INFO] [stdout] 112 | | in_curly_brackets_depth += 1; [INFO] [stdout] 113 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 110 ~ '{' [INFO] [stdout] 111 ~ if !(in_single_quotations || in_double_quotations) => { [INFO] [stdout] 112 | in_curly_brackets_depth += 1; [INFO] [stdout] 113 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:116:21 [INFO] [stdout] | [INFO] [stdout] 116 | / if !(in_single_quotations || in_double_quotations) { [INFO] [stdout] 117 | | if in_curly_brackets_depth > 0 { [INFO] [stdout] 118 | | in_curly_brackets_depth -= 1; [INFO] [stdout] 119 | | } [INFO] [stdout] 120 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 115 ~ '}' [INFO] [stdout] 116 ~ if !(in_single_quotations || in_double_quotations) => { [INFO] [stdout] 117 | if in_curly_brackets_depth > 0 { [INFO] [stdout] 118 | in_curly_brackets_depth -= 1; [INFO] [stdout] 119 | } [INFO] [stdout] 120 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:148:21 [INFO] [stdout] | [INFO] [stdout] 148 | / if !(in_single_quotations || in_double_quotations) { [INFO] [stdout] 149 | | break; [INFO] [stdout] 150 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 146 ~ '#' [INFO] [stdout] 147 | // Check if not in quotations or brackets. [INFO] [stdout] 148 ~ if !(in_single_quotations || in_double_quotations) => { [INFO] [stdout] 149 | break; [INFO] [stdout] 150 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lib.rs:92:21 [INFO] [stdout] | [INFO] [stdout] 92 | / if !(in_single_quotations || in_double_quotations) { [INFO] [stdout] 93 | | if in_brackets_depth > 0 { [INFO] [stdout] 94 | | in_brackets_depth -= 1; [INFO] [stdout] 95 | | } [INFO] [stdout] 96 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 92 ~ if !(in_single_quotations || in_double_quotations) [INFO] [stdout] 93 ~ && in_brackets_depth > 0 { [INFO] [stdout] 94 | in_brackets_depth -= 1; [INFO] [stdout] 95 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lib.rs:104:21 [INFO] [stdout] | [INFO] [stdout] 104 | / if !(in_single_quotations || in_double_quotations) { [INFO] [stdout] 105 | | if in_square_brackets_depth > 0 { [INFO] [stdout] 106 | | in_square_brackets_depth -= 1; [INFO] [stdout] 107 | | } [INFO] [stdout] 108 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 104 ~ if !(in_single_quotations || in_double_quotations) [INFO] [stdout] 105 ~ && in_square_brackets_depth > 0 { [INFO] [stdout] 106 | in_square_brackets_depth -= 1; [INFO] [stdout] 107 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lib.rs:116:21 [INFO] [stdout] | [INFO] [stdout] 116 | / if !(in_single_quotations || in_double_quotations) { [INFO] [stdout] 117 | | if in_curly_brackets_depth > 0 { [INFO] [stdout] 118 | | in_curly_brackets_depth -= 1; [INFO] [stdout] 119 | | } [INFO] [stdout] 120 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 116 ~ if !(in_single_quotations || in_double_quotations) [INFO] [stdout] 117 ~ && in_curly_brackets_depth > 0 { [INFO] [stdout] 118 | in_curly_brackets_depth -= 1; [INFO] [stdout] 119 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:177:9 [INFO] [stdout] | [INFO] [stdout] 177 | return format!("{}Line{}{}: {}\n", spaces, line_space, self.get_number(), self.get_text()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 177 - return format!("{}Line{}{}: {}\n", spaces, line_space, self.get_number(), self.get_text()); [INFO] [stdout] 177 + format!("{}Line{}{}: {}\n", spaces, line_space, self.get_number(), self.get_text()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:185:9 [INFO] [stdout] | [INFO] [stdout] 185 | / return self.number == other.number [INFO] [stdout] 186 | | && self.text == other.text; [INFO] [stdout] | |______________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 185 ~ self.number == other.number [INFO] [stdout] 186 ~ && self.text == other.text [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:207:21 [INFO] [stdout] | [INFO] [stdout] 207 | None => return None, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 207 - None => return None, [INFO] [stdout] 207 + None => None, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:229:21 [INFO] [stdout] | [INFO] [stdout] 229 | / return Some(Assignment { [INFO] [stdout] 230 | | name: name.trim().to_string(), [INFO] [stdout] 231 | | value: val.trim().to_string(), [INFO] [stdout] 232 | | source: line.clone() [INFO] [stdout] 233 | | }); [INFO] [stdout] | |______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 229 ~ Some(Assignment { [INFO] [stdout] 230 + name: name.trim().to_string(), [INFO] [stdout] 231 + value: val.trim().to_string(), [INFO] [stdout] 232 + source: line.clone() [INFO] [stdout] 233 ~ }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:250:21 [INFO] [stdout] | [INFO] [stdout] 250 | / return Some(Assignment { [INFO] [stdout] 251 | | name: var_trim.trim().to_string(), [INFO] [stdout] 252 | | value: val_trim.trim().to_string(), [INFO] [stdout] 253 | | source: line.clone() [INFO] [stdout] 254 | | }); [INFO] [stdout] | |______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 250 ~ Some(Assignment { [INFO] [stdout] 251 + name: var_trim.trim().to_string(), [INFO] [stdout] 252 + value: val_trim.trim().to_string(), [INFO] [stdout] 253 + source: line.clone() [INFO] [stdout] 254 ~ }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:204:83 [INFO] [stdout] | [INFO] [stdout] 204 | let dummy_line: Line = Line::new(1, &remove_single_line_comment_from_line(&line)); [INFO] [stdout] | ^^^^^ help: change this to: `line` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:261:9 [INFO] [stdout] | [INFO] [stdout] 261 | return &self.name; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 261 - return &self.name; [INFO] [stdout] 261 + &self.name [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:265:9 [INFO] [stdout] | [INFO] [stdout] 265 | return &self.value; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 265 - return &self.value; [INFO] [stdout] 265 + &self.value [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:269:9 [INFO] [stdout] | [INFO] [stdout] 269 | return &self.source; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 269 - return &self.source; [INFO] [stdout] 269 + &self.source [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:279:9 [INFO] [stdout] | [INFO] [stdout] 279 | return format!("{}Assignment({} = {})\n", spaces, self.get_name(), self.get_value()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 279 - return format!("{}Assignment({} = {})\n", spaces, self.get_name(), self.get_value()); [INFO] [stdout] 279 + format!("{}Assignment({} = {})\n", spaces, self.get_name(), self.get_value()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:287:9 [INFO] [stdout] | [INFO] [stdout] 287 | / return self.get_name() == other.get_name() [INFO] [stdout] 288 | | && self.get_value() == other.get_value() [INFO] [stdout] 289 | | && self.get_source() == other.get_source(); [INFO] [stdout] | |______________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 287 ~ self.get_name() == other.get_name() [INFO] [stdout] 288 + && self.get_value() == other.get_value() [INFO] [stdout] 289 ~ && self.get_source() == other.get_source() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `StructureTracker` [INFO] [stdout] --> src/lib.rs:303:5 [INFO] [stdout] | [INFO] [stdout] 303 | / pub fn new() -> Self { [INFO] [stdout] 304 | | return StructureTracker { [INFO] [stdout] 305 | | active: false, [INFO] [stdout] 306 | | indentation_length: 0, [INFO] [stdout] ... | [INFO] [stdout] 309 | | }; [INFO] [stdout] 310 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 301 + impl Default for StructureTracker { [INFO] [stdout] 302 + fn default() -> Self { [INFO] [stdout] 303 + Self::new() [INFO] [stdout] 304 + } [INFO] [stdout] 305 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:304:9 [INFO] [stdout] | [INFO] [stdout] 304 | / return StructureTracker { [INFO] [stdout] 305 | | active: false, [INFO] [stdout] 306 | | indentation_length: 0, [INFO] [stdout] 307 | | indentation_set: false, [INFO] [stdout] 308 | | source: Vec::new() [INFO] [stdout] 309 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 304 ~ StructureTracker { [INFO] [stdout] 305 + active: false, [INFO] [stdout] 306 + indentation_length: 0, [INFO] [stdout] 307 + indentation_set: false, [INFO] [stdout] 308 + source: Vec::new() [INFO] [stdout] 309 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:324:9 [INFO] [stdout] | [INFO] [stdout] 324 | return self.active; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 324 - return self.active; [INFO] [stdout] 324 + self.active [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:328:9 [INFO] [stdout] | [INFO] [stdout] 328 | return self.indentation_length; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 328 - return self.indentation_length; [INFO] [stdout] 328 + self.indentation_length [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:337:9 [INFO] [stdout] | [INFO] [stdout] 337 | return self.indentation_set; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 337 - return self.indentation_set; [INFO] [stdout] 337 + self.indentation_set [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:341:9 [INFO] [stdout] | [INFO] [stdout] 341 | return &self.source; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 341 - return &self.source; [INFO] [stdout] 341 + &self.source [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:357:9 [INFO] [stdout] | [INFO] [stdout] 357 | / return MultilineCommentTracker { [INFO] [stdout] 358 | | active: false [INFO] [stdout] 359 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 357 ~ MultilineCommentTracker { [INFO] [stdout] 358 + active: false [INFO] [stdout] 359 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:371:9 [INFO] [stdout] | [INFO] [stdout] 371 | return self.active; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 371 - return self.active; [INFO] [stdout] 371 + self.active [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:383:17 [INFO] [stdout] | [INFO] [stdout] 383 | return false; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 383 - return false; [INFO] [stdout] 383 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:385:17 [INFO] [stdout] | [INFO] [stdout] 385 | return true; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 385 - return true; [INFO] [stdout] 385 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:389:13 [INFO] [stdout] | [INFO] [stdout] 389 | return true; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 389 - return true; [INFO] [stdout] 389 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:392:13 [INFO] [stdout] | [INFO] [stdout] 392 | return false; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 392 - return false; [INFO] [stdout] 392 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:377:73 [INFO] [stdout] | [INFO] [stdout] 377 | let is_ml_comment_start: bool = line_is_multiline_comment_start(&line); [INFO] [stdout] | ^^^^^ help: change this to: `line` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:378:69 [INFO] [stdout] | [INFO] [stdout] 378 | let is_ml_comment_end: bool = line_is_multiline_comment_end(&line); [INFO] [stdout] | ^^^^^ help: change this to: `line` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/lib.rs:382:13 [INFO] [stdout] | [INFO] [stdout] 382 | / if line.get_text().matches("\"").count() >= 6 || line.get_text().matches("\'").count() >= 6 { [INFO] [stdout] 383 | | return false; [INFO] [stdout] 384 | | } else { [INFO] [stdout] 385 | | return true; [INFO] [stdout] 386 | | } [INFO] [stdout] | |_____________^ help: you can reduce it to: `return !(line.get_text().matches("\"").count() >= 6 || line.get_text().matches("\'").count() >= 6)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] = note: `#[warn(clippy::needless_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:399:9 [INFO] [stdout] | [INFO] [stdout] 399 | return line_is_multiline_comment_end(&line); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 399 - return line_is_multiline_comment_end(&line); [INFO] [stdout] 399 + line_is_multiline_comment_end(&line) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:399:46 [INFO] [stdout] | [INFO] [stdout] 399 | return line_is_multiline_comment_end(&line); [INFO] [stdout] | ^^^^^ help: change this to: `line` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:572:9 [INFO] [stdout] | [INFO] [stdout] 572 | / return File { [INFO] [stdout] 573 | | name: name.to_string(), [INFO] [stdout] 574 | | imports: imports, [INFO] [stdout] 575 | | global_variables: global_vars, [INFO] [stdout] 576 | | functions: functions, [INFO] [stdout] 577 | | classes: classes [INFO] [stdout] 578 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 572 ~ File { [INFO] [stdout] 573 + name: name.to_string(), [INFO] [stdout] 574 + imports: imports, [INFO] [stdout] 575 + global_variables: global_vars, [INFO] [stdout] 576 + functions: functions, [INFO] [stdout] 577 + classes: classes [INFO] [stdout] 578 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/lib.rs:416:40 [INFO] [stdout] | [INFO] [stdout] 416 | pub fn new(filepath: &str, source: &Vec, writer: &mut BufWriter>) -> Self { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 416 ~ pub fn new(filepath: &str, source: &[Line], writer: &mut BufWriter>) -> Self { [INFO] [stdout] 417 | // Get filename from path. [INFO] [stdout] ... [INFO] [stdout] 442 | // Get clone of source. [INFO] [stdout] 443 ~ let mut source: Vec = source.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:473:47 [INFO] [stdout] | [INFO] [stdout] 473 | function_tracker.add_line(&line); [INFO] [stdout] | ^^^^^ help: change this to: `line` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:478:51 [INFO] [stdout] | [INFO] [stdout] 478 | function_tracker.add_line(&line); [INFO] [stdout] | ^^^^^ help: change this to: `line` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:492:44 [INFO] [stdout] | [INFO] [stdout] 492 | class_tracker.add_line(&line); [INFO] [stdout] | ^^^^^ help: change this to: `line` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:497:48 [INFO] [stdout] | [INFO] [stdout] 497 | class_tracker.add_line(&line); [INFO] [stdout] | ^^^^^ help: change this to: `line` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:514:67 [INFO] [stdout] | [INFO] [stdout] 514 | if ml_comment_tracker.is_end_of_multiline_comment(&line) { [INFO] [stdout] | ^^^^^ help: change this to: `line` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:518:69 [INFO] [stdout] | [INFO] [stdout] 518 | if ml_comment_tracker.is_begin_of_multiline_comment(&line) { [INFO] [stdout] | ^^^^^ help: change this to: `line` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lib.rs:527:13 [INFO] [stdout] | [INFO] [stdout] 527 | / match line_is_import(&line, writer) { [INFO] [stdout] 528 | | Some(a) => { [INFO] [stdout] 529 | | for module in a.iter() { [INFO] [stdout] 530 | | imports.push(module.clone()); [INFO] [stdout] ... | [INFO] [stdout] 533 | | None => () [INFO] [stdout] 534 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 527 ~ if let Some(a) = line_is_import(&line, writer) { [INFO] [stdout] 528 + for module in a.iter() { [INFO] [stdout] 529 + imports.push(module.clone()); [INFO] [stdout] 530 + } [INFO] [stdout] 531 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:527:34 [INFO] [stdout] | [INFO] [stdout] 527 | match line_is_import(&line, writer) { [INFO] [stdout] | ^^^^^ help: change this to: `line` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/lib.rs:537:20 [INFO] [stdout] | [INFO] [stdout] 537 | if let Some(_) = line.is_assignment() { [INFO] [stdout] | -------^^^^^^^----------------------- help: try: `if line.is_assignment().is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:545:39 [INFO] [stdout] | [INFO] [stdout] 545 | if line_is_function_start(&line) { [INFO] [stdout] | ^^^^^ help: change this to: `line` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:548:43 [INFO] [stdout] | [INFO] [stdout] 548 | function_tracker.add_line(&line); [INFO] [stdout] | ^^^^^ help: change this to: `line` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:552:36 [INFO] [stdout] | [INFO] [stdout] 552 | if line_is_class_start(&line) { [INFO] [stdout] | ^^^^^ help: change this to: `line` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:555:40 [INFO] [stdout] | [INFO] [stdout] 555 | class_tracker.add_line(&line); [INFO] [stdout] | ^^^^^ help: change this to: `line` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:589:13 [INFO] [stdout] | [INFO] [stdout] 589 | return false; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 589 - return false; [INFO] [stdout] 589 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the method `scan` doesn't need a mutable reference [INFO] [stdout] --> src/lib.rs:639:35 [INFO] [stdout] | [INFO] [stdout] 639 | function.scan(writer, &mut scope); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] = note: `#[warn(clippy::unnecessary_mut_passed)]` on by default [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 639 - function.scan(writer, &mut scope); [INFO] [stdout] 639 + function.scan(writer, &scope); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the method `scan` doesn't need a mutable reference [INFO] [stdout] --> src/lib.rs:644:32 [INFO] [stdout] | [INFO] [stdout] 644 | class.scan(writer, &mut scope); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 644 - class.scan(writer, &mut scope); [INFO] [stdout] 644 + class.scan(writer, &scope); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:649:9 [INFO] [stdout] | [INFO] [stdout] 649 | return &self.name; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 649 - return &self.name; [INFO] [stdout] 649 + &self.name [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:653:9 [INFO] [stdout] | [INFO] [stdout] 653 | return &self.imports; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 653 - return &self.imports; [INFO] [stdout] 653 + &self.imports [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:657:9 [INFO] [stdout] | [INFO] [stdout] 657 | return &self.global_variables; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 657 - return &self.global_variables; [INFO] [stdout] 657 + &self.global_variables [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:661:9 [INFO] [stdout] | [INFO] [stdout] 661 | return &self.functions; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 661 - return &self.functions; [INFO] [stdout] 661 + &self.functions [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:665:9 [INFO] [stdout] | [INFO] [stdout] 665 | return &self.classes; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 665 - return &self.classes; [INFO] [stdout] 665 + &self.classes [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:718:9 [INFO] [stdout] | [INFO] [stdout] 718 | return string; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 718 - return string; [INFO] [stdout] 718 + string [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/lib.rs:684:12 [INFO] [stdout] | [INFO] [stdout] 684 | if self.get_global_variables().len() > 0{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.get_global_variables().is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/lib.rs:695:12 [INFO] [stdout] | [INFO] [stdout] 695 | if self.get_functions().len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.get_functions().is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/lib.rs:706:12 [INFO] [stdout] | [INFO] [stdout] 706 | if self.get_classes().len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.get_classes().is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:726:9 [INFO] [stdout] | [INFO] [stdout] 726 | / return self.get_name() == other.get_name() [INFO] [stdout] 727 | | && self.get_imports() == other.get_imports() [INFO] [stdout] 728 | | && self.get_global_variables() == other.get_global_variables() [INFO] [stdout] 729 | | && self.get_functions() == other.get_functions() [INFO] [stdout] 730 | | && self.get_classes() == other.get_classes(); [INFO] [stdout] | |________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 726 ~ self.get_name() == other.get_name() [INFO] [stdout] 727 + && self.get_imports() == other.get_imports() [INFO] [stdout] 728 + && self.get_global_variables() == other.get_global_variables() [INFO] [stdout] 729 + && self.get_functions() == other.get_functions() [INFO] [stdout] 730 ~ && self.get_classes() == other.get_classes() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lib.rs:798:28 [INFO] [stdout] | [INFO] [stdout] 798 | if !(params.chars().nth(index - 1).unwrap() == '\\') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(params.chars().nth(index - 1).unwrap() != '\\')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lib.rs:807:28 [INFO] [stdout] | [INFO] [stdout] 807 | if !(params.chars().nth(index - 1).unwrap() == '\\') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(params.chars().nth(index - 1).unwrap() != '\\')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lib.rs:866:32 [INFO] [stdout] | [INFO] [stdout] 866 | ... if !(param.chars().nth(index - 1).unwrap() == '\\') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(param.chars().nth(index - 1).unwrap() != '\\')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lib.rs:876:32 [INFO] [stdout] | [INFO] [stdout] 876 | ... if !(param.chars().nth(index - 1).unwrap() == '\\') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(param.chars().nth(index - 1).unwrap() != '\\')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lib.rs:908:32 [INFO] [stdout] | [INFO] [stdout] 908 | ... if !(string_builder.chars().nth(index - 1).unwrap() == '\\') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(string_builder.chars().nth(index - 1).unwrap() != '\\')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lib.rs:918:32 [INFO] [stdout] | [INFO] [stdout] 918 | ... if !(string_builder.chars().nth(index - 1).unwrap() == '\\') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(string_builder.chars().nth(index - 1).unwrap() != '\\')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:1011:9 [INFO] [stdout] | [INFO] [stdout] 1011 | / return Function { [INFO] [stdout] 1012 | | name: name, [INFO] [stdout] 1013 | | parameters: parameters, [INFO] [stdout] 1014 | | functions: functions, [INFO] [stdout] 1015 | | source: remove_empty_lines(source.to_vec()) [INFO] [stdout] 1016 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1011 ~ Function { [INFO] [stdout] 1012 + name: name, [INFO] [stdout] 1013 + parameters: parameters, [INFO] [stdout] 1014 + functions: functions, [INFO] [stdout] 1015 + source: remove_empty_lines(source.to_vec()) [INFO] [stdout] 1016 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/lib.rs:745:24 [INFO] [stdout] | [INFO] [stdout] 745 | pub fn new(source: &Vec, writer: &mut BufWriter>) -> Self { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 745 ~ pub fn new(source: &[Line], writer: &mut BufWriter>) -> Self { [INFO] [stdout] 746 | // Get clone of source. [INFO] [stdout] 747 ~ let mut source: Vec = source.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `source.get(0)` [INFO] [stdout] --> src/lib.rs:761:70 [INFO] [stdout] | [INFO] [stdout] 761 | let first_line: &str = &remove_single_line_comment_from_line(source.get(0).unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `source.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:813:21 [INFO] [stdout] | [INFO] [stdout] 813 | / if !(in_quotations || in_double_quotations) { [INFO] [stdout] 814 | | in_brackets_depth += 1; [INFO] [stdout] 815 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 812 ~ '(' [INFO] [stdout] 813 ~ if !(in_quotations || in_double_quotations) => { [INFO] [stdout] 814 | in_brackets_depth += 1; [INFO] [stdout] 815 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:818:21 [INFO] [stdout] | [INFO] [stdout] 818 | / if !(in_quotations || in_double_quotations) { [INFO] [stdout] 819 | | in_brackets_depth -= 1; [INFO] [stdout] 820 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 817 ~ ')' [INFO] [stdout] 818 ~ if !(in_quotations || in_double_quotations) => { [INFO] [stdout] 819 | in_brackets_depth -= 1; [INFO] [stdout] 820 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:823:21 [INFO] [stdout] | [INFO] [stdout] 823 | / if !(in_quotations || in_double_quotations) { [INFO] [stdout] 824 | | in_square_brackets_depth += 1; [INFO] [stdout] 825 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 822 ~ '[' [INFO] [stdout] 823 ~ if !(in_quotations || in_double_quotations) => { [INFO] [stdout] 824 | in_square_brackets_depth += 1; [INFO] [stdout] 825 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:828:21 [INFO] [stdout] | [INFO] [stdout] 828 | / if !(in_quotations || in_double_quotations) { [INFO] [stdout] 829 | | in_square_brackets_depth -= 1; [INFO] [stdout] 830 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 827 ~ ']' [INFO] [stdout] 828 ~ if !(in_quotations || in_double_quotations) => { [INFO] [stdout] 829 | in_square_brackets_depth -= 1; [INFO] [stdout] 830 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:833:21 [INFO] [stdout] | [INFO] [stdout] 833 | / if !(in_quotations || in_double_quotations) { [INFO] [stdout] 834 | | in_curly_brackets_depth += 1; [INFO] [stdout] 835 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 832 ~ '{' [INFO] [stdout] 833 ~ if !(in_quotations || in_double_quotations) => { [INFO] [stdout] 834 | in_curly_brackets_depth += 1; [INFO] [stdout] 835 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:838:21 [INFO] [stdout] | [INFO] [stdout] 838 | / if !(in_quotations || in_double_quotations) { [INFO] [stdout] 839 | | in_curly_brackets_depth -= 1; [INFO] [stdout] 840 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 837 ~ '}' [INFO] [stdout] 838 ~ if !(in_quotations || in_double_quotations) => { [INFO] [stdout] 839 | in_curly_brackets_depth -= 1; [INFO] [stdout] 840 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:844:21 [INFO] [stdout] | [INFO] [stdout] 844 | / ... if !(in_quotations || in_double_quotations || in_brackets_depth > 0 || in_square_brackets_depth > 0 || in_curly_brackets_de... [INFO] [stdout] 845 | | ... parameters.push("".to_string()); [INFO] [stdout] 846 | | ... } [INFO] [stdout] | |_______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 842 ~ ',' [INFO] [stdout] 843 | // Check if not in quotations or brackets. [INFO] [stdout] 844 ~ if !(in_quotations || in_double_quotations || in_brackets_depth > 0 || in_square_brackets_depth > 0 || in_curly_brackets_depth > 0) => { [INFO] [stdout] 845 | parameters.push("".to_string()); [INFO] [stdout] 846 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:956:47 [INFO] [stdout] | [INFO] [stdout] 956 | function_tracker.add_line(&line); [INFO] [stdout] | ^^^^^ help: change this to: `line` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:961:51 [INFO] [stdout] | [INFO] [stdout] 961 | function_tracker.add_line(&line); [INFO] [stdout] | ^^^^^ help: change this to: `line` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:978:67 [INFO] [stdout] | [INFO] [stdout] 978 | if ml_comment_tracker.is_end_of_multiline_comment(&line) { [INFO] [stdout] | ^^^^^ help: change this to: `line` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:982:69 [INFO] [stdout] | [INFO] [stdout] 982 | if ml_comment_tracker.is_begin_of_multiline_comment(&line) { [INFO] [stdout] | ^^^^^ help: change this to: `line` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:991:39 [INFO] [stdout] | [INFO] [stdout] 991 | if line_is_function_start(&line) { [INFO] [stdout] | ^^^^^ help: change this to: `line` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:999:43 [INFO] [stdout] | [INFO] [stdout] 999 | function_tracker.add_line(&line); [INFO] [stdout] | ^^^^^ help: change this to: `line` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `default` can be confused for the standard trait method `std::default::Default::default` [INFO] [stdout] --> src/lib.rs:1019:5 [INFO] [stdout] | [INFO] [stdout] 1019 | / pub fn default() -> Self { [INFO] [stdout] 1020 | | return Function { [INFO] [stdout] 1021 | | name: "".to_string(), [INFO] [stdout] 1022 | | parameters: Vec::new(), [INFO] [stdout] ... | [INFO] [stdout] 1025 | | }; [INFO] [stdout] 1026 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::default::Default` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] = note: `#[warn(clippy::should_implement_trait)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:1020:9 [INFO] [stdout] | [INFO] [stdout] 1020 | / return Function { [INFO] [stdout] 1021 | | name: "".to_string(), [INFO] [stdout] 1022 | | parameters: Vec::new(), [INFO] [stdout] 1023 | | functions: Vec::new(), [INFO] [stdout] 1024 | | source: Vec::new() [INFO] [stdout] 1025 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1020 ~ Function { [INFO] [stdout] 1021 + name: "".to_string(), [INFO] [stdout] 1022 + parameters: Vec::new(), [INFO] [stdout] 1023 + functions: Vec::new(), [INFO] [stdout] 1024 + source: Vec::new() [INFO] [stdout] 1025 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/lib.rs:1028:71 [INFO] [stdout] | [INFO] [stdout] 1028 | pub fn scan(&self, writer: &mut BufWriter>, scope: &Vec<(usize, String)>) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 1028 ~ pub fn scan(&self, writer: &mut BufWriter>, scope: &[(usize, String)]) { [INFO] [stdout] 1029 | // Define function to check if the scope contains a variable name. [INFO] [stdout] ... [INFO] [stdout] 1039 | // Clone scope (everything inside this function is local to this scope). [INFO] [stdout] 1040 ~ let mut scope: Vec<(usize, String)> = scope.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:1036:13 [INFO] [stdout] | [INFO] [stdout] 1036 | return false; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1036 - return false; [INFO] [stdout] 1036 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:1069:69 [INFO] [stdout] | [INFO] [stdout] 1069 | let current_indentation: usize = get_indentation_length(&line); [INFO] [stdout] | ^^^^^ help: change this to: `line` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` branch is empty [INFO] [stdout] --> src/lib.rs:1107:13 [INFO] [stdout] | [INFO] [stdout] 1107 | if line.get_text().trim() == "else:" {} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can remove it: `line.get_text().trim() == "else:";` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_ifs [INFO] [stdout] = note: `#[warn(clippy::needless_ifs)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_string` [INFO] [stdout] --> src/lib.rs:1114:41 [INFO] [stdout] | [INFO] [stdout] 1114 | let itervar: &str = &a["itervar"].trim().to_string(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `a["itervar"].trim()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] = note: `#[warn(clippy::unnecessary_to_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_string` [INFO] [stdout] --> src/lib.rs:1126:42 [INFO] [stdout] | [INFO] [stdout] 1126 | let iterator: &str = &a["iterator"].trim().to_string(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `a["iterator"].trim()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_string` [INFO] [stdout] --> src/lib.rs:1141:51 [INFO] [stdout] | [INFO] [stdout] 1141 | ... let condition: &str = &b["condition"].trim().to_string(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `b["condition"].trim()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:1157:72 [INFO] [stdout] | [INFO] [stdout] 1157 | ... let capt_with = re_with_statement.captures(&line.get_text()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `line.get_text()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:1173:59 [INFO] [stdout] | [INFO] [stdout] 1173 | ... match Assignment::new(&line) { [INFO] [stdout] | ^^^^^ help: change this to: `line` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:1218:9 [INFO] [stdout] | [INFO] [stdout] 1218 | return &self.name; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1218 - return &self.name; [INFO] [stdout] 1218 + &self.name [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:1222:9 [INFO] [stdout] | [INFO] [stdout] 1222 | return &self.parameters; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1222 - return &self.parameters; [INFO] [stdout] 1222 + &self.parameters [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:1226:9 [INFO] [stdout] | [INFO] [stdout] 1226 | return &self.functions; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1226 - return &self.functions; [INFO] [stdout] 1226 + &self.functions [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:1230:9 [INFO] [stdout] | [INFO] [stdout] 1230 | return &self.source; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1230 - return &self.source; [INFO] [stdout] 1230 + &self.source [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:1272:9 [INFO] [stdout] | [INFO] [stdout] 1272 | return string; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1272 - return string; [INFO] [stdout] 1272 + string [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/lib.rs:1249:12 [INFO] [stdout] | [INFO] [stdout] 1249 | if self.get_functions().len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.get_functions().is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/lib.rs:1252:33 [INFO] [stdout] | [INFO] [stdout] 1252 | string.push_str(format!("{}", function.as_string(indentation_length + 8)).as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `function.as_string(indentation_length + 8).to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/lib.rs:1260:12 [INFO] [stdout] | [INFO] [stdout] 1260 | if self.get_source().len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.get_source().is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/lib.rs:1263:33 [INFO] [stdout] | [INFO] [stdout] 1263 | string.push_str(format!("{}", line.as_string(indentation_length + 8)).as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `line.as_string(indentation_length + 8).to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:1280:9 [INFO] [stdout] | [INFO] [stdout] 1280 | / return self.get_name() == other.get_name() [INFO] [stdout] 1281 | | && self.get_parameters() == other.get_parameters() [INFO] [stdout] 1282 | | && self.get_functions() == other.get_functions() [INFO] [stdout] 1283 | | && self.get_source() == other.get_source(); [INFO] [stdout] | |______________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1280 ~ self.get_name() == other.get_name() [INFO] [stdout] 1281 + && self.get_parameters() == other.get_parameters() [INFO] [stdout] 1282 + && self.get_functions() == other.get_functions() [INFO] [stdout] 1283 ~ && self.get_source() == other.get_source() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:1467:9 [INFO] [stdout] | [INFO] [stdout] 1467 | / return Class { [INFO] [stdout] 1468 | | name: name, [INFO] [stdout] 1469 | | parent: parent, [INFO] [stdout] 1470 | | variables: variables, [INFO] [stdout] 1471 | | methods: methods, [INFO] [stdout] 1472 | | classes: classes [INFO] [stdout] 1473 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1467 ~ Class { [INFO] [stdout] 1468 + name: name, [INFO] [stdout] 1469 + parent: parent, [INFO] [stdout] 1470 + variables: variables, [INFO] [stdout] 1471 + methods: methods, [INFO] [stdout] 1472 + classes: classes [INFO] [stdout] 1473 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/lib.rs:1299:24 [INFO] [stdout] | [INFO] [stdout] 1299 | pub fn new(source: &Vec, writer: &mut BufWriter>) -> Self { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 1299 ~ pub fn new(source: &[Line], writer: &mut BufWriter>) -> Self { [INFO] [stdout] 1300 | // Get clone of source. [INFO] [stdout] 1301 ~ let mut source: Vec = source.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `source.get(0)` [INFO] [stdout] --> src/lib.rs:1315:70 [INFO] [stdout] | [INFO] [stdout] 1315 | let first_line: &str = &remove_single_line_comment_from_line(source.get(0).unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `source.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:1321:56 [INFO] [stdout] | [INFO] [stdout] 1321 | let class_start_capt = re_class_start.captures(&first_line); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `first_line` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:1362:45 [INFO] [stdout] | [INFO] [stdout] 1362 | method_tracker.add_line(&line); [INFO] [stdout] | ^^^^^ help: change this to: `line` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:1367:49 [INFO] [stdout] | [INFO] [stdout] 1367 | method_tracker.add_line(&line); [INFO] [stdout] | ^^^^^ help: change this to: `line` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:1382:44 [INFO] [stdout] | [INFO] [stdout] 1382 | class_tracker.add_line(&line); [INFO] [stdout] | ^^^^^ help: change this to: `line` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:1387:48 [INFO] [stdout] | [INFO] [stdout] 1387 | class_tracker.add_line(&line); [INFO] [stdout] | ^^^^^ help: change this to: `line` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:1405:67 [INFO] [stdout] | [INFO] [stdout] 1405 | if ml_comment_tracker.is_end_of_multiline_comment(&line) { [INFO] [stdout] | ^^^^^ help: change this to: `line` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:1409:69 [INFO] [stdout] | [INFO] [stdout] 1409 | if ml_comment_tracker.is_begin_of_multiline_comment(&line) { [INFO] [stdout] | ^^^^^ help: change this to: `line` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:1418:74 [INFO] [stdout] | [INFO] [stdout] 1418 | let line_text: String = remove_single_line_comment_from_line(&line); [INFO] [stdout] | ^^^^^ help: change this to: `line` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:1423:45 [INFO] [stdout] | [INFO] [stdout] 1423 | method_tracker.add_line(&line); [INFO] [stdout] | ^^^^^ help: change this to: `line` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:1436:52 [INFO] [stdout] | [INFO] [stdout] 1436 | ... class_tracker.add_line(&line); [INFO] [stdout] | ^^^^^ help: change this to: `line` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `default` can be confused for the standard trait method `std::default::Default::default` [INFO] [stdout] --> src/lib.rs:1476:5 [INFO] [stdout] | [INFO] [stdout] 1476 | / pub fn default() -> Self { [INFO] [stdout] 1477 | | return Class { [INFO] [stdout] 1478 | | name: "".to_string(), [INFO] [stdout] 1479 | | parent: "".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 1483 | | }; [INFO] [stdout] 1484 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::default::Default` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:1477:9 [INFO] [stdout] | [INFO] [stdout] 1477 | / return Class { [INFO] [stdout] 1478 | | name: "".to_string(), [INFO] [stdout] 1479 | | parent: "".to_string(), [INFO] [stdout] 1480 | | variables: Vec::new(), [INFO] [stdout] 1481 | | methods: Vec::new(), [INFO] [stdout] 1482 | | classes: Vec::new() [INFO] [stdout] 1483 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1477 ~ Class { [INFO] [stdout] 1478 + name: "".to_string(), [INFO] [stdout] 1479 + parent: "".to_string(), [INFO] [stdout] 1480 + variables: Vec::new(), [INFO] [stdout] 1481 + methods: Vec::new(), [INFO] [stdout] 1482 + classes: Vec::new() [INFO] [stdout] 1483 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/lib.rs:1486:71 [INFO] [stdout] | [INFO] [stdout] 1486 | pub fn scan(&self, writer: &mut BufWriter>, scope: &Vec<(usize, String)>) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 1486 ~ pub fn scan(&self, writer: &mut BufWriter>, scope: &[(usize, String)]) { [INFO] [stdout] 1487 | // Define function to check if the scope contains a variable name. [INFO] [stdout] ... [INFO] [stdout] 1497 | // Clone scope (everything inside this class is local to this scope). [INFO] [stdout] 1498 ~ let mut scope: Vec<(usize, String)> = scope.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:1494:13 [INFO] [stdout] | [INFO] [stdout] 1494 | return false; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1494 - return false; [INFO] [stdout] 1494 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `self.get_methods().get(0).unwrap().get_source().get(0)` [INFO] [stdout] --> src/lib.rs:1506:63 [INFO] [stdout] | [INFO] [stdout] 1506 | let class_indentation: usize = get_indentation_length(self.get_methods().get(0).unwrap().get_source().get(0).unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.get_methods().get(0).unwrap().get_source().first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `self.get_methods().get(0)` [INFO] [stdout] --> src/lib.rs:1506:63 [INFO] [stdout] | [INFO] [stdout] 1506 | let class_indentation: usize = get_indentation_length(self.get_methods().get(0).unwrap().get_source().get(0).unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.get_methods().first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the method `scan` doesn't need a mutable reference [INFO] [stdout] --> src/lib.rs:1527:33 [INFO] [stdout] | [INFO] [stdout] 1527 | method.scan(writer, &mut scope); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 1527 - method.scan(writer, &mut scope); [INFO] [stdout] 1527 + method.scan(writer, &scope); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:1532:9 [INFO] [stdout] | [INFO] [stdout] 1532 | return &self.name; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1532 - return &self.name; [INFO] [stdout] 1532 + &self.name [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:1536:9 [INFO] [stdout] | [INFO] [stdout] 1536 | return &self.parent; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1536 - return &self.parent; [INFO] [stdout] 1536 + &self.parent [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:1540:9 [INFO] [stdout] | [INFO] [stdout] 1540 | return &self.variables; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1540 - return &self.variables; [INFO] [stdout] 1540 + &self.variables [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:1544:9 [INFO] [stdout] | [INFO] [stdout] 1544 | return &self.methods; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1544 - return &self.methods; [INFO] [stdout] 1544 + &self.methods [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:1548:9 [INFO] [stdout] | [INFO] [stdout] 1548 | return &self.classes; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1548 - return &self.classes; [INFO] [stdout] 1548 + &self.classes [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:1589:9 [INFO] [stdout] | [INFO] [stdout] 1589 | return lines; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1589 - return lines; [INFO] [stdout] 1589 + lines [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `lines.get(0)` [INFO] [stdout] --> src/lib.rs:1577:57 [INFO] [stdout] | [INFO] [stdout] 1577 | let indentation: usize = get_indentation_length(lines.get(0).unwrap()) - 4; [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `lines.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/lib.rs:1580:13 [INFO] [stdout] | [INFO] [stdout] 1580 | indentation_str.push_str(" "); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `indentation_str.push(' ')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] = note: `#[warn(clippy::single_char_add_str)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `lines.get(0)` [INFO] [stdout] --> src/lib.rs:1584:48 [INFO] [stdout] | [INFO] [stdout] 1584 | ... let class_definition: Line = Line::new(lines.get(0).unwrap().get_number() - 1, format!("{}class {}({}): [FABICATED LINE]", i... [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `lines.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:1642:9 [INFO] [stdout] | [INFO] [stdout] 1642 | return string; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1642 - return string; [INFO] [stdout] 1642 + string [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/lib.rs:1608:12 [INFO] [stdout] | [INFO] [stdout] 1608 | if self.get_variables().len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.get_variables().is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/lib.rs:1619:12 [INFO] [stdout] | [INFO] [stdout] 1619 | if self.get_methods().len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.get_methods().is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/lib.rs:1630:12 [INFO] [stdout] | [INFO] [stdout] 1630 | if self.get_classes().len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.get_classes().is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:1650:9 [INFO] [stdout] | [INFO] [stdout] 1650 | / return self.get_name() == other.get_name() [INFO] [stdout] 1651 | | && self.get_parent() == other.get_parent() [INFO] [stdout] 1652 | | && self.get_variables() == other.get_variables() [INFO] [stdout] 1653 | | && self.get_methods() == other.get_methods() [INFO] [stdout] 1654 | | && self.get_classes() == other.get_classes(); [INFO] [stdout] | |________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1650 ~ self.get_name() == other.get_name() [INFO] [stdout] 1651 + && self.get_parent() == other.get_parent() [INFO] [stdout] 1652 + && self.get_variables() == other.get_variables() [INFO] [stdout] 1653 + && self.get_methods() == other.get_methods() [INFO] [stdout] 1654 ~ && self.get_classes() == other.get_classes() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:1665:5 [INFO] [stdout] | [INFO] [stdout] 1665 | return indentation_capt.unwrap()["indentation"].to_string().len(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1665 - return indentation_capt.unwrap()["indentation"].to_string().len(); [INFO] [stdout] 1665 + indentation_capt.unwrap()["indentation"].to_string().len() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:1705:22 [INFO] [stdout] | [INFO] [stdout] 1705 | 0 => return None, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1705 - 0 => return None, [INFO] [stdout] 1705 + 0 => None, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:1706:22 [INFO] [stdout] | [INFO] [stdout] 1706 | _ => return Some(modules_vec), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1706 - _ => return Some(modules_vec), [INFO] [stdout] 1706 + _ => Some(modules_vec), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:1737:30 [INFO] [stdout] | [INFO] [stdout] 1737 | 0 => return None, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1737 - 0 => return None, [INFO] [stdout] 1737 + 0 => None, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:1738:30 [INFO] [stdout] | [INFO] [stdout] 1738 | _ => return Some(objects_vec), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1738 - _ => return Some(objects_vec), [INFO] [stdout] 1738 + _ => Some(objects_vec), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:1741:25 [INFO] [stdout] | [INFO] [stdout] 1741 | None => return None [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1741 - None => return None [INFO] [stdout] 1741 + None => None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:1674:66 [INFO] [stdout] | [INFO] [stdout] 1674 | let line_text: String = remove_single_line_comment_from_line(&line); [INFO] [stdout] | ^^^^^ help: change this to: `line` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing last element with `module_split.get(module_split.len() - 1)` [INFO] [stdout] --> src/lib.rs:1686:34 [INFO] [stdout] | [INFO] [stdout] 1686 | modules_vec.push(module_split.get(module_split.len() - 1).unwrap().trim().to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `module_split.last()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_last_with_len [INFO] [stdout] = note: `#[warn(clippy::get_last_with_len)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing last element with `object_split.get(object_split.len() - 1)` [INFO] [stdout] --> src/lib.rs:1718:42 [INFO] [stdout] | [INFO] [stdout] 1718 | objects_vec.push(object_split.get(object_split.len() - 1).unwrap().trim().to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `object_split.last()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_last_with_len [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:1754:20 [INFO] [stdout] | [INFO] [stdout] 1754 | Some(_) => return true, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1754 - Some(_) => return true, [INFO] [stdout] 1754 + Some(_) => true, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:1755:17 [INFO] [stdout] | [INFO] [stdout] 1755 | None => return false [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1755 - None => return false [INFO] [stdout] 1755 + None => false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:1750:66 [INFO] [stdout] | [INFO] [stdout] 1750 | let line_text: String = remove_single_line_comment_from_line(&line); [INFO] [stdout] | ^^^^^ help: change this to: `line` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:1766:20 [INFO] [stdout] | [INFO] [stdout] 1766 | Some(_) => return true, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1766 - Some(_) => return true, [INFO] [stdout] 1766 + Some(_) => true, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:1767:17 [INFO] [stdout] | [INFO] [stdout] 1767 | None => return false [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1767 - None => return false [INFO] [stdout] 1767 + None => false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lib.rs:1786:28 [INFO] [stdout] | [INFO] [stdout] 1786 | if !(prev_char == '\\') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `(prev_char != '\\')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lib.rs:1794:32 [INFO] [stdout] | [INFO] [stdout] 1794 | ... if !(prev_char == '\\') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `(prev_char != '\\')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lib.rs:1807:28 [INFO] [stdout] | [INFO] [stdout] 1807 | if !(prev_char == '\\') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `(prev_char != '\\')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lib.rs:1815:32 [INFO] [stdout] | [INFO] [stdout] 1815 | ... if !(prev_char == '\\') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `(prev_char != '\\')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:1832:5 [INFO] [stdout] | [INFO] [stdout] 1832 | return result; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1832 - return result; [INFO] [stdout] 1832 + result [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:1781:17 [INFO] [stdout] | [INFO] [stdout] 1781 | / if !in_double_quotations { [INFO] [stdout] 1782 | | if index == 0 { [INFO] [stdout] 1783 | | in_single_quotations = !in_single_quotations; [INFO] [stdout] 1784 | | } else if index == 1 { [INFO] [stdout] ... | [INFO] [stdout] 1799 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1780 ~ '\'' [INFO] [stdout] 1781 ~ if !in_double_quotations => { [INFO] [stdout] 1782 | if index == 0 { [INFO] [stdout] ... [INFO] [stdout] 1798 | } [INFO] [stdout] 1799 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:1802:17 [INFO] [stdout] | [INFO] [stdout] 1802 | / if !in_single_quotations { [INFO] [stdout] 1803 | | if index == 0 { [INFO] [stdout] 1804 | | in_double_quotations = !in_double_quotations; [INFO] [stdout] 1805 | | } else if index == 1 { [INFO] [stdout] ... | [INFO] [stdout] 1820 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1801 ~ '\"' [INFO] [stdout] 1802 ~ if !in_single_quotations => { [INFO] [stdout] 1803 | if index == 0 { [INFO] [stdout] ... [INFO] [stdout] 1819 | } [INFO] [stdout] 1820 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:1823:17 [INFO] [stdout] | [INFO] [stdout] 1823 | / if !(in_single_quotations || in_double_quotations) { [INFO] [stdout] 1824 | | return result; [INFO] [stdout] 1825 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1822 ~ '#' [INFO] [stdout] 1823 ~ if !(in_single_quotations || in_double_quotations) => { [INFO] [stdout] 1824 | return result; [INFO] [stdout] 1825 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lib.rs:1793:25 [INFO] [stdout] | [INFO] [stdout] 1793 | / if !(prev_char == '\'' && prev_prev_char == '\'') { [INFO] [stdout] 1794 | | if !(prev_char == '\\') { [INFO] [stdout] 1795 | | in_single_quotations = !in_single_quotations; [INFO] [stdout] 1796 | | } [INFO] [stdout] 1797 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1793 ~ if !(prev_char == '\'' && prev_prev_char == '\'') [INFO] [stdout] 1794 ~ && !(prev_char == '\\') { [INFO] [stdout] 1795 | in_single_quotations = !in_single_quotations; [INFO] [stdout] 1796 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lib.rs:1814:25 [INFO] [stdout] | [INFO] [stdout] 1814 | / if !(prev_char == '\"' && prev_prev_char == '\"') { [INFO] [stdout] 1815 | | if !(prev_char == '\\') { [INFO] [stdout] 1816 | | in_double_quotations = !in_double_quotations; [INFO] [stdout] 1817 | | } [INFO] [stdout] 1818 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1814 ~ if !(prev_char == '\"' && prev_prev_char == '\"') [INFO] [stdout] 1815 ~ && !(prev_char == '\\') { [INFO] [stdout] 1816 | in_double_quotations = !in_double_quotations; [INFO] [stdout] 1817 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:1836:5 [INFO] [stdout] | [INFO] [stdout] 1836 | / return line.get_text().trim_start().starts_with("\"\"\"") [INFO] [stdout] 1837 | | || line.get_text().trim_start().starts_with("\'\'\'"); [INFO] [stdout] | |_____________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1836 ~ line.get_text().trim_start().starts_with("\"\"\"") [INFO] [stdout] 1837 ~ || line.get_text().trim_start().starts_with("\'\'\'") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:1852:5 [INFO] [stdout] | [INFO] [stdout] 1852 | return condition1 || condition2; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1852 - return condition1 || condition2; [INFO] [stdout] 1852 + condition1 || condition2 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:1844:72 [INFO] [stdout] | [INFO] [stdout] 1844 | let text_no_comment: String = remove_single_line_comment_from_line(&line); [INFO] [stdout] | ^^^^^ help: change this to: `line` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:1903:5 [INFO] [stdout] | [INFO] [stdout] 1903 | return result; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1903 - return result; [INFO] [stdout] 1903 + result [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:1895:50 [INFO] [stdout] | [INFO] [stdout] 1895 | if result.get("check").unwrap().contains(&value) { [INFO] [stdout] | ^^^^^^ help: change this to: `value` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:1926:5 [INFO] [stdout] | [INFO] [stdout] 1926 | return result; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1926 - return result; [INFO] [stdout] 1926 + result [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:1949:5 [INFO] [stdout] | [INFO] [stdout] 1949 | return result; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1949 - return result; [INFO] [stdout] 1949 + result [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:1987:5 [INFO] [stdout] | [INFO] [stdout] 1987 | return result; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1987 - return result; [INFO] [stdout] 1987 + result [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/lib.rs:1960:12 [INFO] [stdout] | [INFO] [stdout] 1960 | if let Some(_) = capt { [INFO] [stdout] | -------^^^^^^^------- help: try: `if capt.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lib.rs:1976:9 [INFO] [stdout] | [INFO] [stdout] 1976 | / if index != 0 && value.len() == 1 { [INFO] [stdout] 1977 | | if value.get(0).unwrap() == subelement { [INFO] [stdout] 1978 | | continue; [INFO] [stdout] 1979 | | } [INFO] [stdout] 1980 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1976 ~ if index != 0 && value.len() == 1 [INFO] [stdout] 1977 ~ && value.get(0).unwrap() == subelement { [INFO] [stdout] 1978 | continue; [INFO] [stdout] 1979 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `value.get(0)` [INFO] [stdout] --> src/lib.rs:1977:16 [INFO] [stdout] | [INFO] [stdout] 1977 | if value.get(0).unwrap() == subelement { [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `value.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert` to construct default value [INFO] [stdout] --> src/lib.rs:1983:51 [INFO] [stdout] | [INFO] [stdout] 1983 | result.entry("check".to_string()).or_insert(Vec::new()).push(string); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:2009:5 [INFO] [stdout] | [INFO] [stdout] 2009 | return result; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 2009 - return result; [INFO] [stdout] 2009 + result [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:2519:5 [INFO] [stdout] | [INFO] [stdout] 2519 | return result; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 2519 - return result; [INFO] [stdout] 2519 + result [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lib.rs:2052:17 [INFO] [stdout] | [INFO] [stdout] 2052 | / if in_single_quotations || in_double_quotations { [INFO] [stdout] 2053 | | if !space_added { [INFO] [stdout] 2054 | | string_single_spaces.push(c); [INFO] [stdout] 2055 | | space_added = true; [INFO] [stdout] 2056 | | } [INFO] [stdout] 2057 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2052 ~ if (in_single_quotations || in_double_quotations) { [INFO] [stdout] 2053 ~ && !space_added { [INFO] [stdout] 2054 | string_single_spaces.push(c); [INFO] [stdout] 2055 | space_added = true; [INFO] [stdout] 2056 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:2086:17 [INFO] [stdout] | [INFO] [stdout] 2086 | / if !(in_single_quotations || in_double_quotations) { [INFO] [stdout] 2087 | | // Check if the previous and next character are not both \w characters. If they are, do not remove the space. [INFO] [stdout] 2088 | | if index == 0 { [INFO] [stdout] 2089 | | continue; [INFO] [stdout] ... | [INFO] [stdout] 2123 | | string_no_spaces.push(c); [INFO] [stdout] 2124 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2085 ~ ' ' [INFO] [stdout] 2086 ~ if !(in_single_quotations || in_double_quotations) => { [INFO] [stdout] 2087 | // Check if the previous and next character are not both \w characters. If they are, do not remove the space. [INFO] [stdout] ... [INFO] [stdout] 2121 | } [INFO] [stdout] 2122 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lib.rs:2095:21 [INFO] [stdout] | [INFO] [stdout] 2095 | / match prev_char { [INFO] [stdout] 2096 | | Some(a) => { [INFO] [stdout] 2097 | | match next_char { [INFO] [stdout] 2098 | | Some(b) => { [INFO] [stdout] ... | [INFO] [stdout] 2120 | | None => () [INFO] [stdout] 2121 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 2095 ~ if let Some(a) = prev_char { [INFO] [stdout] 2096 + match next_char { [INFO] [stdout] 2097 + Some(b) => { [INFO] [stdout] 2098 + let re = Regex::new(r"^\w$").unwrap(); [INFO] [stdout] 2099 + let a_str = &a.to_string(); [INFO] [stdout] 2100 + let b_str = &b.to_string(); [INFO] [stdout] 2101 + let capt_a = re.captures(a_str); [INFO] [stdout] 2102 + let capt_b = re.captures(b_str); [INFO] [stdout] 2103 + [INFO] [stdout] 2104 + match capt_a { [INFO] [stdout] 2105 + Some(_) => { [INFO] [stdout] 2106 + match capt_b { [INFO] [stdout] 2107 + Some(_) => { [INFO] [stdout] 2108 + string_no_spaces.push(c); [INFO] [stdout] 2109 + }, [INFO] [stdout] 2110 + None => () [INFO] [stdout] 2111 + } [INFO] [stdout] 2112 + }, [INFO] [stdout] 2113 + None => () [INFO] [stdout] 2114 + } [INFO] [stdout] 2115 + }, [INFO] [stdout] 2116 + None => () [INFO] [stdout] 2117 + } [INFO] [stdout] 2118 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lib.rs:2097:29 [INFO] [stdout] | [INFO] [stdout] 2097 | / ... match next_char { [INFO] [stdout] 2098 | | ... Some(b) => { [INFO] [stdout] 2099 | | ... let re = Regex::new(r"^\w$").unwrap(); [INFO] [stdout] 2100 | | ... let a_str = &a.to_string(); [INFO] [stdout] ... | [INFO] [stdout] 2117 | | ... None => () [INFO] [stdout] 2118 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 2097 ~ if let Some(b) = next_char { [INFO] [stdout] 2098 + let re = Regex::new(r"^\w$").unwrap(); [INFO] [stdout] 2099 + let a_str = &a.to_string(); [INFO] [stdout] 2100 + let b_str = &b.to_string(); [INFO] [stdout] 2101 + let capt_a = re.captures(a_str); [INFO] [stdout] 2102 + let capt_b = re.captures(b_str); [INFO] [stdout] 2103 + [INFO] [stdout] 2104 + match capt_a { [INFO] [stdout] 2105 + Some(_) => { [INFO] [stdout] 2106 + match capt_b { [INFO] [stdout] 2107 + Some(_) => { [INFO] [stdout] 2108 + string_no_spaces.push(c); [INFO] [stdout] 2109 + }, [INFO] [stdout] 2110 + None => () [INFO] [stdout] 2111 + } [INFO] [stdout] 2112 + }, [INFO] [stdout] 2113 + None => () [INFO] [stdout] 2114 + } [INFO] [stdout] 2115 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: compiling a regex in a loop [INFO] [stdout] --> src/lib.rs:2099:46 [INFO] [stdout] | [INFO] [stdout] 2099 | ... let re = Regex::new(r"^\w$").unwrap(); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: move the regex construction outside this loop [INFO] [stdout] --> src/lib.rs:2071:5 [INFO] [stdout] | [INFO] [stdout] 2071 | for (index, c) in element.chars().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#regex_creation_in_loops [INFO] [stdout] = note: `#[warn(clippy::regex_creation_in_loops)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lib.rs:2105:37 [INFO] [stdout] | [INFO] [stdout] 2105 | / ... match capt_a { [INFO] [stdout] 2106 | | ... Some(_) => { [INFO] [stdout] 2107 | | ... match capt_b { [INFO] [stdout] 2108 | | ... Some(_) => { [INFO] [stdout] ... | [INFO] [stdout] 2114 | | ... None => () [INFO] [stdout] 2115 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 2105 ~ if let Some(_) = capt_a { [INFO] [stdout] 2106 + match capt_b { [INFO] [stdout] 2107 + Some(_) => { [INFO] [stdout] 2108 + string_no_spaces.push(c); [INFO] [stdout] 2109 + }, [INFO] [stdout] 2110 + None => () [INFO] [stdout] 2111 + } [INFO] [stdout] 2112 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lib.rs:2107:45 [INFO] [stdout] | [INFO] [stdout] 2107 | / ... match capt_b { [INFO] [stdout] 2108 | | ... Some(_) => { [INFO] [stdout] 2109 | | ... string_no_spaces.push(c); [INFO] [stdout] 2110 | | ... }, [INFO] [stdout] 2111 | | ... None => () [INFO] [stdout] 2112 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 2107 ~ if let Some(_) = capt_b { [INFO] [stdout] 2108 + string_no_spaces.push(c); [INFO] [stdout] 2109 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/lib.rs:2178:12 [INFO] [stdout] | [INFO] [stdout] 2178 | if let Some(_) = capt { [INFO] [stdout] | -------^^^^^^^------- help: try: `if capt.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `split_by_dot.get(0)` [INFO] [stdout] --> src/lib.rs:2211:9 [INFO] [stdout] | [INFO] [stdout] 2211 | if (split_by_dot.get(0).unwrap() != &string_no_spaces || split_by_dot.len() > 1) && !string_contains_arithmetic { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `split_by_dot.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:2307:17 [INFO] [stdout] | [INFO] [stdout] 2307 | / ... if !(in_single_quotations || in_double_quotations || bracket_depth > 0 || square_bracket_depth > 0 || curly_bracket_depth ... [INFO] [stdout] 2308 | | ... if !parts.contains(¤t_string) { [INFO] [stdout] 2309 | | ... parts.push(current_string); [INFO] [stdout] ... | [INFO] [stdout] 2313 | | ... current_string.push(c); [INFO] [stdout] 2314 | | ... } [INFO] [stdout] | |_______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2306 ~ '+'|'-'|'%'|'^'|'&'|'|' [INFO] [stdout] 2307 ~ if !(in_single_quotations || in_double_quotations || bracket_depth > 0 || square_bracket_depth > 0 || curly_bracket_depth > 0) => { [INFO] [stdout] 2308 | if !parts.contains(¤t_string) { [INFO] [stdout] ... [INFO] [stdout] 2311 | current_string = "".to_string(); [INFO] [stdout] 2312 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:2318:17 [INFO] [stdout] | [INFO] [stdout] 2318 | / ... if !(in_single_quotations || in_double_quotations || bracket_depth > 0 || square_bracket_depth > 0 || curly_bracket_depth ... [INFO] [stdout] 2319 | | ... if index < string_no_spaces.len() - 1 { [INFO] [stdout] 2320 | | ... let next_char: char = string_no_spaces.chars().nth(index + 1).unwrap(); [INFO] [stdout] 2321 | | ... if next_char == '*' || next_char == '/' { [INFO] [stdout] ... | [INFO] [stdout] 2334 | | ... current_string.push(c); [INFO] [stdout] 2335 | | ... } [INFO] [stdout] | |_______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2316 ~ '*'|'/' [INFO] [stdout] 2317 | // Check if next character is * or /. [INFO] [stdout] 2318 ~ if !(in_single_quotations || in_double_quotations || bracket_depth > 0 || square_bracket_depth > 0 || curly_bracket_depth > 0) => { [INFO] [stdout] 2319 | if index < string_no_spaces.len() - 1 { [INFO] [stdout] ... [INFO] [stdout] 2332 | current_string = "".to_string(); [INFO] [stdout] 2333 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:2339:17 [INFO] [stdout] | [INFO] [stdout] 2339 | / ... if !(in_single_quotations || in_double_quotations || bracket_depth > 0 || square_bracket_depth > 0 || curly_bracket_depth ... [INFO] [stdout] 2340 | | ... if !parts.contains(¤t_string) { [INFO] [stdout] 2341 | | ... parts.push(current_string); [INFO] [stdout] ... | [INFO] [stdout] 2355 | | ... current_string.push(c); [INFO] [stdout] 2356 | | ... } [INFO] [stdout] | |_______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2337 ~ '<'|'>'|'!'|'=' [INFO] [stdout] 2338 | // Check if the next character is '='. [INFO] [stdout] 2339 ~ if !(in_single_quotations || in_double_quotations || bracket_depth > 0 || square_bracket_depth > 0 || curly_bracket_depth > 0) => { [INFO] [stdout] 2340 | if !parts.contains(¤t_string) { [INFO] [stdout] ... [INFO] [stdout] 2353 | } [INFO] [stdout] 2354 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:2360:17 [INFO] [stdout] | [INFO] [stdout] 2360 | / ... if !(in_single_quotations || in_double_quotations || bracket_depth > 0 || square_bracket_depth > 0 || curly_bracket_depth ... [INFO] [stdout] 2361 | | ... let mut prev_char: Option = Some('?'); [INFO] [stdout] 2362 | | ... if index > 0 { [INFO] [stdout] 2363 | | ... prev_char = string_no_spaces.chars().nth(index - 1); [INFO] [stdout] ... | [INFO] [stdout] 2419 | | ... current_string.push(c); [INFO] [stdout] 2420 | | ... } [INFO] [stdout] | |_______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2358 ~ 'a' [INFO] [stdout] 2359 | // Check if the next characters are 'nd' and the 'and' is surrounded by non-word characters. [INFO] [stdout] 2360 ~ if !(in_single_quotations || in_double_quotations || bracket_depth > 0 || square_bracket_depth > 0 || curly_bracket_depth > 0) => { [INFO] [stdout] 2361 | let mut prev_char: Option = Some('?'); [INFO] [stdout] ... [INFO] [stdout] 2417 | } [INFO] [stdout] 2418 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:2424:17 [INFO] [stdout] | [INFO] [stdout] 2424 | / ... if !(in_single_quotations || in_double_quotations || bracket_depth > 0 || square_bracket_depth > 0 || curly_bracket_depth ... [INFO] [stdout] 2425 | | ... let mut prev_char: Option = Some('?'); [INFO] [stdout] 2426 | | ... if index > 0 { [INFO] [stdout] 2427 | | ... prev_char = string_no_spaces.chars().nth(index - 1); [INFO] [stdout] ... | [INFO] [stdout] 2475 | | ... current_string.push(c); [INFO] [stdout] 2476 | | ... } [INFO] [stdout] | |_______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2422 ~ 'o' [INFO] [stdout] 2423 | // Check if the next character is 'r' and the 'or' is surrounded by non-word characters. [INFO] [stdout] 2424 ~ if !(in_single_quotations || in_double_quotations || bracket_depth > 0 || square_bracket_depth > 0 || curly_bracket_depth > 0) => { [INFO] [stdout] 2425 | let mut prev_char: Option = Some('?'); [INFO] [stdout] ... [INFO] [stdout] 2473 | } [INFO] [stdout] 2474 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lib.rs:2253:17 [INFO] [stdout] | [INFO] [stdout] 2253 | / if !(in_single_quotations || in_double_quotations) { [INFO] [stdout] 2254 | | if square_bracket_depth == 0 && curly_bracket_depth == 0 { [INFO] [stdout] 2255 | | bracket_depth += 1; [INFO] [stdout] 2256 | | } [INFO] [stdout] 2257 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2253 ~ if !(in_single_quotations || in_double_quotations) [INFO] [stdout] 2254 ~ && square_bracket_depth == 0 && curly_bracket_depth == 0 { [INFO] [stdout] 2255 | bracket_depth += 1; [INFO] [stdout] 2256 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lib.rs:2261:17 [INFO] [stdout] | [INFO] [stdout] 2261 | / if !(in_single_quotations || in_double_quotations) { [INFO] [stdout] 2262 | | if square_bracket_depth == 0 && curly_bracket_depth == 0 { [INFO] [stdout] 2263 | | if bracket_depth > 0 { [INFO] [stdout] 2264 | | bracket_depth -= 1; [INFO] [stdout] ... | [INFO] [stdout] 2267 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2261 ~ if !(in_single_quotations || in_double_quotations) [INFO] [stdout] 2262 ~ && square_bracket_depth == 0 && curly_bracket_depth == 0 { [INFO] [stdout] 2263 | if bracket_depth > 0 { [INFO] [stdout] 2264 | bracket_depth -= 1; [INFO] [stdout] 2265 | } [INFO] [stdout] 2266 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lib.rs:2262:21 [INFO] [stdout] | [INFO] [stdout] 2262 | / if square_bracket_depth == 0 && curly_bracket_depth == 0 { [INFO] [stdout] 2263 | | if bracket_depth > 0 { [INFO] [stdout] 2264 | | bracket_depth -= 1; [INFO] [stdout] 2265 | | } [INFO] [stdout] 2266 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2262 ~ if square_bracket_depth == 0 && curly_bracket_depth == 0 [INFO] [stdout] 2263 ~ && bracket_depth > 0 { [INFO] [stdout] 2264 | bracket_depth -= 1; [INFO] [stdout] 2265 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lib.rs:2271:17 [INFO] [stdout] | [INFO] [stdout] 2271 | / if !(in_single_quotations || in_double_quotations) { [INFO] [stdout] 2272 | | if bracket_depth == 0 && curly_bracket_depth == 0 { [INFO] [stdout] 2273 | | square_bracket_depth += 1; [INFO] [stdout] 2274 | | } [INFO] [stdout] 2275 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2271 ~ if !(in_single_quotations || in_double_quotations) [INFO] [stdout] 2272 ~ && bracket_depth == 0 && curly_bracket_depth == 0 { [INFO] [stdout] 2273 | square_bracket_depth += 1; [INFO] [stdout] 2274 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lib.rs:2279:17 [INFO] [stdout] | [INFO] [stdout] 2279 | / if !(in_single_quotations || in_double_quotations) { [INFO] [stdout] 2280 | | if bracket_depth == 0 && curly_bracket_depth == 0 { [INFO] [stdout] 2281 | | if square_bracket_depth > 0 { [INFO] [stdout] 2282 | | square_bracket_depth -= 1; [INFO] [stdout] ... | [INFO] [stdout] 2285 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2279 ~ if !(in_single_quotations || in_double_quotations) [INFO] [stdout] 2280 ~ && bracket_depth == 0 && curly_bracket_depth == 0 { [INFO] [stdout] 2281 | if square_bracket_depth > 0 { [INFO] [stdout] 2282 | square_bracket_depth -= 1; [INFO] [stdout] 2283 | } [INFO] [stdout] 2284 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lib.rs:2280:21 [INFO] [stdout] | [INFO] [stdout] 2280 | / if bracket_depth == 0 && curly_bracket_depth == 0 { [INFO] [stdout] 2281 | | if square_bracket_depth > 0 { [INFO] [stdout] 2282 | | square_bracket_depth -= 1; [INFO] [stdout] 2283 | | } [INFO] [stdout] 2284 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2280 ~ if bracket_depth == 0 && curly_bracket_depth == 0 [INFO] [stdout] 2281 ~ && square_bracket_depth > 0 { [INFO] [stdout] 2282 | square_bracket_depth -= 1; [INFO] [stdout] 2283 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lib.rs:2289:17 [INFO] [stdout] | [INFO] [stdout] 2289 | / if !(in_single_quotations || in_double_quotations) { [INFO] [stdout] 2290 | | if bracket_depth == 0 && square_bracket_depth == 0 { [INFO] [stdout] 2291 | | curly_bracket_depth += 1; [INFO] [stdout] 2292 | | } [INFO] [stdout] 2293 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2289 ~ if !(in_single_quotations || in_double_quotations) [INFO] [stdout] 2290 ~ && bracket_depth == 0 && square_bracket_depth == 0 { [INFO] [stdout] 2291 | curly_bracket_depth += 1; [INFO] [stdout] 2292 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lib.rs:2297:17 [INFO] [stdout] | [INFO] [stdout] 2297 | / if !(in_single_quotations || in_double_quotations) { [INFO] [stdout] 2298 | | if bracket_depth == 0 && square_bracket_depth == 0 { [INFO] [stdout] 2299 | | if curly_bracket_depth > 0 { [INFO] [stdout] 2300 | | curly_bracket_depth -= 1; [INFO] [stdout] ... | [INFO] [stdout] 2303 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2297 ~ if !(in_single_quotations || in_double_quotations) [INFO] [stdout] 2298 ~ && bracket_depth == 0 && square_bracket_depth == 0 { [INFO] [stdout] 2299 | if curly_bracket_depth > 0 { [INFO] [stdout] 2300 | curly_bracket_depth -= 1; [INFO] [stdout] 2301 | } [INFO] [stdout] 2302 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lib.rs:2298:21 [INFO] [stdout] | [INFO] [stdout] 2298 | / if bracket_depth == 0 && square_bracket_depth == 0 { [INFO] [stdout] 2299 | | if curly_bracket_depth > 0 { [INFO] [stdout] 2300 | | curly_bracket_depth -= 1; [INFO] [stdout] 2301 | | } [INFO] [stdout] 2302 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2298 ~ if bracket_depth == 0 && square_bracket_depth == 0 [INFO] [stdout] 2299 ~ && curly_bracket_depth > 0 { [INFO] [stdout] 2300 | curly_bracket_depth -= 1; [INFO] [stdout] 2301 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:2348:29 [INFO] [stdout] | [INFO] [stdout] 2348 | / ... if a == '=' { [INFO] [stdout] 2349 | | ... chars_to_skip += 1; [INFO] [stdout] 2350 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2347 ~ Some(a) [INFO] [stdout] 2348 ~ if a == '=' => { [INFO] [stdout] 2349 | chars_to_skip += 1; [INFO] [stdout] 2350 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lib.rs:2346:21 [INFO] [stdout] | [INFO] [stdout] 2346 | / match next_char { [INFO] [stdout] 2347 | | Some(a) => { [INFO] [stdout] 2348 | | if a == '=' { [INFO] [stdout] 2349 | | chars_to_skip += 1; [INFO] [stdout] ... | [INFO] [stdout] 2352 | | None => () [INFO] [stdout] 2353 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 2346 ~ if let Some(a) = next_char { [INFO] [stdout] 2347 + if a == '=' { [INFO] [stdout] 2348 + chars_to_skip += 1; [INFO] [stdout] 2349 + } [INFO] [stdout] 2350 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: compiling a regex in a loop [INFO] [stdout] --> src/lib.rs:2368:44 [INFO] [stdout] | [INFO] [stdout] 2368 | let re_not_word_char = Regex::new(r"^\W$").unwrap(); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: move the regex construction outside this loop [INFO] [stdout] --> src/lib.rs:2234:5 [INFO] [stdout] | [INFO] [stdout] 2234 | for (index, c) in string_no_spaces.chars().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#regex_creation_in_loops [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:2377:45 [INFO] [stdout] | [INFO] [stdout] 2377 | / ... if nc == 'n' && nnc == 'd' { [INFO] [stdout] 2378 | | ... match next_next_next_char { [INFO] [stdout] 2379 | | ... Some(nnnc) => { [INFO] [stdout] 2380 | | ... let nnnc_string: String = nnnc.to_string(); [INFO] [stdout] ... | [INFO] [stdout] 2401 | | ... current_string.push(c); [INFO] [stdout] 2402 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2376 ~ Some(nnc) [INFO] [stdout] 2377 ~ if nc == 'n' && nnc == 'd' => { [INFO] [stdout] 2378 | match next_next_next_char { [INFO] [stdout] ... [INFO] [stdout] 2399 | } [INFO] [stdout] 2400 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/lib.rs:2382:64 [INFO] [stdout] | [INFO] [stdout] 2382 | ... if let Some(_) = pc_not_word_char { [INFO] [stdout] | -------^^^^^^^------------------- help: try: `if pc_not_word_char.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/lib.rs:2383:68 [INFO] [stdout] | [INFO] [stdout] 2383 | ... if let Some(_) = nnnc_not_word_char { [INFO] [stdout] | -------^^^^^^^--------------------- help: try: `if nnnc_not_word_char.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: compiling a regex in a loop [INFO] [stdout] --> src/lib.rs:2431:44 [INFO] [stdout] | [INFO] [stdout] 2431 | let re_not_word_char = Regex::new(r"^\W$").unwrap(); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: move the regex construction outside this loop [INFO] [stdout] --> src/lib.rs:2234:5 [INFO] [stdout] | [INFO] [stdout] 2234 | for (index, c) in string_no_spaces.chars().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#regex_creation_in_loops [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:2438:37 [INFO] [stdout] | [INFO] [stdout] 2438 | / ... if nc == 'r' { [INFO] [stdout] 2439 | | ... match next_next_char { [INFO] [stdout] 2440 | | ... Some(nnc) => { [INFO] [stdout] 2441 | | ... let nnc_string: String = nnc.to_string(); [INFO] [stdout] ... | [INFO] [stdout] 2462 | | ... current_string.push(c); [INFO] [stdout] 2463 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2437 ~ Some(nc) [INFO] [stdout] 2438 ~ if nc == 'r' => { [INFO] [stdout] 2439 | match next_next_char { [INFO] [stdout] ... [INFO] [stdout] 2460 | } [INFO] [stdout] 2461 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/lib.rs:2443:56 [INFO] [stdout] | [INFO] [stdout] 2443 | ... if let Some(_) = pc_not_word_char { [INFO] [stdout] | -------^^^^^^^------------------- help: try: `if pc_not_word_char.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/lib.rs:2444:60 [INFO] [stdout] | [INFO] [stdout] 2444 | ... if let Some(_) = nnc_not_word_char { [INFO] [stdout] | -------^^^^^^^-------------------- help: try: `if nnc_not_word_char.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lib.rs:2483:5 [INFO] [stdout] | [INFO] [stdout] 2483 | / if parts.len() > 0 { [INFO] [stdout] 2484 | | if !parts.contains(¤t_string) { [INFO] [stdout] 2485 | | parts.push(current_string); [INFO] [stdout] 2486 | | } [INFO] [stdout] 2487 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2483 ~ if parts.len() > 0 [INFO] [stdout] 2484 ~ && !parts.contains(¤t_string) { [INFO] [stdout] 2485 | parts.push(current_string); [INFO] [stdout] 2486 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/lib.rs:2483:8 [INFO] [stdout] | [INFO] [stdout] 2483 | if parts.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!parts.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/lib.rs:2491:12 [INFO] [stdout] | [INFO] [stdout] 2491 | if part == "" { [INFO] [stdout] | ^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `part.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] = note: `#[warn(clippy::comparison_to_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:2495:28 [INFO] [stdout] | [INFO] [stdout] 2495 | if result.contains(&part) { [INFO] [stdout] | ^^^^^ help: change this to: `part` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:2590:5 [INFO] [stdout] | [INFO] [stdout] 2590 | return false; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 2590 - return false; [INFO] [stdout] 2590 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:2530:21 [INFO] [stdout] | [INFO] [stdout] 2530 | / if !in_double_quotations { [INFO] [stdout] 2531 | | in_single_quotations = !in_single_quotations; [INFO] [stdout] 2532 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2529 ~ '\'' [INFO] [stdout] 2530 ~ if !in_double_quotations => { [INFO] [stdout] 2531 | in_single_quotations = !in_single_quotations; [INFO] [stdout] 2532 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:2535:21 [INFO] [stdout] | [INFO] [stdout] 2535 | / if !in_single_quotations { [INFO] [stdout] 2536 | | in_double_quotations = !in_double_quotations; [INFO] [stdout] 2537 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2534 ~ '\"' [INFO] [stdout] 2535 ~ if !in_single_quotations => { [INFO] [stdout] 2536 | in_double_quotations = !in_double_quotations; [INFO] [stdout] 2537 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:2540:21 [INFO] [stdout] | [INFO] [stdout] 2540 | / if !(in_single_quotations || in_double_quotations) { [INFO] [stdout] 2541 | | bracket_level += 1; [INFO] [stdout] 2542 | | if index != 0 && bracket_level == 1 { [INFO] [stdout] 2543 | | return false; [INFO] [stdout] 2544 | | } [INFO] [stdout] 2545 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2539 ~ '(' [INFO] [stdout] 2540 ~ if !(in_single_quotations || in_double_quotations) => { [INFO] [stdout] 2541 | bracket_level += 1; [INFO] [stdout] ... [INFO] [stdout] 2544 | } [INFO] [stdout] 2545 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:2548:21 [INFO] [stdout] | [INFO] [stdout] 2548 | / if !(in_single_quotations || in_double_quotations) { [INFO] [stdout] 2549 | | bracket_level -= 1; [INFO] [stdout] 2550 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2547 ~ ')' [INFO] [stdout] 2548 ~ if !(in_single_quotations || in_double_quotations) => { [INFO] [stdout] 2549 | bracket_level -= 1; [INFO] [stdout] 2550 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:2563:21 [INFO] [stdout] | [INFO] [stdout] 2563 | / if !in_double_quotations { [INFO] [stdout] 2564 | | in_single_quotations = !in_single_quotations; [INFO] [stdout] 2565 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2562 ~ '\'' [INFO] [stdout] 2563 ~ if !in_double_quotations => { [INFO] [stdout] 2564 | in_single_quotations = !in_single_quotations; [INFO] [stdout] 2565 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:2568:21 [INFO] [stdout] | [INFO] [stdout] 2568 | / if !in_single_quotations { [INFO] [stdout] 2569 | | in_double_quotations = !in_double_quotations; [INFO] [stdout] 2570 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2567 ~ '\"' [INFO] [stdout] 2568 ~ if !in_single_quotations => { [INFO] [stdout] 2569 | in_double_quotations = !in_double_quotations; [INFO] [stdout] 2570 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:2573:21 [INFO] [stdout] | [INFO] [stdout] 2573 | / if !(in_single_quotations || in_double_quotations) { [INFO] [stdout] 2574 | | bracket_level += 1; [INFO] [stdout] 2575 | | if index != 0 && bracket_level == 1 { [INFO] [stdout] 2576 | | return false; [INFO] [stdout] 2577 | | } [INFO] [stdout] 2578 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2572 ~ '[' [INFO] [stdout] 2573 ~ if !(in_single_quotations || in_double_quotations) => { [INFO] [stdout] 2574 | bracket_level += 1; [INFO] [stdout] ... [INFO] [stdout] 2577 | } [INFO] [stdout] 2578 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:2581:21 [INFO] [stdout] | [INFO] [stdout] 2581 | / if !(in_single_quotations || in_double_quotations) { [INFO] [stdout] 2582 | | bracket_level -= 1; [INFO] [stdout] 2583 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2580 ~ ']' [INFO] [stdout] 2581 ~ if !(in_single_quotations || in_double_quotations) => { [INFO] [stdout] 2582 | bracket_level -= 1; [INFO] [stdout] 2583 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:2667:5 [INFO] [stdout] | [INFO] [stdout] 2667 | / return (in_single_quotations_true_count == 1 && !in_single_quotations) [INFO] [stdout] 2668 | | || (in_double_quotations_true_count == 1 && !in_double_quotations) [INFO] [stdout] 2669 | | || (in_multiline_single_quotations_true_count == 1 && !in_multiline_single_quotations) [INFO] [stdout] 2670 | | || (in_multiline_double_quotations_true_count == 1 && !in_multiline_double_quotations); [INFO] [stdout] | |______________________________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 2667 ~ (in_single_quotations_true_count == 1 && !in_single_quotations) [INFO] [stdout] 2668 + || (in_double_quotations_true_count == 1 && !in_double_quotations) [INFO] [stdout] 2669 + || (in_multiline_single_quotations_true_count == 1 && !in_multiline_single_quotations) [INFO] [stdout] 2670 ~ || (in_multiline_double_quotations_true_count == 1 && !in_multiline_double_quotations) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:2614:17 [INFO] [stdout] | [INFO] [stdout] 2614 | / if !(in_double_quotations || in_multiline_double_quotations) { [INFO] [stdout] 2615 | | if index >= 2 { [INFO] [stdout] 2616 | | let prev_char = string.chars().nth(index - 1).unwrap(); [INFO] [stdout] 2617 | | let prev_prev_char = string.chars().nth(index - 2).unwrap(); [INFO] [stdout] ... | [INFO] [stdout] 2636 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2613 ~ '\'' [INFO] [stdout] 2614 ~ if !(in_double_quotations || in_multiline_double_quotations) => { [INFO] [stdout] 2615 | if index >= 2 { [INFO] [stdout] ... [INFO] [stdout] 2635 | } [INFO] [stdout] 2636 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:2639:17 [INFO] [stdout] | [INFO] [stdout] 2639 | / if !(in_single_quotations || in_multiline_single_quotations) { [INFO] [stdout] 2640 | | if index >= 2 { [INFO] [stdout] 2641 | | let prev_char = string.chars().nth(index - 1).unwrap(); [INFO] [stdout] 2642 | | let prev_prev_char = string.chars().nth(index - 2).unwrap(); [INFO] [stdout] ... | [INFO] [stdout] 2661 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2638 ~ '\"' [INFO] [stdout] 2639 ~ if !(in_single_quotations || in_multiline_single_quotations) => { [INFO] [stdout] 2640 | if index >= 2 { [INFO] [stdout] ... [INFO] [stdout] 2660 | } [INFO] [stdout] 2661 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:2727:5 [INFO] [stdout] | [INFO] [stdout] 2727 | return true; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 2727 - return true; [INFO] [stdout] 2727 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lib.rs:2677:5 [INFO] [stdout] | [INFO] [stdout] 2677 | / match capt { [INFO] [stdout] 2678 | | None => return false, [INFO] [stdout] 2679 | | Some(_) => (), [INFO] [stdout] 2680 | | } [INFO] [stdout] | |_____^ help: try: `if let None = capt { return false }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:2710:17 [INFO] [stdout] | [INFO] [stdout] 2710 | / if !(in_single_quotations || in_double_quotations) { [INFO] [stdout] 2711 | | in_brackets_depth += 1; [INFO] [stdout] 2712 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2709 ~ '(' [INFO] [stdout] 2710 ~ if !(in_single_quotations || in_double_quotations) => { [INFO] [stdout] 2711 | in_brackets_depth += 1; [INFO] [stdout] 2712 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:2715:17 [INFO] [stdout] | [INFO] [stdout] 2715 | / if !(in_single_quotations || in_double_quotations) { [INFO] [stdout] 2716 | | in_brackets_depth -= 1; [INFO] [stdout] 2717 | | if in_brackets_depth == 0 { [INFO] [stdout] 2718 | | if index != string.len() - 1 { [INFO] [stdout] ... | [INFO] [stdout] 2722 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2714 ~ ')' [INFO] [stdout] 2715 ~ if !(in_single_quotations || in_double_quotations) => { [INFO] [stdout] 2716 | in_brackets_depth -= 1; [INFO] [stdout] ... [INFO] [stdout] 2721 | } [INFO] [stdout] 2722 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lib.rs:2717:21 [INFO] [stdout] | [INFO] [stdout] 2717 | / if in_brackets_depth == 0 { [INFO] [stdout] 2718 | | if index != string.len() - 1 { [INFO] [stdout] 2719 | | return false; [INFO] [stdout] 2720 | | } [INFO] [stdout] 2721 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2717 ~ if in_brackets_depth == 0 [INFO] [stdout] 2718 ~ && index != string.len() - 1 { [INFO] [stdout] 2719 | return false; [INFO] [stdout] 2720 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:2784:5 [INFO] [stdout] | [INFO] [stdout] 2784 | return true; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 2784 - return true; [INFO] [stdout] 2784 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/lib.rs:2734:5 [INFO] [stdout] | [INFO] [stdout] 2734 | / match capt { [INFO] [stdout] 2735 | | None => return false, [INFO] [stdout] 2736 | | Some(_) => (), [INFO] [stdout] 2737 | | } [INFO] [stdout] | |_____^ help: try: `if let None = capt { return false }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:2767:17 [INFO] [stdout] | [INFO] [stdout] 2767 | / if !(in_single_quotations || in_double_quotations) { [INFO] [stdout] 2768 | | in_brackets_depth += 1; [INFO] [stdout] 2769 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2766 ~ '[' [INFO] [stdout] 2767 ~ if !(in_single_quotations || in_double_quotations) => { [INFO] [stdout] 2768 | in_brackets_depth += 1; [INFO] [stdout] 2769 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:2772:17 [INFO] [stdout] | [INFO] [stdout] 2772 | / if !(in_single_quotations || in_double_quotations) { [INFO] [stdout] 2773 | | in_brackets_depth -= 1; [INFO] [stdout] 2774 | | if in_brackets_depth == 0 { [INFO] [stdout] 2775 | | if index != string.len() - 1 { [INFO] [stdout] ... | [INFO] [stdout] 2779 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2771 ~ ']' [INFO] [stdout] 2772 ~ if !(in_single_quotations || in_double_quotations) => { [INFO] [stdout] 2773 | in_brackets_depth -= 1; [INFO] [stdout] ... [INFO] [stdout] 2778 | } [INFO] [stdout] 2779 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lib.rs:2774:21 [INFO] [stdout] | [INFO] [stdout] 2774 | / if in_brackets_depth == 0 { [INFO] [stdout] 2775 | | if index != string.len() - 1 { [INFO] [stdout] 2776 | | return false; [INFO] [stdout] 2777 | | } [INFO] [stdout] 2778 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2774 ~ if in_brackets_depth == 0 [INFO] [stdout] 2775 ~ && index != string.len() - 1 { [INFO] [stdout] 2776 | return false; [INFO] [stdout] 2777 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:2861:5 [INFO] [stdout] | [INFO] [stdout] 2861 | return false; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 2861 - return false; [INFO] [stdout] 2861 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:2802:17 [INFO] [stdout] | [INFO] [stdout] 2802 | / if !in_double_quotations { [INFO] [stdout] 2803 | | in_single_quotations = !in_single_quotations; [INFO] [stdout] 2804 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2801 ~ '\'' [INFO] [stdout] 2802 ~ if !in_double_quotations => { [INFO] [stdout] 2803 | in_single_quotations = !in_single_quotations; [INFO] [stdout] 2804 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:2807:17 [INFO] [stdout] | [INFO] [stdout] 2807 | / if !in_single_quotations { [INFO] [stdout] 2808 | | in_double_quotations = !in_double_quotations; [INFO] [stdout] 2809 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2806 ~ '\"' [INFO] [stdout] 2807 ~ if !in_single_quotations => { [INFO] [stdout] 2808 | in_double_quotations = !in_double_quotations; [INFO] [stdout] 2809 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:2812:17 [INFO] [stdout] | [INFO] [stdout] 2812 | / if !(in_single_quotations || in_double_quotations) { [INFO] [stdout] 2813 | | if square_bracket_depth == 0 && curly_bracket_depth == 0 { [INFO] [stdout] 2814 | | bracket_depth += 1; [INFO] [stdout] 2815 | | } [INFO] [stdout] 2816 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2811 ~ '(' [INFO] [stdout] 2812 ~ if !(in_single_quotations || in_double_quotations) => { [INFO] [stdout] 2813 | if square_bracket_depth == 0 && curly_bracket_depth == 0 { [INFO] [stdout] 2814 | bracket_depth += 1; [INFO] [stdout] 2815 | } [INFO] [stdout] 2816 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:2819:17 [INFO] [stdout] | [INFO] [stdout] 2819 | / if !(in_single_quotations || in_double_quotations) { [INFO] [stdout] 2820 | | if square_bracket_depth == 0 && curly_bracket_depth == 0 { [INFO] [stdout] 2821 | | bracket_depth -= 1; [INFO] [stdout] 2822 | | } [INFO] [stdout] 2823 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2818 ~ ')' [INFO] [stdout] 2819 ~ if !(in_single_quotations || in_double_quotations) => { [INFO] [stdout] 2820 | if square_bracket_depth == 0 && curly_bracket_depth == 0 { [INFO] [stdout] 2821 | bracket_depth -= 1; [INFO] [stdout] 2822 | } [INFO] [stdout] 2823 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:2826:17 [INFO] [stdout] | [INFO] [stdout] 2826 | / if !(in_single_quotations || in_double_quotations) { [INFO] [stdout] 2827 | | if bracket_depth == 0 && curly_bracket_depth == 0 { [INFO] [stdout] 2828 | | square_bracket_depth += 1; [INFO] [stdout] 2829 | | } [INFO] [stdout] 2830 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2825 ~ '[' [INFO] [stdout] 2826 ~ if !(in_single_quotations || in_double_quotations) => { [INFO] [stdout] 2827 | if bracket_depth == 0 && curly_bracket_depth == 0 { [INFO] [stdout] 2828 | square_bracket_depth += 1; [INFO] [stdout] 2829 | } [INFO] [stdout] 2830 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:2833:17 [INFO] [stdout] | [INFO] [stdout] 2833 | / if !(in_single_quotations || in_double_quotations) { [INFO] [stdout] 2834 | | if bracket_depth == 0 && curly_bracket_depth == 0 { [INFO] [stdout] 2835 | | square_bracket_depth -= 1; [INFO] [stdout] 2836 | | } [INFO] [stdout] 2837 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2832 ~ ']' [INFO] [stdout] 2833 ~ if !(in_single_quotations || in_double_quotations) => { [INFO] [stdout] 2834 | if bracket_depth == 0 && curly_bracket_depth == 0 { [INFO] [stdout] 2835 | square_bracket_depth -= 1; [INFO] [stdout] 2836 | } [INFO] [stdout] 2837 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:2840:17 [INFO] [stdout] | [INFO] [stdout] 2840 | / if !(in_single_quotations || in_double_quotations) { [INFO] [stdout] 2841 | | if bracket_depth == 0 && square_bracket_depth == 0 { [INFO] [stdout] 2842 | | curly_bracket_depth += 1; [INFO] [stdout] 2843 | | } [INFO] [stdout] 2844 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2839 ~ '{' [INFO] [stdout] 2840 ~ if !(in_single_quotations || in_double_quotations) => { [INFO] [stdout] 2841 | if bracket_depth == 0 && square_bracket_depth == 0 { [INFO] [stdout] 2842 | curly_bracket_depth += 1; [INFO] [stdout] 2843 | } [INFO] [stdout] 2844 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:2847:17 [INFO] [stdout] | [INFO] [stdout] 2847 | / if !(in_single_quotations || in_double_quotations) { [INFO] [stdout] 2848 | | if bracket_depth == 0 && square_bracket_depth == 0 { [INFO] [stdout] 2849 | | curly_bracket_depth -= 1; [INFO] [stdout] 2850 | | } [INFO] [stdout] 2851 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2846 ~ '}' [INFO] [stdout] 2847 ~ if !(in_single_quotations || in_double_quotations) => { [INFO] [stdout] 2848 | if bracket_depth == 0 && square_bracket_depth == 0 { [INFO] [stdout] 2849 | curly_bracket_depth -= 1; [INFO] [stdout] 2850 | } [INFO] [stdout] 2851 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:2854:17 [INFO] [stdout] | [INFO] [stdout] 2854 | / ... if !(in_single_quotations || in_double_quotations || bracket_depth > 0 || square_bracket_depth > 0 || curly_bracket_depth ... [INFO] [stdout] 2855 | | ... return true; [INFO] [stdout] 2856 | | ... } [INFO] [stdout] | |_______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2853 ~ '+'|'-'|'%'|'^'|'&'|'|'|'<'|'>'|'!'|'*'|'/'|'=' [INFO] [stdout] 2854 ~ if !(in_single_quotations || in_double_quotations || bracket_depth > 0 || square_bracket_depth > 0 || curly_bracket_depth > 0) => { [INFO] [stdout] 2855 | return true; [INFO] [stdout] 2856 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lib.rs:2812:17 [INFO] [stdout] | [INFO] [stdout] 2812 | / if !(in_single_quotations || in_double_quotations) { [INFO] [stdout] 2813 | | if square_bracket_depth == 0 && curly_bracket_depth == 0 { [INFO] [stdout] 2814 | | bracket_depth += 1; [INFO] [stdout] 2815 | | } [INFO] [stdout] 2816 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2812 ~ if !(in_single_quotations || in_double_quotations) [INFO] [stdout] 2813 ~ && square_bracket_depth == 0 && curly_bracket_depth == 0 { [INFO] [stdout] 2814 | bracket_depth += 1; [INFO] [stdout] 2815 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lib.rs:2819:17 [INFO] [stdout] | [INFO] [stdout] 2819 | / if !(in_single_quotations || in_double_quotations) { [INFO] [stdout] 2820 | | if square_bracket_depth == 0 && curly_bracket_depth == 0 { [INFO] [stdout] 2821 | | bracket_depth -= 1; [INFO] [stdout] 2822 | | } [INFO] [stdout] 2823 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2819 ~ if !(in_single_quotations || in_double_quotations) [INFO] [stdout] 2820 ~ && square_bracket_depth == 0 && curly_bracket_depth == 0 { [INFO] [stdout] 2821 | bracket_depth -= 1; [INFO] [stdout] 2822 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lib.rs:2826:17 [INFO] [stdout] | [INFO] [stdout] 2826 | / if !(in_single_quotations || in_double_quotations) { [INFO] [stdout] 2827 | | if bracket_depth == 0 && curly_bracket_depth == 0 { [INFO] [stdout] 2828 | | square_bracket_depth += 1; [INFO] [stdout] 2829 | | } [INFO] [stdout] 2830 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2826 ~ if !(in_single_quotations || in_double_quotations) [INFO] [stdout] 2827 ~ && bracket_depth == 0 && curly_bracket_depth == 0 { [INFO] [stdout] 2828 | square_bracket_depth += 1; [INFO] [stdout] 2829 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lib.rs:2833:17 [INFO] [stdout] | [INFO] [stdout] 2833 | / if !(in_single_quotations || in_double_quotations) { [INFO] [stdout] 2834 | | if bracket_depth == 0 && curly_bracket_depth == 0 { [INFO] [stdout] 2835 | | square_bracket_depth -= 1; [INFO] [stdout] 2836 | | } [INFO] [stdout] 2837 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2833 ~ if !(in_single_quotations || in_double_quotations) [INFO] [stdout] 2834 ~ && bracket_depth == 0 && curly_bracket_depth == 0 { [INFO] [stdout] 2835 | square_bracket_depth -= 1; [INFO] [stdout] 2836 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lib.rs:2840:17 [INFO] [stdout] | [INFO] [stdout] 2840 | / if !(in_single_quotations || in_double_quotations) { [INFO] [stdout] 2841 | | if bracket_depth == 0 && square_bracket_depth == 0 { [INFO] [stdout] 2842 | | curly_bracket_depth += 1; [INFO] [stdout] 2843 | | } [INFO] [stdout] 2844 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2840 ~ if !(in_single_quotations || in_double_quotations) [INFO] [stdout] 2841 ~ && bracket_depth == 0 && square_bracket_depth == 0 { [INFO] [stdout] 2842 | curly_bracket_depth += 1; [INFO] [stdout] 2843 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lib.rs:2847:17 [INFO] [stdout] | [INFO] [stdout] 2847 | / if !(in_single_quotations || in_double_quotations) { [INFO] [stdout] 2848 | | if bracket_depth == 0 && square_bracket_depth == 0 { [INFO] [stdout] 2849 | | curly_bracket_depth -= 1; [INFO] [stdout] 2850 | | } [INFO] [stdout] 2851 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2847 ~ if !(in_single_quotations || in_double_quotations) [INFO] [stdout] 2848 ~ && bracket_depth == 0 && square_bracket_depth == 0 { [INFO] [stdout] 2849 | curly_bracket_depth -= 1; [INFO] [stdout] 2850 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:2971:5 [INFO] [stdout] | [INFO] [stdout] 2971 | return parts; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 2971 - return parts; [INFO] [stdout] 2971 + parts [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:2941:17 [INFO] [stdout] | [INFO] [stdout] 2941 | / ... if delimiter == ',' { [INFO] [stdout] 2942 | | ... if !(in_single_quotations || in_double_quotations || in_brackets_depth > 0 || in_square_brackets_depth > 0 || in_curly... [INFO] [stdout] 2943 | | ... parts.push(current_string.trim().to_string()); [INFO] [stdout] 2944 | | ... current_string = "".to_string(); [INFO] [stdout] ... | [INFO] [stdout] 2949 | | ... current_string.push(c); [INFO] [stdout] 2950 | | ... } [INFO] [stdout] | |_______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2940 ~ ',' [INFO] [stdout] 2941 ~ if delimiter == ',' => { [INFO] [stdout] 2942 | if !(in_single_quotations || in_double_quotations || in_brackets_depth > 0 || in_square_brackets_depth > 0 || in_curly_brackets_depth > 0) { [INFO] [stdout] ... [INFO] [stdout] 2947 | } [INFO] [stdout] 2948 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/lib.rs:2953:17 [INFO] [stdout] | [INFO] [stdout] 2953 | / ... if delimiter == '.' { [INFO] [stdout] 2954 | | ... if !(in_single_quotations || in_double_quotations || in_brackets_depth > 0 || in_square_brackets_depth > 0 || in_curly... [INFO] [stdout] 2955 | | ... parts.push(current_string.trim().to_string()); [INFO] [stdout] 2956 | | ... current_string = "".to_string(); [INFO] [stdout] ... | [INFO] [stdout] 2961 | | ... current_string.push(c); [INFO] [stdout] 2962 | | ... } [INFO] [stdout] | |_______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2952 ~ '.' [INFO] [stdout] 2953 ~ if delimiter == '.' => { [INFO] [stdout] 2954 | if !(in_single_quotations || in_double_quotations || in_brackets_depth > 0 || in_square_brackets_depth > 0 || in_curly_brackets_depth > 0) { [INFO] [stdout] ... [INFO] [stdout] 2959 | } [INFO] [stdout] 2960 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lib.rs:2905:17 [INFO] [stdout] | [INFO] [stdout] 2905 | / if !(in_single_quotations || in_double_quotations || in_square_brackets_depth > 0 || in_curly_brackets_depth > 0) { [INFO] [stdout] 2906 | | if in_brackets_depth > 0 { [INFO] [stdout] 2907 | | in_brackets_depth -= 1; [INFO] [stdout] 2908 | | } [INFO] [stdout] 2909 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2905 ~ if !(in_single_quotations || in_double_quotations || in_square_brackets_depth > 0 || in_curly_brackets_depth > 0) [INFO] [stdout] 2906 ~ && in_brackets_depth > 0 { [INFO] [stdout] 2907 | in_brackets_depth -= 1; [INFO] [stdout] 2908 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lib.rs:2919:17 [INFO] [stdout] | [INFO] [stdout] 2919 | / if !(in_single_quotations || in_double_quotations || in_brackets_depth > 0 || in_curly_brackets_depth > 0) { [INFO] [stdout] 2920 | | if in_square_brackets_depth > 0 { [INFO] [stdout] 2921 | | in_square_brackets_depth -= 1; [INFO] [stdout] 2922 | | } [INFO] [stdout] 2923 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2919 ~ if !(in_single_quotations || in_double_quotations || in_brackets_depth > 0 || in_curly_brackets_depth > 0) [INFO] [stdout] 2920 ~ && in_square_brackets_depth > 0 { [INFO] [stdout] 2921 | in_square_brackets_depth -= 1; [INFO] [stdout] 2922 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/lib.rs:2933:17 [INFO] [stdout] | [INFO] [stdout] 2933 | / if !(in_single_quotations || in_double_quotations || in_square_brackets_depth > 0 || in_curly_brackets_depth > 0) { [INFO] [stdout] 2934 | | if in_curly_brackets_depth > 0 { [INFO] [stdout] 2935 | | in_curly_brackets_depth -= 1; [INFO] [stdout] 2936 | | } [INFO] [stdout] 2937 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 2933 ~ if !(in_single_quotations || in_double_quotations || in_square_brackets_depth > 0 || in_curly_brackets_depth > 0) [INFO] [stdout] 2934 ~ && in_curly_brackets_depth > 0 { [INFO] [stdout] 2935 | in_curly_brackets_depth -= 1; [INFO] [stdout] 2936 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:2980:5 [INFO] [stdout] | [INFO] [stdout] 2980 | return Ok(result); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 2980 - return Ok(result); [INFO] [stdout] 2980 + Ok(result) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:2985:22 [INFO] [stdout] | [INFO] [stdout] 2985 | Ok(lines) => return lines, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 2985 - Ok(lines) => return lines, [INFO] [stdout] 2985 + Ok(lines) => lines, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:2998:5 [INFO] [stdout] | [INFO] [stdout] 2998 | return lines; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 2998 - return lines; [INFO] [stdout] 2998 + lines [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/lib.rs:2993:36 [INFO] [stdout] | [INFO] [stdout] 2993 | pub fn vec_str_to_vec_line(source: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 2993 - pub fn vec_str_to_vec_line(source: &Vec) -> Vec { [INFO] [stdout] 2993 + pub fn vec_str_to_vec_line(source: &[String]) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:3016:5 [INFO] [stdout] | [INFO] [stdout] 3016 | return source; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 3016 - return source; [INFO] [stdout] 3016 + source [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:3238:40 [INFO] [stdout] | [INFO] [stdout] 3238 | let map = test_matches.get(&key_str).unwrap(); [INFO] [stdout] | ^^^^^^^^ help: change this to: `key_str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:3289:40 [INFO] [stdout] | [INFO] [stdout] 3289 | let map = test_matches.get(&key_str).unwrap(); [INFO] [stdout] | ^^^^^^^^ help: change this to: `key_str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:3349:40 [INFO] [stdout] | [INFO] [stdout] 3349 | let map = test_matches.get(&key_str).unwrap(); [INFO] [stdout] | ^^^^^^^^ help: change this to: `key_str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:3413:40 [INFO] [stdout] | [INFO] [stdout] 3413 | let map = test_matches.get(&key_str).unwrap(); [INFO] [stdout] | ^^^^^^^^ help: change this to: `key_str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:3472:40 [INFO] [stdout] | [INFO] [stdout] 3472 | let map = test_matches.get(&key_str).unwrap(); [INFO] [stdout] | ^^^^^^^^ help: change this to: `key_str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:3555:59 [INFO] [stdout] | [INFO] [stdout] 3555 | let num_spaces = test_string_indentations.get(&key_str).unwrap(); [INFO] [stdout] | ^^^^^^^^ help: change this to: `key_str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:3558:40 [INFO] [stdout] | [INFO] [stdout] 3558 | let map = test_matches.get(&key_str).unwrap(); [INFO] [stdout] | ^^^^^^^^ help: change this to: `key_str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:3619:40 [INFO] [stdout] | [INFO] [stdout] 3619 | let map = test_matches.get(&key_str).unwrap(); [INFO] [stdout] | ^^^^^^^^ help: change this to: `key_str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:3674:40 [INFO] [stdout] | [INFO] [stdout] 3674 | let map = test_matches.get(&key_str).unwrap(); [INFO] [stdout] | ^^^^^^^^ help: change this to: `key_str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:3727:40 [INFO] [stdout] | [INFO] [stdout] 3727 | let map = test_matches.get(&key_str).unwrap(); [INFO] [stdout] | ^^^^^^^^ help: change this to: `key_str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:3780:40 [INFO] [stdout] | [INFO] [stdout] 3780 | let map = test_matches.get(&key_str).unwrap(); [INFO] [stdout] | ^^^^^^^^ help: change this to: `key_str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:3874:40 [INFO] [stdout] | [INFO] [stdout] 3874 | let map = test_matches.get(&key_str).unwrap(); [INFO] [stdout] | ^^^^^^^^ help: change this to: `key_str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/lib.rs:3906:9 [INFO] [stdout] | [INFO] [stdout] 3906 | assert_eq!(line_org == line_same, true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_assert_comparison)]` on by default [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 3906 - assert_eq!(line_org == line_same, true); [INFO] [stdout] 3906 + assert!(line_org == line_same); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/lib.rs:3907:9 [INFO] [stdout] | [INFO] [stdout] 3907 | assert_eq!(line_org == line_diff_number, false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 3907 - assert_eq!(line_org == line_diff_number, false); [INFO] [stdout] 3907 + assert!(!(line_org == line_diff_number)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/lib.rs:3908:9 [INFO] [stdout] | [INFO] [stdout] 3908 | assert_eq!(line_org == line_diff_text, false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 3908 - assert_eq!(line_org == line_diff_text, false); [INFO] [stdout] 3908 + assert!(!(line_org == line_diff_text)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/lib.rs:3913:9 [INFO] [stdout] | [INFO] [stdout] 3913 | assert_eq!(asg_org == asg_same, true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 3913 - assert_eq!(asg_org == asg_same, true); [INFO] [stdout] 3913 + assert!(asg_org == asg_same); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/lib.rs:3917:9 [INFO] [stdout] | [INFO] [stdout] 3917 | assert_eq!(asg_org == asg_diff_name, false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 3917 - assert_eq!(asg_org == asg_diff_name, false); [INFO] [stdout] 3917 + assert!(!(asg_org == asg_diff_name)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/lib.rs:3921:9 [INFO] [stdout] | [INFO] [stdout] 3921 | assert_eq!(asg_org == asg_diff_value, false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 3921 - assert_eq!(asg_org == asg_diff_value, false); [INFO] [stdout] 3921 + assert!(!(asg_org == asg_diff_value)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/lib.rs:3925:9 [INFO] [stdout] | [INFO] [stdout] 3925 | assert_eq!(asg_org == asg_diff_source, false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 3925 - assert_eq!(asg_org == asg_diff_source, false); [INFO] [stdout] 3925 + assert!(!(asg_org == asg_diff_source)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/lib.rs:3932:9 [INFO] [stdout] | [INFO] [stdout] 3932 | assert_eq!(file_org == file_same, true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 3932 - assert_eq!(file_org == file_same, true); [INFO] [stdout] 3932 + assert!(file_org == file_same); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/lib.rs:3936:9 [INFO] [stdout] | [INFO] [stdout] 3936 | assert_eq!(file_org == file_diff_name, false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 3936 - assert_eq!(file_org == file_diff_name, false); [INFO] [stdout] 3936 + assert!(!(file_org == file_diff_name)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/lib.rs:3940:9 [INFO] [stdout] | [INFO] [stdout] 3940 | assert_eq!(file_org == file_diff_imports, false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 3940 - assert_eq!(file_org == file_diff_imports, false); [INFO] [stdout] 3940 + assert!(!(file_org == file_diff_imports)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/lib.rs:3948:9 [INFO] [stdout] | [INFO] [stdout] 3948 | assert_eq!(file_org == file_diff_global_variables, false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 3948 - assert_eq!(file_org == file_diff_global_variables, false); [INFO] [stdout] 3948 + assert!(!(file_org == file_diff_global_variables)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/lib.rs:3962:9 [INFO] [stdout] | [INFO] [stdout] 3962 | assert_eq!(file_org == file_diff_functions, false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 3962 - assert_eq!(file_org == file_diff_functions, false); [INFO] [stdout] 3962 + assert!(!(file_org == file_diff_functions)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/lib.rs:3974:9 [INFO] [stdout] | [INFO] [stdout] 3974 | assert_eq!(file_org == file_diff_classes, false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 3974 - assert_eq!(file_org == file_diff_classes, false); [INFO] [stdout] 3974 + assert!(!(file_org == file_diff_classes)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/lib.rs:3984:9 [INFO] [stdout] | [INFO] [stdout] 3984 | assert_eq!(function_org == function_same, true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 3984 - assert_eq!(function_org == function_same, true); [INFO] [stdout] 3984 + assert!(function_org == function_same); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/lib.rs:3988:9 [INFO] [stdout] | [INFO] [stdout] 3988 | assert_eq!(function_org == function_diff_name, false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 3988 - assert_eq!(function_org == function_diff_name, false); [INFO] [stdout] 3988 + assert!(!(function_org == function_diff_name)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/lib.rs:3992:9 [INFO] [stdout] | [INFO] [stdout] 3992 | assert_eq!(function_org == function_diff_parameters, false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 3992 - assert_eq!(function_org == function_diff_parameters, false); [INFO] [stdout] 3992 + assert!(!(function_org == function_diff_parameters)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/lib.rs:3996:9 [INFO] [stdout] | [INFO] [stdout] 3996 | assert_eq!(function_org == function_diff_functions, false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 3996 - assert_eq!(function_org == function_diff_functions, false); [INFO] [stdout] 3996 + assert!(!(function_org == function_diff_functions)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/lib.rs:4000:9 [INFO] [stdout] | [INFO] [stdout] 4000 | assert_eq!(function_org == function_diff_source, false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 4000 - assert_eq!(function_org == function_diff_source, false); [INFO] [stdout] 4000 + assert!(!(function_org == function_diff_source)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/lib.rs:4014:9 [INFO] [stdout] | [INFO] [stdout] 4014 | assert_eq!(class_org == class_same, true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 4014 - assert_eq!(class_org == class_same, true); [INFO] [stdout] 4014 + assert!(class_org == class_same); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/lib.rs:4018:9 [INFO] [stdout] | [INFO] [stdout] 4018 | assert_eq!(class_org == class_diff_name, false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 4018 - assert_eq!(class_org == class_diff_name, false); [INFO] [stdout] 4018 + assert!(!(class_org == class_diff_name)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/lib.rs:4022:9 [INFO] [stdout] | [INFO] [stdout] 4022 | assert_eq!(class_org == class_diff_parent, false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 4022 - assert_eq!(class_org == class_diff_parent, false); [INFO] [stdout] 4022 + assert!(!(class_org == class_diff_parent)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/lib.rs:4026:9 [INFO] [stdout] | [INFO] [stdout] 4026 | assert_eq!(class_org == class_diff_variables, false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 4026 - assert_eq!(class_org == class_diff_variables, false); [INFO] [stdout] 4026 + assert!(!(class_org == class_diff_variables)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/lib.rs:4030:9 [INFO] [stdout] | [INFO] [stdout] 4030 | assert_eq!(class_org == class_diff_methods, false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 4030 - assert_eq!(class_org == class_diff_methods, false); [INFO] [stdout] 4030 + assert!(!(class_org == class_diff_methods)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/lib.rs:4034:9 [INFO] [stdout] | [INFO] [stdout] 4034 | assert_eq!(class_org == class_diff_classes, false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 4034 - assert_eq!(class_org == class_diff_classes, false); [INFO] [stdout] 4034 + assert!(!(class_org == class_diff_classes)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `test_lines.get(0)` [INFO] [stdout] --> src/lib.rs:4476:100 [INFO] [stdout] | [INFO] [stdout] 4476 | ..., value: "banana".to_string(), source: test_lines.get(0).unwrap().clone()}), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `test_lines.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 6.00s [INFO] running `Command { std: "docker" "inspect" "c2fde1465db48dff0bfec0f756c0e8f92fe84cc8e64577cdcd72f768af4dba8d", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "c2fde1465db48dff0bfec0f756c0e8f92fe84cc8e64577cdcd72f768af4dba8d", kill_on_drop: false }` [INFO] [stdout] c2fde1465db48dff0bfec0f756c0e8f92fe84cc8e64577cdcd72f768af4dba8d