[INFO] cloning repository https://github.com/Lollyde/aoc_2025 [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/Lollyde/aoc_2025" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FLollyde%2Faoc_2025", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FLollyde%2Faoc_2025'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 5b13b7db5a6c7f6e453a9481287f250044780071 [INFO] linting Lollyde/aoc_2025 against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FLollyde%2Faoc_2025" "/workspace/builds/worker-3-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-3-tc1/source'... [INFO] [stderr] done. [INFO] removed /workspace/builds/worker-3-tc1/source/.cargo/config.toml [INFO] started tweaking git repo https://github.com/Lollyde/aoc_2025 [INFO] finished tweaking git repo https://github.com/Lollyde/aoc_2025 [INFO] tweaked toml for git repo https://github.com/Lollyde/aoc_2025 written to /workspace/builds/worker-3-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/Lollyde/aoc_2025 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/Lollyde/aoc_2025 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-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-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] 77cdc986941bae3b0c4d4fe848149864cbdb8fff78dcc524a84113fada42f8a0 [INFO] running `Command { std: "docker" "start" "-a" "77cdc986941bae3b0c4d4fe848149864cbdb8fff78dcc524a84113fada42f8a0", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "77cdc986941bae3b0c4d4fe848149864cbdb8fff78dcc524a84113fada42f8a0", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "77cdc986941bae3b0c4d4fe848149864cbdb8fff78dcc524a84113fada42f8a0", kill_on_drop: false }` [INFO] [stdout] 77cdc986941bae3b0c4d4fe848149864cbdb8fff78dcc524a84113fada42f8a0 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-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] 154c01829a78ed5325ad04d6372b9d5fcdfc15ff1490ad92e5eaeea9382d1c55 [INFO] running `Command { std: "docker" "start" "-a" "154c01829a78ed5325ad04d6372b9d5fcdfc15ff1490ad92e5eaeea9382d1c55", kill_on_drop: false }` [INFO] [stderr] Checking num-integer v0.1.46 [INFO] [stderr] Checking pico-args v0.5.0 [INFO] [stderr] Checking tinyjson v2.5.1 [INFO] [stderr] Checking rayon v1.11.0 [INFO] [stderr] Checking ndarray v0.17.1 [INFO] [stderr] Checking sprs v0.11.4 [INFO] [stderr] Checking microlp v0.2.11 [INFO] [stderr] Checking advent_of_code v0.12.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: consider using `sort_unstable_by_key` [INFO] [stdout] --> src/template/timings.rs:54:9 [INFO] [stdout] | [INFO] [stdout] 54 | data.sort_unstable_by(|a, b| a.day.cmp(&b.day)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] = note: `#[warn(clippy::unnecessary_sort_by)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 54 - data.sort_unstable_by(|a, b| a.day.cmp(&b.day)); [INFO] [stdout] 54 + data.sort_unstable_by_key(|a| a.day); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u32` -> `u32`) [INFO] [stdout] --> src/numhelpers/mod.rs:23:9 [INFO] [stdout] | [INFO] [stdout] 23 | self.checked_ilog10().unwrap_or(0) as u32 + 1 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.checked_ilog10().unwrap_or(0)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_unstable_by_key` [INFO] [stdout] --> src/template/timings.rs:54:9 [INFO] [stdout] | [INFO] [stdout] 54 | data.sort_unstable_by(|a, b| a.day.cmp(&b.day)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] = note: `#[warn(clippy::unnecessary_sort_by)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 54 - data.sort_unstable_by(|a, b| a.day.cmp(&b.day)); [INFO] [stdout] 54 + data.sort_unstable_by_key(|a| a.day); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u32` -> `u32`) [INFO] [stdout] --> src/numhelpers/mod.rs:23:9 [INFO] [stdout] | [INFO] [stdout] 23 | self.checked_ilog10().unwrap_or(0) as u32 + 1 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.checked_ilog10().unwrap_or(0)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/bin/09.rs:49:13 [INFO] [stdout] | [INFO] [stdout] 49 | / ( [INFO] [stdout] 50 | | // AND the points arent outside of the bounds of the square [INFO] [stdout] 51 | | !(line.from >= bound_max && line.to >= bound_max) && [INFO] [stdout] 52 | | !(line.from <= bound_min && line.to <= bound_min) [INFO] [stdout] 53 | | ) [INFO] [stdout] | |_____________^ help: try: `!(line.from >= bound_max && line.to >= bound_max || line.from <= bound_min && line.to <= bound_min)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/bin/09.rs:49:13 [INFO] [stdout] | [INFO] [stdout] 49 | / ( [INFO] [stdout] 50 | | // AND the points arent outside of the bounds of the square [INFO] [stdout] 51 | | !(line.from >= bound_max && line.to >= bound_max) && [INFO] [stdout] 52 | | !(line.from <= bound_min && line.to <= bound_min) [INFO] [stdout] 53 | | ) [INFO] [stdout] | |_____________^ help: try: `!(line.from >= bound_max && line.to >= bound_max || line.from <= bound_min && line.to <= bound_min)` [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: called `unwrap` on `start` after checking its variant with `is_some` [INFO] [stdout] --> src/bin/05.rs:51:24 [INFO] [stdout] | [INFO] [stdout] 49 | if start.is_some() && end.is_some() { [INFO] [stdout] | --------------- the check is happening here [INFO] [stdout] 50 | Some(FreshRange { [INFO] [stdout] 51 | start: start.unwrap(), [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `if let` or `match` [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: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/bin/06.rs:11:48 [INFO] [stdout] | [INFO] [stdout] 11 | fn get_instructions(input: &Vec>) -> Vec> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::str::Split<'_, char>` [INFO] [stdout] --> src/bin/09.rs:93:15 [INFO] [stdout] | [INFO] [stdout] 93 | match s.split(',') [INFO] [stdout] | _______________^ [INFO] [stdout] 94 | | .into_iter() [INFO] [stdout] | |____________________________^ help: consider removing `.into_iter()`: `s.split(',')` [INFO] [stdout] | [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: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/bin/06.rs:13:32 [INFO] [stdout] | [INFO] [stdout] 13 | line.iter().map(|e| -> Box<&dyn Fn(&mut u64, &u64)> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> src/bin/06.rs:14:13 [INFO] [stdout] | [INFO] [stdout] 14 | / match e { [INFO] [stdout] 15 | | &"+" => Box::new(&add), [INFO] [stdout] 16 | | &"*" => Box::new(&mul), [INFO] [stdout] 17 | | _ => unreachable!() [INFO] [stdout] 18 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] = note: `#[warn(clippy::match_ref_pats)]` on by default [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 14 ~ match *e { [INFO] [stdout] 15 ~ "+" => Box::new(&add), [INFO] [stdout] 16 ~ "*" => Box::new(&mul), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/bin/09.rs:112:10 [INFO] [stdout] | [INFO] [stdout] 112 | .map(|e| { [INFO] [stdout] | __________^ [INFO] [stdout] 113 | | points [INFO] [stdout] 114 | | .iter() [INFO] [stdout] 115 | | .map(|p| p.area_with(e)) [INFO] [stdout] 116 | | .collect::>() [INFO] [stdout] 117 | | }) [INFO] [stdout] 118 | | .flatten() [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] = note: `#[warn(clippy::map_flatten)]` on by default [INFO] [stdout] help: try replacing `map` with `flat_map` and remove the `.flatten()` [INFO] [stdout] | [INFO] [stdout] 112 ~ .flat_map(|e| { [INFO] [stdout] 113 + points [INFO] [stdout] 114 + .iter() [INFO] [stdout] 115 + .map(|p| p.area_with(e)) [INFO] [stdout] 116 + .collect::>() [INFO] [stdout] 117 + }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.fold` can be written more succinctly using another method [INFO] [stdout] --> src/bin/06.rs:50:37 [INFO] [stdout] | [INFO] [stdout] 50 | false => buf.iter().fold(1u64, |acc, e| acc * e), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `product::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fold [INFO] [stdout] = note: `#[warn(clippy::unnecessary_fold)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> src/bin/06.rs:58:13 [INFO] [stdout] | [INFO] [stdout] 58 | / match c { [INFO] [stdout] 59 | | &&'\n' => {}, [INFO] [stdout] 60 | | &&' ' => {}, [INFO] [stdout] 61 | | &&'+' => { [INFO] [stdout] ... | [INFO] [stdout] 73 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 58 ~ match *c { [INFO] [stdout] 59 ~ &'\n' => {}, [INFO] [stdout] 60 ~ &' ' => {}, [INFO] [stdout] 61 ~ &'+' => { [INFO] [stdout] 62 | is_add = true; [INFO] [stdout] 63 | instr_set = true; [INFO] [stdout] 64 | }, [INFO] [stdout] 65 ~ &'*' => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.fold` can be written more succinctly using another method [INFO] [stdout] --> src/bin/06.rs:79:29 [INFO] [stdout] | [INFO] [stdout] 79 | false => buf.iter().fold(1u64, |acc, e| acc * e), [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: called `unwrap` on `end` after checking its variant with `is_some` [INFO] [stdout] --> src/bin/05.rs:52:22 [INFO] [stdout] | [INFO] [stdout] 49 | if start.is_some() && end.is_some() { [INFO] [stdout] | ------------- the check is happening here [INFO] [stdout] ... [INFO] [stdout] 52 | end: end.unwrap(), [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `if let` or `match` [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: useless conversion to the same type: `std::str::Split<'_, char>` [INFO] [stdout] --> src/bin/09.rs:93:15 [INFO] [stdout] | [INFO] [stdout] 93 | match s.split(',') [INFO] [stdout] | _______________^ [INFO] [stdout] 94 | | .into_iter() [INFO] [stdout] | |____________________________^ help: consider removing `.into_iter()`: `s.split(',')` [INFO] [stdout] | [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: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/bin/02.rs:16:8 [INFO] [stdout] | [INFO] [stdout] 16 | if (input.checked_ilog10().unwrap_or(0) + 1) as usize % len != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `!((input.checked_ilog10().unwrap_or(0) + 1) as usize).is_multiple_of(len)` [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/bin/02.rs:28:8 [INFO] [stdout] | [INFO] [stdout] 28 | if len%2 != 0 { [INFO] [stdout] | ^^^^^^^^^^ help: replace with: `!len.is_multiple_of(2)` [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: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/bin/09.rs:112:10 [INFO] [stdout] | [INFO] [stdout] 112 | .map(|e| { [INFO] [stdout] | __________^ [INFO] [stdout] 113 | | points [INFO] [stdout] 114 | | .iter() [INFO] [stdout] 115 | | .map(|p| p.area_with(e)) [INFO] [stdout] 116 | | .collect::>() [INFO] [stdout] 117 | | }) [INFO] [stdout] 118 | | .flatten() [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] = note: `#[warn(clippy::map_flatten)]` on by default [INFO] [stdout] help: try replacing `map` with `flat_map` and remove the `.flatten()` [INFO] [stdout] | [INFO] [stdout] 112 ~ .flat_map(|e| { [INFO] [stdout] 113 + points [INFO] [stdout] 114 + .iter() [INFO] [stdout] 115 + .map(|p| p.area_with(e)) [INFO] [stdout] 116 + .collect::>() [INFO] [stdout] 117 + }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::str::Lines<'_>` [INFO] [stdout] --> src/bin/01.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | input.to_ascii_lowercase().lines().into_iter() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `input.to_ascii_lowercase().lines()` [INFO] [stdout] | [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 multiplication by -1 can be written more succinctly [INFO] [stdout] --> src/bin/01.rs:10:34 [INFO] [stdout] | [INFO] [stdout] 10 | false => s.strip_prefix("l").unwrap().parse::().ok().unwrap() * -1, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `-s.strip_prefix("l").unwrap().parse::().ok().unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] = note: `#[warn(clippy::neg_multiply)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `start` after checking its variant with `is_some` [INFO] [stdout] --> src/bin/05.rs:51:24 [INFO] [stdout] | [INFO] [stdout] 49 | if start.is_some() && end.is_some() { [INFO] [stdout] | --------------- the check is happening here [INFO] [stdout] 50 | Some(FreshRange { [INFO] [stdout] 51 | start: start.unwrap(), [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `if let` or `match` [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 `end` after checking its variant with `is_some` [INFO] [stdout] --> src/bin/05.rs:52:22 [INFO] [stdout] | [INFO] [stdout] 49 | if start.is_some() && end.is_some() { [INFO] [stdout] | ------------- the check is happening here [INFO] [stdout] ... [INFO] [stdout] 52 | end: end.unwrap(), [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `if let` or `match` [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: useless conversion to the same type: `std::str::Lines<'_>` [INFO] [stdout] --> src/bin/01.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | input.to_ascii_lowercase().lines().into_iter() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `input.to_ascii_lowercase().lines()` [INFO] [stdout] | [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 multiplication by -1 can be written more succinctly [INFO] [stdout] --> src/bin/01.rs:10:34 [INFO] [stdout] | [INFO] [stdout] 10 | false => s.strip_prefix("l").unwrap().parse::().ok().unwrap() * -1, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `-s.strip_prefix("l").unwrap().parse::().ok().unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] = note: `#[warn(clippy::neg_multiply)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.fold` can be written more succinctly using another method [INFO] [stdout] --> src/bin/12.rs:16:18 [INFO] [stdout] | [INFO] [stdout] 16 | .fold(1, |a, b| a*b); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `product()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fold [INFO] [stdout] = note: `#[warn(clippy::unnecessary_fold)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.fold` can be written more succinctly using another method [INFO] [stdout] --> src/bin/12.rs:16:18 [INFO] [stdout] | [INFO] [stdout] 16 | .fold(1, |a, b| a*b); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `product()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fold [INFO] [stdout] = note: `#[warn(clippy::unnecessary_fold)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/bin/11.rs:57:12 [INFO] [stdout] | [INFO] [stdout] 57 | if next.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `next.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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/bin/11.rs:73:5 [INFO] [stdout] | [INFO] [stdout] 73 | / match scores.get(from) { [INFO] [stdout] 74 | | Some(score) => return *score, [INFO] [stdout] 75 | | None => {} [INFO] [stdout] 76 | | } [INFO] [stdout] | |_____^ help: try: `if let Some(score) = scores.get(from) { return *score }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> src/bin/11.rs:107:22 [INFO] [stdout] | [INFO] [stdout] 107 | (*k, v.into_iter().filter(|e| !pruned.contains(e)).map(|e| *e).collect::>()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `v.into_iter().filter(|e| !pruned.contains(e)).copied()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] = note: `#[warn(clippy::map_clone)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> src/bin/11.rs:107:24 [INFO] [stdout] | [INFO] [stdout] 107 | (*k, v.into_iter().filter(|e| !pruned.contains(e)).map(|e| *e).collect::>()) [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] = note: `#[warn(clippy::into_iter_on_ref)]` 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/11.rs:122:11 [INFO] [stdout] | [INFO] [stdout] 122 | parse(&input, &mut graph); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/11.rs:129:11 [INFO] [stdout] | [INFO] [stdout] 129 | parse(&input, &mut graph); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/bin/02.rs:16:8 [INFO] [stdout] | [INFO] [stdout] 16 | if (input.checked_ilog10().unwrap_or(0) + 1) as usize % len != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `!((input.checked_ilog10().unwrap_or(0) + 1) as usize).is_multiple_of(len)` [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/bin/02.rs:28:8 [INFO] [stdout] | [INFO] [stdout] 28 | if len%2 != 0 { [INFO] [stdout] | ^^^^^^^^^^ help: replace with: `!len.is_multiple_of(2)` [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: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/08.rs:54:42 [INFO] [stdout] | [INFO] [stdout] 54 | fn combine(roots: &mut Vec, rank: &mut Vec, a: usize, b: 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] 54 - fn combine(roots: &mut Vec, rank: &mut Vec, a: usize, b: usize) { [INFO] [stdout] 54 + fn combine(roots: &mut Vec, rank: &mut [usize], a: usize, b: 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/08.rs:55:27 [INFO] [stdout] | [INFO] [stdout] 55 | let aroot = find_root(&roots, a); [INFO] [stdout] | ^^^^^^ help: change this to: `roots` [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/bin/08.rs:56:27 [INFO] [stdout] | [INFO] [stdout] 56 | let broot = find_root(&roots, b); [INFO] [stdout] | ^^^^^^ help: change this to: `roots` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/08.rs:102:17 [INFO] [stdout] | [INFO] [stdout] 102 | return; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 101 - networks.push(vec!(distance.from, distance.to)); [INFO] [stdout] 102 - return; [INFO] [stdout] 101 + networks.push(vec!(distance.from, distance.to)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.fold` can be written more succinctly using another method [INFO] [stdout] --> src/bin/08.rs:108:63 [INFO] [stdout] | [INFO] [stdout] 108 | networks.iter().rev().take(3).map(|e| e.len() as u64).fold(1u64, |acc, e| acc * e) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `product::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fold [INFO] [stdout] = note: `#[warn(clippy::unnecessary_fold)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/bin/11.rs:57:12 [INFO] [stdout] | [INFO] [stdout] 57 | if next.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `next.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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/bin/11.rs:73:5 [INFO] [stdout] | [INFO] [stdout] 73 | / match scores.get(from) { [INFO] [stdout] 74 | | Some(score) => return *score, [INFO] [stdout] 75 | | None => {} [INFO] [stdout] 76 | | } [INFO] [stdout] | |_____^ help: try: `if let Some(score) = scores.get(from) { return *score }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> src/bin/11.rs:107:22 [INFO] [stdout] | [INFO] [stdout] 107 | (*k, v.into_iter().filter(|e| !pruned.contains(e)).map(|e| *e).collect::>()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `v.into_iter().filter(|e| !pruned.contains(e)).copied()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] = note: `#[warn(clippy::map_clone)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> src/bin/11.rs:107:24 [INFO] [stdout] | [INFO] [stdout] 107 | (*k, v.into_iter().filter(|e| !pruned.contains(e)).map(|e| *e).collect::>()) [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] = note: `#[warn(clippy::into_iter_on_ref)]` 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/11.rs:122:11 [INFO] [stdout] | [INFO] [stdout] 122 | parse(&input, &mut graph); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/11.rs:129:11 [INFO] [stdout] | [INFO] [stdout] 129 | parse(&input, &mut graph); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/08.rs:54:42 [INFO] [stdout] | [INFO] [stdout] 54 | fn combine(roots: &mut Vec, rank: &mut Vec, a: usize, b: 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] 54 - fn combine(roots: &mut Vec, rank: &mut Vec, a: usize, b: usize) { [INFO] [stdout] 54 + fn combine(roots: &mut Vec, rank: &mut [usize], a: usize, b: 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/08.rs:55:27 [INFO] [stdout] | [INFO] [stdout] 55 | let aroot = find_root(&roots, a); [INFO] [stdout] | ^^^^^^ help: change this to: `roots` [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/bin/08.rs:56:27 [INFO] [stdout] | [INFO] [stdout] 56 | let broot = find_root(&roots, b); [INFO] [stdout] | ^^^^^^ help: change this to: `roots` [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/10.rs:17:27 [INFO] [stdout] | [INFO] [stdout] 17 | fn new(desired_state: &Vec) -> ButtonState { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 17 - fn new(desired_state: &Vec) -> ButtonState { [INFO] [stdout] 17 + fn new(desired_state: &[u16]) -> ButtonState { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/bin/06.rs:11:48 [INFO] [stdout] | [INFO] [stdout] 11 | fn get_instructions(input: &Vec>) -> Vec> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/bin/06.rs:13:32 [INFO] [stdout] | [INFO] [stdout] 13 | line.iter().map(|e| -> Box<&dyn Fn(&mut u64, &u64)> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> src/bin/06.rs:14:13 [INFO] [stdout] | [INFO] [stdout] 14 | / match e { [INFO] [stdout] 15 | | &"+" => Box::new(&add), [INFO] [stdout] 16 | | &"*" => Box::new(&mul), [INFO] [stdout] 17 | | _ => unreachable!() [INFO] [stdout] 18 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] = note: `#[warn(clippy::match_ref_pats)]` on by default [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 14 ~ match *e { [INFO] [stdout] 15 ~ "+" => Box::new(&add), [INFO] [stdout] 16 ~ "*" => Box::new(&mul), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/08.rs:102:17 [INFO] [stdout] | [INFO] [stdout] 102 | return; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 101 - networks.push(vec!(distance.from, distance.to)); [INFO] [stdout] 102 - return; [INFO] [stdout] 101 + networks.push(vec!(distance.from, distance.to)); [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/bin/10.rs:26:39 [INFO] [stdout] | [INFO] [stdout] 26 | fn distance(&self, desired_state: &Vec) -> Option { [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] 26 - fn distance(&self, desired_state: &Vec) -> Option { [INFO] [stdout] 26 + fn distance(&self, desired_state: &[u16]) -> Option { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/bin/10.rs:35:9 [INFO] [stdout] | [INFO] [stdout] 35 | / match result { [INFO] [stdout] 36 | | Some(v) => { [INFO] [stdout] 37 | | Some(v.iter().map(|e| *e as u16).sum::()) [INFO] [stdout] 38 | | }, [INFO] [stdout] 39 | | None => None [INFO] [stdout] 40 | | } [INFO] [stdout] | |_________^ help: try: `result.map(|v| v.iter().map(|e| *e as u16).sum::())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.fold` can be written more succinctly using another method [INFO] [stdout] --> src/bin/06.rs:50:37 [INFO] [stdout] | [INFO] [stdout] 50 | false => buf.iter().fold(1u64, |acc, e| acc * e), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `product::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fold [INFO] [stdout] = note: `#[warn(clippy::unnecessary_fold)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.fold` can be written more succinctly using another method [INFO] [stdout] --> src/bin/08.rs:108:63 [INFO] [stdout] | [INFO] [stdout] 108 | networks.iter().rev().take(3).map(|e| e.len() as u64).fold(1u64, |acc, e| acc * e) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `product::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fold [INFO] [stdout] = note: `#[warn(clippy::unnecessary_fold)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> src/bin/06.rs:58:13 [INFO] [stdout] | [INFO] [stdout] 58 | / match c { [INFO] [stdout] 59 | | &&'\n' => {}, [INFO] [stdout] 60 | | &&' ' => {}, [INFO] [stdout] 61 | | &&'+' => { [INFO] [stdout] ... | [INFO] [stdout] 73 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 58 ~ match *c { [INFO] [stdout] 59 ~ &'\n' => {}, [INFO] [stdout] 60 ~ &' ' => {}, [INFO] [stdout] 61 ~ &'+' => { [INFO] [stdout] 62 | is_add = true; [INFO] [stdout] 63 | instr_set = true; [INFO] [stdout] 64 | }, [INFO] [stdout] 65 ~ &'*' => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.fold` can be written more succinctly using another method [INFO] [stdout] --> src/bin/06.rs:79:29 [INFO] [stdout] | [INFO] [stdout] 79 | false => buf.iter().fold(1u64, |acc, e| acc * e), [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: casting to the same type is unnecessary (`u16` -> `u16`) [INFO] [stdout] --> src/bin/10.rs:37:39 [INFO] [stdout] | [INFO] [stdout] 37 | Some(v.iter().map(|e| *e as u16).sum::()) [INFO] [stdout] | ^^^^^^^^^ help: try: `*e` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/10.rs:44:30 [INFO] [stdout] | [INFO] [stdout] 44 | fn apply(&self, buttons: &Vec, desired_state: &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] 44 - fn apply(&self, buttons: &Vec, desired_state: &Vec) -> Vec { [INFO] [stdout] 44 + fn apply(&self, buttons: &[u16], desired_state: &Vec) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/10.rs:56:21 [INFO] [stdout] | [INFO] [stdout] 56 | button = button >> 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `button >>= 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/bin/10.rs:61:17 [INFO] [stdout] | [INFO] [stdout] 61 | / match res.distance(desired_state) { [INFO] [stdout] 62 | | Some(_) => Some(res), [INFO] [stdout] 63 | | None => None [INFO] [stdout] 64 | | } [INFO] [stdout] | |_________________^ help: try: `res.distance(desired_state).map(|_| res)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/bin/10.rs:110:33 [INFO] [stdout] | [INFO] [stdout] 110 | .filter(|c| c.is_digit(10)) [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `c.is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] = note: `#[warn(clippy::is_digit_ascii_radix)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `skip_while(

).next()` on an `Iterator` [INFO] [stdout] --> src/bin/10.rs:117:24 [INFO] [stdout] | [INFO] [stdout] 117 | let joltages = s [INFO] [stdout] | ________________________^ [INFO] [stdout] 118 | | .skip_while(|e| !e.contains('{')) [INFO] [stdout] 119 | | .next().unwrap() [INFO] [stdout] | |___________________^ [INFO] [stdout] | [INFO] [stdout] = help: this is more succinctly expressed by calling `.find(!

)` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#skip_while_next [INFO] [stdout] = note: `#[warn(clippy::skip_while_next)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/bin/10.rs:144:18 [INFO] [stdout] | [INFO] [stdout] 144 | .map(|state| { [INFO] [stdout] | __________________^ [INFO] [stdout] 145 | | self.buttons.iter().map(|button| { [INFO] [stdout] 146 | | state.bitxor(button) [INFO] [stdout] 147 | | }) [INFO] [stdout] 148 | | }) [INFO] [stdout] 149 | | .flatten() [INFO] [stdout] | |__________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] = note: `#[warn(clippy::map_flatten)]` on by default [INFO] [stdout] help: try replacing `map` with `flat_map` and remove the `.flatten()` [INFO] [stdout] | [INFO] [stdout] 144 ~ .flat_map(|state| { [INFO] [stdout] 145 + self.buttons.iter().map(|button| { [INFO] [stdout] 146 + state.bitxor(button) [INFO] [stdout] 147 + }) [INFO] [stdout] 148 + }) [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/bin/10.rs:17:27 [INFO] [stdout] | [INFO] [stdout] 17 | fn new(desired_state: &Vec) -> ButtonState { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 17 - fn new(desired_state: &Vec) -> ButtonState { [INFO] [stdout] 17 + fn new(desired_state: &[u16]) -> ButtonState { [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/bin/10.rs:26:39 [INFO] [stdout] | [INFO] [stdout] 26 | fn distance(&self, desired_state: &Vec) -> Option { [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] 26 - fn distance(&self, desired_state: &Vec) -> Option { [INFO] [stdout] 26 + fn distance(&self, desired_state: &[u16]) -> Option { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/bin/10.rs:35:9 [INFO] [stdout] | [INFO] [stdout] 35 | / match result { [INFO] [stdout] 36 | | Some(v) => { [INFO] [stdout] 37 | | Some(v.iter().map(|e| *e as u16).sum::()) [INFO] [stdout] 38 | | }, [INFO] [stdout] 39 | | None => None [INFO] [stdout] 40 | | } [INFO] [stdout] | |_________^ help: try: `result.map(|v| v.iter().map(|e| *e as u16).sum::())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u16` -> `u16`) [INFO] [stdout] --> src/bin/10.rs:37:39 [INFO] [stdout] | [INFO] [stdout] 37 | Some(v.iter().map(|e| *e as u16).sum::()) [INFO] [stdout] | ^^^^^^^^^ help: try: `*e` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/10.rs:44:30 [INFO] [stdout] | [INFO] [stdout] 44 | fn apply(&self, buttons: &Vec, desired_state: &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] 44 - fn apply(&self, buttons: &Vec, desired_state: &Vec) -> Vec { [INFO] [stdout] 44 + fn apply(&self, buttons: &[u16], desired_state: &Vec) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/10.rs:56:21 [INFO] [stdout] | [INFO] [stdout] 56 | button = button >> 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `button >>= 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/bin/10.rs:61:17 [INFO] [stdout] | [INFO] [stdout] 61 | / match res.distance(desired_state) { [INFO] [stdout] 62 | | Some(_) => Some(res), [INFO] [stdout] 63 | | None => None [INFO] [stdout] 64 | | } [INFO] [stdout] | |_________________^ help: try: `res.distance(desired_state).map(|_| res)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/bin/10.rs:110:33 [INFO] [stdout] | [INFO] [stdout] 110 | .filter(|c| c.is_digit(10)) [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `c.is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] = note: `#[warn(clippy::is_digit_ascii_radix)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `skip_while(

).next()` on an `Iterator` [INFO] [stdout] --> src/bin/10.rs:117:24 [INFO] [stdout] | [INFO] [stdout] 117 | let joltages = s [INFO] [stdout] | ________________________^ [INFO] [stdout] 118 | | .skip_while(|e| !e.contains('{')) [INFO] [stdout] 119 | | .next().unwrap() [INFO] [stdout] | |___________________^ [INFO] [stdout] | [INFO] [stdout] = help: this is more succinctly expressed by calling `.find(!

)` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#skip_while_next [INFO] [stdout] = note: `#[warn(clippy::skip_while_next)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/bin/10.rs:144:18 [INFO] [stdout] | [INFO] [stdout] 144 | .map(|state| { [INFO] [stdout] | __________________^ [INFO] [stdout] 145 | | self.buttons.iter().map(|button| { [INFO] [stdout] 146 | | state.bitxor(button) [INFO] [stdout] 147 | | }) [INFO] [stdout] 148 | | }) [INFO] [stdout] 149 | | .flatten() [INFO] [stdout] | |__________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] = note: `#[warn(clippy::map_flatten)]` on by default [INFO] [stdout] help: try replacing `map` with `flat_map` and remove the `.flatten()` [INFO] [stdout] | [INFO] [stdout] 144 ~ .flat_map(|state| { [INFO] [stdout] 145 + self.buttons.iter().map(|button| { [INFO] [stdout] 146 + state.bitxor(button) [INFO] [stdout] 147 + }) [INFO] [stdout] 148 + }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 8.30s [INFO] running `Command { std: "docker" "inspect" "154c01829a78ed5325ad04d6372b9d5fcdfc15ff1490ad92e5eaeea9382d1c55", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "154c01829a78ed5325ad04d6372b9d5fcdfc15ff1490ad92e5eaeea9382d1c55", kill_on_drop: false }` [INFO] [stdout] 154c01829a78ed5325ad04d6372b9d5fcdfc15ff1490ad92e5eaeea9382d1c55