[INFO] cloning repository https://github.com/padoyle/advent2020 [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/padoyle/advent2020" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fpadoyle%2Fadvent2020", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fpadoyle%2Fadvent2020'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 84ec49fccf932eb719d840baf1da086197517137 [INFO] linting padoyle/advent2020 against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fpadoyle%2Fadvent2020" "/workspace/builds/worker-6-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-6-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/padoyle/advent2020 [INFO] finished tweaking git repo https://github.com/padoyle/advent2020 [INFO] tweaked toml for git repo https://github.com/padoyle/advent2020 written to /workspace/builds/worker-6-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/padoyle/advent2020 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/padoyle/advent2020 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] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-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] 8a011ac8a6c5f0428de766363c3ba808721c88ca17881df17a2b27a65d8d07e4 [INFO] running `Command { std: "docker" "start" "-a" "8a011ac8a6c5f0428de766363c3ba808721c88ca17881df17a2b27a65d8d07e4", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "8a011ac8a6c5f0428de766363c3ba808721c88ca17881df17a2b27a65d8d07e4", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "8a011ac8a6c5f0428de766363c3ba808721c88ca17881df17a2b27a65d8d07e4", kill_on_drop: false }` [INFO] [stdout] 8a011ac8a6c5f0428de766363c3ba808721c88ca17881df17a2b27a65d8d07e4 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-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] 19c558ed6d5f5e5e6cf8d40ba473653f53275107401ea9b73989aebe5918620a [INFO] running `Command { std: "docker" "start" "-a" "19c558ed6d5f5e5e6cf8d40ba473653f53275107401ea9b73989aebe5918620a", kill_on_drop: false }` [INFO] [stderr] Checking maplit v1.0.2 [INFO] [stderr] Checking advent2020 v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> src/day_01.rs:1:16 [INFO] [stdout] | [INFO] [stdout] 1 | static INPUT: &'static str = include_str!("assets/day_01_input.txt"); [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] = note: `#[warn(clippy::redundant_static_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> src/day_02.rs:3:16 [INFO] [stdout] | [INFO] [stdout] 3 | static INPUT: &'static str = include_str!("assets/day_02_input.txt"); [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> src/day_03.rs:3:16 [INFO] [stdout] | [INFO] [stdout] 3 | static INPUT: &'static str = include_str!("assets/day_03_input.txt"); [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> src/day_03.rs:79:22 [INFO] [stdout] | [INFO] [stdout] 79 | static EXAMPLE: &'static str = r#"..##....... [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> src/day_04.rs:3:16 [INFO] [stdout] | [INFO] [stdout] 3 | static INPUT: &'static str = include_str!("assets/day_04_input.txt"); [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> src/day_04.rs:106:25 [INFO] [stdout] | [INFO] [stdout] 106 | static EXAMPLE_P1: &'static str = r#"ecl:gry pid:860033327 eyr:2020 hcl:#fffffd [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> src/day_04.rs:120:33 [INFO] [stdout] | [INFO] [stdout] 120 | static EXAMPLE_P2_INVALID: &'static str = r#"eyr:1972 cid:100 [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> src/day_04.rs:134:31 [INFO] [stdout] | [INFO] [stdout] 134 | static EXAMPLE_P2_VALID: &'static str = r#"pid:087499704 hgt:74in ecl:grn iyr:2012 eyr:2030 byr:1980 [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> src/day_05.rs:1:16 [INFO] [stdout] | [INFO] [stdout] 1 | static INPUT: &'static str = include_str!("assets/day_05_input.txt"); [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> src/day_06.rs:3:16 [INFO] [stdout] | [INFO] [stdout] 3 | static INPUT: &'static str = include_str!("assets/day_06_input.txt"); [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> src/day_06.rs:45:22 [INFO] [stdout] | [INFO] [stdout] 45 | static EXAMPLE: &'static str = r#"abc [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> src/day_07.rs:3:16 [INFO] [stdout] | [INFO] [stdout] 3 | static INPUT: &'static str = include_str!("assets/day_07_input.txt"); [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> src/day_08.rs:3:16 [INFO] [stdout] | [INFO] [stdout] 3 | static INPUT: &'static str = include_str!("assets/day_08_input.txt"); [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/day_08.rs:96:72 [INFO] [stdout] | [INFO] [stdout] 96 | self.instructions[modify_ptr] = Instruction::Nop { value: value }; [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `value` [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/day_08.rs:106:72 [INFO] [stdout] | [INFO] [stdout] 106 | self.instructions[modify_ptr] = Instruction::Jmp { offset: offset }; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `offset` [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: statics have by default a `'static` lifetime [INFO] [stdout] --> src/day_09.rs:3:16 [INFO] [stdout] | [INFO] [stdout] 3 | static INPUT: &'static str = include_str!("assets/day_09_input.txt"); [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> src/day_10.rs:1:16 [INFO] [stdout] | [INFO] [stdout] 1 | static INPUT: &'static str = include_str!("assets/day_10_input.txt"); [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> src/day_11.rs:3:16 [INFO] [stdout] | [INFO] [stdout] 3 | static INPUT: &'static str = include_str!("assets/day_11_input.txt"); [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> src/day_12.rs:1:16 [INFO] [stdout] | [INFO] [stdout] 1 | static INPUT: &'static str = include_str!("assets/day_12_input.txt"); [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> src/day_13.rs:3:16 [INFO] [stdout] | [INFO] [stdout] 3 | static INPUT: &'static str = include_str!("assets/day_13_input.txt"); [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> src/day_14.rs:3:16 [INFO] [stdout] | [INFO] [stdout] 3 | static INPUT: &'static str = include_str!("assets/day_14_input.txt"); [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> src/day_16.rs:3:16 [INFO] [stdout] | [INFO] [stdout] 3 | static INPUT: &'static str = include_str!("assets/day_16_input.txt"); [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary trailing semicolon [INFO] [stdout] --> src/day_20.rs:59:10 [INFO] [stdout] | [INFO] [stdout] 59 | }; [INFO] [stdout] | ^ help: remove this semicolon [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(redundant_semicolons)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> src/day_21.rs:3:16 [INFO] [stdout] | [INFO] [stdout] 3 | static INPUT: &'static str = include_str!("assets/day_21_input.txt"); [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> src/day_22.rs:6:16 [INFO] [stdout] | [INFO] [stdout] 6 | static INPUT: &'static str = include_str!("assets/day_22_input.txt"); [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> src/day_01.rs:1:16 [INFO] [stdout] | [INFO] [stdout] 1 | static INPUT: &'static str = include_str!("assets/day_01_input.txt"); [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] = note: `#[warn(clippy::redundant_static_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> src/day_02.rs:3:16 [INFO] [stdout] | [INFO] [stdout] 3 | static INPUT: &'static str = include_str!("assets/day_02_input.txt"); [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> src/day_03.rs:3:16 [INFO] [stdout] | [INFO] [stdout] 3 | static INPUT: &'static str = include_str!("assets/day_03_input.txt"); [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> src/day_04.rs:3:16 [INFO] [stdout] | [INFO] [stdout] 3 | static INPUT: &'static str = include_str!("assets/day_04_input.txt"); [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> src/day_05.rs:1:16 [INFO] [stdout] | [INFO] [stdout] 1 | static INPUT: &'static str = include_str!("assets/day_05_input.txt"); [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> src/day_06.rs:3:16 [INFO] [stdout] | [INFO] [stdout] 3 | static INPUT: &'static str = include_str!("assets/day_06_input.txt"); [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> src/day_07.rs:3:16 [INFO] [stdout] | [INFO] [stdout] 3 | static INPUT: &'static str = include_str!("assets/day_07_input.txt"); [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> src/day_08.rs:3:16 [INFO] [stdout] | [INFO] [stdout] 3 | static INPUT: &'static str = include_str!("assets/day_08_input.txt"); [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/day_08.rs:96:72 [INFO] [stdout] | [INFO] [stdout] 96 | self.instructions[modify_ptr] = Instruction::Nop { value: value }; [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `value` [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/day_08.rs:106:72 [INFO] [stdout] | [INFO] [stdout] 106 | self.instructions[modify_ptr] = Instruction::Jmp { offset: offset }; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `offset` [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: statics have by default a `'static` lifetime [INFO] [stdout] --> src/day_09.rs:3:16 [INFO] [stdout] | [INFO] [stdout] 3 | static INPUT: &'static str = include_str!("assets/day_09_input.txt"); [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> src/day_10.rs:1:16 [INFO] [stdout] | [INFO] [stdout] 1 | static INPUT: &'static str = include_str!("assets/day_10_input.txt"); [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> src/day_11.rs:3:16 [INFO] [stdout] | [INFO] [stdout] 3 | static INPUT: &'static str = include_str!("assets/day_11_input.txt"); [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> src/day_12.rs:1:16 [INFO] [stdout] | [INFO] [stdout] 1 | static INPUT: &'static str = include_str!("assets/day_12_input.txt"); [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> src/day_13.rs:3:16 [INFO] [stdout] | [INFO] [stdout] 3 | static INPUT: &'static str = include_str!("assets/day_13_input.txt"); [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> src/day_14.rs:3:16 [INFO] [stdout] | [INFO] [stdout] 3 | static INPUT: &'static str = include_str!("assets/day_14_input.txt"); [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> src/day_16.rs:3:16 [INFO] [stdout] | [INFO] [stdout] 3 | static INPUT: &'static str = include_str!("assets/day_16_input.txt"); [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary trailing semicolon [INFO] [stdout] --> src/day_20.rs:59:10 [INFO] [stdout] | [INFO] [stdout] 59 | }; [INFO] [stdout] | ^ help: remove this semicolon [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(redundant_semicolons)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> src/day_21.rs:3:16 [INFO] [stdout] | [INFO] [stdout] 3 | static INPUT: &'static str = include_str!("assets/day_21_input.txt"); [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statics have by default a `'static` lifetime [INFO] [stdout] --> src/day_22.rs:6:16 [INFO] [stdout] | [INFO] [stdout] 6 | static INPUT: &'static str = include_str!("assets/day_22_input.txt"); [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day_01.rs:10:22 [INFO] [stdout] | [INFO] [stdout] 10 | fn sum2_2020(inputs: &Vec) -> (u32, u32) { [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] 10 - fn sum2_2020(inputs: &Vec) -> (u32, u32) { [INFO] [stdout] 10 + fn sum2_2020(inputs: &[u32]) -> (u32, u32) { [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/day_01.rs:28:22 [INFO] [stdout] | [INFO] [stdout] 28 | fn sum3_2020(inputs: &Vec) -> (u32, u32, u32) { [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] 28 - fn sum3_2020(inputs: &Vec) -> (u32, u32, u32) { [INFO] [stdout] 28 + fn sum3_2020(inputs: &[u32]) -> (u32, u32, u32) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/day_02.rs:37:40 [INFO] [stdout] | [INFO] [stdout] 37 | return (Rule::from_str(*rule).unwrap(), *pass); [INFO] [stdout] | ^^^^^ help: try: `rule` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] = note: `#[warn(clippy::explicit_auto_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `get(&col_wrapped).is_some()` [INFO] [stdout] --> src/day_03.rs:14:25 [INFO] [stdout] | [INFO] [stdout] 14 | self.trees[row].get(&col_wrapped).is_some() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `contains(&col_wrapped)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_get_then_check [INFO] [stdout] = note: `#[warn(clippy::unnecessary_get_then_check)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.fold` can be written more succinctly using another method [INFO] [stdout] --> src/day_03.rs:62:6 [INFO] [stdout] | [INFO] [stdout] 62 | .fold(1, |acc, value| acc * value) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `product()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fold [INFO] [stdout] = note: `#[warn(clippy::unnecessary_fold)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: found call to `str::trim` before `str::split_whitespace` [INFO] [stdout] --> src/day_04.rs:7:10 [INFO] [stdout] | [INFO] [stdout] 7 | .trim() [INFO] [stdout] | __________^ [INFO] [stdout] 8 | | .split_whitespace() [INFO] [stdout] | |_________^ help: remove `trim()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trim_split_whitespace [INFO] [stdout] = note: `#[warn(clippy::trim_split_whitespace)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `get(field).is_some()` [INFO] [stdout] --> src/day_04.rs:25:38 [INFO] [stdout] | [INFO] [stdout] 25 | .all(|field| passport_fields.get(field).is_some()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `contains_key(field)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_get_then_check [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/day_04.rs:40:13 [INFO] [stdout] | [INFO] [stdout] 40 | value >= 1920 && value <= 2002 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(1920..=2002).contains(&value)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/day_04.rs:44:13 [INFO] [stdout] | [INFO] [stdout] 44 | value >= 2010 && value <= 2020 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(2010..=2020).contains(&value)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/day_04.rs:48:13 [INFO] [stdout] | [INFO] [stdout] 48 | value >= 2020 && value <= 2030 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(2020..=2030).contains(&value)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/day_04.rs:58:21 [INFO] [stdout] | [INFO] [stdout] 58 | height >= 150 && height <= 193 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(150..=193).contains(&height)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/day_04.rs:62:21 [INFO] [stdout] | [INFO] [stdout] 62 | height >= 59 && height <= 76 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(59..=76).contains(&height)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's keys [INFO] [stdout] --> src/day_07.rs:63:37 [INFO] [stdout] | [INFO] [stdout] 63 | for (child_container, _) in self.rules.get(container).unwrap() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] = note: `#[warn(clippy::for_kv_map)]` on by default [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 63 - for (child_container, _) in self.rules.get(container).unwrap() { [INFO] [stdout] 63 + for child_container in self.rules.get(container).unwrap().keys() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> src/day_07.rs:77:53 [INFO] [stdout] | [INFO] [stdout] 77 | let possible_containers: HashSet<&'a str> = self [INFO] [stdout] | _____________________________________________________^ [INFO] [stdout] 78 | | .rules [INFO] [stdout] 79 | | .keys() [INFO] [stdout] 80 | | .filter(|container| self.is_possible_container(bag_color, container)) [INFO] [stdout] 81 | | // dunno how to elegantly avoid this deref mapping [INFO] [stdout] 82 | | .map(|value| *value) [INFO] [stdout] | |________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] = note: `#[warn(clippy::map_clone)]` on by default [INFO] [stdout] help: consider calling the dedicated `copied` method [INFO] [stdout] | [INFO] [stdout] 77 ~ let possible_containers: HashSet<&'a str> = self [INFO] [stdout] 78 + .rules [INFO] [stdout] 79 + .keys() [INFO] [stdout] 80 + .filter(|container| self.is_possible_container(bag_color, container)).copied() [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/day_01.rs:10:22 [INFO] [stdout] | [INFO] [stdout] 10 | fn sum2_2020(inputs: &Vec) -> (u32, u32) { [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] 10 - fn sum2_2020(inputs: &Vec) -> (u32, u32) { [INFO] [stdout] 10 + fn sum2_2020(inputs: &[u32]) -> (u32, u32) { [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/day_01.rs:28:22 [INFO] [stdout] | [INFO] [stdout] 28 | fn sum3_2020(inputs: &Vec) -> (u32, u32, u32) { [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] 28 - fn sum3_2020(inputs: &Vec) -> (u32, u32, u32) { [INFO] [stdout] 28 + fn sum3_2020(inputs: &[u32]) -> (u32, u32, u32) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/day_02.rs:37:40 [INFO] [stdout] | [INFO] [stdout] 37 | return (Rule::from_str(*rule).unwrap(), *pass); [INFO] [stdout] | ^^^^^ help: try: `rule` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] = note: `#[warn(clippy::explicit_auto_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `get(&col_wrapped).is_some()` [INFO] [stdout] --> src/day_03.rs:14:25 [INFO] [stdout] | [INFO] [stdout] 14 | self.trees[row].get(&col_wrapped).is_some() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `contains(&col_wrapped)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_get_then_check [INFO] [stdout] = note: `#[warn(clippy::unnecessary_get_then_check)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.fold` can be written more succinctly using another method [INFO] [stdout] --> src/day_03.rs:62:6 [INFO] [stdout] | [INFO] [stdout] 62 | .fold(1, |acc, value| acc * value) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `product()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fold [INFO] [stdout] = note: `#[warn(clippy::unnecessary_fold)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: found call to `str::trim` before `str::split_whitespace` [INFO] [stdout] --> src/day_04.rs:7:10 [INFO] [stdout] | [INFO] [stdout] 7 | .trim() [INFO] [stdout] | __________^ [INFO] [stdout] 8 | | .split_whitespace() [INFO] [stdout] | |_________^ help: remove `trim()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trim_split_whitespace [INFO] [stdout] = note: `#[warn(clippy::trim_split_whitespace)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `get(field).is_some()` [INFO] [stdout] --> src/day_04.rs:25:38 [INFO] [stdout] | [INFO] [stdout] 25 | .all(|field| passport_fields.get(field).is_some()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `contains_key(field)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_get_then_check [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day_09.rs:16:39 [INFO] [stdout] | [INFO] [stdout] 16 | fn find_first_invalid_value(sequence: &Vec, lookback: usize) -> i64 { [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] 16 - fn find_first_invalid_value(sequence: &Vec, lookback: usize) -> i64 { [INFO] [stdout] 16 + fn find_first_invalid_value(sequence: &[i64], lookback: usize) -> i64 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/day_04.rs:40:13 [INFO] [stdout] | [INFO] [stdout] 40 | value >= 1920 && value <= 2002 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(1920..=2002).contains(&value)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/day_04.rs:44:13 [INFO] [stdout] | [INFO] [stdout] 44 | value >= 2010 && value <= 2020 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(2010..=2020).contains(&value)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day_09.rs:28:39 [INFO] [stdout] | [INFO] [stdout] 28 | fn find_encryption_weakness(sequence: &Vec, target_sum: i64) -> i64 { [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] 28 - fn find_encryption_weakness(sequence: &Vec, target_sum: i64) -> i64 { [INFO] [stdout] 28 + fn find_encryption_weakness(sequence: &[i64], target_sum: i64) -> i64 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/day_04.rs:48:13 [INFO] [stdout] | [INFO] [stdout] 48 | value >= 2020 && value <= 2030 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(2020..=2030).contains(&value)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/day_04.rs:58:21 [INFO] [stdout] | [INFO] [stdout] 58 | height >= 150 && height <= 193 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(150..=193).contains(&height)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/day_04.rs:62:21 [INFO] [stdout] | [INFO] [stdout] 62 | height >= 59 && height <= 76 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(59..=76).contains(&height)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's keys [INFO] [stdout] --> src/day_07.rs:63:37 [INFO] [stdout] | [INFO] [stdout] 63 | for (child_container, _) in self.rules.get(container).unwrap() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] = note: `#[warn(clippy::for_kv_map)]` on by default [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 63 - for (child_container, _) in self.rules.get(container).unwrap() { [INFO] [stdout] 63 + for child_container in self.rules.get(container).unwrap().keys() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> src/day_07.rs:77:53 [INFO] [stdout] | [INFO] [stdout] 77 | let possible_containers: HashSet<&'a str> = self [INFO] [stdout] | _____________________________________________________^ [INFO] [stdout] 78 | | .rules [INFO] [stdout] 79 | | .keys() [INFO] [stdout] 80 | | .filter(|container| self.is_possible_container(bag_color, container)) [INFO] [stdout] 81 | | // dunno how to elegantly avoid this deref mapping [INFO] [stdout] 82 | | .map(|value| *value) [INFO] [stdout] | |________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] = note: `#[warn(clippy::map_clone)]` on by default [INFO] [stdout] help: consider calling the dedicated `copied` method [INFO] [stdout] | [INFO] [stdout] 77 ~ let possible_containers: HashSet<&'a str> = self [INFO] [stdout] 78 + .rules [INFO] [stdout] 79 + .keys() [INFO] [stdout] 80 + .filter(|container| self.is_possible_container(bag_color, container)).copied() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/day_11.rs:65:14 [INFO] [stdout] | [INFO] [stdout] 65 | .map(str::chars) [INFO] [stdout] | ______________^ [INFO] [stdout] 66 | | .flatten() [INFO] [stdout] | |______________________^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(str::chars)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] = note: `#[warn(clippy::map_flatten)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day_09.rs:16:39 [INFO] [stdout] | [INFO] [stdout] 16 | fn find_first_invalid_value(sequence: &Vec, lookback: usize) -> i64 { [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] 16 - fn find_first_invalid_value(sequence: &Vec, lookback: usize) -> i64 { [INFO] [stdout] 16 + fn find_first_invalid_value(sequence: &[i64], lookback: usize) -> i64 { [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/day_09.rs:28:39 [INFO] [stdout] | [INFO] [stdout] 28 | fn find_encryption_weakness(sequence: &Vec, target_sum: i64) -> i64 { [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] 28 - fn find_encryption_weakness(sequence: &Vec, target_sum: i64) -> i64 { [INFO] [stdout] 28 + fn find_encryption_weakness(sequence: &[i64], target_sum: i64) -> i64 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/day_11.rs:65:14 [INFO] [stdout] | [INFO] [stdout] 65 | .map(str::chars) [INFO] [stdout] | ______________^ [INFO] [stdout] 66 | | .flatten() [INFO] [stdout] | |______________________^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(str::chars)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] = note: `#[warn(clippy::map_flatten)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `skip(..).next()` on an iterator [INFO] [stdout] --> src/day_13.rs:76:38 [INFO] [stdout] | [INFO] [stdout] 76 | let bus_ids_input = INPUT.lines().skip(1).next().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: use `nth` instead: `.nth(1)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_skip_next [INFO] [stdout] = note: `#[warn(clippy::iter_skip_next)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `skip(..).next()` on an iterator [INFO] [stdout] --> src/day_13.rs:117:69 [INFO] [stdout] | [INFO] [stdout] 117 | let earliest = get_earliest_departure_sequence(INPUT.lines().skip(1).next().unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: use `nth` instead: `.nth(1)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_skip_next [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `skip(..).next()` on an iterator [INFO] [stdout] --> src/day_13.rs:76:38 [INFO] [stdout] | [INFO] [stdout] 76 | let bus_ids_input = INPUT.lines().skip(1).next().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: use `nth` instead: `.nth(1)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_skip_next [INFO] [stdout] = note: `#[warn(clippy::iter_skip_next)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u64` is unnecessary [INFO] [stdout] --> src/day_14.rs:17:32 [INFO] [stdout] | [INFO] [stdout] 17 | '1' => mask += (2 as u64).pow(i as u32), [INFO] [stdout] | ^^^^^^^^^^ help: try: `2_u64` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u64` is unnecessary [INFO] [stdout] --> src/day_14.rs:18:36 [INFO] [stdout] | [INFO] [stdout] 18 | '0' => inv_mask += (2 as u64).pow(i as u32), [INFO] [stdout] | ^^^^^^^^^^ help: try: `2_u64` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u64` is unnecessary [INFO] [stdout] --> src/day_14.rs:17:32 [INFO] [stdout] | [INFO] [stdout] 17 | '1' => mask += (2 as u64).pow(i as u32), [INFO] [stdout] | ^^^^^^^^^^ help: try: `2_u64` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u64` is unnecessary [INFO] [stdout] --> src/day_14.rs:18:36 [INFO] [stdout] | [INFO] [stdout] 18 | '0' => inv_mask += (2 as u64).pow(i as u32), [INFO] [stdout] | ^^^^^^^^^^ help: try: `2_u64` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day_15.rs:5:38 [INFO] [stdout] | [INFO] [stdout] 5 | fn find_nth_number(starting_numbers: &Vec, target: usize) -> usize { [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] 5 - fn find_nth_number(starting_numbers: &Vec, target: usize) -> usize { [INFO] [stdout] 5 + fn find_nth_number(starting_numbers: &[usize], target: usize) -> usize { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/day_16.rs:45:21 [INFO] [stdout] | [INFO] [stdout] 45 | fn parse_field_rule<'a>(input: &'a str) -> (&'a str, RangePair) { [INFO] [stdout] | ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 45 - fn parse_field_rule<'a>(input: &'a str) -> (&'a str, RangePair) { [INFO] [stdout] 45 + fn parse_field_rule(input: &str) -> (&str, RangePair) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/day_16.rs:89:10 [INFO] [stdout] | [INFO] [stdout] 89 | .map(|line| { [INFO] [stdout] | __________^ [INFO] [stdout] 90 | | let field_values = parse_fields(line); [INFO] [stdout] 91 | | field_values.into_iter().filter(|field_value| { [INFO] [stdout] 92 | | !info [INFO] [stdout] ... | [INFO] [stdout] 97 | | }) [INFO] [stdout] 98 | | .flatten() [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] help: try replacing `map` with `flat_map` and remove the `.flatten()` [INFO] [stdout] | [INFO] [stdout] 89 ~ .flat_map(|line| { [INFO] [stdout] 90 + let field_values = parse_fields(line); [INFO] [stdout] 91 + field_values.into_iter().filter(|field_value| { [INFO] [stdout] 92 + !info [INFO] [stdout] 93 + .field_rules [INFO] [stdout] 94 + .values() [INFO] [stdout] 95 + .any(|rule| rule.fits(*field_value)) [INFO] [stdout] 96 + }) [INFO] [stdout] 97 + }) [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/day_15.rs:5:38 [INFO] [stdout] | [INFO] [stdout] 5 | fn find_nth_number(starting_numbers: &Vec, target: usize) -> usize { [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] 5 - fn find_nth_number(starting_numbers: &Vec, target: usize) -> usize { [INFO] [stdout] 5 + fn find_nth_number(starting_numbers: &[usize], target: usize) -> usize { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `y` is used as a loop counter [INFO] [stdout] --> src/day_17.rs:100:5 [INFO] [stdout] | [INFO] [stdout] 100 | for line in input.lines() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (y, line) in input.lines().enumerate()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] = note: `#[warn(clippy::explicit_counter_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: wildcard pattern covers any other pattern as it will match anyway [INFO] [stdout] --> src/day_17.rs:107:17 [INFO] [stdout] | [INFO] [stdout] 107 | '.' | _ => {} [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider handling `_` separately [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_in_or_patterns [INFO] [stdout] = note: `#[warn(clippy::wildcard_in_or_patterns)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for an equality check. Consider using `if` [INFO] [stdout] --> src/day_17.rs:103:13 [INFO] [stdout] | [INFO] [stdout] 103 | / match next_char { [INFO] [stdout] 104 | | '#' => { [INFO] [stdout] 105 | | result.insert(P::new(x, y)); [INFO] [stdout] ... | [INFO] [stdout] 108 | | } [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] 103 ~ if next_char == '#' { [INFO] [stdout] 104 + result.insert(P::new(x, y)); [INFO] [stdout] 105 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/day_17.rs:121:10 [INFO] [stdout] | [INFO] [stdout] 121 | .map(|point| neighbors.iter().map(move |neighbor| point.add(neighbor))) [INFO] [stdout] | __________^ [INFO] [stdout] 122 | | .flatten() [INFO] [stdout] | |__________________^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(|point| neighbors.iter().map(move |neighbor| point.add(neighbor)))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/day_16.rs:45:21 [INFO] [stdout] | [INFO] [stdout] 45 | fn parse_field_rule<'a>(input: &'a str) -> (&'a str, RangePair) { [INFO] [stdout] | ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 45 - fn parse_field_rule<'a>(input: &'a str) -> (&'a str, RangePair) { [INFO] [stdout] 45 + fn parse_field_rule(input: &str) -> (&str, RangePair) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/day_17.rs:131:13 [INFO] [stdout] | [INFO] [stdout] 131 | / (is_active && (active_neighbors == 2 || active_neighbors == 3)) // stays active [INFO] [stdout] 132 | | || (!is_active && active_neighbors == 3) // becomes active [INFO] [stdout] | |____________________________________________________^ [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] help: try [INFO] [stdout] | [INFO] [stdout] 131 - (is_active && (active_neighbors == 2 || active_neighbors == 3)) // stays active [INFO] [stdout] 132 - || (!is_active && active_neighbors == 3) // becomes active [INFO] [stdout] 131 + !(!is_active && active_neighbors != 3 || active_neighbors != 2 && active_neighbors != 3) // becomes active [INFO] [stdout] | [INFO] [stdout] 131 - (is_active && (active_neighbors == 2 || active_neighbors == 3)) // stays active [INFO] [stdout] 132 - || (!is_active && active_neighbors == 3) // becomes active [INFO] [stdout] 131 + (active_neighbors == 3 || active_neighbors == 2) && (active_neighbors == 3 || is_active) // becomes active [INFO] [stdout] | [INFO] [stdout] 131 - (is_active && (active_neighbors == 2 || active_neighbors == 3)) // stays active [INFO] [stdout] 132 - || (!is_active && active_neighbors == 3) // becomes active [INFO] [stdout] 131 + active_neighbors == 3 || is_active && active_neighbors == 2 // becomes active [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/day_17.rs:138:16 [INFO] [stdout] | [INFO] [stdout] 138 | neighbors: &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] 138 - neighbors: &Vec

