[INFO] cloning repository https://github.com/chops76/AoC2017 [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/chops76/AoC2017" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fchops76%2FAoC2017", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fchops76%2FAoC2017'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] d11abbd6c95199f44df6e7fc1075e7217eb09f89 [INFO] linting chops76/AoC2017 against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fchops76%2FAoC2017" "/workspace/builds/worker-2-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-2-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/chops76/AoC2017 [INFO] finished tweaking git repo https://github.com/chops76/AoC2017 [INFO] tweaked toml for git repo https://github.com/chops76/AoC2017 written to /workspace/builds/worker-2-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/chops76/AoC2017 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/AoC2017 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] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded primes v0.3.0 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-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] a364698fe4a9e6a5d1eb5a1bcceb5fe42b07f5a30338bc6619d2050c13b0ff37 [INFO] running `Command { std: "docker" "start" "-a" "a364698fe4a9e6a5d1eb5a1bcceb5fe42b07f5a30338bc6619d2050c13b0ff37", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "a364698fe4a9e6a5d1eb5a1bcceb5fe42b07f5a30338bc6619d2050c13b0ff37", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "a364698fe4a9e6a5d1eb5a1bcceb5fe42b07f5a30338bc6619d2050c13b0ff37", kill_on_drop: false }` [INFO] [stdout] a364698fe4a9e6a5d1eb5a1bcceb5fe42b07f5a30338bc6619d2050c13b0ff37 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-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] 8db6db01e052921fcab574f6921066f913f29be2c324fc688be4cb3463e271d8 [INFO] running `Command { std: "docker" "start" "-a" "8db6db01e052921fcab574f6921066f913f29be2c324fc688be4cb3463e271d8", kill_on_drop: false }` [INFO] [stderr] Checking primes v0.3.0 [INFO] [stderr] Checking aoc_2017 v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `std::cmp` [INFO] [stdout] --> src/day4.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use std::cmp; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: almost complete ascii range [INFO] [stdout] --> src/day18.rs:73:12 [INFO] [stdout] | [INFO] [stdout] 73 | for r in 'a'..'z' { [INFO] [stdout] | ^^^--^^^ [INFO] [stdout] | | [INFO] [stdout] | help: use an inclusive range: `..=` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#almost_complete_range [INFO] [stdout] = note: `#[warn(clippy::almost_complete_range)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/day18.rs:78:4 [INFO] [stdout] | [INFO] [stdout] 78 | regs: regs, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `regs` [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: almost complete ascii range [INFO] [stdout] --> src/day18.rs:168:11 [INFO] [stdout] | [INFO] [stdout] 168 | for r in 'a'..'z' { [INFO] [stdout] | ^^^--^^^ [INFO] [stdout] | | [INFO] [stdout] | help: use an inclusive range: `..=` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#almost_complete_range [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::cmp` [INFO] [stdout] --> src/day4.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use std::cmp; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: almost complete ascii range [INFO] [stdout] --> src/day18.rs:73:12 [INFO] [stdout] | [INFO] [stdout] 73 | for r in 'a'..'z' { [INFO] [stdout] | ^^^--^^^ [INFO] [stdout] | | [INFO] [stdout] | help: use an inclusive range: `..=` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#almost_complete_range [INFO] [stdout] = note: `#[warn(clippy::almost_complete_range)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/day18.rs:78:4 [INFO] [stdout] | [INFO] [stdout] 78 | regs: regs, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `regs` [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: almost complete ascii range [INFO] [stdout] --> src/day18.rs:168:11 [INFO] [stdout] | [INFO] [stdout] 168 | for r in 'a'..'z' { [INFO] [stdout] | ^^^--^^^ [INFO] [stdout] | | [INFO] [stdout] | help: use an inclusive range: `..=` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#almost_complete_range [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable expression [INFO] [stdout] --> src/day6.rs:55:2 [INFO] [stdout] | [INFO] [stdout] 37 | / loop { [INFO] [stdout] 38 | | if hs.contains(&vals) { [INFO] [stdout] 39 | | if cycling { [INFO] [stdout] 40 | | return count; [INFO] [stdout] ... | [INFO] [stdout] 54 | | } [INFO] [stdout] | |_____- any code following this expression is unreachable [INFO] [stdout] 55 | count [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/day6.rs:55:2 [INFO] [stdout] | [INFO] [stdout] 37 | / loop { [INFO] [stdout] 38 | | if hs.contains(&vals) { [INFO] [stdout] 39 | | if cycling { [INFO] [stdout] 40 | | return count; [INFO] [stdout] ... | [INFO] [stdout] 54 | | } [INFO] [stdout] | |_____- any code following this expression is unreachable [INFO] [stdout] 55 | count [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 pattern [INFO] [stdout] --> src/day18.rs:142:4 [INFO] [stdout] | [INFO] [stdout] 142 | _ => { [INFO] [stdout] | ^ no value can reach this [INFO] [stdout] | [INFO] [stdout] note: multiple earlier patterns match some of the same values [INFO] [stdout] --> src/day18.rs:142:4 [INFO] [stdout] | [INFO] [stdout] 96 | Command::Set(x, y) => { [INFO] [stdout] | ------------------ matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 101 | Command::Mul(x, y) => { [INFO] [stdout] | ------------------ matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 107 | Command::Jgz(x, y) => { [INFO] [stdout] | ------------------ matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 116 | Command::Add(x, y) => { [INFO] [stdout] | ------------------ matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 142 | _ => { [INFO] [stdout] | ^ ...and 3 other patterns collectively make this unreachable [INFO] [stdout] = note: `#[warn(unreachable_patterns)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable pattern [INFO] [stdout] --> src/day18.rs:217:4 [INFO] [stdout] | [INFO] [stdout] 217 | _ => { [INFO] [stdout] | ^ no value can reach this [INFO] [stdout] | [INFO] [stdout] note: multiple earlier patterns match some of the same values [INFO] [stdout] --> src/day18.rs:217:4 [INFO] [stdout] | [INFO] [stdout] 176 | Command::Set(x, y) => { [INFO] [stdout] | ------------------ matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 181 | Command::Mul(x, y) => { [INFO] [stdout] | ------------------ matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 187 | Command::Jgz(x, y) => { [INFO] [stdout] | ------------------ matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 196 | Command::Add(x, y) => { [INFO] [stdout] | ------------------ matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 217 | _ => { [INFO] [stdout] | ^ ...and 3 other patterns collectively make this unreachable [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `ip` is never read [INFO] [stdout] --> src/day18.rs:214:5 [INFO] [stdout] | [INFO] [stdout] 214 | ip += 1; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `found_pos` is assigned to, but never used [INFO] [stdout] --> src/day20.rs:35:6 [INFO] [stdout] | [INFO] [stdout] 35 | let mut found_pos = 99999; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: consider using `_found_pos` instead [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `found_pos` is never read [INFO] [stdout] --> src/day20.rs:50:5 [INFO] [stdout] | [INFO] [stdout] 50 | found_pos = pos; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `found_pos` is never read [INFO] [stdout] --> src/day20.rs:44:4 [INFO] [stdout] | [INFO] [stdout] 44 | found_pos = pos; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable pattern [INFO] [stdout] --> src/day18.rs:142:4 [INFO] [stdout] | [INFO] [stdout] 142 | _ => { [INFO] [stdout] | ^ no value can reach this [INFO] [stdout] | [INFO] [stdout] note: multiple earlier patterns match some of the same values [INFO] [stdout] --> src/day18.rs:142:4 [INFO] [stdout] | [INFO] [stdout] 96 | Command::Set(x, y) => { [INFO] [stdout] | ------------------ matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 101 | Command::Mul(x, y) => { [INFO] [stdout] | ------------------ matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 107 | Command::Jgz(x, y) => { [INFO] [stdout] | ------------------ matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 116 | Command::Add(x, y) => { [INFO] [stdout] | ------------------ matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 142 | _ => { [INFO] [stdout] | ^ ...and 3 other patterns collectively make this unreachable [INFO] [stdout] = note: `#[warn(unreachable_patterns)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable pattern [INFO] [stdout] --> src/day18.rs:217:4 [INFO] [stdout] | [INFO] [stdout] 217 | _ => { [INFO] [stdout] | ^ no value can reach this [INFO] [stdout] | [INFO] [stdout] note: multiple earlier patterns match some of the same values [INFO] [stdout] --> src/day18.rs:217:4 [INFO] [stdout] | [INFO] [stdout] 176 | Command::Set(x, y) => { [INFO] [stdout] | ------------------ matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 181 | Command::Mul(x, y) => { [INFO] [stdout] | ------------------ matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 187 | Command::Jgz(x, y) => { [INFO] [stdout] | ------------------ matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 196 | Command::Add(x, y) => { [INFO] [stdout] | ------------------ matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 217 | _ => { [INFO] [stdout] | ^ ...and 3 other patterns collectively make this unreachable [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `ip` is never read [INFO] [stdout] --> src/day18.rs:214:5 [INFO] [stdout] | [INFO] [stdout] 214 | ip += 1; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `found_pos` is assigned to, but never used [INFO] [stdout] --> src/day20.rs:35:6 [INFO] [stdout] | [INFO] [stdout] 35 | let mut found_pos = 99999; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: consider using `_found_pos` instead [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `found_pos` is never read [INFO] [stdout] --> src/day20.rs:50:5 [INFO] [stdout] | [INFO] [stdout] 50 | found_pos = pos; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `found_pos` is never read [INFO] [stdout] --> src/day20.rs:44:4 [INFO] [stdout] | [INFO] [stdout] 44 | found_pos = pos; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable pattern [INFO] [stdout] --> src/day23.rs:82:4 [INFO] [stdout] | [INFO] [stdout] 82 | _ => { [INFO] [stdout] | ^ no value can reach this [INFO] [stdout] | [INFO] [stdout] note: multiple earlier patterns match some of the same values [INFO] [stdout] --> src/day23.rs:82:4 [INFO] [stdout] | [INFO] [stdout] 55 | Command::Set(x, y) => { [INFO] [stdout] | ------------------ matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 60 | Command::Mul(x, y) => { [INFO] [stdout] | ------------------ matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 67 | Command::Jnz(x, y) => { [INFO] [stdout] | ------------------ matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 76 | Command::Sub(x, y) => { [INFO] [stdout] | ------------------ matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 82 | _ => { [INFO] [stdout] | ^ collectively making this unreachable [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day1.rs:12:16 [INFO] [stdout] | [INFO] [stdout] 12 | fn part1(vals: &Vec) -> u32 { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 12 - fn part1(vals: &Vec) -> u32 { [INFO] [stdout] 12 + fn part1(vals: &[u32]) -> u32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day1.rs:16:16 [INFO] [stdout] | [INFO] [stdout] 16 | fn part2(vals: &Vec) -> u32 { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 16 - fn part2(vals: &Vec) -> u32 { [INFO] [stdout] 16 + fn part2(vals: &[u32]) -> u32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable pattern [INFO] [stdout] --> src/day23.rs:82:4 [INFO] [stdout] | [INFO] [stdout] 82 | _ => { [INFO] [stdout] | ^ no value can reach this [INFO] [stdout] | [INFO] [stdout] note: multiple earlier patterns match some of the same values [INFO] [stdout] --> src/day23.rs:82:4 [INFO] [stdout] | [INFO] [stdout] 55 | Command::Set(x, y) => { [INFO] [stdout] | ------------------ matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 60 | Command::Mul(x, y) => { [INFO] [stdout] | ------------------ matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 67 | Command::Jnz(x, y) => { [INFO] [stdout] | ------------------ matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 76 | Command::Sub(x, y) => { [INFO] [stdout] | ------------------ matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 82 | _ => { [INFO] [stdout] | ^ collectively making this unreachable [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `flatten()` will run forever if the iterator repeatedly produces an `Err` [INFO] [stdout] --> src/day2.rs:14:28 [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/day2.rs:14:2 [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] = note: `#[warn(clippy::lines_filter_map_ok)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day2.rs:23:23 [INFO] [stdout] | [INFO] [stdout] 23 | fn evenly_divis(nums: &Vec) -> i32 { [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] 23 - fn evenly_divis(nums: &Vec) -> i32 { [INFO] [stdout] 23 + fn evenly_divis(nums: &[i32]) -> i32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/day2.rs:38:8 [INFO] [stdout] | [INFO] [stdout] 38 | .map(|v| evenly_divis(v)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `evenly_divis` [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day3.rs:55:30 [INFO] [stdout] | [INFO] [stdout] 55 | fn sum(x: i32, y: i32, nums: &Vec>) -> u32 { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 55 - fn sum(x: i32, y: i32, nums: &Vec>) -> u32 { [INFO] [stdout] 55 + fn sum(x: i32, y: i32, nums: &[Vec]) -> u32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day1.rs:12:16 [INFO] [stdout] | [INFO] [stdout] 12 | fn part1(vals: &Vec) -> u32 { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 12 - fn part1(vals: &Vec) -> u32 { [INFO] [stdout] 12 + fn part1(vals: &[u32]) -> u32 { [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:15:28 [INFO] [stdout] | [INFO] [stdout] 15 | 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:15:2 [INFO] [stdout] | [INFO] [stdout] 15 | 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/day1.rs:16:16 [INFO] [stdout] | [INFO] [stdout] 16 | fn part2(vals: &Vec) -> u32 { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 16 - fn part2(vals: &Vec) -> u32 { [INFO] [stdout] 16 + fn part2(vals: &[u32]) -> u32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day5.rs:12:21 [INFO] [stdout] | [INFO] [stdout] 12 | fn part1(jumps_ref: &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] 12 ~ fn part1(jumps_ref: &[i32]) -> usize { [INFO] [stdout] 13 ~ let mut jumps = jumps_ref.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/day2.rs:14:28 [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/day2.rs:14:2 [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] = note: `#[warn(clippy::lines_filter_map_ok)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day5.rs:25:21 [INFO] [stdout] | [INFO] [stdout] 25 | fn part2(jumps_ref: &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] 25 ~ fn part2(jumps_ref: &[i32]) -> usize { [INFO] [stdout] 26 ~ let mut jumps = jumps_ref.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/day2.rs:23:23 [INFO] [stdout] | [INFO] [stdout] 23 | fn evenly_divis(nums: &Vec) -> i32 { [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] 23 - fn evenly_divis(nums: &Vec) -> i32 { [INFO] [stdout] 23 + fn evenly_divis(nums: &[i32]) -> i32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/day2.rs:38:8 [INFO] [stdout] | [INFO] [stdout] 38 | .map(|v| evenly_divis(v)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `evenly_divis` [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day6.rs:13:22 [INFO] [stdout] | [INFO] [stdout] 13 | pub fn part1(vals_p: &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] 13 ~ pub fn part1(vals_p: &[u32]) -> usize { [INFO] [stdout] 14 | let mut count = 0; [INFO] [stdout] 15 ~ let mut vals = vals_p.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/day6.rs:31:22 [INFO] [stdout] | [INFO] [stdout] 31 | pub fn part2(vals_p: &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] 31 ~ pub fn part2(vals_p: &[u32]) -> usize { [INFO] [stdout] 32 | let mut count = 0; [INFO] [stdout] 33 ~ let mut vals = vals_p.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/day3.rs:55:30 [INFO] [stdout] | [INFO] [stdout] 55 | fn sum(x: i32, y: i32, nums: &Vec>) -> u32 { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 55 - fn sum(x: i32, y: i32, nums: &Vec>) -> u32 { [INFO] [stdout] 55 + fn sum(x: i32, y: i32, nums: &[Vec]) -> u32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `flatten()` will run forever if the iterator repeatedly produces an `Err` [INFO] [stdout] --> src/day7.rs:21:40 [INFO] [stdout] | [INFO] [stdout] 21 | for line in BufReader::new(f).lines().flatten() { [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:21:14 [INFO] [stdout] | [INFO] [stdout] 21 | for line in BufReader::new(f).lines().flatten() { [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/day4.rs:15:28 [INFO] [stdout] | [INFO] [stdout] 15 | 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:15:2 [INFO] [stdout] | [INFO] [stdout] 15 | 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 seem to want to iterate on a map's values [INFO] [stdout] --> src/day7.rs:29:20 [INFO] [stdout] | [INFO] [stdout] 29 | for (_, clist) in children { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] = note: `#[warn(clippy::for_kv_map)]` on by default [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 29 - for (_, clist) in children { [INFO] [stdout] 29 + for clist in children.values() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's keys [INFO] [stdout] --> src/day7.rs:34:21 [INFO] [stdout] | [INFO] [stdout] 34 | for (parent, _) in children { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 34 - for (parent, _) in children { [INFO] [stdout] 34 + for parent in children.keys() { [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/day5.rs:12:21 [INFO] [stdout] | [INFO] [stdout] 12 | fn part1(jumps_ref: &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] 12 ~ fn part1(jumps_ref: &[i32]) -> usize { [INFO] [stdout] 13 ~ let mut jumps = jumps_ref.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/day5.rs:25:21 [INFO] [stdout] | [INFO] [stdout] 25 | fn part2(jumps_ref: &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] 25 ~ fn part2(jumps_ref: &[i32]) -> usize { [INFO] [stdout] 26 ~ let mut jumps = jumps_ref.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/day8.rs:31:28 [INFO] [stdout] | [INFO] [stdout] 31 | 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:31:2 [INFO] [stdout] | [INFO] [stdout] 31 | 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/day6.rs:13:22 [INFO] [stdout] | [INFO] [stdout] 13 | pub fn part1(vals_p: &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] 13 ~ pub fn part1(vals_p: &[u32]) -> usize { [INFO] [stdout] 14 | let mut count = 0; [INFO] [stdout] 15 ~ let mut vals = vals_p.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/day6.rs:31:22 [INFO] [stdout] | [INFO] [stdout] 31 | pub fn part2(vals_p: &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] 31 ~ pub fn part2(vals_p: &[u32]) -> usize { [INFO] [stdout] 32 | let mut count = 0; [INFO] [stdout] 33 ~ let mut vals = vals_p.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/day7.rs:21:40 [INFO] [stdout] | [INFO] [stdout] 21 | for line in BufReader::new(f).lines().flatten() { [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:21:14 [INFO] [stdout] | [INFO] [stdout] 21 | for line in BufReader::new(f).lines().flatten() { [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 seem to want to iterate on a map's values [INFO] [stdout] --> src/day7.rs:29:20 [INFO] [stdout] | [INFO] [stdout] 29 | for (_, clist) in children { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] = note: `#[warn(clippy::for_kv_map)]` on by default [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 29 - for (_, clist) in children { [INFO] [stdout] 29 + for clist in children.values() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's keys [INFO] [stdout] --> src/day7.rs:34:21 [INFO] [stdout] | [INFO] [stdout] 34 | for (parent, _) in children { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 34 - for (parent, _) in children { [INFO] [stdout] 34 + for parent in children.keys() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `skip_size` is used as a loop counter [INFO] [stdout] --> src/day10.rs:35:2 [INFO] [stdout] | [INFO] [stdout] 35 | for length in lengths { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (skip_size, length) in lengths.iter().enumerate()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] = note: `#[warn(clippy::explicit_counter_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `flatten()` will run forever if the iterator repeatedly produces an `Err` [INFO] [stdout] --> src/day8.rs:31:28 [INFO] [stdout] | [INFO] [stdout] 31 | 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:31:2 [INFO] [stdout] | [INFO] [stdout] 31 | 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 `set` [INFO] [stdout] --> src/day10.rs:71:12 [INFO] [stdout] | [INFO] [stdout] 71 | for i in 1..set.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] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 71 - for i in 1..set.len() { [INFO] [stdout] 71 + for in set.iter().skip(1) { [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:15:28 [INFO] [stdout] | [INFO] [stdout] 15 | 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/day12.rs:15:2 [INFO] [stdout] | [INFO] [stdout] 15 | 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/day12.rs:18:25 [INFO] [stdout] | [INFO] [stdout] 18 | fn set_with_node(nodes: &Vec>, node_num: usize) -> HashSet { [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] 18 - fn set_with_node(nodes: &Vec>, node_num: usize) -> HashSet { [INFO] [stdout] 18 + fn set_with_node(nodes: &[Vec], node_num: usize) -> HashSet { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/day12.rs:23:8 [INFO] [stdout] | [INFO] [stdout] 23 | 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] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `skip_size` is used as a loop counter [INFO] [stdout] --> src/day10.rs:35:2 [INFO] [stdout] | [INFO] [stdout] 35 | for length in lengths { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (skip_size, length) in lengths.iter().enumerate()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] = note: `#[warn(clippy::explicit_counter_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/day12.rs:47:8 [INFO] [stdout] | [INFO] [stdout] 47 | while all_nodes.len() != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!all_nodes.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: the loop variable `i` is only used to index `set` [INFO] [stdout] --> src/day10.rs:71:12 [INFO] [stdout] | [INFO] [stdout] 71 | for i in 1..set.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] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 71 - for i in 1..set.len() { [INFO] [stdout] 71 + for in set.iter().skip(1) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `flatten()` will run forever if the iterator repeatedly produces an `Err` [INFO] [stdout] --> src/day13.rs:15:59 [INFO] [stdout] | [INFO] [stdout] 15 | let vals:Vec<(usize, usize)> = 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/day13.rs:15:33 [INFO] [stdout] | [INFO] [stdout] 15 | let vals:Vec<(usize, usize)> = 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 seem to want to iterate on a map's keys [INFO] [stdout] --> src/day13.rs:28:18 [INFO] [stdout] | [INFO] [stdout] 28 | for (key, _) in scanners { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 28 - for (key, _) in scanners { [INFO] [stdout] 28 + for key in scanners.keys() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: iterating on a map's keys [INFO] [stdout] --> src/day13.rs:33:16 [INFO] [stdout] | [INFO] [stdout] 33 | let end_pos = scan_pos.iter().map(|(k, _)| **k).max().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `scan_pos.keys().map(|k| **k)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_kv_map [INFO] [stdout] = note: `#[warn(clippy::iter_kv_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `valid` [INFO] [stdout] --> src/day13.rs:78:11 [INFO] [stdout] | [INFO] [stdout] 78 | for i in 0..valid.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] 78 - for i in 0..valid.len() { [INFO] [stdout] 78 + for (i, ) in valid.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> src/day13.rs:79:6 [INFO] [stdout] | [INFO] [stdout] 79 | if valid[i] == true { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `valid[i]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `flatten()` will run forever if the iterator repeatedly produces an `Err` [INFO] [stdout] --> src/day12.rs:15:28 [INFO] [stdout] | [INFO] [stdout] 15 | 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/day12.rs:15:2 [INFO] [stdout] | [INFO] [stdout] 15 | 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/day12.rs:18:25 [INFO] [stdout] | [INFO] [stdout] 18 | fn set_with_node(nodes: &Vec>, node_num: usize) -> HashSet { [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] 18 - fn set_with_node(nodes: &Vec>, node_num: usize) -> HashSet { [INFO] [stdout] 18 + fn set_with_node(nodes: &[Vec], node_num: usize) -> HashSet { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/day12.rs:23:8 [INFO] [stdout] | [INFO] [stdout] 23 | 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] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/day12.rs:47:8 [INFO] [stdout] | [INFO] [stdout] 47 | while all_nodes.len() != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!all_nodes.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: the loop variable `i` is only used to index `set` [INFO] [stdout] --> src/day14.rs:42:12 [INFO] [stdout] | [INFO] [stdout] 42 | for i in 1..set.len() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 42 - for i in 1..set.len() { [INFO] [stdout] 42 + for in set.iter().skip(1) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `flatten()` will run forever if the iterator repeatedly produces an `Err` [INFO] [stdout] --> src/day13.rs:15:59 [INFO] [stdout] | [INFO] [stdout] 15 | let vals:Vec<(usize, usize)> = 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/day13.rs:15:33 [INFO] [stdout] | [INFO] [stdout] 15 | let vals:Vec<(usize, usize)> = 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 seem to want to iterate on a map's keys [INFO] [stdout] --> src/day13.rs:28:18 [INFO] [stdout] | [INFO] [stdout] 28 | for (key, _) in scanners { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 28 - for (key, _) in scanners { [INFO] [stdout] 28 + for key in scanners.keys() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: iterating on a map's keys [INFO] [stdout] --> src/day13.rs:33:16 [INFO] [stdout] | [INFO] [stdout] 33 | let end_pos = scan_pos.iter().map(|(k, _)| **k).max().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `scan_pos.keys().map(|k| **k)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_kv_map [INFO] [stdout] = note: `#[warn(clippy::iter_kv_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/day14.rs:66:8 [INFO] [stdout] | [INFO] [stdout] 66 | 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 `if` statement can be collapsed [INFO] [stdout] --> src/day14.rs:69:3 [INFO] [stdout] | [INFO] [stdout] 69 | / if x > 0 && nodes.contains(&(x-1,y)) { [INFO] [stdout] 70 | | if !visited.contains(&(x-1,y)) { [INFO] [stdout] 71 | | queue.push_back((x-1,y)); [INFO] [stdout] 72 | | visited.insert((x-1,y)); [INFO] [stdout] 73 | | } [INFO] [stdout] 74 | | } [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] 69 ~ if x > 0 && nodes.contains(&(x-1,y)) [INFO] [stdout] 70 ~ && !visited.contains(&(x-1,y)) { [INFO] [stdout] 71 | queue.push_back((x-1,y)); [INFO] [stdout] 72 | visited.insert((x-1,y)); [INFO] [stdout] 73 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/day14.rs:75:3 [INFO] [stdout] | [INFO] [stdout] 75 | / if y > 0 && nodes.contains(&(x,y-1)) { [INFO] [stdout] 76 | | if !visited.contains(&(x,y-1)) { [INFO] [stdout] 77 | | queue.push_back((x,y-1)); [INFO] [stdout] 78 | | visited.insert((x,y-1)); [INFO] [stdout] 79 | | } [INFO] [stdout] 80 | | } [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] 75 ~ if y > 0 && nodes.contains(&(x,y-1)) [INFO] [stdout] 76 ~ && !visited.contains(&(x,y-1)) { [INFO] [stdout] 77 | queue.push_back((x,y-1)); [INFO] [stdout] 78 | visited.insert((x,y-1)); [INFO] [stdout] 79 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/day14.rs:81:3 [INFO] [stdout] | [INFO] [stdout] 81 | / if nodes.contains(&(x+1,y)) { [INFO] [stdout] 82 | | if !visited.contains(&(x+1,y)) { [INFO] [stdout] 83 | | queue.push_back((x+1,y)); [INFO] [stdout] 84 | | visited.insert((x+1,y)); [INFO] [stdout] 85 | | } [INFO] [stdout] 86 | | } [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] 81 ~ if nodes.contains(&(x+1,y)) [INFO] [stdout] 82 ~ && !visited.contains(&(x+1,y)) { [INFO] [stdout] 83 | queue.push_back((x+1,y)); [INFO] [stdout] 84 | visited.insert((x+1,y)); [INFO] [stdout] 85 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/day14.rs:87:3 [INFO] [stdout] | [INFO] [stdout] 87 | / if nodes.contains(&(x,y+1)) { [INFO] [stdout] 88 | | if !visited.contains(&(x,y+1)) { [INFO] [stdout] 89 | | queue.push_back((x,y+1)); [INFO] [stdout] 90 | | visited.insert((x,y+1)); [INFO] [stdout] 91 | | } [INFO] [stdout] 92 | | } [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] 87 ~ if nodes.contains(&(x,y+1)) [INFO] [stdout] 88 ~ && !visited.contains(&(x,y+1)) { [INFO] [stdout] 89 | queue.push_back((x,y+1)); [INFO] [stdout] 90 | visited.insert((x,y+1)); [INFO] [stdout] 91 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `valid` [INFO] [stdout] --> src/day13.rs:78:11 [INFO] [stdout] | [INFO] [stdout] 78 | for i in 0..valid.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] 78 - for i in 0..valid.len() { [INFO] [stdout] 78 + for (i, ) in valid.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> src/day13.rs:79:6 [INFO] [stdout] | [INFO] [stdout] 79 | if valid[i] == true { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `valid[i]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is used to index `chrs` [INFO] [stdout] --> src/day14.rs:103:12 [INFO] [stdout] | [INFO] [stdout] 103 | for j in 0..chrs.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] 103 - for j in 0..chrs.len() { [INFO] [stdout] 103 + for (j, ) in chrs.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/day14.rs:111:8 [INFO] [stdout] | [INFO] [stdout] 111 | while nodes.len() != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!nodes.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: the loop variable `i` is only used to index `set` [INFO] [stdout] --> src/day14.rs:42:12 [INFO] [stdout] | [INFO] [stdout] 42 | for i in 1..set.len() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 42 - for i in 1..set.len() { [INFO] [stdout] 42 + for in set.iter().skip(1) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/day15.rs:13:8 [INFO] [stdout] | [INFO] [stdout] 13 | while new_num % 4 != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace with: `!new_num.is_multiple_of(4)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/day15.rs:21:8 [INFO] [stdout] | [INFO] [stdout] 21 | while new_num % 8 != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace with: `!new_num.is_multiple_of(8)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/day14.rs:66:8 [INFO] [stdout] | [INFO] [stdout] 66 | 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 `if` statement can be collapsed [INFO] [stdout] --> src/day14.rs:69:3 [INFO] [stdout] | [INFO] [stdout] 69 | / if x > 0 && nodes.contains(&(x-1,y)) { [INFO] [stdout] 70 | | if !visited.contains(&(x-1,y)) { [INFO] [stdout] 71 | | queue.push_back((x-1,y)); [INFO] [stdout] 72 | | visited.insert((x-1,y)); [INFO] [stdout] 73 | | } [INFO] [stdout] 74 | | } [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] 69 ~ if x > 0 && nodes.contains(&(x-1,y)) [INFO] [stdout] 70 ~ && !visited.contains(&(x-1,y)) { [INFO] [stdout] 71 | queue.push_back((x-1,y)); [INFO] [stdout] 72 | visited.insert((x-1,y)); [INFO] [stdout] 73 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/day14.rs:75:3 [INFO] [stdout] | [INFO] [stdout] 75 | / if y > 0 && nodes.contains(&(x,y-1)) { [INFO] [stdout] 76 | | if !visited.contains(&(x,y-1)) { [INFO] [stdout] 77 | | queue.push_back((x,y-1)); [INFO] [stdout] 78 | | visited.insert((x,y-1)); [INFO] [stdout] 79 | | } [INFO] [stdout] 80 | | } [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] 75 ~ if y > 0 && nodes.contains(&(x,y-1)) [INFO] [stdout] 76 ~ && !visited.contains(&(x,y-1)) { [INFO] [stdout] 77 | queue.push_back((x,y-1)); [INFO] [stdout] 78 | visited.insert((x,y-1)); [INFO] [stdout] 79 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/day14.rs:81:3 [INFO] [stdout] | [INFO] [stdout] 81 | / if nodes.contains(&(x+1,y)) { [INFO] [stdout] 82 | | if !visited.contains(&(x+1,y)) { [INFO] [stdout] 83 | | queue.push_back((x+1,y)); [INFO] [stdout] 84 | | visited.insert((x+1,y)); [INFO] [stdout] 85 | | } [INFO] [stdout] 86 | | } [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] 81 ~ if nodes.contains(&(x+1,y)) [INFO] [stdout] 82 ~ && !visited.contains(&(x+1,y)) { [INFO] [stdout] 83 | queue.push_back((x+1,y)); [INFO] [stdout] 84 | visited.insert((x+1,y)); [INFO] [stdout] 85 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/day14.rs:87:3 [INFO] [stdout] | [INFO] [stdout] 87 | / if nodes.contains(&(x,y+1)) { [INFO] [stdout] 88 | | if !visited.contains(&(x,y+1)) { [INFO] [stdout] 89 | | queue.push_back((x,y+1)); [INFO] [stdout] 90 | | visited.insert((x,y+1)); [INFO] [stdout] 91 | | } [INFO] [stdout] 92 | | } [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] 87 ~ if nodes.contains(&(x,y+1)) [INFO] [stdout] 88 ~ && !visited.contains(&(x,y+1)) { [INFO] [stdout] 89 | queue.push_back((x,y+1)); [INFO] [stdout] 90 | visited.insert((x,y+1)); [INFO] [stdout] 91 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is used to index `chrs` [INFO] [stdout] --> src/day14.rs:103:12 [INFO] [stdout] | [INFO] [stdout] 103 | for j in 0..chrs.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] 103 - for j in 0..chrs.len() { [INFO] [stdout] 103 + for (j, ) in chrs.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/day14.rs:111:8 [INFO] [stdout] | [INFO] [stdout] 111 | while nodes.len() != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!nodes.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: redundant closure [INFO] [stdout] --> src/day16.rs:38:22 [INFO] [stdout] | [INFO] [stdout] 38 | fstr.split(",").map(|s| parse_line(s)).collect() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `parse_line` [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: this looks like you are swapping elements of `prog_order` manually [INFO] [stdout] --> src/day16.rs:55:5 [INFO] [stdout] | [INFO] [stdout] 55 | / let tmp = prog_order[(head + pos1) % progs]; [INFO] [stdout] 56 | | prog_order[(head + pos1) % progs] = prog_order[(head + pos2) % progs]; [INFO] [stdout] 57 | | prog_order[(head + pos2) % progs] = tmp; [INFO] [stdout] | |________________________________________________________^ help: try: `prog_order.swap((head + pos1) % progs, (head + pos2) % progs);` [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: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/day15.rs:13:8 [INFO] [stdout] | [INFO] [stdout] 13 | while new_num % 4 != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace with: `!new_num.is_multiple_of(4)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this looks like you are swapping elements of `prog_order` manually [INFO] [stdout] --> src/day16.rs:62:5 [INFO] [stdout] | [INFO] [stdout] 62 | / let tmp = prog_order[pos1]; [INFO] [stdout] 63 | | prog_order[pos1] = prog_order[pos2]; [INFO] [stdout] 64 | | prog_order[pos2] = tmp; [INFO] [stdout] | |_______________________________________^ help: try: `prog_order.swap(pos1, pos2);` [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: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/day15.rs:21:8 [INFO] [stdout] | [INFO] [stdout] 21 | while new_num % 8 != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace with: `!new_num.is_multiple_of(8)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this looks like you are swapping elements of `prog_order` manually [INFO] [stdout] --> src/day16.rs:95:6 [INFO] [stdout] | [INFO] [stdout] 95 | / let tmp = prog_order[(head + pos1) % progs]; [INFO] [stdout] 96 | | prog_order[(head + pos1) % progs] = prog_order[(head + pos2) % progs]; [INFO] [stdout] 97 | | prog_order[(head + pos2) % progs] = tmp; [INFO] [stdout] | |____________________________________________________________^ help: try: `prog_order.swap((head + pos1) % progs, (head + pos2) % progs);` [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: this looks like you are swapping elements of `prog_order` manually [INFO] [stdout] --> src/day16.rs:102:6 [INFO] [stdout] | [INFO] [stdout] 102 | / let tmp = prog_order[pos1]; [INFO] [stdout] 103 | | prog_order[pos1] = prog_order[pos2]; [INFO] [stdout] 104 | | prog_order[pos2] = tmp; [INFO] [stdout] | |___________________________________________^ help: try: `prog_order.swap(pos1, pos2);` [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: redundant closure [INFO] [stdout] --> src/day16.rs:38:22 [INFO] [stdout] | [INFO] [stdout] 38 | fstr.split(",").map(|s| parse_line(s)).collect() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `parse_line` [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: this looks like you are swapping elements of `prog_order` manually [INFO] [stdout] --> src/day16.rs:55:5 [INFO] [stdout] | [INFO] [stdout] 55 | / let tmp = prog_order[(head + pos1) % progs]; [INFO] [stdout] 56 | | prog_order[(head + pos1) % progs] = prog_order[(head + pos2) % progs]; [INFO] [stdout] 57 | | prog_order[(head + pos2) % progs] = tmp; [INFO] [stdout] | |________________________________________________________^ help: try: `prog_order.swap((head + pos1) % progs, (head + pos2) % progs);` [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: the variable `size` is used as a loop counter [INFO] [stdout] --> src/day17.rs:20:2 [INFO] [stdout] | [INFO] [stdout] 20 | for i in 1..=50000000 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (size, i) in (1..).zip((1..=50000000))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this looks like you are swapping elements of `prog_order` manually [INFO] [stdout] --> src/day16.rs:62:5 [INFO] [stdout] | [INFO] [stdout] 62 | / let tmp = prog_order[pos1]; [INFO] [stdout] 63 | | prog_order[pos1] = prog_order[pos2]; [INFO] [stdout] 64 | | prog_order[pos2] = tmp; [INFO] [stdout] | |_______________________________________^ help: try: `prog_order.swap(pos1, pos2);` [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: this looks like you are swapping elements of `prog_order` manually [INFO] [stdout] --> src/day16.rs:95:6 [INFO] [stdout] | [INFO] [stdout] 95 | / let tmp = prog_order[(head + pos1) % progs]; [INFO] [stdout] 96 | | prog_order[(head + pos1) % progs] = prog_order[(head + pos2) % progs]; [INFO] [stdout] 97 | | prog_order[(head + pos2) % progs] = tmp; [INFO] [stdout] | |____________________________________________________________^ help: try: `prog_order.swap((head + pos1) % progs, (head + pos2) % progs);` [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: this looks like you are swapping elements of `prog_order` manually [INFO] [stdout] --> src/day16.rs:102:6 [INFO] [stdout] | [INFO] [stdout] 102 | / let tmp = prog_order[pos1]; [INFO] [stdout] 103 | | prog_order[pos1] = prog_order[pos2]; [INFO] [stdout] 104 | | prog_order[pos2] = tmp; [INFO] [stdout] | |___________________________________________^ help: try: `prog_order.swap(pos1, pos2);` [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: `flatten()` will run forever if the iterator repeatedly produces an `Err` [INFO] [stdout] --> src/day18.rs:54:28 [INFO] [stdout] | [INFO] [stdout] 54 | 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/day18.rs:54:2 [INFO] [stdout] | [INFO] [stdout] 54 | 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 variable `size` is used as a loop counter [INFO] [stdout] --> src/day17.rs:20:2 [INFO] [stdout] | [INFO] [stdout] 20 | for i in 1..=50000000 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (size, i) in (1..).zip((1..=50000000))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/day18.rs:135:8 [INFO] [stdout] | [INFO] [stdout] 135 | if self.incoming.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.incoming.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/day18.rs:54:28 [INFO] [stdout] | [INFO] [stdout] 54 | 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/day18.rs:54:2 [INFO] [stdout] | [INFO] [stdout] 54 | 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: this boolean expression can be simplified [INFO] [stdout] --> src/day18.rs:152:8 [INFO] [stdout] | [INFO] [stdout] 152 | while !(vm0.done && vm1.done) && !(vm0.locked && vm1.locked) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!(vm0.done && vm1.done || vm0.locked && vm1.locked)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/day18.rs:155:9 [INFO] [stdout] | [INFO] [stdout] 155 | while vm0.outgoing.len() != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!vm0.outgoing.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/day18.rs:158:9 [INFO] [stdout] | [INFO] [stdout] 158 | while vm1.outgoing.len() != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!vm1.outgoing.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/day18.rs:135:8 [INFO] [stdout] | [INFO] [stdout] 135 | if self.incoming.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.incoming.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:152:8 [INFO] [stdout] | [INFO] [stdout] 152 | while !(vm0.done && vm1.done) && !(vm0.locked && vm1.locked) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!(vm0.done && vm1.done || vm0.locked && vm1.locked)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/day18.rs:155:9 [INFO] [stdout] | [INFO] [stdout] 155 | while vm0.outgoing.len() != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!vm0.outgoing.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/day18.rs:158:9 [INFO] [stdout] | [INFO] [stdout] 158 | while vm1.outgoing.len() != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!vm1.outgoing.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/day19.rs:9:28 [INFO] [stdout] | [INFO] [stdout] 9 | BufReader::new(f).lines().flatten().map(|s| s.chars().collect::>()).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/day19.rs:9:2 [INFO] [stdout] | [INFO] [stdout] 9 | BufReader::new(f).lines().flatten().map(|s| s.chars().collect::>()).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/day19.rs:9:28 [INFO] [stdout] | [INFO] [stdout] 9 | BufReader::new(f).lines().flatten().map(|s| s.chars().collect::>()).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/day19.rs:9:2 [INFO] [stdout] | [INFO] [stdout] 9 | BufReader::new(f).lines().flatten().map(|s| s.chars().collect::>()).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/day20.rs:28:28 [INFO] [stdout] | [INFO] [stdout] 28 | 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/day20.rs:28:2 [INFO] [stdout] | [INFO] [stdout] 28 | 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 used to index `particles` [INFO] [stdout] --> src/day20.rs:36:11 [INFO] [stdout] | [INFO] [stdout] 36 | for i in 0..particles.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] 36 - for i in 0..particles.len() { [INFO] [stdout] 36 + for (i, ) in particles.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/day20.rs:45:10 [INFO] [stdout] | [INFO] [stdout] 45 | } else if acc == found_acc { [INFO] [stdout] | ________________^ [INFO] [stdout] 46 | | if vel < found_vel { [INFO] [stdout] 47 | | found = i; [INFO] [stdout] 48 | | found_acc = acc; [INFO] [stdout] ... | [INFO] [stdout] 51 | | } // This is as much as I needed [INFO] [stdout] 52 | | } [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] 45 ~ } else if acc == found_acc [INFO] [stdout] 46 ~ && vel < found_vel { [INFO] [stdout] 47 | found = i; [INFO] [stdout] ... [INFO] [stdout] 50 | found_pos = pos; [INFO] [stdout] 51 ~ } // This is as much as I needed [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `part` [INFO] [stdout] --> src/day20.rs:61:12 [INFO] [stdout] | [INFO] [stdout] 61 | for i in 0..part.len() { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 61 - for i in 0..part.len() { [INFO] [stdout] 61 + for in &mut part { [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:28:28 [INFO] [stdout] | [INFO] [stdout] 28 | 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/day20.rs:28:2 [INFO] [stdout] | [INFO] [stdout] 28 | 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 used to index `particles` [INFO] [stdout] --> src/day20.rs:36:11 [INFO] [stdout] | [INFO] [stdout] 36 | for i in 0..particles.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] 36 - for i in 0..particles.len() { [INFO] [stdout] 36 + for (i, ) in particles.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/day20.rs:45:10 [INFO] [stdout] | [INFO] [stdout] 45 | } else if acc == found_acc { [INFO] [stdout] | ________________^ [INFO] [stdout] 46 | | if vel < found_vel { [INFO] [stdout] 47 | | found = i; [INFO] [stdout] 48 | | found_acc = acc; [INFO] [stdout] ... | [INFO] [stdout] 51 | | } // This is as much as I needed [INFO] [stdout] 52 | | } [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] 45 ~ } else if acc == found_acc [INFO] [stdout] 46 ~ && vel < found_vel { [INFO] [stdout] 47 | found = i; [INFO] [stdout] ... [INFO] [stdout] 50 | found_pos = pos; [INFO] [stdout] 51 ~ } // This is as much as I needed [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `part` [INFO] [stdout] --> src/day20.rs:61:12 [INFO] [stdout] | [INFO] [stdout] 61 | for i in 0..part.len() { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 61 - for i in 0..part.len() { [INFO] [stdout] 61 + for in &mut part { [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/day21.rs:8:18 [INFO] [stdout] | [INFO] [stdout] 8 | fn rotate(array: &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] 8 ~ fn rotate(array: &[Vec]) -> Vec> { [INFO] [stdout] 9 ~ let mut a = array.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/day21.rs:24:16 [INFO] [stdout] | [INFO] [stdout] 24 | fn flip(array: &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] 24 ~ fn flip(array: &[Vec]) -> Vec> { [INFO] [stdout] 25 ~ let mut a = array.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `a` [INFO] [stdout] --> src/day21.rs:27:11 [INFO] [stdout] | [INFO] [stdout] 27 | for i in 0..n { [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] 27 - for i in 0..n { [INFO] [stdout] 27 + for in a.iter_mut().take(n) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this looks like you are swapping elements of `a[i]` manually [INFO] [stdout] --> src/day21.rs:29:4 [INFO] [stdout] | [INFO] [stdout] 29 | / let temp = a[i][j]; [INFO] [stdout] 30 | | a[i][j] = a[i][n-1-j]; [INFO] [stdout] 31 | | a[i][n-1-j] = temp; [INFO] [stdout] | |_______________________________^ help: try: `a[i].swap(j, n-1-j);` [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/day21.rs:8:18 [INFO] [stdout] | [INFO] [stdout] 8 | fn rotate(array: &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] 8 ~ fn rotate(array: &[Vec]) -> Vec> { [INFO] [stdout] 9 ~ let mut a = array.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/day21.rs:38:22 [INFO] [stdout] | [INFO] [stdout] 38 | fn find_match(array: &Vec>, rules: &Input) -> 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] 38 ~ fn find_match(array: &[Vec], rules: &Input) -> Vec> { [INFO] [stdout] 39 ~ let mut a = array.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/day21.rs:24:16 [INFO] [stdout] | [INFO] [stdout] 24 | fn flip(array: &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] 24 ~ fn flip(array: &[Vec]) -> Vec> { [INFO] [stdout] 25 ~ let mut a = array.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `a` [INFO] [stdout] --> src/day21.rs:27:11 [INFO] [stdout] | [INFO] [stdout] 27 | for i in 0..n { [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] 27 - for i in 0..n { [INFO] [stdout] 27 + for in a.iter_mut().take(n) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this looks like you are swapping elements of `a[i]` manually [INFO] [stdout] --> src/day21.rs:29:4 [INFO] [stdout] | [INFO] [stdout] 29 | / let temp = a[i][j]; [INFO] [stdout] 30 | | a[i][j] = a[i][n-1-j]; [INFO] [stdout] 31 | | a[i][n-1-j] = temp; [INFO] [stdout] | |_______________________________^ help: try: `a[i].swap(j, n-1-j);` [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/day21.rs:38:22 [INFO] [stdout] | [INFO] [stdout] 38 | fn find_match(array: &Vec>, rules: &Input) -> 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] 38 ~ fn find_match(array: &[Vec], rules: &Input) -> Vec> { [INFO] [stdout] 39 ~ let mut a = array.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/day21.rs:75:28 [INFO] [stdout] | [INFO] [stdout] 75 | 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/day21.rs:75:2 [INFO] [stdout] | [INFO] [stdout] 75 | 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: `flatten()` will run forever if the iterator repeatedly produces an `Err` [INFO] [stdout] --> src/day21.rs:75:28 [INFO] [stdout] | [INFO] [stdout] 75 | 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/day21.rs:75:2 [INFO] [stdout] | [INFO] [stdout] 75 | 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 only used to index `to_combine` [INFO] [stdout] --> src/day21.rs:106:13 [INFO] [stdout] | [INFO] [stdout] 106 | for j in 0..to_combine[major_row].len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 106 - for j in 0..to_combine[major_row].len() { [INFO] [stdout] 106 + for in to_combine.iter().take(to_combine[major_row].len()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `CLEAN` contains a capitalized acronym [INFO] [stdout] --> src/day22.rs:9:2 [INFO] [stdout] | [INFO] [stdout] 9 | CLEAN, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Clean` [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: name `INFECTED` contains a capitalized acronym [INFO] [stdout] --> src/day22.rs:10:2 [INFO] [stdout] | [INFO] [stdout] 10 | INFECTED, [INFO] [stdout] | ^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Infected` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `WEAKENED` contains a capitalized acronym [INFO] [stdout] --> src/day22.rs:11:2 [INFO] [stdout] | [INFO] [stdout] 11 | WEAKENED, [INFO] [stdout] | ^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Weakened` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `FLAGGED` contains a capitalized acronym [INFO] [stdout] --> src/day22.rs:12:2 [INFO] [stdout] | [INFO] [stdout] 12 | FLAGGED [INFO] [stdout] | ^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Flagged` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `flatten()` will run forever if the iterator repeatedly produces an `Err` [INFO] [stdout] --> src/day22.rs:24:45 [INFO] [stdout] | [INFO] [stdout] 24 | for (i, line) in BufReader::new(f).lines().flatten().enumerate() { [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/day22.rs:24:19 [INFO] [stdout] | [INFO] [stdout] 24 | for (i, line) in BufReader::new(f).lines().flatten().enumerate() { [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 only used to index `to_combine` [INFO] [stdout] --> src/day21.rs:106:13 [INFO] [stdout] | [INFO] [stdout] 106 | for j in 0..to_combine[major_row].len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 106 - for j in 0..to_combine[major_row].len() { [INFO] [stdout] 106 + for in to_combine.iter().take(to_combine[major_row].len()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `CLEAN` contains a capitalized acronym [INFO] [stdout] --> src/day22.rs:9:2 [INFO] [stdout] | [INFO] [stdout] 9 | CLEAN, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Clean` [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: name `INFECTED` contains a capitalized acronym [INFO] [stdout] --> src/day22.rs:10:2 [INFO] [stdout] | [INFO] [stdout] 10 | INFECTED, [INFO] [stdout] | ^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Infected` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `WEAKENED` contains a capitalized acronym [INFO] [stdout] --> src/day22.rs:11:2 [INFO] [stdout] | [INFO] [stdout] 11 | WEAKENED, [INFO] [stdout] | ^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Weakened` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `FLAGGED` contains a capitalized acronym [INFO] [stdout] --> src/day22.rs:12:2 [INFO] [stdout] | [INFO] [stdout] 12 | FLAGGED [INFO] [stdout] | ^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Flagged` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `flatten()` will run forever if the iterator repeatedly produces an `Err` [INFO] [stdout] --> src/day22.rs:24:45 [INFO] [stdout] | [INFO] [stdout] 24 | for (i, line) in BufReader::new(f).lines().flatten().enumerate() { [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/day22.rs:24:19 [INFO] [stdout] | [INFO] [stdout] 24 | for (i, line) in BufReader::new(f).lines().flatten().enumerate() { [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/day23.rs:42:28 [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/day23.rs:42:2 [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: `flatten()` will run forever if the iterator repeatedly produces an `Err` [INFO] [stdout] --> src/day23.rs:42:28 [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/day23.rs:42:2 [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: `flatten()` will run forever if the iterator repeatedly produces an `Err` [INFO] [stdout] --> src/day24.rs:15:28 [INFO] [stdout] | [INFO] [stdout] 15 | 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/day24.rs:15:2 [INFO] [stdout] | [INFO] [stdout] 15 | 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: length comparison to zero [INFO] [stdout] --> src/day24.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | if options.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `options.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/day24.rs:15:28 [INFO] [stdout] | [INFO] [stdout] 15 | 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/day24.rs:15:2 [INFO] [stdout] | [INFO] [stdout] 15 | 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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day24.rs:41:26 [INFO] [stdout] | [INFO] [stdout] 41 | recur(0, &mut cur_list, &parts) [INFO] [stdout] | ^^^^^^ help: change this to: `parts` [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/day24.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | if options.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `options.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/day24.rs:47:5 [INFO] [stdout] | [INFO] [stdout] 47 | if options.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `options.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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day24.rs:41:26 [INFO] [stdout] | [INFO] [stdout] 41 | recur(0, &mut cur_list, &parts) [INFO] [stdout] | ^^^^^^ help: change this to: `parts` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day24.rs:67:27 [INFO] [stdout] | [INFO] [stdout] 67 | recur2(0, &mut cur_list, &parts).1 [INFO] [stdout] | ^^^^^^ help: change this to: `parts` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/day24.rs:47:5 [INFO] [stdout] | [INFO] [stdout] 47 | if options.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `options.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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day24.rs:67:27 [INFO] [stdout] | [INFO] [stdout] 67 | recur2(0, &mut cur_list, &parts).1 [INFO] [stdout] | ^^^^^^ help: change this to: `parts` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> src/day25.rs:9:3 [INFO] [stdout] | [INFO] [stdout] 9 | / if !tape.contains_key(&pos) { [INFO] [stdout] 10 | | tape.insert(pos, false); [INFO] [stdout] 11 | | } [INFO] [stdout] | |_________^ help: try: `tape.entry(pos).or_insert(false);` [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: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> src/day25.rs:9:3 [INFO] [stdout] | [INFO] [stdout] 9 | / if !tape.contains_key(&pos) { [INFO] [stdout] 10 | | tape.insert(pos, false); [INFO] [stdout] 11 | | } [INFO] [stdout] | |_________^ help: try: `tape.entry(pos).or_insert(false);` [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: unused `std::result::Result` that must be used [INFO] [stdout] --> src/day1.rs:8:2 [INFO] [stdout] | [INFO] [stdout] 8 | File::open(path).unwrap().read_to_string(&mut fstr); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 8 | let _ = File::open(path).unwrap().read_to_string(&mut fstr); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/day5.rs:8:2 [INFO] [stdout] | [INFO] [stdout] 8 | File::open(path).unwrap().read_to_string(&mut fstr); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 8 | let _ = File::open(path).unwrap().read_to_string(&mut fstr); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/day1.rs:8:2 [INFO] [stdout] | [INFO] [stdout] 8 | File::open(path).unwrap().read_to_string(&mut fstr); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 8 | let _ = File::open(path).unwrap().read_to_string(&mut fstr); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/day6.rs:9:2 [INFO] [stdout] | [INFO] [stdout] 9 | File::open(path).unwrap().read_to_string(&mut fstr); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 9 | let _ = File::open(path).unwrap().read_to_string(&mut fstr); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/day5.rs:8:2 [INFO] [stdout] | [INFO] [stdout] 8 | File::open(path).unwrap().read_to_string(&mut fstr); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 8 | let _ = File::open(path).unwrap().read_to_string(&mut fstr); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/day9.rs:8:2 [INFO] [stdout] | [INFO] [stdout] 8 | File::open(path).unwrap().read_to_string(&mut fstr); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 8 | let _ = File::open(path).unwrap().read_to_string(&mut fstr); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/day6.rs:9:2 [INFO] [stdout] | [INFO] [stdout] 9 | File::open(path).unwrap().read_to_string(&mut fstr); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 9 | let _ = File::open(path).unwrap().read_to_string(&mut fstr); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/day10.rs:9:2 [INFO] [stdout] | [INFO] [stdout] 9 | File::open(path).unwrap().read_to_string(&mut fstr); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 9 | let _ = File::open(path).unwrap().read_to_string(&mut fstr); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/day10.rs:16:2 [INFO] [stdout] | [INFO] [stdout] 16 | File::open(path).unwrap().read_to_string(&mut fstr); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 16 | let _ = File::open(path).unwrap().read_to_string(&mut fstr); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/day11.rs:9:2 [INFO] [stdout] | [INFO] [stdout] 9 | File::open(path).unwrap().read_to_string(&mut fstr); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 9 | let _ = File::open(path).unwrap().read_to_string(&mut fstr); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/day9.rs:8:2 [INFO] [stdout] | [INFO] [stdout] 8 | File::open(path).unwrap().read_to_string(&mut fstr); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 8 | let _ = File::open(path).unwrap().read_to_string(&mut fstr); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/day10.rs:9:2 [INFO] [stdout] | [INFO] [stdout] 9 | File::open(path).unwrap().read_to_string(&mut fstr); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 9 | let _ = File::open(path).unwrap().read_to_string(&mut fstr); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/day10.rs:16:2 [INFO] [stdout] | [INFO] [stdout] 16 | File::open(path).unwrap().read_to_string(&mut fstr); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 16 | let _ = File::open(path).unwrap().read_to_string(&mut fstr); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/day11.rs:9:2 [INFO] [stdout] | [INFO] [stdout] 9 | File::open(path).unwrap().read_to_string(&mut fstr); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 9 | let _ = File::open(path).unwrap().read_to_string(&mut fstr); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/day16.rs:37:2 [INFO] [stdout] | [INFO] [stdout] 37 | File::open(path).unwrap().read_to_string(&mut fstr); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 37 | let _ = File::open(path).unwrap().read_to_string(&mut fstr); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/day16.rs:37:2 [INFO] [stdout] | [INFO] [stdout] 37 | File::open(path).unwrap().read_to_string(&mut fstr); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 37 | let _ = File::open(path).unwrap().read_to_string(&mut fstr); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.76s [INFO] running `Command { std: "docker" "inspect" "8db6db01e052921fcab574f6921066f913f29be2c324fc688be4cb3463e271d8", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "8db6db01e052921fcab574f6921066f913f29be2c324fc688be4cb3463e271d8", kill_on_drop: false }` [INFO] [stdout] 8db6db01e052921fcab574f6921066f913f29be2c324fc688be4cb3463e271d8