[INFO] cloning repository https://github.com/j9d/advent-25 [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/j9d/advent-25" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fj9d%2Fadvent-25", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fj9d%2Fadvent-25'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 5d6d7946274d0e9674b58a9d745e6b129dfb6f88 [INFO] linting j9d/advent-25 against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fj9d%2Fadvent-25" "/workspace/builds/worker-4-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-4-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/j9d/advent-25 [INFO] finished tweaking git repo https://github.com/j9d/advent-25 [INFO] tweaked toml for git repo https://github.com/j9d/advent-25 written to /workspace/builds/worker-4-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/j9d/advent-25 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/j9d/advent-25 already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-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] 211a981e52fdbde156ceeed03459db663f9bff8d1efc3c5178c5c9975f10cfc2 [INFO] running `Command { std: "docker" "start" "-a" "211a981e52fdbde156ceeed03459db663f9bff8d1efc3c5178c5c9975f10cfc2", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "211a981e52fdbde156ceeed03459db663f9bff8d1efc3c5178c5c9975f10cfc2", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "211a981e52fdbde156ceeed03459db663f9bff8d1efc3c5178c5c9975f10cfc2", kill_on_drop: false }` [INFO] [stdout] 211a981e52fdbde156ceeed03459db663f9bff8d1efc3c5178c5c9975f10cfc2 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-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] bf927825b294275993a9623ad55666ce54abb4e0e59deabcb6494a6967c7b1cf [INFO] running `Command { std: "docker" "start" "-a" "bf927825b294275993a9623ad55666ce54abb4e0e59deabcb6494a6967c7b1cf", kill_on_drop: false }` [INFO] [stderr] Checking advent-25 v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/bin/1.rs:20:24 [INFO] [stdout] | [INFO] [stdout] 20 | if code < 0 && !(prev == 0) { [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `(prev != 0)` [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: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/bin/1.rs:9:31 [INFO] [stdout] | [INFO] [stdout] 9 | for (_, i) in input.iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_enumerate_index [INFO] [stdout] = note: `#[warn(clippy::unused_enumerate_index)]` on by default [INFO] [stdout] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 9 - for (_, i) in input.iter().enumerate() { [INFO] [stdout] 9 + for i in input.iter() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/bin/5.rs:24:12 [INFO] [stdout] | [INFO] [stdout] 24 | if line.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `line.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this call to `from_str_radix` can be replaced with a call to `str::parse` [INFO] [stdout] --> src/bin/5.rs:28:62 [INFO] [stdout] | [INFO] [stdout] 28 | let range: Vec = line.split("-").map(|item| u64::from_str_radix(item, 10).unwrap()).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `item.parse::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_str_radix_10 [INFO] [stdout] = note: `#[warn(clippy::from_str_radix_10)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this call to `from_str_radix` can be replaced with a call to `str::parse` [INFO] [stdout] --> src/bin/5.rs:31:24 [INFO] [stdout] | [INFO] [stdout] 31 | foods.push(u64::from_str_radix(&line, 10).unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `line.parse::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_str_radix_10 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/bin/5.rs:38:12 [INFO] [stdout] | [INFO] [stdout] 38 | if fresh_ranges.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!fresh_ranges.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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/4.rs:3:24 [INFO] [stdout] | [INFO] [stdout] 3 | fn get_surrounds(grid: &Vec>, current_row: isize, current_col: isize) -> Vec<(char, usize, usize)> { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 3 - fn get_surrounds(grid: &Vec>, current_row: isize, current_col: isize) -> Vec<(char, usize, usize)> { [INFO] [stdout] 3 + fn get_surrounds(grid: &[Vec], current_row: isize, current_col: isize) -> Vec<(char, usize, usize)> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/4.rs:33:47 [INFO] [stdout] | [INFO] [stdout] 33 | let surrounds = get_surrounds(&grid, r.try_into().unwrap(), c.try_into().unwrap()); [INFO] [stdout] | ^^^^^ help: change this to: `grid` [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/bin/3.rs:8:41 [INFO] [stdout] | [INFO] [stdout] 8 | let start_point: usize = if joltage.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!joltage.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: useless conversion to the same type: `usize` [INFO] [stdout] --> src/bin/3.rs:9:35 [INFO] [stdout] | [INFO] [stdout] 9 | let last: usize = joltage.last().unwrap().1.try_into().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider removing `.try_into()` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this call to `from_str_radix` can be replaced with a call to `str::parse` [INFO] [stdout] --> src/bin/3.rs:22:5 [INFO] [stdout] | [INFO] [stdout] 22 | u64::from_str_radix(&joltage_str, 10).unwrap() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `joltage_str.parse::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_str_radix_10 [INFO] [stdout] = note: `#[warn(clippy::from_str_radix_10)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this call to `from_str_radix` can be replaced with a call to `str::parse` [INFO] [stdout] --> src/bin/2.rs:8:10 [INFO] [stdout] | [INFO] [stdout] 8 | (u64::from_str_radix(bounds[0], 10).unwrap(), u64::from_str_radix(bounds[1], 10).unwrap()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `bounds[0].parse::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_str_radix_10 [INFO] [stdout] = note: `#[warn(clippy::from_str_radix_10)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this call to `from_str_radix` can be replaced with a call to `str::parse` [INFO] [stdout] --> src/bin/2.rs:8:55 [INFO] [stdout] | [INFO] [stdout] 8 | (u64::from_str_radix(bounds[0], 10).unwrap(), u64::from_str_radix(bounds[1], 10).unwrap()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `bounds[1].parse::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_str_radix_10 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/bin/5.rs:24:12 [INFO] [stdout] | [INFO] [stdout] 24 | if line.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `line.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this call to `from_str_radix` can be replaced with a call to `str::parse` [INFO] [stdout] --> src/bin/5.rs:28:62 [INFO] [stdout] | [INFO] [stdout] 28 | let range: Vec = line.split("-").map(|item| u64::from_str_radix(item, 10).unwrap()).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `item.parse::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_str_radix_10 [INFO] [stdout] = note: `#[warn(clippy::from_str_radix_10)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this call to `from_str_radix` can be replaced with a call to `str::parse` [INFO] [stdout] --> src/bin/5.rs:31:24 [INFO] [stdout] | [INFO] [stdout] 31 | foods.push(u64::from_str_radix(&line, 10).unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `line.parse::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_str_radix_10 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/bin/5.rs:38:12 [INFO] [stdout] | [INFO] [stdout] 38 | if fresh_ranges.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!fresh_ranges.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: called `unwrap` on `potential_duplicate_position` after checking its variant with `is_none` [INFO] [stdout] --> src/bin/7.rs:69:38 [INFO] [stdout] | [INFO] [stdout] 65 | if potential_duplicate_position.is_none() { [INFO] [stdout] | ----------------------------------------- help: try: `if let Some() = potential_duplicate_position` [INFO] [stdout] ... [INFO] [stdout] 69 | .get_mut(potential_duplicate_position.unwrap()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `duplicate_index` after checking its variant with `is_none` [INFO] [stdout] --> src/bin/7.rs:86:64 [INFO] [stdout] | [INFO] [stdout] 83 | if duplicate_index.is_none() { [INFO] [stdout] | ---------------------------- help: try: `if let Some() = duplicate_index` [INFO] [stdout] ... [INFO] [stdout] 86 | let mut duplicate = newer_particles.remove(duplicate_index.unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/bin/7.rs:22:12 [INFO] [stdout] | [INFO] [stdout] 22 | if splitters.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!splitters.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/bin/7.rs:50:12 [INFO] [stdout] | [INFO] [stdout] 50 | if splitters.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!splitters.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: deref which would be done by auto-deref [INFO] [stdout] --> src/bin/7.rs:58:46 [INFO] [stdout] | [INFO] [stdout] 58 | .position(|particle| (*particle).0 == splitter.0) [INFO] [stdout] | ^^^^^^^^^^^ help: try: `particle` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] = note: `#[warn(clippy::explicit_auto_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/bin/3.rs:8:41 [INFO] [stdout] | [INFO] [stdout] 8 | let start_point: usize = if joltage.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!joltage.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: useless conversion to the same type: `usize` [INFO] [stdout] --> src/bin/3.rs:9:35 [INFO] [stdout] | [INFO] [stdout] 9 | let last: usize = joltage.last().unwrap().1.try_into().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider removing `.try_into()` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this call to `from_str_radix` can be replaced with a call to `str::parse` [INFO] [stdout] --> src/bin/3.rs:22:5 [INFO] [stdout] | [INFO] [stdout] 22 | u64::from_str_radix(&joltage_str, 10).unwrap() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `joltage_str.parse::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_str_radix_10 [INFO] [stdout] = note: `#[warn(clippy::from_str_radix_10)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/bin/1.rs:20:24 [INFO] [stdout] | [INFO] [stdout] 20 | if code < 0 && !(prev == 0) { [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `(prev != 0)` [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: deref which would be done by auto-deref [INFO] [stdout] --> src/bin/7.rs:71:25 [INFO] [stdout] | [INFO] [stdout] 71 | (*duplicate).1 += splitter.1; [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `duplicate` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/bin/1.rs:9:31 [INFO] [stdout] | [INFO] [stdout] 9 | for (_, i) in input.iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_enumerate_index [INFO] [stdout] = note: `#[warn(clippy::unused_enumerate_index)]` on by default [INFO] [stdout] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 9 - for (_, i) in input.iter().enumerate() { [INFO] [stdout] 9 + for i in input.iter() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `(usize, usize)` which implements the `Copy` trait [INFO] [stdout] --> src/bin/7.rs:84:42 [INFO] [stdout] | [INFO] [stdout] 84 | newer_particles.push(particle.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `particle` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this manual char comparison can be written more succinctly [INFO] [stdout] --> src/bin/6.rs:7:48 [INFO] [stdout] | [INFO] [stdout] 7 | let mut spaces: Vec<&str> = input[4].split(|item| item == '*' || item == '+').collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using an array of `char`: `['*', '+']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_pattern_char_comparison [INFO] [stdout] = note: `#[warn(clippy::manual_pattern_char_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this call to `from_str_radix` can be replaced with a call to `str::parse` [INFO] [stdout] --> src/bin/6.rs:31:30 [INFO] [stdout] | [INFO] [stdout] 31 | inputs.iter().map(|item| u64::from_str_radix(item.trim(), 10).unwrap()).collect::>() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `item.trim().parse::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_str_radix_10 [INFO] [stdout] = note: `#[warn(clippy::from_str_radix_10)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is only used to index `iters` [INFO] [stdout] --> src/bin/6.rs:41:18 [INFO] [stdout] | [INFO] [stdout] 41 | for j in 0..iters.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] 41 - for j in 0..iters.len() { [INFO] [stdout] 41 + for in &mut iters { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this call to `from_str_radix` can be replaced with a call to `str::parse` [INFO] [stdout] --> src/bin/6.rs:51:13 [INFO] [stdout] | [INFO] [stdout] 51 | / u64::from_str_radix( [INFO] [stdout] 52 | | filtered_figure [INFO] [stdout] 53 | | .iter() [INFO] [stdout] 54 | | .map(|i| i.as_str()) [INFO] [stdout] ... | [INFO] [stdout] 58 | | 10 [INFO] [stdout] 59 | | ) [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_str_radix_10 [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 51 ~ filtered_figure [INFO] [stdout] 52 + .iter() [INFO] [stdout] 53 + .map(|i| i.as_str()) [INFO] [stdout] 54 + .collect::>() [INFO] [stdout] 55 + .join("") [INFO] [stdout] 56 + .as_str().parse::() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `equations` [INFO] [stdout] --> src/bin/6.rs:73:14 [INFO] [stdout] | [INFO] [stdout] 73 | for i in 0..equations[0].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] 73 - for i in 0..equations[0].len() { [INFO] [stdout] 73 + for in equations.iter().take(equations[0].len()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is only used to index `equations` [INFO] [stdout] --> src/bin/6.rs:75:18 [INFO] [stdout] | [INFO] [stdout] 75 | for j in 0..=3 { [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] 75 - for j in 0..=3 { [INFO] [stdout] 75 + for in equations.iter().take(3 + 1) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.fold` can be written more succinctly using another method [INFO] [stdout] --> src/bin/6.rs:80:33 [INFO] [stdout] | [INFO] [stdout] 80 | equation_1.0.iter().fold(0, |acc, elem| acc + elem) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `sum::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fold [INFO] [stdout] = note: `#[warn(clippy::unnecessary_fold)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.fold` can be written more succinctly using another method [INFO] [stdout] --> src/bin/6.rs:82:33 [INFO] [stdout] | [INFO] [stdout] 82 | equation_1.0.iter().fold(1, |acc, elem| acc * elem) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `product::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fold [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.fold` can be written more succinctly using another method [INFO] [stdout] --> src/bin/6.rs:87:33 [INFO] [stdout] | [INFO] [stdout] 87 | equation_2.0.iter().fold(0, |acc, elem| acc + elem) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `sum::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fold [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.fold` can be written more succinctly using another method [INFO] [stdout] --> src/bin/6.rs:89:33 [INFO] [stdout] | [INFO] [stdout] 89 | equation_2.0.iter().fold(1, |acc, elem| acc * elem) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `product::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fold [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this call to `from_str_radix` can be replaced with a call to `str::parse` [INFO] [stdout] --> src/bin/2.rs:8:10 [INFO] [stdout] | [INFO] [stdout] 8 | (u64::from_str_radix(bounds[0], 10).unwrap(), u64::from_str_radix(bounds[1], 10).unwrap()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `bounds[0].parse::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_str_radix_10 [INFO] [stdout] = note: `#[warn(clippy::from_str_radix_10)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this call to `from_str_radix` can be replaced with a call to `str::parse` [INFO] [stdout] --> src/bin/2.rs:8:55 [INFO] [stdout] | [INFO] [stdout] 8 | (u64::from_str_radix(bounds[0], 10).unwrap(), u64::from_str_radix(bounds[1], 10).unwrap()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `bounds[1].parse::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_str_radix_10 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this manual char comparison can be written more succinctly [INFO] [stdout] --> src/bin/6.rs:7:48 [INFO] [stdout] | [INFO] [stdout] 7 | let mut spaces: Vec<&str> = input[4].split(|item| item == '*' || item == '+').collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using an array of `char`: `['*', '+']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_pattern_char_comparison [INFO] [stdout] = note: `#[warn(clippy::manual_pattern_char_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this call to `from_str_radix` can be replaced with a call to `str::parse` [INFO] [stdout] --> src/bin/6.rs:31:30 [INFO] [stdout] | [INFO] [stdout] 31 | inputs.iter().map(|item| u64::from_str_radix(item.trim(), 10).unwrap()).collect::>() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `item.trim().parse::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_str_radix_10 [INFO] [stdout] = note: `#[warn(clippy::from_str_radix_10)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is only used to index `iters` [INFO] [stdout] --> src/bin/6.rs:41:18 [INFO] [stdout] | [INFO] [stdout] 41 | for j in 0..iters.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] 41 - for j in 0..iters.len() { [INFO] [stdout] 41 + for in &mut iters { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `potential_duplicate_position` after checking its variant with `is_none` [INFO] [stdout] --> src/bin/7.rs:69:38 [INFO] [stdout] | [INFO] [stdout] 65 | if potential_duplicate_position.is_none() { [INFO] [stdout] | ----------------------------------------- help: try: `if let Some() = potential_duplicate_position` [INFO] [stdout] ... [INFO] [stdout] 69 | .get_mut(potential_duplicate_position.unwrap()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `duplicate_index` after checking its variant with `is_none` [INFO] [stdout] --> src/bin/7.rs:86:64 [INFO] [stdout] | [INFO] [stdout] 83 | if duplicate_index.is_none() { [INFO] [stdout] | ---------------------------- help: try: `if let Some() = duplicate_index` [INFO] [stdout] ... [INFO] [stdout] 86 | let mut duplicate = newer_particles.remove(duplicate_index.unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this call to `from_str_radix` can be replaced with a call to `str::parse` [INFO] [stdout] --> src/bin/6.rs:51:13 [INFO] [stdout] | [INFO] [stdout] 51 | / u64::from_str_radix( [INFO] [stdout] 52 | | filtered_figure [INFO] [stdout] 53 | | .iter() [INFO] [stdout] 54 | | .map(|i| i.as_str()) [INFO] [stdout] ... | [INFO] [stdout] 58 | | 10 [INFO] [stdout] 59 | | ) [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_str_radix_10 [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 51 ~ filtered_figure [INFO] [stdout] 52 + .iter() [INFO] [stdout] 53 + .map(|i| i.as_str()) [INFO] [stdout] 54 + .collect::>() [INFO] [stdout] 55 + .join("") [INFO] [stdout] 56 + .as_str().parse::() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `equations` [INFO] [stdout] --> src/bin/6.rs:73:14 [INFO] [stdout] | [INFO] [stdout] 73 | for i in 0..equations[0].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] 73 - for i in 0..equations[0].len() { [INFO] [stdout] 73 + for in equations.iter().take(equations[0].len()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is only used to index `equations` [INFO] [stdout] --> src/bin/6.rs:75:18 [INFO] [stdout] | [INFO] [stdout] 75 | for j in 0..=3 { [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] 75 - for j in 0..=3 { [INFO] [stdout] 75 + for in equations.iter().take(3 + 1) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.fold` can be written more succinctly using another method [INFO] [stdout] --> src/bin/6.rs:80:33 [INFO] [stdout] | [INFO] [stdout] 80 | equation_1.0.iter().fold(0, |acc, elem| acc + elem) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `sum::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fold [INFO] [stdout] = note: `#[warn(clippy::unnecessary_fold)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.fold` can be written more succinctly using another method [INFO] [stdout] --> src/bin/6.rs:82:33 [INFO] [stdout] | [INFO] [stdout] 82 | equation_1.0.iter().fold(1, |acc, elem| acc * elem) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `product::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fold [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.fold` can be written more succinctly using another method [INFO] [stdout] --> src/bin/6.rs:87:33 [INFO] [stdout] | [INFO] [stdout] 87 | equation_2.0.iter().fold(0, |acc, elem| acc + elem) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `sum::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fold [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/bin/7.rs:22:12 [INFO] [stdout] | [INFO] [stdout] 22 | if splitters.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!splitters.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.fold` can be written more succinctly using another method [INFO] [stdout] --> src/bin/6.rs:89:33 [INFO] [stdout] | [INFO] [stdout] 89 | equation_2.0.iter().fold(1, |acc, elem| acc * elem) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `product::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fold [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/bin/7.rs:50:12 [INFO] [stdout] | [INFO] [stdout] 50 | if splitters.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!splitters.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: deref which would be done by auto-deref [INFO] [stdout] --> src/bin/7.rs:58:46 [INFO] [stdout] | [INFO] [stdout] 58 | .position(|particle| (*particle).0 == splitter.0) [INFO] [stdout] | ^^^^^^^^^^^ help: try: `particle` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] = note: `#[warn(clippy::explicit_auto_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/bin/7.rs:71:25 [INFO] [stdout] | [INFO] [stdout] 71 | (*duplicate).1 += splitter.1; [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `duplicate` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/4.rs:3:24 [INFO] [stdout] | [INFO] [stdout] 3 | fn get_surrounds(grid: &Vec>, current_row: isize, current_col: isize) -> Vec<(char, usize, usize)> { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 3 - fn get_surrounds(grid: &Vec>, current_row: isize, current_col: isize) -> Vec<(char, usize, usize)> { [INFO] [stdout] 3 + fn get_surrounds(grid: &[Vec], current_row: isize, current_col: isize) -> Vec<(char, usize, usize)> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `(usize, usize)` which implements the `Copy` trait [INFO] [stdout] --> src/bin/7.rs:84:42 [INFO] [stdout] | [INFO] [stdout] 84 | newer_particles.push(particle.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `particle` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/4.rs:33:47 [INFO] [stdout] | [INFO] [stdout] 33 | let surrounds = get_surrounds(&grid, r.try_into().unwrap(), c.try_into().unwrap()); [INFO] [stdout] | ^^^^^ help: change this to: `grid` [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] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.53s [INFO] running `Command { std: "docker" "inspect" "bf927825b294275993a9623ad55666ce54abb4e0e59deabcb6494a6967c7b1cf", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "bf927825b294275993a9623ad55666ce54abb4e0e59deabcb6494a6967c7b1cf", kill_on_drop: false }` [INFO] [stdout] bf927825b294275993a9623ad55666ce54abb4e0e59deabcb6494a6967c7b1cf