, [INFO] [stdout] 138 + neighbors: &[P], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/day_16.rs:89:10 [INFO] [stdout] | [INFO] [stdout] 89 | .map(|line| { [INFO] [stdout] | __________^ [INFO] [stdout] 90 | | let field_values = parse_fields(line); [INFO] [stdout] 91 | | field_values.into_iter().filter(|field_value| { [INFO] [stdout] 92 | | !info [INFO] [stdout] ... | [INFO] [stdout] 97 | | }) [INFO] [stdout] 98 | | .flatten() [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] help: try replacing `map` with `flat_map` and remove the `.flatten()` [INFO] [stdout] | [INFO] [stdout] 89 ~ .flat_map(|line| { [INFO] [stdout] 90 + let field_values = parse_fields(line); [INFO] [stdout] 91 + field_values.into_iter().filter(|field_value| { [INFO] [stdout] 92 + !info [INFO] [stdout] 93 + .field_rules [INFO] [stdout] 94 + .values() [INFO] [stdout] 95 + .any(|rule| rule.fits(*field_value)) [INFO] [stdout] 96 + }) [INFO] [stdout] 97 + }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant name ends with the enum's name [INFO] [stdout] --> src/day_18.rs:61:5 [INFO] [stdout] | [INFO] [stdout] 61 | SubExpr(Box>), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stdout] = note: `#[warn(clippy::enum_variant_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `Box>`. Consider using just `Vec<..>` [INFO] [stdout] --> src/day_18.rs:61:13 [INFO] [stdout] | [INFO] [stdout] 61 | SubExpr(Box>), [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `Vec<..>` is already on the heap, `Box>` makes an extra allocation [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#box_collection [INFO] [stdout] = note: `#[warn(clippy::box_collection)]` 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/day_18.rs:78:65 [INFO] [stdout] | [INFO] [stdout] 78 | let (sub, skip_to) = Self::parse_from_index(&input, i + 1); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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: redundant closure [INFO] [stdout] --> src/day_19.rs:42:33 [INFO] [stdout] | [INFO] [stdout] 42 | .unwrap_or_else(|| Vec::new()), [INFO] [stdout] | ^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Vec::new` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> src/day_19.rs:39:37 [INFO] [stdout] | [INFO] [stdout] 39 | Rule::Literal(value) => message [INFO] [stdout] | _____________________________________^ [INFO] [stdout] 40 | | .strip_prefix(*value) [INFO] [stdout] 41 | | .and_then(|sub| Some(vec![sub])) [INFO] [stdout] | |________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] = note: `#[warn(clippy::bind_instead_of_map)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 39 ~ Rule::Literal(value) => message [INFO] [stdout] 40 + .strip_prefix(*value).map(|sub| vec![sub]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: found call to `str::trim` before `str::split_whitespace` [INFO] [stdout] --> src/day_19.rs:56:10 [INFO] [stdout] | [INFO] [stdout] 56 | .trim() [INFO] [stdout] | __________^ [INFO] [stdout] 57 | | .split_whitespace() [INFO] [stdout] | |_________^ help: remove `trim()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trim_split_whitespace [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `y` is used as a loop counter [INFO] [stdout] --> src/day_17.rs:100:5 [INFO] [stdout] | [INFO] [stdout] 100 | for line in input.lines() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (y, line) in input.lines().enumerate()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] = note: `#[warn(clippy::explicit_counter_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: wildcard pattern covers any other pattern as it will match anyway [INFO] [stdout] --> src/day_17.rs:107:17 [INFO] [stdout] | [INFO] [stdout] 107 | '.' | _ => {} [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider handling `_` separately [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_in_or_patterns [INFO] [stdout] = note: `#[warn(clippy::wildcard_in_or_patterns)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for an equality check. Consider using `if` [INFO] [stdout] --> src/day_17.rs:103:13 [INFO] [stdout] | [INFO] [stdout] 103 | / match next_char { [INFO] [stdout] 104 | | '#' => { [INFO] [stdout] 105 | | result.insert(P::new(x, y)); [INFO] [stdout] ... | [INFO] [stdout] 108 | | } [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] 103 ~ if next_char == '#' { [INFO] [stdout] 104 + result.insert(P::new(x, y)); [INFO] [stdout] 105 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `[u16; 4]` which implements the `Copy` trait [INFO] [stdout] --> src/day_20.rs:111:29 [INFO] [stdout] | [INFO] [stdout] 111 | let mut new_sides = self.sides.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.sides` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/day_17.rs:121:10 [INFO] [stdout] | [INFO] [stdout] 121 | .map(|point| neighbors.iter().map(move |neighbor| point.add(neighbor))) [INFO] [stdout] | __________^ [INFO] [stdout] 122 | | .flatten() [INFO] [stdout] | |__________________^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(|point| neighbors.iter().map(move |neighbor| point.add(neighbor)))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/day_17.rs:131:13 [INFO] [stdout] | [INFO] [stdout] 131 | / (is_active && (active_neighbors == 2 || active_neighbors == 3)) // stays active [INFO] [stdout] 132 | | || (!is_active && active_neighbors == 3) // becomes active [INFO] [stdout] | |____________________________________________________^ [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] help: try [INFO] [stdout] | [INFO] [stdout] 131 - (is_active && (active_neighbors == 2 || active_neighbors == 3)) // stays active [INFO] [stdout] 132 - || (!is_active && active_neighbors == 3) // becomes active [INFO] [stdout] 131 + !(!is_active && active_neighbors != 3 || active_neighbors != 2 && active_neighbors != 3) // becomes active [INFO] [stdout] | [INFO] [stdout] 131 - (is_active && (active_neighbors == 2 || active_neighbors == 3)) // stays active [INFO] [stdout] 132 - || (!is_active && active_neighbors == 3) // becomes active [INFO] [stdout] 131 + (active_neighbors == 3 || active_neighbors == 2) && (active_neighbors == 3 || is_active) // becomes active [INFO] [stdout] | [INFO] [stdout] 131 - (is_active && (active_neighbors == 2 || active_neighbors == 3)) // stays active [INFO] [stdout] 132 - || (!is_active && active_neighbors == 3) // becomes active [INFO] [stdout] 131 + active_neighbors == 3 || is_active && active_neighbors == 2 // becomes active [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/day_17.rs:138:16 [INFO] [stdout] | [INFO] [stdout] 138 | neighbors: &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] 138 - neighbors: &Vec

, [INFO] [stdout] 138 + neighbors: &[P], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/day_20.rs:179:14 [INFO] [stdout] | [INFO] [stdout] 179 | .map(|tile_str| Tile::parse(tile_str)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Tile::parse` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day_20.rs:229:17 [INFO] [stdout] | [INFO] [stdout] 229 | fn solve(tiles: &Vec) -> TileMap { [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] 229 - fn solve(tiles: &Vec) -> TileMap { [INFO] [stdout] 229 + fn solve(tiles: &[Tile]) -> TileMap { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant name ends with the enum's name [INFO] [stdout] --> src/day_18.rs:61:5 [INFO] [stdout] | [INFO] [stdout] 61 | SubExpr(Box>), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stdout] = note: `#[warn(clippy::enum_variant_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `u16` which implements the `Copy` trait [INFO] [stdout] --> src/day_20.rs:236:26 [INFO] [stdout] | [INFO] [stdout] 236 | let first_tile_key = remaining.keys().next().unwrap().clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*remaining.keys().next().unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `Box>`. Consider using just `Vec<..>` [INFO] [stdout] --> src/day_18.rs:61:13 [INFO] [stdout] | [INFO] [stdout] 61 | SubExpr(Box>), [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `Vec<..>` is already on the heap, `Box>` makes an extra allocation [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#box_collection [INFO] [stdout] = note: `#[warn(clippy::box_collection)]` 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/day_18.rs:78:65 [INFO] [stdout] | [INFO] [stdout] 78 | let (sub, skip_to) = Self::parse_from_index(&input, i + 1); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/day_20.rs:284:18 [INFO] [stdout] | [INFO] [stdout] 284 | fn get_tile_data<'a>(input: &'a str) -> HashMap { [INFO] [stdout] | ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 284 - fn get_tile_data<'a>(input: &'a str) -> HashMap { [INFO] [stdout] 284 + fn get_tile_data(input: &str) -> HashMap { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `y` is used to index `data` [INFO] [stdout] --> src/day_20.rs:315:14 [INFO] [stdout] | [INFO] [stdout] 315 | for y in 0..len - 1 { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 315 - for y in 0..len - 1 { [INFO] [stdout] 315 + for (y, ) in data.iter_mut().enumerate().take(len - 1) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `x` is only used to index `data` [INFO] [stdout] --> src/day_20.rs:316:18 [INFO] [stdout] | [INFO] [stdout] 316 | for x in (y + 1)..len { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 316 - for x in (y + 1)..len { [INFO] [stdout] 316 + for in data.iter_mut().take(len).skip((y + 1)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day_20.rs:460:27 [INFO] [stdout] | [INFO] [stdout] 460 | check_water_roughness(&INPUT) [INFO] [stdout] | ^^^^^^ help: change this to: `INPUT` [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 are using an explicit closure for copying elements [INFO] [stdout] --> src/day_21.rs:22:40 [INFO] [stdout] | [INFO] [stdout] 22 | let all_allergens: HashSet<&str> = foods [INFO] [stdout] | ________________________________________^ [INFO] [stdout] 23 | | .iter() [INFO] [stdout] 24 | | .map(|(_i, a)| a.iter()) [INFO] [stdout] 25 | | .flatten() [INFO] [stdout] 26 | | .map(|a| *a) [INFO] [stdout] | |____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] help: consider calling the dedicated `copied` method [INFO] [stdout] | [INFO] [stdout] 22 ~ let all_allergens: HashSet<&str> = foods [INFO] [stdout] 23 + .iter() [INFO] [stdout] 24 + .map(|(_i, a)| a.iter()) [INFO] [stdout] 25 + .flatten().copied() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/day_19.rs:42:33 [INFO] [stdout] | [INFO] [stdout] 42 | .unwrap_or_else(|| Vec::new()), [INFO] [stdout] | ^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Vec::new` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/day_21.rs:24:10 [INFO] [stdout] | [INFO] [stdout] 24 | .map(|(_i, a)| a.iter()) [INFO] [stdout] | __________^ [INFO] [stdout] 25 | | .flatten() [INFO] [stdout] | |__________________^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(|(_i, a)| a.iter())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> src/day_19.rs:39:37 [INFO] [stdout] | [INFO] [stdout] 39 | Rule::Literal(value) => message [INFO] [stdout] | _____________________________________^ [INFO] [stdout] 40 | | .strip_prefix(*value) [INFO] [stdout] 41 | | .and_then(|sub| Some(vec![sub])) [INFO] [stdout] | |________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] = note: `#[warn(clippy::bind_instead_of_map)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 39 ~ Rule::Literal(value) => message [INFO] [stdout] 40 + .strip_prefix(*value).map(|sub| vec![sub]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/day_21.rs:35:18 [INFO] [stdout] | [INFO] [stdout] 35 | .or_insert_with(HashSet::new); [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: found call to `str::trim` before `str::split_whitespace` [INFO] [stdout] --> src/day_19.rs:56:10 [INFO] [stdout] | [INFO] [stdout] 56 | .trim() [INFO] [stdout] | __________^ [INFO] [stdout] 57 | | .split_whitespace() [INFO] [stdout] | |_________^ help: remove `trim()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trim_split_whitespace [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/day_21.rs:100:10 [INFO] [stdout] | [INFO] [stdout] 100 | .map(|(i_set, _)| i_set) [INFO] [stdout] | __________^ [INFO] [stdout] 101 | | .flatten() [INFO] [stdout] | |__________________^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(|(i_set, _)| i_set)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `[u16; 4]` which implements the `Copy` trait [INFO] [stdout] --> src/day_20.rs:111:29 [INFO] [stdout] | [INFO] [stdout] 111 | let mut new_sides = self.sides.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.sides` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/day_20.rs:179:14 [INFO] [stdout] | [INFO] [stdout] 179 | .map(|tile_str| Tile::parse(tile_str)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Tile::parse` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day_20.rs:229:17 [INFO] [stdout] | [INFO] [stdout] 229 | fn solve(tiles: &Vec) -> TileMap { [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] 229 - fn solve(tiles: &Vec) -> TileMap { [INFO] [stdout] 229 + fn solve(tiles: &[Tile]) -> TileMap { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `u16` which implements the `Copy` trait [INFO] [stdout] --> src/day_20.rs:236:26 [INFO] [stdout] | [INFO] [stdout] 236 | let first_tile_key = remaining.keys().next().unwrap().clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*remaining.keys().next().unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/day_20.rs:284:18 [INFO] [stdout] | [INFO] [stdout] 284 | fn get_tile_data<'a>(input: &'a str) -> HashMap { [INFO] [stdout] | ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 284 - fn get_tile_data<'a>(input: &'a str) -> HashMap { [INFO] [stdout] 284 + fn get_tile_data(input: &str) -> HashMap { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/day_24.rs:94:10 [INFO] [stdout] | [INFO] [stdout] 94 | .map(|tile| Vec::from(tile.get_neighbors())) [INFO] [stdout] | __________^ [INFO] [stdout] 95 | | .flatten() [INFO] [stdout] | |__________________^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(|tile| Vec::from(tile.get_neighbors()))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `y` is used to index `data` [INFO] [stdout] --> src/day_20.rs:315:14 [INFO] [stdout] | [INFO] [stdout] 315 | for y in 0..len - 1 { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 315 - for y in 0..len - 1 { [INFO] [stdout] 315 + for (y, ) in data.iter_mut().enumerate().take(len - 1) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `x` is only used to index `data` [INFO] [stdout] --> src/day_20.rs:316:18 [INFO] [stdout] | [INFO] [stdout] 316 | for x in (y + 1)..len { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 316 - for x in (y + 1)..len { [INFO] [stdout] 316 + for in data.iter_mut().take(len).skip((y + 1)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day_24.rs:123:20 [INFO] [stdout] | [INFO] [stdout] 123 | flip_all_tiles(&INPUT).len() [INFO] [stdout] | ^^^^^^ help: change this to: `INPUT` [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/day_24.rs:127:32 [INFO] [stdout] | [INFO] [stdout] 127 | daily_flips(flip_all_tiles(&INPUT)).len() [INFO] [stdout] | ^^^^^^ help: change this to: `INPUT` [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/day_20.rs:460:27 [INFO] [stdout] | [INFO] [stdout] 460 | check_water_roughness(&INPUT) [INFO] [stdout] | ^^^^^^ help: change this to: `INPUT` [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: useless use of `vec!` [INFO] [stdout] --> src/day_03.rs:54:5 [INFO] [stdout] | [INFO] [stdout] 54 | / vec![ [INFO] [stdout] 55 | | find_trees(tree_grid, 1, 1), [INFO] [stdout] 56 | | find_trees(tree_grid, 1, 3), [INFO] [stdout] 57 | | find_trees(tree_grid, 1, 5), [INFO] [stdout] 58 | | find_trees(tree_grid, 1, 7), [INFO] [stdout] 59 | | find_trees(tree_grid, 2, 1), [INFO] [stdout] 60 | | ] [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] help: you can use an array directly [INFO] [stdout] | [INFO] [stdout] 54 ~ [find_trees(tree_grid, 1, 1), [INFO] [stdout] 55 + find_trees(tree_grid, 1, 3), [INFO] [stdout] 56 + find_trees(tree_grid, 1, 5), [INFO] [stdout] 57 + find_trees(tree_grid, 1, 7), [INFO] [stdout] 58 + find_trees(tree_grid, 2, 1)] [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/day_04.rs:37:5 [INFO] [stdout] | [INFO] [stdout] 37 | / vec![ [INFO] [stdout] 38 | | passport_fields.get("byr").map(|value| { [INFO] [stdout] 39 | | let value: i32 = value.parse().unwrap(); [INFO] [stdout] 40 | | value >= 1920 && value <= 2002 [INFO] [stdout] ... | [INFO] [stdout] 81 | | .map(|value| value.len() == 9 && value.parse::().is_ok()), [INFO] [stdout] 82 | | ] [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] help: you can use an array directly [INFO] [stdout] | [INFO] [stdout] 37 ~ [passport_fields.get("byr").map(|value| { [INFO] [stdout] 38 + let value: i32 = value.parse().unwrap(); [INFO] [stdout] 39 + value >= 1920 && value <= 2002 [INFO] [stdout] 40 + }), [INFO] [stdout] 41 + passport_fields.get("iyr").map(|value| { [INFO] [stdout] 42 + let value: i32 = value.parse().unwrap(); [INFO] [stdout] 43 + value >= 2010 && value <= 2020 [INFO] [stdout] 44 + }), [INFO] [stdout] 45 + passport_fields.get("eyr").map(|value| { [INFO] [stdout] 46 + let value: i32 = value.parse().unwrap(); [INFO] [stdout] 47 + value >= 2020 && value <= 2030 [INFO] [stdout] 48 + }), [INFO] [stdout] 49 + passport_fields.get("hgt").map(|value| { [INFO] [stdout] 50 + if value.len() <= 2 { [INFO] [stdout] 51 + return false; [INFO] [stdout] 52 + } [INFO] [stdout] 53 + let (num, unit) = value.split_at(value.len() - 2); [INFO] [stdout] 54 + match unit { [INFO] [stdout] 55 + "cm" => { [INFO] [stdout] 56 + let height: i32 = num.parse().unwrap_or(-1); [INFO] [stdout] 57 + height >= 150 && height <= 193 [INFO] [stdout] 58 + } [INFO] [stdout] 59 + "in" => { [INFO] [stdout] 60 + let height: i32 = num.parse().unwrap_or(-1); [INFO] [stdout] 61 + height >= 59 && height <= 76 [INFO] [stdout] 62 + } [INFO] [stdout] 63 + _ => false, [INFO] [stdout] 64 + } [INFO] [stdout] 65 + }), [INFO] [stdout] 66 + passport_fields [INFO] [stdout] 67 + .get("hcl") [INFO] [stdout] 68 + .map(|value| value.len() == 7 && i64::from_str_radix(&value[1..], 16).is_ok()), [INFO] [stdout] 69 + passport_fields.get("ecl").map(|&value| { [INFO] [stdout] 70 + value == "amb" [INFO] [stdout] 71 + || value == "blu" [INFO] [stdout] 72 + || value == "brn" [INFO] [stdout] 73 + || value == "gry" [INFO] [stdout] 74 + || value == "grn" [INFO] [stdout] 75 + || value == "hzl" [INFO] [stdout] 76 + || value == "oth" [INFO] [stdout] 77 + }), [INFO] [stdout] 78 + passport_fields [INFO] [stdout] 79 + .get("pid") [INFO] [stdout] 80 + .map(|value| value.len() == 9 && value.parse::().is_ok())] [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/day_17.rs:63:22 [INFO] [stdout] | [INFO] [stdout] 63 | let values = vec![-1, 0, 1]; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: you can use an array directly: `[-1, 0, 1]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/day_17.rs:78:22 [INFO] [stdout] | [INFO] [stdout] 78 | let values = vec![-1, 0, 1]; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: you can use an array directly: `[-1, 0, 1]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/day_20.rs:200:5 [INFO] [stdout] | [INFO] [stdout] 200 | / vec![ [INFO] [stdout] 201 | | map.get(&(min_x, min_y)).unwrap().id as u64, [INFO] [stdout] 202 | | map.get(&(max_x, min_y)).unwrap().id as u64, [INFO] [stdout] 203 | | map.get(&(min_x, max_y)).unwrap().id as u64, [INFO] [stdout] 204 | | map.get(&(max_x, max_y)).unwrap().id as u64, [INFO] [stdout] 205 | | ] [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] help: you can use an array directly [INFO] [stdout] | [INFO] [stdout] 200 ~ [map.get(&(min_x, min_y)).unwrap().id as u64, [INFO] [stdout] 201 + map.get(&(max_x, min_y)).unwrap().id as u64, [INFO] [stdout] 202 + map.get(&(min_x, max_y)).unwrap().id as u64, [INFO] [stdout] 203 + map.get(&(max_x, max_y)).unwrap().id as u64] [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day_20.rs:527:47 [INFO] [stdout] | [INFO] [stdout] 527 | assert_eq!(273, check_water_roughness(&EXAMPLE)); [INFO] [stdout] | ^^^^^^^^ help: change this to: `EXAMPLE` [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/day_20.rs:532:48 [INFO] [stdout] | [INFO] [stdout] 532 | assert_eq!(2409, check_water_roughness(&INPUT)); [INFO] [stdout] | ^^^^^^ help: change this to: `INPUT` [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 are using an explicit closure for copying elements [INFO] [stdout] --> src/day_21.rs:22:40 [INFO] [stdout] | [INFO] [stdout] 22 | let all_allergens: HashSet<&str> = foods [INFO] [stdout] | ________________________________________^ [INFO] [stdout] 23 | | .iter() [INFO] [stdout] 24 | | .map(|(_i, a)| a.iter()) [INFO] [stdout] 25 | | .flatten() [INFO] [stdout] 26 | | .map(|a| *a) [INFO] [stdout] | |____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] help: consider calling the dedicated `copied` method [INFO] [stdout] | [INFO] [stdout] 22 ~ let all_allergens: HashSet<&str> = foods [INFO] [stdout] 23 + .iter() [INFO] [stdout] 24 + .map(|(_i, a)| a.iter()) [INFO] [stdout] 25 + .flatten().copied() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/day_21.rs:24:10 [INFO] [stdout] | [INFO] [stdout] 24 | .map(|(_i, a)| a.iter()) [INFO] [stdout] | __________^ [INFO] [stdout] 25 | | .flatten() [INFO] [stdout] | |__________________^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(|(_i, a)| a.iter())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/day_21.rs:35:18 [INFO] [stdout] | [INFO] [stdout] 35 | .or_insert_with(HashSet::new); [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: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/day_21.rs:100:10 [INFO] [stdout] | [INFO] [stdout] 100 | .map(|(i_set, _)| i_set) [INFO] [stdout] | __________^ [INFO] [stdout] 101 | | .flatten() [INFO] [stdout] | |__________________^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(|(i_set, _)| i_set)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/day_24.rs:94:10 [INFO] [stdout] | [INFO] [stdout] 94 | .map(|tile| Vec::from(tile.get_neighbors())) [INFO] [stdout] | __________^ [INFO] [stdout] 95 | | .flatten() [INFO] [stdout] | |__________________^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(|tile| Vec::from(tile.get_neighbors()))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day_24.rs:123:20 [INFO] [stdout] | [INFO] [stdout] 123 | flip_all_tiles(&INPUT).len() [INFO] [stdout] | ^^^^^^ help: change this to: `INPUT` [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/day_24.rs:127:32 [INFO] [stdout] | [INFO] [stdout] 127 | daily_flips(flip_all_tiles(&INPUT)).len() [INFO] [stdout] | ^^^^^^ help: change this to: `INPUT` [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/day_24.rs:157:38 [INFO] [stdout] | [INFO] [stdout] 157 | let flipped = flip_all_tiles(&EXAMPLE); [INFO] [stdout] | ^^^^^^^^ help: change this to: `EXAMPLE` [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/day_24.rs:163:38 [INFO] [stdout] | [INFO] [stdout] 163 | let flipped = flip_all_tiles(&INPUT); [INFO] [stdout] | ^^^^^^ help: change this to: `INPUT` [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/day_24.rs:169:38 [INFO] [stdout] | [INFO] [stdout] 169 | let flipped = flip_all_tiles(&EXAMPLE); [INFO] [stdout] | ^^^^^^^^ help: change this to: `EXAMPLE` [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/day_24.rs:176:38 [INFO] [stdout] | [INFO] [stdout] 176 | let flipped = flip_all_tiles(&INPUT); [INFO] [stdout] | ^^^^^^ help: change this to: `INPUT` [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: useless use of `vec!` [INFO] [stdout] --> src/day_03.rs:54:5 [INFO] [stdout] | [INFO] [stdout] 54 | / vec![ [INFO] [stdout] 55 | | find_trees(tree_grid, 1, 1), [INFO] [stdout] 56 | | find_trees(tree_grid, 1, 3), [INFO] [stdout] 57 | | find_trees(tree_grid, 1, 5), [INFO] [stdout] 58 | | find_trees(tree_grid, 1, 7), [INFO] [stdout] 59 | | find_trees(tree_grid, 2, 1), [INFO] [stdout] 60 | | ] [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] help: you can use an array directly [INFO] [stdout] | [INFO] [stdout] 54 ~ [find_trees(tree_grid, 1, 1), [INFO] [stdout] 55 + find_trees(tree_grid, 1, 3), [INFO] [stdout] 56 + find_trees(tree_grid, 1, 5), [INFO] [stdout] 57 + find_trees(tree_grid, 1, 7), [INFO] [stdout] 58 + find_trees(tree_grid, 2, 1)] [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/day_04.rs:37:5 [INFO] [stdout] | [INFO] [stdout] 37 | / vec![ [INFO] [stdout] 38 | | passport_fields.get("byr").map(|value| { [INFO] [stdout] 39 | | let value: i32 = value.parse().unwrap(); [INFO] [stdout] 40 | | value >= 1920 && value <= 2002 [INFO] [stdout] ... | [INFO] [stdout] 81 | | .map(|value| value.len() == 9 && value.parse::().is_ok()), [INFO] [stdout] 82 | | ] [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] help: you can use an array directly [INFO] [stdout] | [INFO] [stdout] 37 ~ [passport_fields.get("byr").map(|value| { [INFO] [stdout] 38 + let value: i32 = value.parse().unwrap(); [INFO] [stdout] 39 + value >= 1920 && value <= 2002 [INFO] [stdout] 40 + }), [INFO] [stdout] 41 + passport_fields.get("iyr").map(|value| { [INFO] [stdout] 42 + let value: i32 = value.parse().unwrap(); [INFO] [stdout] 43 + value >= 2010 && value <= 2020 [INFO] [stdout] 44 + }), [INFO] [stdout] 45 + passport_fields.get("eyr").map(|value| { [INFO] [stdout] 46 + let value: i32 = value.parse().unwrap(); [INFO] [stdout] 47 + value >= 2020 && value <= 2030 [INFO] [stdout] 48 + }), [INFO] [stdout] 49 + passport_fields.get("hgt").map(|value| { [INFO] [stdout] 50 + if value.len() <= 2 { [INFO] [stdout] 51 + return false; [INFO] [stdout] 52 + } [INFO] [stdout] 53 + let (num, unit) = value.split_at(value.len() - 2); [INFO] [stdout] 54 + match unit { [INFO] [stdout] 55 + "cm" => { [INFO] [stdout] 56 + let height: i32 = num.parse().unwrap_or(-1); [INFO] [stdout] 57 + height >= 150 && height <= 193 [INFO] [stdout] 58 + } [INFO] [stdout] 59 + "in" => { [INFO] [stdout] 60 + let height: i32 = num.parse().unwrap_or(-1); [INFO] [stdout] 61 + height >= 59 && height <= 76 [INFO] [stdout] 62 + } [INFO] [stdout] 63 + _ => false, [INFO] [stdout] 64 + } [INFO] [stdout] 65 + }), [INFO] [stdout] 66 + passport_fields [INFO] [stdout] 67 + .get("hcl") [INFO] [stdout] 68 + .map(|value| value.len() == 7 && i64::from_str_radix(&value[1..], 16).is_ok()), [INFO] [stdout] 69 + passport_fields.get("ecl").map(|&value| { [INFO] [stdout] 70 + value == "amb" [INFO] [stdout] 71 + || value == "blu" [INFO] [stdout] 72 + || value == "brn" [INFO] [stdout] 73 + || value == "gry" [INFO] [stdout] 74 + || value == "grn" [INFO] [stdout] 75 + || value == "hzl" [INFO] [stdout] 76 + || value == "oth" [INFO] [stdout] 77 + }), [INFO] [stdout] 78 + passport_fields [INFO] [stdout] 79 + .get("pid") [INFO] [stdout] 80 + .map(|value| value.len() == 9 && value.parse::().is_ok())] [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/day_17.rs:63:22 [INFO] [stdout] | [INFO] [stdout] 63 | let values = vec![-1, 0, 1]; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: you can use an array directly: `[-1, 0, 1]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/day_17.rs:78:22 [INFO] [stdout] | [INFO] [stdout] 78 | let values = vec![-1, 0, 1]; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: you can use an array directly: `[-1, 0, 1]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/day_20.rs:200:5 [INFO] [stdout] | [INFO] [stdout] 200 | / vec![ [INFO] [stdout] 201 | | map.get(&(min_x, min_y)).unwrap().id as u64, [INFO] [stdout] 202 | | map.get(&(max_x, min_y)).unwrap().id as u64, [INFO] [stdout] 203 | | map.get(&(min_x, max_y)).unwrap().id as u64, [INFO] [stdout] 204 | | map.get(&(max_x, max_y)).unwrap().id as u64, [INFO] [stdout] 205 | | ] [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] help: you can use an array directly [INFO] [stdout] | [INFO] [stdout] 200 ~ [map.get(&(min_x, min_y)).unwrap().id as u64, [INFO] [stdout] 201 + map.get(&(max_x, min_y)).unwrap().id as u64, [INFO] [stdout] 202 + map.get(&(min_x, max_y)).unwrap().id as u64, [INFO] [stdout] 203 + map.get(&(max_x, max_y)).unwrap().id as u64] [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 1.28s [INFO] running `Command { std: "docker" "inspect" "19c558ed6d5f5e5e6cf8d40ba473653f53275107401ea9b73989aebe5918620a", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "19c558ed6d5f5e5e6cf8d40ba473653f53275107401ea9b73989aebe5918620a", kill_on_drop: false }` [INFO] [stdout] 19c558ed6d5f5e5e6cf8d40ba473653f53275107401ea9b73989aebe5918620a