[INFO] cloning repository https://github.com/chops76/AoC2016 [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/chops76/AoC2016" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fchops76%2FAoC2016", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fchops76%2FAoC2016'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 921f4cb87ebfaf6fbe863be4894e6b9873192a69 [INFO] linting chops76/AoC2016 against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fchops76%2FAoC2016" "/workspace/builds/worker-7-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-7-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/chops76/AoC2016 [INFO] finished tweaking git repo https://github.com/chops76/AoC2016 [INFO] tweaked toml for git repo https://github.com/chops76/AoC2016 written to /workspace/builds/worker-7-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/chops76/AoC2016 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/chops76/AoC2016 already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded md-5 v0.8.0 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-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] 9d2da054692842b8705bc8106c249d234cb7727632e876e545c59b191b75c19f [INFO] running `Command { std: "docker" "start" "-a" "9d2da054692842b8705bc8106c249d234cb7727632e876e545c59b191b75c19f", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "9d2da054692842b8705bc8106c249d234cb7727632e876e545c59b191b75c19f", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "9d2da054692842b8705bc8106c249d234cb7727632e876e545c59b191b75c19f", kill_on_drop: false }` [INFO] [stdout] 9d2da054692842b8705bc8106c249d234cb7727632e876e545c59b191b75c19f [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-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] e92015e87736ff740d6a4d4908dcccdecefe8121a7438178005bfe65feb122d3 [INFO] running `Command { std: "docker" "start" "-a" "e92015e87736ff740d6a4d4908dcccdecefe8121a7438178005bfe65feb122d3", kill_on_drop: false }` [INFO] [stderr] Checking byte-tools v0.3.1 [INFO] [stderr] Checking byteorder v1.4.2 [INFO] [stderr] Checking opaque-debug v0.2.3 [INFO] [stderr] Checking either v1.6.1 [INFO] [stderr] Checking generic-array v0.12.3 [INFO] [stderr] Checking block-padding v0.1.5 [INFO] [stderr] Checking itertools v0.9.0 [INFO] [stderr] Checking block-buffer v0.7.3 [INFO] [stderr] Checking digest v0.8.1 [INFO] [stderr] Checking md-5 v0.8.0 [INFO] [stderr] Checking aoc_2016 v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `std::char` [INFO] [stdout] --> src/day3.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use std::char; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/day4.rs:23:3 [INFO] [stdout] | [INFO] [stdout] 23 | checksum: checksum [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `checksum` [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: variant `ROTATE_COL` should have an upper camel case name [INFO] [stdout] --> src/day8.rs:10:2 [INFO] [stdout] | [INFO] [stdout] 10 | ROTATE_COL, [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to upper camel case: `RotateCol` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_camel_case_types)]` (part of `#[warn(nonstandard_style)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `ROTATE_ROW` should have an upper camel case name [INFO] [stdout] --> src/day8.rs:11:2 [INFO] [stdout] | [INFO] [stdout] 11 | ROTATE_ROW [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to upper camel case: `RotateRow` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::cmp` [INFO] [stdout] --> src/day12.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use std::cmp; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `cpy` should have an upper camel case name [INFO] [stdout] --> src/day12.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | cpy, [INFO] [stdout] | ^^^ help: convert the identifier to upper camel case (notice the capitalization): `Cpy` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `inc` should have an upper camel case name [INFO] [stdout] --> src/day12.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | inc, [INFO] [stdout] | ^^^ help: convert the identifier to upper camel case (notice the capitalization): `Inc` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `dec` should have an upper camel case name [INFO] [stdout] --> src/day12.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | dec, [INFO] [stdout] | ^^^ help: convert the identifier to upper camel case: `Dec` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `jnz` should have an upper camel case name [INFO] [stdout] --> src/day12.rs:11:5 [INFO] [stdout] | [INFO] [stdout] 11 | jnz [INFO] [stdout] | ^^^ help: convert the identifier to upper camel case: `Jnz` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::BinaryHeap` [INFO] [stdout] --> src/day22.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use std::collections::BinaryHeap; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::HashSet` [INFO] [stdout] --> src/day22.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use std::collections::HashSet; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::VecDeque` [INFO] [stdout] --> src/day22.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use std::collections::VecDeque; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `itertools::Itertools` [INFO] [stdout] --> src/day22.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | use itertools::Itertools; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::cmp` [INFO] [stdout] --> src/day23.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use std::cmp; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `cpy` should have an upper camel case name [INFO] [stdout] --> src/day23.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | cpy, [INFO] [stdout] | ^^^ help: convert the identifier to upper camel case (notice the capitalization): `Cpy` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `inc` should have an upper camel case name [INFO] [stdout] --> src/day23.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | inc, [INFO] [stdout] | ^^^ help: convert the identifier to upper camel case (notice the capitalization): `Inc` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `dec` should have an upper camel case name [INFO] [stdout] --> src/day23.rs:11:5 [INFO] [stdout] | [INFO] [stdout] 11 | dec, [INFO] [stdout] | ^^^ help: convert the identifier to upper camel case: `Dec` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `jnz` should have an upper camel case name [INFO] [stdout] --> src/day23.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | jnz, [INFO] [stdout] | ^^^ help: convert the identifier to upper camel case: `Jnz` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `tgl` should have an upper camel case name [INFO] [stdout] --> src/day23.rs:13:5 [INFO] [stdout] | [INFO] [stdout] 13 | tgl [INFO] [stdout] | ^^^ help: convert the identifier to upper camel case: `Tgl` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::cmp` [INFO] [stdout] --> src/day25.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use std::cmp; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `cpy` should have an upper camel case name [INFO] [stdout] --> src/day25.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | cpy, [INFO] [stdout] | ^^^ help: convert the identifier to upper camel case (notice the capitalization): `Cpy` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `inc` should have an upper camel case name [INFO] [stdout] --> src/day25.rs:11:5 [INFO] [stdout] | [INFO] [stdout] 11 | inc, [INFO] [stdout] | ^^^ help: convert the identifier to upper camel case (notice the capitalization): `Inc` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `dec` should have an upper camel case name [INFO] [stdout] --> src/day25.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | dec, [INFO] [stdout] | ^^^ help: convert the identifier to upper camel case: `Dec` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `jnz` should have an upper camel case name [INFO] [stdout] --> src/day25.rs:13:5 [INFO] [stdout] | [INFO] [stdout] 13 | jnz, [INFO] [stdout] | ^^^ help: convert the identifier to upper camel case: `Jnz` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `tgl` should have an upper camel case name [INFO] [stdout] --> src/day25.rs:14:5 [INFO] [stdout] | [INFO] [stdout] 14 | tgl, [INFO] [stdout] | ^^^ help: convert the identifier to upper camel case: `Tgl` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `out` should have an upper camel case name [INFO] [stdout] --> src/day25.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 15 | out [INFO] [stdout] | ^^^ help: convert the identifier to upper camel case (notice the capitalization): `Out` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable expression [INFO] [stdout] --> src/day10.rs:98:2 [INFO] [stdout] | [INFO] [stdout] 51 | / loop { [INFO] [stdout] 52 | | let mut double = 0; [INFO] [stdout] 53 | | for (n, b) in &bots { [INFO] [stdout] 54 | | if b.len() == 2 { [INFO] [stdout] ... | [INFO] [stdout] 97 | | } [INFO] [stdout] | |_____- any code following this expression is unreachable [INFO] [stdout] 98 | 0 [INFO] [stdout] | ^ unreachable expression [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unreachable_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable expression [INFO] [stdout] --> src/day10.rs:153:2 [INFO] [stdout] | [INFO] [stdout] 104 | / loop { [INFO] [stdout] 105 | | let mut double = 0; [INFO] [stdout] 106 | | let mut found = false; [INFO] [stdout] 107 | | for (n, b) in &bots { [INFO] [stdout] ... | [INFO] [stdout] 152 | | } [INFO] [stdout] | |_____- any code following this expression is unreachable [INFO] [stdout] 153 | 0 [INFO] [stdout] | ^ unreachable expression [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `super::*` [INFO] [stdout] --> src/day2.rs:101:6 [INFO] [stdout] | [INFO] [stdout] 101 | use super::*; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::char` [INFO] [stdout] --> src/day3.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use std::char; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/day4.rs:23:3 [INFO] [stdout] | [INFO] [stdout] 23 | checksum: checksum [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `checksum` [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: unused import: `super::*` [INFO] [stdout] --> src/day4.rs:100:6 [INFO] [stdout] | [INFO] [stdout] 100 | use super::*; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `ROTATE_COL` should have an upper camel case name [INFO] [stdout] --> src/day8.rs:10:2 [INFO] [stdout] | [INFO] [stdout] 10 | ROTATE_COL, [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to upper camel case: `RotateCol` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_camel_case_types)]` (part of `#[warn(nonstandard_style)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `ROTATE_ROW` should have an upper camel case name [INFO] [stdout] --> src/day8.rs:11:2 [INFO] [stdout] | [INFO] [stdout] 11 | ROTATE_ROW [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to upper camel case: `RotateRow` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/day9.rs:41:7 [INFO] [stdout] | [INFO] [stdout] 41 | for i in 0..num_chars { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/day9.rs:45:7 [INFO] [stdout] | [INFO] [stdout] 45 | for i in 0..num_times { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/day9.rs:83:7 [INFO] [stdout] | [INFO] [stdout] 83 | for i in 0..num_chars { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::cmp` [INFO] [stdout] --> src/day12.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use std::cmp; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `cpy` should have an upper camel case name [INFO] [stdout] --> src/day12.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | cpy, [INFO] [stdout] | ^^^ help: convert the identifier to upper camel case (notice the capitalization): `Cpy` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `inc` should have an upper camel case name [INFO] [stdout] --> src/day12.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | inc, [INFO] [stdout] | ^^^ help: convert the identifier to upper camel case (notice the capitalization): `Inc` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `dec` should have an upper camel case name [INFO] [stdout] --> src/day12.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | dec, [INFO] [stdout] | ^^^ help: convert the identifier to upper camel case: `Dec` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `jnz` should have an upper camel case name [INFO] [stdout] --> src/day12.rs:11:5 [INFO] [stdout] | [INFO] [stdout] 11 | jnz [INFO] [stdout] | ^^^ help: convert the identifier to upper camel case: `Jnz` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `super::*` [INFO] [stdout] --> src/day12.rs:101:9 [INFO] [stdout] | [INFO] [stdout] 101 | use super::*; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `super::*` [INFO] [stdout] --> src/day13.rs:86:9 [INFO] [stdout] | [INFO] [stdout] 86 | use super::*; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::BinaryHeap` [INFO] [stdout] --> src/day22.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use std::collections::BinaryHeap; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::HashSet` [INFO] [stdout] --> src/day22.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use std::collections::HashSet; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::VecDeque` [INFO] [stdout] --> src/day22.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use std::collections::VecDeque; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `itertools::Itertools` [INFO] [stdout] --> src/day22.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | use itertools::Itertools; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::cmp` [INFO] [stdout] --> src/day23.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use std::cmp; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `cpy` should have an upper camel case name [INFO] [stdout] --> src/day23.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | cpy, [INFO] [stdout] | ^^^ help: convert the identifier to upper camel case (notice the capitalization): `Cpy` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `inc` should have an upper camel case name [INFO] [stdout] --> src/day23.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | inc, [INFO] [stdout] | ^^^ help: convert the identifier to upper camel case (notice the capitalization): `Inc` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `dec` should have an upper camel case name [INFO] [stdout] --> src/day23.rs:11:5 [INFO] [stdout] | [INFO] [stdout] 11 | dec, [INFO] [stdout] | ^^^ help: convert the identifier to upper camel case: `Dec` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `jnz` should have an upper camel case name [INFO] [stdout] --> src/day23.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | jnz, [INFO] [stdout] | ^^^ help: convert the identifier to upper camel case: `Jnz` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `tgl` should have an upper camel case name [INFO] [stdout] --> src/day23.rs:13:5 [INFO] [stdout] | [INFO] [stdout] 13 | tgl [INFO] [stdout] | ^^^ help: convert the identifier to upper camel case: `Tgl` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `super::*` [INFO] [stdout] --> src/day23.rs:125:9 [INFO] [stdout] | [INFO] [stdout] 125 | use super::*; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::cmp` [INFO] [stdout] --> src/day25.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use std::cmp; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `cpy` should have an upper camel case name [INFO] [stdout] --> src/day25.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | cpy, [INFO] [stdout] | ^^^ help: convert the identifier to upper camel case (notice the capitalization): `Cpy` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `inc` should have an upper camel case name [INFO] [stdout] --> src/day25.rs:11:5 [INFO] [stdout] | [INFO] [stdout] 11 | inc, [INFO] [stdout] | ^^^ help: convert the identifier to upper camel case (notice the capitalization): `Inc` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `dec` should have an upper camel case name [INFO] [stdout] --> src/day25.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | dec, [INFO] [stdout] | ^^^ help: convert the identifier to upper camel case: `Dec` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `jnz` should have an upper camel case name [INFO] [stdout] --> src/day25.rs:13:5 [INFO] [stdout] | [INFO] [stdout] 13 | jnz, [INFO] [stdout] | ^^^ help: convert the identifier to upper camel case: `Jnz` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `tgl` should have an upper camel case name [INFO] [stdout] --> src/day25.rs:14:5 [INFO] [stdout] | [INFO] [stdout] 14 | tgl, [INFO] [stdout] | ^^^ help: convert the identifier to upper camel case: `Tgl` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `out` should have an upper camel case name [INFO] [stdout] --> src/day25.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 15 | out [INFO] [stdout] | ^^^ help: convert the identifier to upper camel case (notice the capitalization): `Out` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `super::*` [INFO] [stdout] --> src/day25.rs:163:9 [INFO] [stdout] | [INFO] [stdout] 163 | use super::*; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/day19.rs:35:7 [INFO] [stdout] | [INFO] [stdout] 35 | for i in 0..to_iter { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/day22.rs:52:9 [INFO] [stdout] | [INFO] [stdout] 52 | let mut empty = Node { [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `initial_state_test` is never used [INFO] [stdout] --> src/day11.rs:88:4 [INFO] [stdout] | [INFO] [stdout] 88 | fn initial_state_test() -> State { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `State` is never constructed [INFO] [stdout] --> src/day22.rs:23:8 [INFO] [stdout] | [INFO] [stdout] 23 | struct State { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `find_cost` is never used [INFO] [stdout] --> src/day22.rs:93:4 [INFO] [stdout] | [INFO] [stdout] 93 | fn find_cost(nodes: &Vec>) -> usize { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/day1.rs:17:26 [INFO] [stdout] | [INFO] [stdout] 17 | fstr.split(", ").map(|s| parse_ins(s)).collect() [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `parse_ins` [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: `flatten()` will run forever if the iterator repeatedly produces an `Err` [INFO] [stdout] --> src/day2.rs:10:31 [INFO] [stdout] | [INFO] [stdout] 10 | BufReader::new(f).lines().flatten().collect() [INFO] [stdout] | ^^^^^^^^^ help: replace with: `map_while(Result::ok)` [INFO] [stdout] | [INFO] [stdout] note: this expression returning a `std::io::Lines` may produce an infinite number of `Err` in case of a read error [INFO] [stdout] --> src/day2.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | BufReader::new(f).lines().flatten().collect() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#lines_filter_map_ok [INFO] [stdout] = note: `#[warn(clippy::lines_filter_map_ok)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/day3.rs:9:23 [INFO] [stdout] | [INFO] [stdout] 9 | s.split_whitespace().map(|v| v.parse()).flatten().collect() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(|v| v.parse())` [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: `flatten()` will run forever if the iterator repeatedly produces an `Err` [INFO] [stdout] --> src/day3.rs:14:31 [INFO] [stdout] | [INFO] [stdout] 14 | BufReader::new(f).lines().flatten().map(|s| parse_line(&s)).collect() [INFO] [stdout] | ^^^^^^^^^ help: replace with: `map_while(Result::ok)` [INFO] [stdout] | [INFO] [stdout] note: this expression returning a `std::io::Lines` may produce an infinite number of `Err` in case of a read error [INFO] [stdout] --> src/day3.rs:14:5 [INFO] [stdout] | [INFO] [stdout] 14 | BufReader::new(f).lines().flatten().map(|s| parse_line(&s)).collect() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#lines_filter_map_ok [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day3.rs:17:17 [INFO] [stdout] | [INFO] [stdout] 17 | fn valid(sides: &Vec) -> bool { [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] 17 ~ fn valid(sides: &[u32]) -> bool { [INFO] [stdout] 18 ~ let mut s = sides.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `flatten()` will run forever if the iterator repeatedly produces an `Err` [INFO] [stdout] --> src/day4.rs:29:31 [INFO] [stdout] | [INFO] [stdout] 29 | BufReader::new(f).lines().flatten().map(|s| parse_line(&s)).collect() [INFO] [stdout] | ^^^^^^^^^ help: replace with: `map_while(Result::ok)` [INFO] [stdout] | [INFO] [stdout] note: this expression returning a `std::io::Lines` may produce an infinite number of `Err` in case of a read error [INFO] [stdout] --> src/day4.rs:29:5 [INFO] [stdout] | [INFO] [stdout] 29 | BufReader::new(f).lines().flatten().map(|s| parse_line(&s)).collect() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#lines_filter_map_ok [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is used to index `v` [INFO] [stdout] --> src/day4.rs:40:12 [INFO] [stdout] | [INFO] [stdout] 40 | for j in 0..26 { [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] 40 - for j in 0..26 { [INFO] [stdout] 40 + for (j, ) in v.iter().enumerate().take(26) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `flatten()` will run forever if the iterator repeatedly produces an `Err` [INFO] [stdout] --> src/day6.rs:10:31 [INFO] [stdout] | [INFO] [stdout] 10 | BufReader::new(f).lines().flatten().collect() [INFO] [stdout] | ^^^^^^^^^ help: replace with: `map_while(Result::ok)` [INFO] [stdout] | [INFO] [stdout] note: this expression returning a `std::io::Lines` may produce an infinite number of `Err` in case of a read error [INFO] [stdout] --> src/day6.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | BufReader::new(f).lines().flatten().collect() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#lines_filter_map_ok [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable expression [INFO] [stdout] --> src/day10.rs:98:2 [INFO] [stdout] | [INFO] [stdout] 51 | / loop { [INFO] [stdout] 52 | | let mut double = 0; [INFO] [stdout] 53 | | for (n, b) in &bots { [INFO] [stdout] 54 | | if b.len() == 2 { [INFO] [stdout] ... | [INFO] [stdout] 97 | | } [INFO] [stdout] | |_____- any code following this expression is unreachable [INFO] [stdout] 98 | 0 [INFO] [stdout] | ^ unreachable expression [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unreachable_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable expression [INFO] [stdout] --> src/day10.rs:153:2 [INFO] [stdout] | [INFO] [stdout] 104 | / loop { [INFO] [stdout] 105 | | let mut double = 0; [INFO] [stdout] 106 | | let mut found = false; [INFO] [stdout] 107 | | for (n, b) in &bots { [INFO] [stdout] ... | [INFO] [stdout] 152 | | } [INFO] [stdout] | |_____- any code following this expression is unreachable [INFO] [stdout] 153 | 0 [INFO] [stdout] | ^ unreachable expression [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `flatten()` will run forever if the iterator repeatedly produces an `Err` [INFO] [stdout] --> src/day7.rs:24:31 [INFO] [stdout] | [INFO] [stdout] 24 | BufReader::new(f).lines().flatten().map(|s| parse_line(&s)).collect() [INFO] [stdout] | ^^^^^^^^^ help: replace with: `map_while(Result::ok)` [INFO] [stdout] | [INFO] [stdout] note: this expression returning a `std::io::Lines` may produce an infinite number of `Err` in case of a read error [INFO] [stdout] --> src/day7.rs:24:5 [INFO] [stdout] | [INFO] [stdout] 24 | BufReader::new(f).lines().flatten().map(|s| parse_line(&s)).collect() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#lines_filter_map_ok [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for cloning elements [INFO] [stdout] --> src/day7.rs:76:2 [INFO] [stdout] | [INFO] [stdout] 76 | hs.iter().map(|s| s.clone()).collect() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `cloned` method: `hs.iter().cloned()` [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] [INFO] [stdout] [INFO] [stdout] warning: name `RECT` contains a capitalized acronym [INFO] [stdout] --> src/day8.rs:9:2 [INFO] [stdout] | [INFO] [stdout] 9 | RECT, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Rect` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `flatten()` will run forever if the iterator repeatedly produces an `Err` [INFO] [stdout] --> src/day8.rs:42:31 [INFO] [stdout] | [INFO] [stdout] 42 | BufReader::new(f).lines().flatten().map(|s| parse_line(&s)).collect() [INFO] [stdout] | ^^^^^^^^^ help: replace with: `map_while(Result::ok)` [INFO] [stdout] | [INFO] [stdout] note: this expression returning a `std::io::Lines` may produce an infinite number of `Err` in case of a read error [INFO] [stdout] --> src/day8.rs:42:5 [INFO] [stdout] | [INFO] [stdout] 42 | BufReader::new(f).lines().flatten().map(|s| parse_line(&s)).collect() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#lines_filter_map_ok [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `grid` [INFO] [stdout] --> src/day8.rs:49:13 [INFO] [stdout] | [INFO] [stdout] 49 | for i in 0..cmd.val1 { [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] 49 - for i in 0..cmd.val1 { [INFO] [stdout] 49 + for in grid.iter_mut().take(cmd.val1) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is only used to index `grid` [INFO] [stdout] --> src/day8.rs:50:14 [INFO] [stdout] | [INFO] [stdout] 50 | for j in 0..cmd.val2 { [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] 50 - for j in 0..cmd.val2 { [INFO] [stdout] 50 + for in grid.iter_mut().take(cmd.val2) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `grid` [INFO] [stdout] --> src/day8.rs:56:13 [INFO] [stdout] | [INFO] [stdout] 56 | for i in 0..50 { [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] 56 - for i in 0..50 { [INFO] [stdout] 56 + for in grid.iter().take(50) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `grid` [INFO] [stdout] --> src/day8.rs:68:13 [INFO] [stdout] | [INFO] [stdout] 68 | for i in 0..6 { [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] 68 - for i in 0..6 { [INFO] [stdout] 68 + for in grid.iter().take(6) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is only used to index `grid` [INFO] [stdout] --> src/day8.rs:82:11 [INFO] [stdout] | [INFO] [stdout] 82 | for j in 0..6 { [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] 82 - for j in 0..6 { [INFO] [stdout] 82 + for in grid.iter().take(6) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `grid` [INFO] [stdout] --> src/day8.rs:83:12 [INFO] [stdout] | [INFO] [stdout] 83 | for i in 0..50 { [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] 83 - for i in 0..50 { [INFO] [stdout] 83 + for in grid.iter().take(50) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/day8.rs:91:3 [INFO] [stdout] | [INFO] [stdout] 91 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] = note: `#[warn(clippy::println_empty_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> src/day10.rs:18:3 [INFO] [stdout] | [INFO] [stdout] 18 | / if !bots.contains_key(&bot_num) { [INFO] [stdout] 19 | | bots.insert(bot_num, Vec::new()); [INFO] [stdout] 20 | | } [INFO] [stdout] | |_________^ help: try: `bots.entry(bot_num).or_insert_with(|| Vec::new());` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry [INFO] [stdout] = note: `#[warn(clippy::map_entry)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `flatten()` will run forever if the iterator repeatedly produces an `Err` [INFO] [stdout] --> src/day10.rs:41:53 [INFO] [stdout] | [INFO] [stdout] 41 | let lines: Vec = BufReader::new(f).lines().flatten().collect(); [INFO] [stdout] | ^^^^^^^^^ help: replace with: `map_while(Result::ok)` [INFO] [stdout] | [INFO] [stdout] note: this expression returning a `std::io::Lines` may produce an infinite number of `Err` in case of a read error [INFO] [stdout] --> src/day10.rs:41:27 [INFO] [stdout] | [INFO] [stdout] 41 | let lines: Vec = BufReader::new(f).lines().flatten().collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#lines_filter_map_ok [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> src/day10.rs:70:5 [INFO] [stdout] | [INFO] [stdout] 70 | / if !bots.contains_key(&bot_num) { [INFO] [stdout] 71 | | bots.insert(bot_num, Vec::new()); [INFO] [stdout] 72 | | } [INFO] [stdout] | |_________________^ help: try: `bots.entry(bot_num).or_insert_with(|| Vec::new());` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> src/day10.rs:76:5 [INFO] [stdout] | [INFO] [stdout] 76 | / if !outputs.contains_key(&output_num) { [INFO] [stdout] 77 | | outputs.insert(output_num, Vec::new()); [INFO] [stdout] 78 | | } [INFO] [stdout] | |_________________^ help: try: `outputs.entry(output_num).or_insert_with(|| Vec::new());` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> src/day10.rs:85:5 [INFO] [stdout] | [INFO] [stdout] 85 | / if !bots.contains_key(&bot_num) { [INFO] [stdout] 86 | | bots.insert(bot_num, Vec::new()); [INFO] [stdout] 87 | | } [INFO] [stdout] | |_________________^ help: try: `bots.entry(bot_num).or_insert_with(|| Vec::new());` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> src/day10.rs:91:5 [INFO] [stdout] | [INFO] [stdout] 91 | / if !outputs.contains_key(&output_num) { [INFO] [stdout] 92 | | outputs.insert(output_num, Vec::new()); [INFO] [stdout] 93 | | } [INFO] [stdout] | |_________________^ help: try: `outputs.entry(output_num).or_insert_with(|| Vec::new());` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> src/day10.rs:125:5 [INFO] [stdout] | [INFO] [stdout] 125 | / if !bots.contains_key(&bot_num) { [INFO] [stdout] 126 | | bots.insert(bot_num, Vec::new()); [INFO] [stdout] 127 | | } [INFO] [stdout] | |_________________^ help: try: `bots.entry(bot_num).or_insert_with(|| Vec::new());` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> src/day10.rs:131:5 [INFO] [stdout] | [INFO] [stdout] 131 | / if !outputs.contains_key(&output_num) { [INFO] [stdout] 132 | | outputs.insert(output_num, Vec::new()); [INFO] [stdout] 133 | | } [INFO] [stdout] | |_________________^ help: try: `outputs.entry(output_num).or_insert_with(|| Vec::new());` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> src/day10.rs:140:5 [INFO] [stdout] | [INFO] [stdout] 140 | / if !bots.contains_key(&bot_num) { [INFO] [stdout] 141 | | bots.insert(bot_num, Vec::new()); [INFO] [stdout] 142 | | } [INFO] [stdout] | |_________________^ help: try: `bots.entry(bot_num).or_insert_with(|| Vec::new());` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> src/day10.rs:146:5 [INFO] [stdout] | [INFO] [stdout] 146 | / if !outputs.contains_key(&output_num) { [INFO] [stdout] 147 | | outputs.insert(output_num, Vec::new()); [INFO] [stdout] 148 | | } [INFO] [stdout] | |_________________^ help: try: `outputs.entry(output_num).or_insert_with(|| Vec::new());` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/day11.rs:113:3 [INFO] [stdout] | [INFO] [stdout] 113 | / match item { [INFO] [stdout] 114 | | Object::Generator(name) => { [INFO] [stdout] 115 | | gens.push(name); [INFO] [stdout] ... | [INFO] [stdout] 118 | | } [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] 113 ~ if let Object::Generator(name) = item { [INFO] [stdout] 114 ~ gens.push(name); [INFO] [stdout] 115 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/day11.rs:121:3 [INFO] [stdout] | [INFO] [stdout] 121 | / match item { [INFO] [stdout] 122 | | Object::Chip(name) => { [INFO] [stdout] 123 | | if floor.contains(&Object::Generator(*name)) { [INFO] [stdout] 124 | | continue; [INFO] [stdout] ... | [INFO] [stdout] 129 | | _ => {} [INFO] [stdout] 130 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 121 ~ if let Object::Chip(name) = item { [INFO] [stdout] 122 ~ if floor.contains(&Object::Generator(*name)) { [INFO] [stdout] 123 ~ continue; [INFO] [stdout] 124 ~ } else if gens.len() != 0 { [INFO] [stdout] 125 ~ return false; [INFO] [stdout] 126 ~ } [INFO] [stdout] 127 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/day11.rs:125:15 [INFO] [stdout] | [INFO] [stdout] 125 | } else if gens.len() != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!gens.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day11.rs:137:22 [INFO] [stdout] | [INFO] [stdout] 137 | if !floor_is_legal(&floor) { [INFO] [stdout] | ^^^^^^ help: change this to: `floor` [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: length comparison to zero [INFO] [stdout] --> src/day11.rs:147:8 [INFO] [stdout] | [INFO] [stdout] 147 | while stack.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!stack.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/day11.rs:153:6 [INFO] [stdout] | [INFO] [stdout] 153 | if state.floors[0].len() == 0 && state.floors[1].len() == 0 && state.floors[2].len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `state.floors[0].is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/day11.rs:153:36 [INFO] [stdout] | [INFO] [stdout] 153 | if state.floors[0].len() == 0 && state.floors[1].len() == 0 && state.floors[2].len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `state.floors[1].is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/day11.rs:153:66 [INFO] [stdout] | [INFO] [stdout] 153 | if state.floors[0].len() == 0 && state.floors[1].len() == 0 && state.floors[2].len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `state.floors[2].is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/day11.rs:172:6 [INFO] [stdout] | [INFO] [stdout] 172 | / if legal_state(&new_state) { [INFO] [stdout] 173 | | if !hs.contains(&new_state) { [INFO] [stdout] 174 | | stack.push_back((new_state.clone(), moves + 1)); [INFO] [stdout] 175 | | hs.insert(new_state); [INFO] [stdout] 176 | | } [INFO] [stdout] 177 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 172 ~ if legal_state(&new_state) [INFO] [stdout] 173 ~ && !hs.contains(&new_state) { [INFO] [stdout] 174 | stack.push_back((new_state.clone(), moves + 1)); [INFO] [stdout] 175 | hs.insert(new_state); [INFO] [stdout] 176 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/day11.rs:191:6 [INFO] [stdout] | [INFO] [stdout] 191 | / if legal_state(&new_state) { [INFO] [stdout] 192 | | if !hs.contains(&new_state) { [INFO] [stdout] 193 | | stack.push_back((new_state.clone(), moves + 1)); [INFO] [stdout] 194 | | hs.insert(new_state); [INFO] [stdout] 195 | | } [INFO] [stdout] 196 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 191 ~ if legal_state(&new_state) [INFO] [stdout] 192 ~ && !hs.contains(&new_state) { [INFO] [stdout] 193 | stack.push_back((new_state.clone(), moves + 1)); [INFO] [stdout] 194 | hs.insert(new_state); [INFO] [stdout] 195 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/day11.rs:210:5 [INFO] [stdout] | [INFO] [stdout] 210 | / if legal_state(&new_state) { [INFO] [stdout] 211 | | if !hs.contains(&new_state) { [INFO] [stdout] 212 | | stack.push_back((new_state.clone(), moves + 1)); [INFO] [stdout] 213 | | hs.insert(new_state); [INFO] [stdout] 214 | | } [INFO] [stdout] 215 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 210 ~ if legal_state(&new_state) [INFO] [stdout] 211 ~ && !hs.contains(&new_state) { [INFO] [stdout] 212 | stack.push_back((new_state.clone(), moves + 1)); [INFO] [stdout] 213 | hs.insert(new_state); [INFO] [stdout] 214 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/day11.rs:227:5 [INFO] [stdout] | [INFO] [stdout] 227 | / if legal_state(&new_state) { [INFO] [stdout] 228 | | if !hs.contains(&new_state) { [INFO] [stdout] 229 | | stack.push_back((new_state.clone(), moves + 1)); [INFO] [stdout] 230 | | hs.insert(new_state); [INFO] [stdout] 231 | | } [INFO] [stdout] 232 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 227 ~ if legal_state(&new_state) [INFO] [stdout] 228 ~ && !hs.contains(&new_state) { [INFO] [stdout] 229 | stack.push_back((new_state.clone(), moves + 1)); [INFO] [stdout] 230 | hs.insert(new_state); [INFO] [stdout] 231 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/day11.rs:243:2 [INFO] [stdout] | [INFO] [stdout] 242 | let moves = iter(&mut stack); [INFO] [stdout] | ----------------------------- unnecessary `let` binding [INFO] [stdout] 243 | moves [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 242 ~ [INFO] [stdout] 243 ~ iter(&mut stack) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `flatten()` will run forever if the iterator repeatedly produces an `Err` [INFO] [stdout] --> src/day12.rs:44:55 [INFO] [stdout] | [INFO] [stdout] 44 | BufReader::new(File::open(path).unwrap()).lines().flatten().map(|s| parse_line(&s)).collect() [INFO] [stdout] | ^^^^^^^^^ help: replace with: `map_while(Result::ok)` [INFO] [stdout] | [INFO] [stdout] note: this expression returning a `std::io::Lines` may produce an infinite number of `Err` in case of a read error [INFO] [stdout] --> src/day12.rs:44:5 [INFO] [stdout] | [INFO] [stdout] 44 | BufReader::new(File::open(path).unwrap()).lines().flatten().map(|s| parse_line(&s)).collect() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#lines_filter_map_ok [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/day13.rs:21:11 [INFO] [stdout] | [INFO] [stdout] 21 | while queue.len() != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!queue.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `flatten()` will run forever if the iterator repeatedly produces an `Err` [INFO] [stdout] --> src/day15.rs:14:55 [INFO] [stdout] | [INFO] [stdout] 14 | BufReader::new(File::open(path).unwrap()).lines().flatten().map(|s| parse_line(&s)).collect() [INFO] [stdout] | ^^^^^^^^^ help: replace with: `map_while(Result::ok)` [INFO] [stdout] | [INFO] [stdout] note: this expression returning a `std::io::Lines` may produce an infinite number of `Err` in case of a read error [INFO] [stdout] --> src/day15.rs:14:5 [INFO] [stdout] | [INFO] [stdout] 14 | BufReader::new(File::open(path).unwrap()).lines().flatten().map(|s| parse_line(&s)).collect() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#lines_filter_map_ok [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/day17.rs:16:11 [INFO] [stdout] | [INFO] [stdout] 16 | while queue.len() != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!queue.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/day17.rs:45:11 [INFO] [stdout] | [INFO] [stdout] 45 | while queue.len() != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!queue.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/day18.rs:18:6 [INFO] [stdout] | [INFO] [stdout] 18 | if (l && c && !r) || (!l && c && r) || (l && !c && !r) || (!l && !c && r) [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] 18 - if (l && c && !r) || (!l && c && r) || (l && !c && !r) || (!l && !c && r) [INFO] [stdout] 18 + if !(!c || l && r || !l && !r) || (l && !c && !r) || (!l && !c && r) [INFO] [stdout] | [INFO] [stdout] 18 - if (l && c && !r) || (!l && c && r) || (l && !c && !r) || (!l && !c && r) [INFO] [stdout] 18 + if (r || l) && (!r || !l) && c || (l && !c && !r) || (!l && !c && r) [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/day18.rs:12:23 [INFO] [stdout] | [INFO] [stdout] 12 | fn get_next(cur_line: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 12 - fn get_next(cur_line: &Vec) -> Vec { [INFO] [stdout] 12 + fn get_next(cur_line: &[char]) -> Vec { [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/day18.rs:29:22 [INFO] [stdout] | [INFO] [stdout] 29 | fn part1(first_line: &Vec) -> 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] 29 ~ fn part1(first_line: &[char]) -> usize { [INFO] [stdout] 30 ~ let mut line = first_line.to_owned(); [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/day18.rs:39:22 [INFO] [stdout] | [INFO] [stdout] 39 | fn part2(first_line: &Vec) -> 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] 39 ~ fn part2(first_line: &[char]) -> usize { [INFO] [stdout] 40 ~ let mut line = first_line.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `flatten()` will run forever if the iterator repeatedly produces an `Err` [INFO] [stdout] --> src/day20.rs:16:55 [INFO] [stdout] | [INFO] [stdout] 16 | BufReader::new(File::open(path).unwrap()).lines().flatten().map(|s| parse_line(&s)).collect() [INFO] [stdout] | ^^^^^^^^^ help: replace with: `map_while(Result::ok)` [INFO] [stdout] | [INFO] [stdout] note: this expression returning a `std::io::Lines` may produce an infinite number of `Err` in case of a read error [INFO] [stdout] --> src/day20.rs:16:5 [INFO] [stdout] | [INFO] [stdout] 16 | BufReader::new(File::open(path).unwrap()).lines().flatten().map(|s| parse_line(&s)).collect() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#lines_filter_map_ok [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `flatten()` will run forever if the iterator repeatedly produces an `Err` [INFO] [stdout] --> src/day21.rs:10:55 [INFO] [stdout] | [INFO] [stdout] 10 | BufReader::new(File::open(path).unwrap()).lines().flatten().collect() [INFO] [stdout] | ^^^^^^^^^ help: replace with: `map_while(Result::ok)` [INFO] [stdout] | [INFO] [stdout] note: this expression returning a `std::io::Lines` may produce an infinite number of `Err` in case of a read error [INFO] [stdout] --> src/day21.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | BufReader::new(File::open(path).unwrap()).lines().flatten().collect() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#lines_filter_map_ok [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this looks like you are swapping elements of `letters` manually [INFO] [stdout] --> src/day21.rs:23:21 [INFO] [stdout] | [INFO] [stdout] 23 | / let tmp = letters[a]; [INFO] [stdout] 24 | | letters[a] = letters[b]; [INFO] [stdout] 25 | | letters[b] = tmp; [INFO] [stdout] | |_____________________________________^ help: try: `letters.swap(a, b);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_swap [INFO] [stdout] = note: `#[warn(clippy::manual_swap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this looks like you are swapping elements of `letters` manually [INFO] [stdout] --> src/day21.rs:29:21 [INFO] [stdout] | [INFO] [stdout] 29 | / let tmp = letters[a]; [INFO] [stdout] 30 | | letters[a] = letters[b]; [INFO] [stdout] 31 | | letters[b] = tmp; [INFO] [stdout] | |_____________________________________^ help: try: `letters.swap(a, b);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_swap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day22.rs:93:21 [INFO] [stdout] | [INFO] [stdout] 93 | fn find_cost(nodes: &Vec>) -> 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] 93 - fn find_cost(nodes: &Vec>) -> usize { [INFO] [stdout] 93 + fn find_cost(nodes: &[Vec]) -> usize { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `x` is used to index `nodes` [INFO] [stdout] --> src/day22.rs:96:14 [INFO] [stdout] | [INFO] [stdout] 96 | for x in 0..32 { [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 and enumerate() [INFO] [stdout] | [INFO] [stdout] 96 - for x in 0..32 { [INFO] [stdout] 96 + for (x, ) in nodes.iter().enumerate().take(32) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `y` is used to index `nodes` [INFO] [stdout] --> src/day22.rs:97:18 [INFO] [stdout] | [INFO] [stdout] 97 | for y in 0..28 { [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 and enumerate() [INFO] [stdout] | [INFO] [stdout] 97 - for y in 0..28 { [INFO] [stdout] 97 + for (y, ) in nodes.iter().enumerate().take(28) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `i32::abs()` to usize [INFO] [stdout] --> src/day22.rs:106:31 [INFO] [stdout] | [INFO] [stdout] 106 | (goal.0 + goal.1) * 100 + (goal.0 as i32 - hole.0 as i32).abs() as usize + [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `(goal.0 as i32 - hole.0 as i32).unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] = note: `#[warn(clippy::cast_abs_to_unsigned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `i32::abs()` to usize [INFO] [stdout] --> src/day22.rs:107:9 [INFO] [stdout] | [INFO] [stdout] 107 | (goal.1 as i32 - hole.1 as i32).abs() as usize [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `(goal.1 as i32 - hole.1 as i32).unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `y` is only used to index `nodes` [INFO] [stdout] --> src/day22.rs:111:14 [INFO] [stdout] | [INFO] [stdout] 111 | for y in 0..28 { [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] 111 - for y in 0..28 { [INFO] [stdout] 111 + for in nodes.iter().take(28) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `x` is only used to index `nodes` [INFO] [stdout] --> src/day22.rs:112:18 [INFO] [stdout] | [INFO] [stdout] 112 | for x in 0..32 { [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] 112 - for x in 0..32 { [INFO] [stdout] 112 + for in nodes.iter().take(32) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/day22.rs:123:9 [INFO] [stdout] | [INFO] [stdout] 123 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `flatten()` will run forever if the iterator repeatedly produces an `Err` [INFO] [stdout] --> src/day23.rs:47:55 [INFO] [stdout] | [INFO] [stdout] 47 | BufReader::new(File::open(path).unwrap()).lines().flatten().map(|s| parse_line(&s)).collect() [INFO] [stdout] | ^^^^^^^^^ help: replace with: `map_while(Result::ok)` [INFO] [stdout] | [INFO] [stdout] note: this expression returning a `std::io::Lines` may produce an infinite number of `Err` in case of a read error [INFO] [stdout] --> src/day23.rs:47:5 [INFO] [stdout] | [INFO] [stdout] 47 | BufReader::new(File::open(path).unwrap()).lines().flatten().map(|s| parse_line(&s)).collect() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#lines_filter_map_ok [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `flatten()` will run forever if the iterator repeatedly produces an `Err` [INFO] [stdout] --> src/day24.rs:15:55 [INFO] [stdout] | [INFO] [stdout] 15 | BufReader::new(File::open(path).unwrap()).lines().flatten().map(|s| parse_line(&s)).collect() [INFO] [stdout] | ^^^^^^^^^ help: replace with: `map_while(Result::ok)` [INFO] [stdout] | [INFO] [stdout] note: this expression returning a `std::io::Lines` may produce an infinite number of `Err` in case of a read error [INFO] [stdout] --> src/day24.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 15 | BufReader::new(File::open(path).unwrap()).lines().flatten().map(|s| parse_line(&s)).collect() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#lines_filter_map_ok [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `y` is used to index `map` [INFO] [stdout] --> src/day24.rs:22:18 [INFO] [stdout] | [INFO] [stdout] 22 | for y in 0..map.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 and enumerate() [INFO] [stdout] | [INFO] [stdout] 22 - for y in 0..map.len() { [INFO] [stdout] 22 + for (y, ) in map.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `(usize, usize)` which implements the `Copy` trait [INFO] [stdout] --> src/day24.rs:34:17 [INFO] [stdout] | [INFO] [stdout] 34 | seen.insert(starting.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `starting` [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: length comparison to zero [INFO] [stdout] --> src/day24.rs:35:11 [INFO] [stdout] | [INFO] [stdout] 35 | while queue.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!queue.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> src/day24.rs:68:22 [INFO] [stdout] | [INFO] [stdout] 68 | let mut vd = order.iter().map(|v| *v).collect::>(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `order.iter().copied()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> src/day24.rs:88:22 [INFO] [stdout] | [INFO] [stdout] 88 | let mut vd = order.iter().map(|v| *v).collect::>(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `order.iter().copied()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `flatten()` will run forever if the iterator repeatedly produces an `Err` [INFO] [stdout] --> src/day25.rs:50:55 [INFO] [stdout] | [INFO] [stdout] 50 | BufReader::new(File::open(path).unwrap()).lines().flatten().map(|s| parse_line(&s)).collect() [INFO] [stdout] | ^^^^^^^^^ help: replace with: `map_while(Result::ok)` [INFO] [stdout] | [INFO] [stdout] note: this expression returning a `std::io::Lines` may produce an infinite number of `Err` in case of a read error [INFO] [stdout] --> src/day25.rs:50:5 [INFO] [stdout] | [INFO] [stdout] 50 | BufReader::new(File::open(path).unwrap()).lines().flatten().map(|s| parse_line(&s)).collect() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#lines_filter_map_ok [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Instruction` which implements the `Copy` trait [INFO] [stdout] --> src/day25.rs:109:32 [INFO] [stdout] | [INFO] [stdout] 109 | let inst = prog[to_toggle as usize].inst.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `prog[to_toggle as usize].inst` [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 loop variable `i` is used to index `ans` [INFO] [stdout] --> src/day25.rs:147:18 [INFO] [stdout] | [INFO] [stdout] 147 | for i in 0..ans.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 and enumerate() [INFO] [stdout] | [INFO] [stdout] 147 - for i in 0..ans.len() { [INFO] [stdout] 147 + for (i, ) in ans.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/day4.rs:33:14 [INFO] [stdout] | [INFO] [stdout] 33 | let mut v = vec![0;26]; [INFO] [stdout] | ^^^^^^^^^^ help: you can use an array directly: `[0; 26]` [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] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/day5.rs:29:14 [INFO] [stdout] | [INFO] [stdout] 29 | let mut v = vec!['-';8]; [INFO] [stdout] | ^^^^^^^^^^^ help: you can use an array directly: `['-'; 8]` [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/day6.rs:16:15 [INFO] [stdout] | [INFO] [stdout] 16 | let mut v = vec![0;26]; [INFO] [stdout] | ^^^^^^^^^^ help: you can use an array directly: `[0; 26]` [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/day6.rs:29:15 [INFO] [stdout] | [INFO] [stdout] 29 | let mut v = vec![0;26]; [INFO] [stdout] | ^^^^^^^^^^ help: you can use an array directly: `[0; 26]` [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/day7.rs:70:15 [INFO] [stdout] | [INFO] [stdout] 70 | let bab = vec![v[i+1], v[i], v[i+1]].iter().collect::(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[v[i+1], v[i], v[i+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: unused variable: `i` [INFO] [stdout] --> src/day9.rs:41:7 [INFO] [stdout] | [INFO] [stdout] 41 | for i in 0..num_chars { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/day9.rs:45:7 [INFO] [stdout] | [INFO] [stdout] 45 | for i in 0..num_times { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/day9.rs:83:7 [INFO] [stdout] | [INFO] [stdout] 83 | for i in 0..num_chars { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/day19.rs:35:7 [INFO] [stdout] | [INFO] [stdout] 35 | for i in 0..to_iter { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/day22.rs:52:9 [INFO] [stdout] | [INFO] [stdout] 52 | let mut empty = Node { [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `initial_state_test` is never used [INFO] [stdout] --> src/day11.rs:88:4 [INFO] [stdout] | [INFO] [stdout] 88 | fn initial_state_test() -> State { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `State` is never constructed [INFO] [stdout] --> src/day22.rs:23:8 [INFO] [stdout] | [INFO] [stdout] 23 | struct State { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `find_cost` is never used [INFO] [stdout] --> src/day22.rs:93:4 [INFO] [stdout] | [INFO] [stdout] 93 | fn find_cost(nodes: &Vec>) -> usize { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/day1.rs:17:26 [INFO] [stdout] | [INFO] [stdout] 17 | fstr.split(", ").map(|s| parse_ins(s)).collect() [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `parse_ins` [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: redundant closure [INFO] [stdout] --> src/day1.rs:84:40 [INFO] [stdout] | [INFO] [stdout] 84 | let input = "R2, L3".split(", ").map(|s| parse_ins(s)).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `parse_ins` [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: redundant closure [INFO] [stdout] --> src/day1.rs:90:44 [INFO] [stdout] | [INFO] [stdout] 90 | let input = "R2, R2, R2".split(", ").map(|s| parse_ins(s)).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `parse_ins` [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: redundant closure [INFO] [stdout] --> src/day1.rs:96:48 [INFO] [stdout] | [INFO] [stdout] 96 | let input = "R5, L5, R5, R3".split(", ").map(|s| parse_ins(s)).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `parse_ins` [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: redundant closure [INFO] [stdout] --> src/day1.rs:102:48 [INFO] [stdout] | [INFO] [stdout] 102 | let input = "R8, R4, R4, R8".split(", ").map(|s| parse_ins(s)).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `parse_ins` [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: `flatten()` will run forever if the iterator repeatedly produces an `Err` [INFO] [stdout] --> src/day2.rs:10:31 [INFO] [stdout] | [INFO] [stdout] 10 | BufReader::new(f).lines().flatten().collect() [INFO] [stdout] | ^^^^^^^^^ help: replace with: `map_while(Result::ok)` [INFO] [stdout] | [INFO] [stdout] note: this expression returning a `std::io::Lines` may produce an infinite number of `Err` in case of a read error [INFO] [stdout] --> src/day2.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | BufReader::new(f).lines().flatten().collect() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#lines_filter_map_ok [INFO] [stdout] = note: `#[warn(clippy::lines_filter_map_ok)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/day3.rs:9:23 [INFO] [stdout] | [INFO] [stdout] 9 | s.split_whitespace().map(|v| v.parse()).flatten().collect() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(|v| v.parse())` [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: `flatten()` will run forever if the iterator repeatedly produces an `Err` [INFO] [stdout] --> src/day3.rs:14:31 [INFO] [stdout] | [INFO] [stdout] 14 | BufReader::new(f).lines().flatten().map(|s| parse_line(&s)).collect() [INFO] [stdout] | ^^^^^^^^^ help: replace with: `map_while(Result::ok)` [INFO] [stdout] | [INFO] [stdout] note: this expression returning a `std::io::Lines` may produce an infinite number of `Err` in case of a read error [INFO] [stdout] --> src/day3.rs:14:5 [INFO] [stdout] | [INFO] [stdout] 14 | BufReader::new(f).lines().flatten().map(|s| parse_line(&s)).collect() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#lines_filter_map_ok [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day3.rs:17:17 [INFO] [stdout] | [INFO] [stdout] 17 | fn valid(sides: &Vec) -> bool { [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] 17 ~ fn valid(sides: &[u32]) -> bool { [INFO] [stdout] 18 ~ let mut s = sides.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/day3.rs:68:3 [INFO] [stdout] | [INFO] [stdout] 68 | assert_eq!(valid(&vec![5, 10, 25]), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_assert_comparison)]` on by default [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 68 - assert_eq!(valid(&vec![5, 10, 25]), false); [INFO] [stdout] 68 + assert!(!valid(&vec![5, 10, 25])); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `flatten()` will run forever if the iterator repeatedly produces an `Err` [INFO] [stdout] --> src/day4.rs:29:31 [INFO] [stdout] | [INFO] [stdout] 29 | BufReader::new(f).lines().flatten().map(|s| parse_line(&s)).collect() [INFO] [stdout] | ^^^^^^^^^ help: replace with: `map_while(Result::ok)` [INFO] [stdout] | [INFO] [stdout] note: this expression returning a `std::io::Lines` may produce an infinite number of `Err` in case of a read error [INFO] [stdout] --> src/day4.rs:29:5 [INFO] [stdout] | [INFO] [stdout] 29 | BufReader::new(f).lines().flatten().map(|s| parse_line(&s)).collect() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#lines_filter_map_ok [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is used to index `v` [INFO] [stdout] --> src/day4.rs:40:12 [INFO] [stdout] | [INFO] [stdout] 40 | for j in 0..26 { [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] 40 - for j in 0..26 { [INFO] [stdout] 40 + for (j, ) in v.iter().enumerate().take(26) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `flatten()` will run forever if the iterator repeatedly produces an `Err` [INFO] [stdout] --> src/day6.rs:10:31 [INFO] [stdout] | [INFO] [stdout] 10 | BufReader::new(f).lines().flatten().collect() [INFO] [stdout] | ^^^^^^^^^ help: replace with: `map_while(Result::ok)` [INFO] [stdout] | [INFO] [stdout] note: this expression returning a `std::io::Lines` may produce an infinite number of `Err` in case of a read error [INFO] [stdout] --> src/day6.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | BufReader::new(f).lines().flatten().collect() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#lines_filter_map_ok [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `flatten()` will run forever if the iterator repeatedly produces an `Err` [INFO] [stdout] --> src/day7.rs:24:31 [INFO] [stdout] | [INFO] [stdout] 24 | BufReader::new(f).lines().flatten().map(|s| parse_line(&s)).collect() [INFO] [stdout] | ^^^^^^^^^ help: replace with: `map_while(Result::ok)` [INFO] [stdout] | [INFO] [stdout] note: this expression returning a `std::io::Lines` may produce an infinite number of `Err` in case of a read error [INFO] [stdout] --> src/day7.rs:24:5 [INFO] [stdout] | [INFO] [stdout] 24 | BufReader::new(f).lines().flatten().map(|s| parse_line(&s)).collect() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#lines_filter_map_ok [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for cloning elements [INFO] [stdout] --> src/day7.rs:76:2 [INFO] [stdout] | [INFO] [stdout] 76 | hs.iter().map(|s| s.clone()).collect() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `cloned` method: `hs.iter().cloned()` [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] [INFO] [stdout] [INFO] [stdout] warning: name `RECT` contains a capitalized acronym [INFO] [stdout] --> src/day8.rs:9:2 [INFO] [stdout] | [INFO] [stdout] 9 | RECT, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Rect` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `flatten()` will run forever if the iterator repeatedly produces an `Err` [INFO] [stdout] --> src/day8.rs:42:31 [INFO] [stdout] | [INFO] [stdout] 42 | BufReader::new(f).lines().flatten().map(|s| parse_line(&s)).collect() [INFO] [stdout] | ^^^^^^^^^ help: replace with: `map_while(Result::ok)` [INFO] [stdout] | [INFO] [stdout] note: this expression returning a `std::io::Lines` may produce an infinite number of `Err` in case of a read error [INFO] [stdout] --> src/day8.rs:42:5 [INFO] [stdout] | [INFO] [stdout] 42 | BufReader::new(f).lines().flatten().map(|s| parse_line(&s)).collect() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#lines_filter_map_ok [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `grid` [INFO] [stdout] --> src/day8.rs:49:13 [INFO] [stdout] | [INFO] [stdout] 49 | for i in 0..cmd.val1 { [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] 49 - for i in 0..cmd.val1 { [INFO] [stdout] 49 + for in grid.iter_mut().take(cmd.val1) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is only used to index `grid` [INFO] [stdout] --> src/day8.rs:50:14 [INFO] [stdout] | [INFO] [stdout] 50 | for j in 0..cmd.val2 { [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] 50 - for j in 0..cmd.val2 { [INFO] [stdout] 50 + for in grid.iter_mut().take(cmd.val2) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `grid` [INFO] [stdout] --> src/day8.rs:56:13 [INFO] [stdout] | [INFO] [stdout] 56 | for i in 0..50 { [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] 56 - for i in 0..50 { [INFO] [stdout] 56 + for in grid.iter().take(50) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `grid` [INFO] [stdout] --> src/day8.rs:68:13 [INFO] [stdout] | [INFO] [stdout] 68 | for i in 0..6 { [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] 68 - for i in 0..6 { [INFO] [stdout] 68 + for in grid.iter().take(6) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is only used to index `grid` [INFO] [stdout] --> src/day8.rs:82:11 [INFO] [stdout] | [INFO] [stdout] 82 | for j in 0..6 { [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] 82 - for j in 0..6 { [INFO] [stdout] 82 + for in grid.iter().take(6) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `grid` [INFO] [stdout] --> src/day8.rs:83:12 [INFO] [stdout] | [INFO] [stdout] 83 | for i in 0..50 { [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] 83 - for i in 0..50 { [INFO] [stdout] 83 + for in grid.iter().take(50) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/day8.rs:91:3 [INFO] [stdout] | [INFO] [stdout] 91 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] = note: `#[warn(clippy::println_empty_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> src/day10.rs:18:3 [INFO] [stdout] | [INFO] [stdout] 18 | / if !bots.contains_key(&bot_num) { [INFO] [stdout] 19 | | bots.insert(bot_num, Vec::new()); [INFO] [stdout] 20 | | } [INFO] [stdout] | |_________^ help: try: `bots.entry(bot_num).or_insert_with(|| Vec::new());` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry [INFO] [stdout] = note: `#[warn(clippy::map_entry)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `flatten()` will run forever if the iterator repeatedly produces an `Err` [INFO] [stdout] --> src/day10.rs:41:53 [INFO] [stdout] | [INFO] [stdout] 41 | let lines: Vec = BufReader::new(f).lines().flatten().collect(); [INFO] [stdout] | ^^^^^^^^^ help: replace with: `map_while(Result::ok)` [INFO] [stdout] | [INFO] [stdout] note: this expression returning a `std::io::Lines` may produce an infinite number of `Err` in case of a read error [INFO] [stdout] --> src/day10.rs:41:27 [INFO] [stdout] | [INFO] [stdout] 41 | let lines: Vec = BufReader::new(f).lines().flatten().collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#lines_filter_map_ok [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> src/day10.rs:70:5 [INFO] [stdout] | [INFO] [stdout] 70 | / if !bots.contains_key(&bot_num) { [INFO] [stdout] 71 | | bots.insert(bot_num, Vec::new()); [INFO] [stdout] 72 | | } [INFO] [stdout] | |_________________^ help: try: `bots.entry(bot_num).or_insert_with(|| Vec::new());` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> src/day10.rs:76:5 [INFO] [stdout] | [INFO] [stdout] 76 | / if !outputs.contains_key(&output_num) { [INFO] [stdout] 77 | | outputs.insert(output_num, Vec::new()); [INFO] [stdout] 78 | | } [INFO] [stdout] | |_________________^ help: try: `outputs.entry(output_num).or_insert_with(|| Vec::new());` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> src/day10.rs:85:5 [INFO] [stdout] | [INFO] [stdout] 85 | / if !bots.contains_key(&bot_num) { [INFO] [stdout] 86 | | bots.insert(bot_num, Vec::new()); [INFO] [stdout] 87 | | } [INFO] [stdout] | |_________________^ help: try: `bots.entry(bot_num).or_insert_with(|| Vec::new());` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> src/day10.rs:91:5 [INFO] [stdout] | [INFO] [stdout] 91 | / if !outputs.contains_key(&output_num) { [INFO] [stdout] 92 | | outputs.insert(output_num, Vec::new()); [INFO] [stdout] 93 | | } [INFO] [stdout] | |_________________^ help: try: `outputs.entry(output_num).or_insert_with(|| Vec::new());` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> src/day10.rs:125:5 [INFO] [stdout] | [INFO] [stdout] 125 | / if !bots.contains_key(&bot_num) { [INFO] [stdout] 126 | | bots.insert(bot_num, Vec::new()); [INFO] [stdout] 127 | | } [INFO] [stdout] | |_________________^ help: try: `bots.entry(bot_num).or_insert_with(|| Vec::new());` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> src/day10.rs:131:5 [INFO] [stdout] | [INFO] [stdout] 131 | / if !outputs.contains_key(&output_num) { [INFO] [stdout] 132 | | outputs.insert(output_num, Vec::new()); [INFO] [stdout] 133 | | } [INFO] [stdout] | |_________________^ help: try: `outputs.entry(output_num).or_insert_with(|| Vec::new());` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> src/day10.rs:140:5 [INFO] [stdout] | [INFO] [stdout] 140 | / if !bots.contains_key(&bot_num) { [INFO] [stdout] 141 | | bots.insert(bot_num, Vec::new()); [INFO] [stdout] 142 | | } [INFO] [stdout] | |_________________^ help: try: `bots.entry(bot_num).or_insert_with(|| Vec::new());` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> src/day10.rs:146:5 [INFO] [stdout] | [INFO] [stdout] 146 | / if !outputs.contains_key(&output_num) { [INFO] [stdout] 147 | | outputs.insert(output_num, Vec::new()); [INFO] [stdout] 148 | | } [INFO] [stdout] | |_________________^ help: try: `outputs.entry(output_num).or_insert_with(|| Vec::new());` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/day11.rs:113:3 [INFO] [stdout] | [INFO] [stdout] 113 | / match item { [INFO] [stdout] 114 | | Object::Generator(name) => { [INFO] [stdout] 115 | | gens.push(name); [INFO] [stdout] ... | [INFO] [stdout] 118 | | } [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] 113 ~ if let Object::Generator(name) = item { [INFO] [stdout] 114 ~ gens.push(name); [INFO] [stdout] 115 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/day11.rs:121:3 [INFO] [stdout] | [INFO] [stdout] 121 | / match item { [INFO] [stdout] 122 | | Object::Chip(name) => { [INFO] [stdout] 123 | | if floor.contains(&Object::Generator(*name)) { [INFO] [stdout] 124 | | continue; [INFO] [stdout] ... | [INFO] [stdout] 129 | | _ => {} [INFO] [stdout] 130 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 121 ~ if let Object::Chip(name) = item { [INFO] [stdout] 122 ~ if floor.contains(&Object::Generator(*name)) { [INFO] [stdout] 123 ~ continue; [INFO] [stdout] 124 ~ } else if gens.len() != 0 { [INFO] [stdout] 125 ~ return false; [INFO] [stdout] 126 ~ } [INFO] [stdout] 127 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/day11.rs:125:15 [INFO] [stdout] | [INFO] [stdout] 125 | } else if gens.len() != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!gens.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day11.rs:137:22 [INFO] [stdout] | [INFO] [stdout] 137 | if !floor_is_legal(&floor) { [INFO] [stdout] | ^^^^^^ help: change this to: `floor` [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: length comparison to zero [INFO] [stdout] --> src/day11.rs:147:8 [INFO] [stdout] | [INFO] [stdout] 147 | while stack.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!stack.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/day11.rs:153:6 [INFO] [stdout] | [INFO] [stdout] 153 | if state.floors[0].len() == 0 && state.floors[1].len() == 0 && state.floors[2].len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `state.floors[0].is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/day11.rs:153:36 [INFO] [stdout] | [INFO] [stdout] 153 | if state.floors[0].len() == 0 && state.floors[1].len() == 0 && state.floors[2].len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `state.floors[1].is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/day11.rs:153:66 [INFO] [stdout] | [INFO] [stdout] 153 | if state.floors[0].len() == 0 && state.floors[1].len() == 0 && state.floors[2].len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `state.floors[2].is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/day11.rs:172:6 [INFO] [stdout] | [INFO] [stdout] 172 | / if legal_state(&new_state) { [INFO] [stdout] 173 | | if !hs.contains(&new_state) { [INFO] [stdout] 174 | | stack.push_back((new_state.clone(), moves + 1)); [INFO] [stdout] 175 | | hs.insert(new_state); [INFO] [stdout] 176 | | } [INFO] [stdout] 177 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 172 ~ if legal_state(&new_state) [INFO] [stdout] 173 ~ && !hs.contains(&new_state) { [INFO] [stdout] 174 | stack.push_back((new_state.clone(), moves + 1)); [INFO] [stdout] 175 | hs.insert(new_state); [INFO] [stdout] 176 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/day11.rs:191:6 [INFO] [stdout] | [INFO] [stdout] 191 | / if legal_state(&new_state) { [INFO] [stdout] 192 | | if !hs.contains(&new_state) { [INFO] [stdout] 193 | | stack.push_back((new_state.clone(), moves + 1)); [INFO] [stdout] 194 | | hs.insert(new_state); [INFO] [stdout] 195 | | } [INFO] [stdout] 196 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 191 ~ if legal_state(&new_state) [INFO] [stdout] 192 ~ && !hs.contains(&new_state) { [INFO] [stdout] 193 | stack.push_back((new_state.clone(), moves + 1)); [INFO] [stdout] 194 | hs.insert(new_state); [INFO] [stdout] 195 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/day11.rs:210:5 [INFO] [stdout] | [INFO] [stdout] 210 | / if legal_state(&new_state) { [INFO] [stdout] 211 | | if !hs.contains(&new_state) { [INFO] [stdout] 212 | | stack.push_back((new_state.clone(), moves + 1)); [INFO] [stdout] 213 | | hs.insert(new_state); [INFO] [stdout] 214 | | } [INFO] [stdout] 215 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 210 ~ if legal_state(&new_state) [INFO] [stdout] 211 ~ && !hs.contains(&new_state) { [INFO] [stdout] 212 | stack.push_back((new_state.clone(), moves + 1)); [INFO] [stdout] 213 | hs.insert(new_state); [INFO] [stdout] 214 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/day11.rs:227:5 [INFO] [stdout] | [INFO] [stdout] 227 | / if legal_state(&new_state) { [INFO] [stdout] 228 | | if !hs.contains(&new_state) { [INFO] [stdout] 229 | | stack.push_back((new_state.clone(), moves + 1)); [INFO] [stdout] 230 | | hs.insert(new_state); [INFO] [stdout] 231 | | } [INFO] [stdout] 232 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 227 ~ if legal_state(&new_state) [INFO] [stdout] 228 ~ && !hs.contains(&new_state) { [INFO] [stdout] 229 | stack.push_back((new_state.clone(), moves + 1)); [INFO] [stdout] 230 | hs.insert(new_state); [INFO] [stdout] 231 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/day11.rs:243:2 [INFO] [stdout] | [INFO] [stdout] 242 | let moves = iter(&mut stack); [INFO] [stdout] | ----------------------------- unnecessary `let` binding [INFO] [stdout] 243 | moves [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 242 ~ [INFO] [stdout] 243 ~ iter(&mut stack) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `flatten()` will run forever if the iterator repeatedly produces an `Err` [INFO] [stdout] --> src/day12.rs:44:55 [INFO] [stdout] | [INFO] [stdout] 44 | BufReader::new(File::open(path).unwrap()).lines().flatten().map(|s| parse_line(&s)).collect() [INFO] [stdout] | ^^^^^^^^^ help: replace with: `map_while(Result::ok)` [INFO] [stdout] | [INFO] [stdout] note: this expression returning a `std::io::Lines` may produce an infinite number of `Err` in case of a read error [INFO] [stdout] --> src/day12.rs:44:5 [INFO] [stdout] | [INFO] [stdout] 44 | BufReader::new(File::open(path).unwrap()).lines().flatten().map(|s| parse_line(&s)).collect() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#lines_filter_map_ok [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/day13.rs:21:11 [INFO] [stdout] | [INFO] [stdout] 21 | while queue.len() != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!queue.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `flatten()` will run forever if the iterator repeatedly produces an `Err` [INFO] [stdout] --> src/day15.rs:14:55 [INFO] [stdout] | [INFO] [stdout] 14 | BufReader::new(File::open(path).unwrap()).lines().flatten().map(|s| parse_line(&s)).collect() [INFO] [stdout] | ^^^^^^^^^ help: replace with: `map_while(Result::ok)` [INFO] [stdout] | [INFO] [stdout] note: this expression returning a `std::io::Lines` may produce an infinite number of `Err` in case of a read error [INFO] [stdout] --> src/day15.rs:14:5 [INFO] [stdout] | [INFO] [stdout] 14 | BufReader::new(File::open(path).unwrap()).lines().flatten().map(|s| parse_line(&s)).collect() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#lines_filter_map_ok [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/day17.rs:16:11 [INFO] [stdout] | [INFO] [stdout] 16 | while queue.len() != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!queue.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/day17.rs:45:11 [INFO] [stdout] | [INFO] [stdout] 45 | while queue.len() != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!queue.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/day18.rs:18:6 [INFO] [stdout] | [INFO] [stdout] 18 | if (l && c && !r) || (!l && c && r) || (l && !c && !r) || (!l && !c && r) [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] 18 - if (l && c && !r) || (!l && c && r) || (l && !c && !r) || (!l && !c && r) [INFO] [stdout] 18 + if !(!c || l && r || !l && !r) || (l && !c && !r) || (!l && !c && r) [INFO] [stdout] | [INFO] [stdout] 18 - if (l && c && !r) || (!l && c && r) || (l && !c && !r) || (!l && !c && r) [INFO] [stdout] 18 + if (r || l) && (!r || !l) && c || (l && !c && !r) || (!l && !c && r) [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/day18.rs:12:23 [INFO] [stdout] | [INFO] [stdout] 12 | fn get_next(cur_line: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 12 - fn get_next(cur_line: &Vec) -> Vec { [INFO] [stdout] 12 + fn get_next(cur_line: &[char]) -> Vec { [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/day18.rs:29:22 [INFO] [stdout] | [INFO] [stdout] 29 | fn part1(first_line: &Vec) -> 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] 29 ~ fn part1(first_line: &[char]) -> usize { [INFO] [stdout] 30 ~ let mut line = first_line.to_owned(); [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/day18.rs:39:22 [INFO] [stdout] | [INFO] [stdout] 39 | fn part2(first_line: &Vec) -> 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] 39 ~ fn part2(first_line: &[char]) -> usize { [INFO] [stdout] 40 ~ let mut line = first_line.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `flatten()` will run forever if the iterator repeatedly produces an `Err` [INFO] [stdout] --> src/day20.rs:16:55 [INFO] [stdout] | [INFO] [stdout] 16 | BufReader::new(File::open(path).unwrap()).lines().flatten().map(|s| parse_line(&s)).collect() [INFO] [stdout] | ^^^^^^^^^ help: replace with: `map_while(Result::ok)` [INFO] [stdout] | [INFO] [stdout] note: this expression returning a `std::io::Lines` may produce an infinite number of `Err` in case of a read error [INFO] [stdout] --> src/day20.rs:16:5 [INFO] [stdout] | [INFO] [stdout] 16 | BufReader::new(File::open(path).unwrap()).lines().flatten().map(|s| parse_line(&s)).collect() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#lines_filter_map_ok [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `flatten()` will run forever if the iterator repeatedly produces an `Err` [INFO] [stdout] --> src/day21.rs:10:55 [INFO] [stdout] | [INFO] [stdout] 10 | BufReader::new(File::open(path).unwrap()).lines().flatten().collect() [INFO] [stdout] | ^^^^^^^^^ help: replace with: `map_while(Result::ok)` [INFO] [stdout] | [INFO] [stdout] note: this expression returning a `std::io::Lines` may produce an infinite number of `Err` in case of a read error [INFO] [stdout] --> src/day21.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | BufReader::new(File::open(path).unwrap()).lines().flatten().collect() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#lines_filter_map_ok [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this looks like you are swapping elements of `letters` manually [INFO] [stdout] --> src/day21.rs:23:21 [INFO] [stdout] | [INFO] [stdout] 23 | / let tmp = letters[a]; [INFO] [stdout] 24 | | letters[a] = letters[b]; [INFO] [stdout] 25 | | letters[b] = tmp; [INFO] [stdout] | |_____________________________________^ help: try: `letters.swap(a, b);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_swap [INFO] [stdout] = note: `#[warn(clippy::manual_swap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this looks like you are swapping elements of `letters` manually [INFO] [stdout] --> src/day21.rs:29:21 [INFO] [stdout] | [INFO] [stdout] 29 | / let tmp = letters[a]; [INFO] [stdout] 30 | | letters[a] = letters[b]; [INFO] [stdout] 31 | | letters[b] = tmp; [INFO] [stdout] | |_____________________________________^ help: try: `letters.swap(a, b);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_swap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day22.rs:93:21 [INFO] [stdout] | [INFO] [stdout] 93 | fn find_cost(nodes: &Vec>) -> 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] 93 - fn find_cost(nodes: &Vec>) -> usize { [INFO] [stdout] 93 + fn find_cost(nodes: &[Vec]) -> usize { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `x` is used to index `nodes` [INFO] [stdout] --> src/day22.rs:96:14 [INFO] [stdout] | [INFO] [stdout] 96 | for x in 0..32 { [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 and enumerate() [INFO] [stdout] | [INFO] [stdout] 96 - for x in 0..32 { [INFO] [stdout] 96 + for (x, ) in nodes.iter().enumerate().take(32) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `y` is used to index `nodes` [INFO] [stdout] --> src/day22.rs:97:18 [INFO] [stdout] | [INFO] [stdout] 97 | for y in 0..28 { [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 and enumerate() [INFO] [stdout] | [INFO] [stdout] 97 - for y in 0..28 { [INFO] [stdout] 97 + for (y, ) in nodes.iter().enumerate().take(28) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `i32::abs()` to usize [INFO] [stdout] --> src/day22.rs:106:31 [INFO] [stdout] | [INFO] [stdout] 106 | (goal.0 + goal.1) * 100 + (goal.0 as i32 - hole.0 as i32).abs() as usize + [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `(goal.0 as i32 - hole.0 as i32).unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] = note: `#[warn(clippy::cast_abs_to_unsigned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `i32::abs()` to usize [INFO] [stdout] --> src/day22.rs:107:9 [INFO] [stdout] | [INFO] [stdout] 107 | (goal.1 as i32 - hole.1 as i32).abs() as usize [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `(goal.1 as i32 - hole.1 as i32).unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `y` is only used to index `nodes` [INFO] [stdout] --> src/day22.rs:111:14 [INFO] [stdout] | [INFO] [stdout] 111 | for y in 0..28 { [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] 111 - for y in 0..28 { [INFO] [stdout] 111 + for in nodes.iter().take(28) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `x` is only used to index `nodes` [INFO] [stdout] --> src/day22.rs:112:18 [INFO] [stdout] | [INFO] [stdout] 112 | for x in 0..32 { [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] 112 - for x in 0..32 { [INFO] [stdout] 112 + for in nodes.iter().take(32) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/day22.rs:123:9 [INFO] [stdout] | [INFO] [stdout] 123 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `flatten()` will run forever if the iterator repeatedly produces an `Err` [INFO] [stdout] --> src/day23.rs:47:55 [INFO] [stdout] | [INFO] [stdout] 47 | BufReader::new(File::open(path).unwrap()).lines().flatten().map(|s| parse_line(&s)).collect() [INFO] [stdout] | ^^^^^^^^^ help: replace with: `map_while(Result::ok)` [INFO] [stdout] | [INFO] [stdout] note: this expression returning a `std::io::Lines` may produce an infinite number of `Err` in case of a read error [INFO] [stdout] --> src/day23.rs:47:5 [INFO] [stdout] | [INFO] [stdout] 47 | BufReader::new(File::open(path).unwrap()).lines().flatten().map(|s| parse_line(&s)).collect() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#lines_filter_map_ok [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `flatten()` will run forever if the iterator repeatedly produces an `Err` [INFO] [stdout] --> src/day24.rs:15:55 [INFO] [stdout] | [INFO] [stdout] 15 | BufReader::new(File::open(path).unwrap()).lines().flatten().map(|s| parse_line(&s)).collect() [INFO] [stdout] | ^^^^^^^^^ help: replace with: `map_while(Result::ok)` [INFO] [stdout] | [INFO] [stdout] note: this expression returning a `std::io::Lines` may produce an infinite number of `Err` in case of a read error [INFO] [stdout] --> src/day24.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 15 | BufReader::new(File::open(path).unwrap()).lines().flatten().map(|s| parse_line(&s)).collect() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#lines_filter_map_ok [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `y` is used to index `map` [INFO] [stdout] --> src/day24.rs:22:18 [INFO] [stdout] | [INFO] [stdout] 22 | for y in 0..map.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 and enumerate() [INFO] [stdout] | [INFO] [stdout] 22 - for y in 0..map.len() { [INFO] [stdout] 22 + for (y, ) in map.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `(usize, usize)` which implements the `Copy` trait [INFO] [stdout] --> src/day24.rs:34:17 [INFO] [stdout] | [INFO] [stdout] 34 | seen.insert(starting.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `starting` [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: length comparison to zero [INFO] [stdout] --> src/day24.rs:35:11 [INFO] [stdout] | [INFO] [stdout] 35 | while queue.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!queue.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> src/day24.rs:68:22 [INFO] [stdout] | [INFO] [stdout] 68 | let mut vd = order.iter().map(|v| *v).collect::>(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `order.iter().copied()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> src/day24.rs:88:22 [INFO] [stdout] | [INFO] [stdout] 88 | let mut vd = order.iter().map(|v| *v).collect::>(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `order.iter().copied()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `flatten()` will run forever if the iterator repeatedly produces an `Err` [INFO] [stdout] --> src/day25.rs:50:55 [INFO] [stdout] | [INFO] [stdout] 50 | BufReader::new(File::open(path).unwrap()).lines().flatten().map(|s| parse_line(&s)).collect() [INFO] [stdout] | ^^^^^^^^^ help: replace with: `map_while(Result::ok)` [INFO] [stdout] | [INFO] [stdout] note: this expression returning a `std::io::Lines` may produce an infinite number of `Err` in case of a read error [INFO] [stdout] --> src/day25.rs:50:5 [INFO] [stdout] | [INFO] [stdout] 50 | BufReader::new(File::open(path).unwrap()).lines().flatten().map(|s| parse_line(&s)).collect() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#lines_filter_map_ok [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Instruction` which implements the `Copy` trait [INFO] [stdout] --> src/day25.rs:109:32 [INFO] [stdout] | [INFO] [stdout] 109 | let inst = prog[to_toggle as usize].inst.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `prog[to_toggle as usize].inst` [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 loop variable `i` is used to index `ans` [INFO] [stdout] --> src/day25.rs:147:18 [INFO] [stdout] | [INFO] [stdout] 147 | for i in 0..ans.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 and enumerate() [INFO] [stdout] | [INFO] [stdout] 147 - for i in 0..ans.len() { [INFO] [stdout] 147 + for (i, ) in ans.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/day4.rs:33:14 [INFO] [stdout] | [INFO] [stdout] 33 | let mut v = vec![0;26]; [INFO] [stdout] | ^^^^^^^^^^ help: you can use an array directly: `[0; 26]` [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] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/day5.rs:29:14 [INFO] [stdout] | [INFO] [stdout] 29 | let mut v = vec!['-';8]; [INFO] [stdout] | ^^^^^^^^^^^ help: you can use an array directly: `['-'; 8]` [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/day6.rs:16:15 [INFO] [stdout] | [INFO] [stdout] 16 | let mut v = vec![0;26]; [INFO] [stdout] | ^^^^^^^^^^ help: you can use an array directly: `[0; 26]` [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/day6.rs:29:15 [INFO] [stdout] | [INFO] [stdout] 29 | let mut v = vec![0;26]; [INFO] [stdout] | ^^^^^^^^^^ help: you can use an array directly: `[0; 26]` [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/day7.rs:70:15 [INFO] [stdout] | [INFO] [stdout] 70 | let bab = vec![v[i+1], v[i], v[i+1]].iter().collect::(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[v[i+1], v[i], v[i+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] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 2.65s [INFO] running `Command { std: "docker" "inspect" "e92015e87736ff740d6a4d4908dcccdecefe8121a7438178005bfe65feb122d3", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "e92015e87736ff740d6a4d4908dcccdecefe8121a7438178005bfe65feb122d3", kill_on_drop: false }` [INFO] [stdout] e92015e87736ff740d6a4d4908dcccdecefe8121a7438178005bfe65feb122d3