[INFO] cloning repository https://github.com/CHildebrandt/aoc-2024 [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/CHildebrandt/aoc-2024" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FCHildebrandt%2Faoc-2024", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FCHildebrandt%2Faoc-2024'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] c2bb68d4b92d58ae88da5278c13150a7dbfc6d49 [INFO] linting CHildebrandt/aoc-2024 against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FCHildebrandt%2Faoc-2024" "/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/CHildebrandt/aoc-2024 [INFO] finished tweaking git repo https://github.com/CHildebrandt/aoc-2024 [INFO] tweaked toml for git repo https://github.com/CHildebrandt/aoc-2024 written to /workspace/builds/worker-4-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/CHildebrandt/aoc-2024 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/CHildebrandt/aoc-2024 already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded deprecate-until v0.1.1 [INFO] [stderr] Downloaded thiserror-impl v2.0.7 [INFO] [stderr] Downloaded thiserror v2.0.7 [INFO] [stderr] Downloaded pathfinding v4.12.0 [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] 2a70608d5fe8b269cfe8235fa917b73d830e1cf9f9588e66ac0d57d1e09be17b [INFO] running `Command { std: "docker" "start" "-a" "2a70608d5fe8b269cfe8235fa917b73d830e1cf9f9588e66ac0d57d1e09be17b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "2a70608d5fe8b269cfe8235fa917b73d830e1cf9f9588e66ac0d57d1e09be17b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "2a70608d5fe8b269cfe8235fa917b73d830e1cf9f9588e66ac0d57d1e09be17b", kill_on_drop: false }` [INFO] [stdout] 2a70608d5fe8b269cfe8235fa917b73d830e1cf9f9588e66ac0d57d1e09be17b [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] a26458b99ec00164c9af117627a78257553c5add4474d320a19c14b46ba9aed0 [INFO] running `Command { std: "docker" "start" "-a" "a26458b99ec00164c9af117627a78257553c5add4474d320a19c14b46ba9aed0", kill_on_drop: false }` [INFO] [stderr] Compiling num-traits v0.2.19 [INFO] [stderr] Compiling semver v1.0.23 [INFO] [stderr] Checking memchr v2.7.4 [INFO] [stderr] Compiling thiserror v2.0.7 [INFO] [stderr] Checking either v1.13.0 [INFO] [stderr] Checking rustc-hash v2.1.0 [INFO] [stderr] Compiling syn v2.0.90 [INFO] [stderr] Checking aoc-2024 v0.1.0 (/opt/rustwide/workdir) [INFO] [stderr] Checking itertools v0.13.0 [INFO] [stderr] Checking rayon v1.10.0 [INFO] [stderr] Checking aho-corasick v1.1.3 [INFO] [stderr] Checking num-integer v0.1.46 [INFO] [stderr] Checking num-complex v0.4.6 [INFO] [stderr] Checking integer-sqrt v0.1.5 [INFO] [stderr] Checking num-bigint v0.4.6 [INFO] [stderr] Checking num-iter v0.1.45 [INFO] [stderr] Checking regex-automata v0.4.9 [INFO] [stderr] Compiling thiserror-impl v2.0.7 [INFO] [stderr] Compiling deprecate-until v0.1.1 [INFO] [stderr] Checking num-rational v0.4.2 [INFO] [stderr] Checking num v0.4.3 [INFO] [stderr] Checking regex v1.11.1 [INFO] [stderr] Checking pathfinding v4.12.0 [INFO] [stderr] Checking utils v0.1.0 (/opt/rustwide/workdir/crates/utils) [INFO] [stdout] warning: unused import: `DerefMut` [INFO] [stdout] --> crates/utils/src/grid.rs:10:21 [INFO] [stdout] | [INFO] [stdout] 10 | use std::ops::{Add, DerefMut, Div, Index, IndexMut, Mul, Sub}; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `DerefMut` [INFO] [stdout] --> crates/utils/src/grid.rs:10:21 [INFO] [stdout] | [INFO] [stdout] 10 | use std::ops::{Add, DerefMut, Div, Index, IndexMut, Mul, Sub}; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `grid`, `height`, and `width` are never read [INFO] [stdout] --> crates/utils/src/grid.rs:659:5 [INFO] [stdout] | [INFO] [stdout] 658 | pub struct SubGrid<'a, T: Debug + Clone> { [INFO] [stdout] | ------- fields in this struct [INFO] [stdout] 659 | grid: &'a Grid, [INFO] [stdout] | ^^^^ [INFO] [stdout] 660 | height: usize, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 661 | width: usize, [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `grid`, `height`, and `width` are never read [INFO] [stdout] --> crates/utils/src/grid.rs:659:5 [INFO] [stdout] | [INFO] [stdout] 658 | pub struct SubGrid<'a, T: Debug + Clone> { [INFO] [stdout] | ------- fields in this struct [INFO] [stdout] 659 | grid: &'a Grid, [INFO] [stdout] | ^^^^ [INFO] [stdout] 660 | height: usize, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 661 | width: usize, [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> crates/utils/src/grid.rs:171:9 [INFO] [stdout] | [INFO] [stdout] 171 | / (y == 0 && x == 0) [INFO] [stdout] 172 | | || (y == 0 && x == self.width - 1) [INFO] [stdout] 173 | | || (y == self.height - 1 && x == 0) [INFO] [stdout] 174 | | || (y == self.height - 1 && x == self.width - 1) [INFO] [stdout] | |____________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 171 - (y == 0 && x == 0) [INFO] [stdout] 172 - || (y == 0 && x == self.width - 1) [INFO] [stdout] 173 - || (y == self.height - 1 && x == 0) [INFO] [stdout] 174 - || (y == self.height - 1 && x == self.width - 1) [INFO] [stdout] 171 + !(x != 0 && x != self.width - 1 || y != 0 && y != self.height - 1) [INFO] [stdout] | [INFO] [stdout] 171 - (y == 0 && x == 0) [INFO] [stdout] 172 - || (y == 0 && x == self.width - 1) [INFO] [stdout] 173 - || (y == self.height - 1 && x == 0) [INFO] [stdout] 174 - || (y == self.height - 1 && x == self.width - 1) [INFO] [stdout] 171 + (y == self.height - 1 || y == 0) && (x == self.width - 1 || x == 0) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> crates/utils/src/grid.rs:171:9 [INFO] [stdout] | [INFO] [stdout] 171 | / (y == 0 && x == 0) [INFO] [stdout] 172 | | || (y == 0 && x == self.width - 1) [INFO] [stdout] 173 | | || (y == self.height - 1 && x == 0) [INFO] [stdout] 174 | | || (y == self.height - 1 && x == self.width - 1) [INFO] [stdout] | |____________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 171 - (y == 0 && x == 0) [INFO] [stdout] 172 - || (y == 0 && x == self.width - 1) [INFO] [stdout] 173 - || (y == self.height - 1 && x == 0) [INFO] [stdout] 174 - || (y == self.height - 1 && x == self.width - 1) [INFO] [stdout] 171 + !(x != 0 && x != self.width - 1 || y != 0 && y != self.height - 1) [INFO] [stdout] | [INFO] [stdout] 171 - (y == 0 && x == 0) [INFO] [stdout] 172 - || (y == 0 && x == self.width - 1) [INFO] [stdout] 173 - || (y == self.height - 1 && x == 0) [INFO] [stdout] 174 - || (y == self.height - 1 && x == self.width - 1) [INFO] [stdout] 171 + (y == self.height - 1 || y == 0) && (x == self.width - 1 || x == 0) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> crates/utils/src/grid.rs:171:9 [INFO] [stdout] | [INFO] [stdout] 171 | / (y == 0 && x == 0) [INFO] [stdout] 172 | | || (y == 0 && x == self.width - 1) [INFO] [stdout] | |______________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 171 - (y == 0 && x == 0) [INFO] [stdout] 172 - || (y == 0 && x == self.width - 1) [INFO] [stdout] 171 + !(y != 0 || x != 0 && x != self.width - 1) [INFO] [stdout] | [INFO] [stdout] 171 - (y == 0 && x == 0) [INFO] [stdout] 172 - || (y == 0 && x == self.width - 1) [INFO] [stdout] 171 + (x == self.width - 1 || x == 0) && y == 0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> crates/utils/src/grid.rs:171:9 [INFO] [stdout] | [INFO] [stdout] 171 | / (y == 0 && x == 0) [INFO] [stdout] 172 | | || (y == 0 && x == self.width - 1) [INFO] [stdout] | |______________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 171 - (y == 0 && x == 0) [INFO] [stdout] 172 - || (y == 0 && x == self.width - 1) [INFO] [stdout] 171 + !(y != 0 || x != 0 && x != self.width - 1) [INFO] [stdout] | [INFO] [stdout] 171 - (y == 0 && x == 0) [INFO] [stdout] 172 - || (y == 0 && x == self.width - 1) [INFO] [stdout] 171 + (x == self.width - 1 || x == 0) && y == 0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> crates/utils/src/grid.rs:216:9 [INFO] [stdout] | [INFO] [stdout] 216 | / positions [INFO] [stdout] 217 | | .iter() [INFO] [stdout] 218 | | .filter(|&pos| self.validate_position(*pos)) [INFO] [stdout] 219 | | .map(|&pos| pos) [INFO] [stdout] | |____________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] = note: `#[warn(clippy::map_clone)]` on by default [INFO] [stdout] help: consider calling the dedicated `copied` method [INFO] [stdout] | [INFO] [stdout] 216 ~ positions [INFO] [stdout] 217 + .iter() [INFO] [stdout] 218 + .filter(|&pos| self.validate_position(*pos)).copied() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> crates/utils/src/grid.rs:216:9 [INFO] [stdout] | [INFO] [stdout] 216 | / positions [INFO] [stdout] 217 | | .iter() [INFO] [stdout] 218 | | .filter(|&pos| self.validate_position(*pos)) [INFO] [stdout] 219 | | .map(|&pos| pos) [INFO] [stdout] | |____________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] = note: `#[warn(clippy::map_clone)]` on by default [INFO] [stdout] help: consider calling the dedicated `copied` method [INFO] [stdout] | [INFO] [stdout] 216 ~ positions [INFO] [stdout] 217 + .iter() [INFO] [stdout] 218 + .filter(|&pos| self.validate_position(*pos)).copied() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `from_str` can be confused for the standard trait method `std::str::FromStr::from_str` [INFO] [stdout] --> crates/utils/src/grid.rs:673:5 [INFO] [stdout] | [INFO] [stdout] 673 | / pub fn from_str(input: &str) -> Result { [INFO] [stdout] 674 | | let mut parts = input.split(','); [INFO] [stdout] 675 | | let y = parts.next().unwrap().parse()?; [INFO] [stdout] 676 | | let x = parts.next().unwrap().parse()?; [INFO] [stdout] 677 | | Ok(Self(y, x)) [INFO] [stdout] 678 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::str::FromStr` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] = note: `#[warn(clippy::should_implement_trait)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `from_str` can be confused for the standard trait method `std::str::FromStr::from_str` [INFO] [stdout] --> crates/utils/src/grid.rs:673:5 [INFO] [stdout] | [INFO] [stdout] 673 | / pub fn from_str(input: &str) -> Result { [INFO] [stdout] 674 | | let mut parts = input.split(','); [INFO] [stdout] 675 | | let y = parts.next().unwrap().parse()?; [INFO] [stdout] 676 | | let x = parts.next().unwrap().parse()?; [INFO] [stdout] 677 | | Ok(Self(y, x)) [INFO] [stdout] 678 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::str::FromStr` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] = note: `#[warn(clippy::should_implement_trait)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> crates/utils/src/grid.rs:162:21 [INFO] [stdout] | [INFO] [stdout] 162 | pub fn sub_grid(&self, height: usize, width: usize) -> SubGrid { [INFO] [stdout] | ^^^^^ the lifetime is elided here ^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 162 | pub fn sub_grid(&self, height: usize, width: usize) -> SubGrid<'_, T> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> crates/utils/src/grid.rs:162:21 [INFO] [stdout] | [INFO] [stdout] 162 | pub fn sub_grid(&self, height: usize, width: usize) -> SubGrid { [INFO] [stdout] | ^^^^^ the lifetime is elided here ^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 162 | pub fn sub_grid(&self, height: usize, width: usize) -> SubGrid<'_, T> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: eliding a lifetime that's named elsewhere is confusing [INFO] [stdout] --> crates/utils/src/grid.rs:804:42 [INFO] [stdout] | [INFO] [stdout] 802 | &'a self, [INFO] [stdout] | -- the lifetime is named here [INFO] [stdout] 803 | pos: &'a Position, [INFO] [stdout] | -- the lifetime is named here [INFO] [stdout] 804 | ) -> impl Iterator + 'a { [INFO] [stdout] | ^^ -- the same lifetime is named here [INFO] [stdout] | | [INFO] [stdout] | the same lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: consistently use `'a` [INFO] [stdout] | [INFO] [stdout] 804 | ) -> impl Iterator + 'a { [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: eliding a lifetime that's named elsewhere is confusing [INFO] [stdout] --> crates/utils/src/grid.rs:811:42 [INFO] [stdout] | [INFO] [stdout] 809 | &'a self, [INFO] [stdout] | -- the lifetime is named here [INFO] [stdout] 810 | pos: &'a Position, [INFO] [stdout] | -- the lifetime is named here [INFO] [stdout] 811 | ) -> impl Iterator + 'a { [INFO] [stdout] | ^^ -- the same lifetime is named here [INFO] [stdout] | | [INFO] [stdout] | the same lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: consistently use `'a` [INFO] [stdout] | [INFO] [stdout] 811 | ) -> impl Iterator + 'a { [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: eliding a lifetime that's named elsewhere is confusing [INFO] [stdout] --> crates/utils/src/grid.rs:804:42 [INFO] [stdout] | [INFO] [stdout] 802 | &'a self, [INFO] [stdout] | -- the lifetime is named here [INFO] [stdout] 803 | pos: &'a Position, [INFO] [stdout] | -- the lifetime is named here [INFO] [stdout] 804 | ) -> impl Iterator + 'a { [INFO] [stdout] | ^^ -- the same lifetime is named here [INFO] [stdout] | | [INFO] [stdout] | the same lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: consistently use `'a` [INFO] [stdout] | [INFO] [stdout] 804 | ) -> impl Iterator + 'a { [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: eliding a lifetime that's named elsewhere is confusing [INFO] [stdout] --> crates/utils/src/grid.rs:811:42 [INFO] [stdout] | [INFO] [stdout] 809 | &'a self, [INFO] [stdout] | -- the lifetime is named here [INFO] [stdout] 810 | pos: &'a Position, [INFO] [stdout] | -- the lifetime is named here [INFO] [stdout] 811 | ) -> impl Iterator + 'a { [INFO] [stdout] | ^^ -- the same lifetime is named here [INFO] [stdout] | | [INFO] [stdout] | the same lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: consistently use `'a` [INFO] [stdout] | [INFO] [stdout] 811 | ) -> impl Iterator + 'a { [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking day16 v0.1.0 (/opt/rustwide/workdir/crates/day16) [INFO] [stderr] Checking day2 v0.1.0 (/opt/rustwide/workdir/crates/day2) [INFO] [stderr] Checking day14 v0.1.0 (/opt/rustwide/workdir/crates/day14) [INFO] [stderr] Checking day17 v0.1.0 (/opt/rustwide/workdir/crates/day17) [INFO] [stderr] Checking day20 v0.1.0 (/opt/rustwide/workdir/crates/day20) [INFO] [stderr] Checking day24 v0.1.0 (/opt/rustwide/workdir/crates/day24) [INFO] [stderr] Checking day19 v0.1.0 (/opt/rustwide/workdir/crates/day19) [INFO] [stderr] Checking day25 v0.1.0 (/opt/rustwide/workdir/crates/day25) [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/day19/src/main.rs:10:13 [INFO] [stdout] | [INFO] [stdout] 10 | / if &design[cursor..n] == *pattern { [INFO] [stdout] 11 | | if is_possible_design(design, n, patterns) { [INFO] [stdout] 12 | | return true; [INFO] [stdout] 13 | | } [INFO] [stdout] 14 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 10 ~ if &design[cursor..n] == *pattern [INFO] [stdout] 11 ~ && is_possible_design(design, n, patterns) { [INFO] [stdout] 12 | return true; [INFO] [stdout] 13 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> crates/day2/src/main.rs:19:15 [INFO] [stdout] | [INFO] [stdout] 19 | fn check(row: &Vec) -> bool { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 19 - fn check(row: &Vec) -> bool { [INFO] [stdout] 19 + fn check(row: &[usize]) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking template v0.1.0 (/opt/rustwide/workdir/crates/template) [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/day2/src/main.rs:34:19 [INFO] [stdout] | [INFO] [stdout] 34 | check(&row) [INFO] [stdout] | ^^^^ help: change this to: `row` [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] --> crates/day25/src/main.rs:26:36 [INFO] [stdout] | [INFO] [stdout] 26 | .map(|grid| Grid::from_str(&grid, Tile::from)) [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: match expression looks like `matches!` macro [INFO] [stdout] --> crates/day20/src/main.rs:22:9 [INFO] [stdout] | [INFO] [stdout] 22 | / match self { [INFO] [stdout] 23 | | Tile::Wall => true, [INFO] [stdout] 24 | | _ => false, [INFO] [stdout] 25 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 22 - match self { [INFO] [stdout] 23 - Tile::Wall => true, [INFO] [stdout] 24 - _ => false, [INFO] [stdout] 25 - } [INFO] [stdout] 22 + matches!(self, Tile::Wall) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking day7 v0.1.0 (/opt/rustwide/workdir/crates/day7) [INFO] [stderr] Checking day9 v0.1.0 (/opt/rustwide/workdir/crates/day9) [INFO] [stderr] Checking day6 v0.1.0 (/opt/rustwide/workdir/crates/day6) [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> crates/day14/src/main.rs:98:32 [INFO] [stdout] | [INFO] [stdout] 98 | mapped.entry(quadrant).or_insert_with(Vec::new).push(robot); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `get(name).is_some()` [INFO] [stdout] --> crates/day24/src/main.rs:99:44 [INFO] [stdout] | [INFO] [stdout] 99 | if z_gates.iter().all(|name| wires.get(name).is_some()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace it with: `contains_key(name)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_get_then_check [INFO] [stdout] = note: `#[warn(clippy::unnecessary_get_then_check)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking day21 v0.1.0 (/opt/rustwide/workdir/crates/day21) [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/day24/src/main.rs:106:35 [INFO] [stdout] | [INFO] [stdout] 106 | .sorted_by(|a, b| a.0.cmp(&b.0)) [INFO] [stdout] | ^^^^ help: change this to: `b.0` [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: unused variable: `input` [INFO] [stdout] --> crates/template/src/main.rs:3:10 [INFO] [stdout] | [INFO] [stdout] 3 | fn part1(input: &str) -> usize { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> crates/template/src/main.rs:7:10 [INFO] [stdout] | [INFO] [stdout] 7 | fn part2(input: &str) -> usize { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part2` is never used [INFO] [stdout] --> crates/template/src/main.rs:7:4 [INFO] [stdout] | [INFO] [stdout] 7 | fn part2(input: &str) -> usize { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking day8 v0.1.0 (/opt/rustwide/workdir/crates/day8) [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> crates/day7/src/main.rs:32:24 [INFO] [stdout] | [INFO] [stdout] 32 | Op::Mul => value % last == 0 && can_eval_to(rest, value / last, using_ops), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace with: `value.is_multiple_of(*last)` [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] [stderr] Checking day15 v0.1.0 (/opt/rustwide/workdir/crates/day15) [INFO] [stderr] Checking day10 v0.1.0 (/opt/rustwide/workdir/crates/day10) [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/day6/src/main.rs:102:57 [INFO] [stdout] | [INFO] [stdout] 102 | .filter(|(pos, floor)| initial_visited.contains(&pos) && **floor == Floor::Empty) [INFO] [stdout] | ^^^^ help: change this to: `pos` [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> crates/day2/src/main.rs:19:15 [INFO] [stdout] | [INFO] [stdout] 19 | fn check(row: &Vec) -> bool { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 19 - fn check(row: &Vec) -> bool { [INFO] [stdout] 19 + fn check(row: &[usize]) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> crates/day14/src/main.rs:98:32 [INFO] [stdout] | [INFO] [stdout] 98 | mapped.entry(quadrant).or_insert_with(Vec::new).push(robot); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/day2/src/main.rs:34:19 [INFO] [stdout] | [INFO] [stdout] 34 | check(&row) [INFO] [stdout] | ^^^^ help: change this to: `row` [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: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> crates/day7/src/main.rs:32:24 [INFO] [stdout] | [INFO] [stdout] 32 | Op::Mul => value % last == 0 && can_eval_to(rest, value / last, using_ops), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace with: `value.is_multiple_of(*last)` [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] [stderr] Checking day23 v0.1.0 (/opt/rustwide/workdir/crates/day23) [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> crates/day21/src/main.rs:88:29 [INFO] [stdout] | [INFO] [stdout] 88 | fn sequence_from_path(path: &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] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 88 - fn sequence_from_path(path: &Vec) -> Vec { [INFO] [stdout] 88 + fn sequence_from_path(path: &[Position]) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/day21/src/main.rs:94:60 [INFO] [stdout] | [INFO] [stdout] 94 | let direction = CardinalDirection::from_cmp(by.cmp(&ay), bx.cmp(&ax)).unwrap(); [INFO] [stdout] | ^^^ help: change this to: `ay` [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] --> crates/day21/src/main.rs:94:73 [INFO] [stdout] | [INFO] [stdout] 94 | let direction = CardinalDirection::from_cmp(by.cmp(&ay), bx.cmp(&ax)).unwrap(); [INFO] [stdout] | ^^^ help: change this to: `ax` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/day21/src/main.rs:191:60 [INFO] [stdout] | [INFO] [stdout] 191 | let lock_paths = &lock_paths[&(lock_key_to_pos[&curr], lock_key_to_pos[next])]; [INFO] [stdout] | ^^^^^ help: change this to: `curr` [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] [stderr] Checking day1 v0.1.0 (/opt/rustwide/workdir/crates/day1) [INFO] [stderr] Checking day13 v0.1.0 (/opt/rustwide/workdir/crates/day13) [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/day15/src/main.rs:140:68 [INFO] [stdout] | [INFO] [stdout] 140 | ... let next_left = direction.add_unsigned(&bumped_left, 1); [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `bumped_left` [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] --> crates/day15/src/main.rs:163:46 [INFO] [stdout] | [INFO] [stdout] 163 | ... grid.replace(&bumped_left, Item::Empty); [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `bumped_left` [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] [stderr] Checking day18 v0.1.0 (/opt/rustwide/workdir/crates/day18) [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> crates/template/src/main.rs:3:10 [INFO] [stdout] | [INFO] [stdout] 3 | fn part1(input: &str) -> usize { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> crates/template/src/main.rs:7:10 [INFO] [stdout] | [INFO] [stdout] 7 | fn part2(input: &str) -> usize { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part2` is never used [INFO] [stdout] --> crates/template/src/main.rs:7:4 [INFO] [stdout] | [INFO] [stdout] 7 | fn part2(input: &str) -> usize { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking day11 v0.1.0 (/opt/rustwide/workdir/crates/day11) [INFO] [stderr] Checking day12 v0.1.0 (/opt/rustwide/workdir/crates/day12) [INFO] [stdout] warning: unnecessary use of `get(name).is_some()` [INFO] [stdout] --> crates/day24/src/main.rs:99:44 [INFO] [stdout] | [INFO] [stdout] 99 | if z_gates.iter().all(|name| wires.get(name).is_some()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace it with: `contains_key(name)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_get_then_check [INFO] [stdout] = note: `#[warn(clippy::unnecessary_get_then_check)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/day24/src/main.rs:106:35 [INFO] [stdout] | [INFO] [stdout] 106 | .sorted_by(|a, b| a.0.cmp(&b.0)) [INFO] [stdout] | ^^^^ help: change this to: `b.0` [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] Checking day22 v0.1.0 (/opt/rustwide/workdir/crates/day22) [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> crates/day11/src/main.rs:21:15 [INFO] [stdout] | [INFO] [stdout] 21 | } else if (stone_val.ilog10() + 1) % 2 == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `(stone_val.ilog10() + 1).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] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> crates/day20/src/main.rs:22:9 [INFO] [stdout] | [INFO] [stdout] 22 | / match self { [INFO] [stdout] 23 | | Tile::Wall => true, [INFO] [stdout] 24 | | _ => false, [INFO] [stdout] 25 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 22 - match self { [INFO] [stdout] 23 - Tile::Wall => true, [INFO] [stdout] 24 - _ => false, [INFO] [stdout] 25 - } [INFO] [stdout] 22 + matches!(self, Tile::Wall) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking day3 v0.1.0 (/opt/rustwide/workdir/crates/day3) [INFO] [stderr] Checking day5 v0.1.0 (/opt/rustwide/workdir/crates/day5) [INFO] [stderr] Checking day4 v0.1.0 (/opt/rustwide/workdir/crates/day4) [INFO] [stdout] warning: usage of `bool::then` in `filter_map` [INFO] [stdout] --> crates/day4/src/main.rs:7:10 [INFO] [stdout] | [INFO] [stdout] 7 | .filter_map(|(pos, c)| { [INFO] [stdout] | __________^ [INFO] [stdout] 8 | | (*c == 'X').then(|| { [INFO] [stdout] 9 | | OrdinalDirection::all() [INFO] [stdout] 10 | | .iter() [INFO] [stdout] ... | [INFO] [stdout] 20 | | }) [INFO] [stdout] 21 | | }) [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_map_bool_then [INFO] [stdout] = note: `#[warn(clippy::filter_map_bool_then)]` on by default [INFO] [stdout] help: use `filter` then `map` instead [INFO] [stdout] | [INFO] [stdout] 7 ~ .filter(|&(pos, c)| (*c == 'X')).map(|(pos, c)| OrdinalDirection::all() [INFO] [stdout] 8 + .iter() [INFO] [stdout] 9 + .filter(|direction| { [INFO] [stdout] 10 + let m = direction.add_unsigned(&pos, 1); [INFO] [stdout] 11 + let a = direction.add_unsigned(&pos, 2); [INFO] [stdout] 12 + let s = direction.add_unsigned(&pos, 3); [INFO] [stdout] 13 + grid.get_virtual(m).is_some_and(|&c| c == 'M') [INFO] [stdout] 14 + && grid.get_virtual(a).is_some_and(|&c| c == 'A') [INFO] [stdout] 15 + && grid.get_virtual(s).is_some_and(|&c| c == 'S') [INFO] [stdout] 16 + }) [INFO] [stdout] 17 + .count()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> crates/day3/src/main.rs:20:5 [INFO] [stdout] | [INFO] [stdout] 20 | instructions.sort_by(|a, b| a.start().cmp(&b.start())); [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] 20 - instructions.sort_by(|a, b| a.start().cmp(&b.start())); [INFO] [stdout] 20 + instructions.sort_by_key(|a| a.start()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: iterating on a map's values [INFO] [stdout] --> crates/day22/src/main.rs:62:5 [INFO] [stdout] | [INFO] [stdout] 62 | / sequence_map [INFO] [stdout] 63 | | .iter() [INFO] [stdout] 64 | | .map(|(_, bananas)| *bananas) [INFO] [stdout] | |_____________________________________^ help: try: `sequence_map.values().map(|bananas| *bananas)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_kv_map [INFO] [stdout] = note: `#[warn(clippy::iter_kv_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `bool::then` in `filter_map` [INFO] [stdout] --> crates/day4/src/main.rs:7:10 [INFO] [stdout] | [INFO] [stdout] 7 | .filter_map(|(pos, c)| { [INFO] [stdout] | __________^ [INFO] [stdout] 8 | | (*c == 'X').then(|| { [INFO] [stdout] 9 | | OrdinalDirection::all() [INFO] [stdout] 10 | | .iter() [INFO] [stdout] ... | [INFO] [stdout] 20 | | }) [INFO] [stdout] 21 | | }) [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_map_bool_then [INFO] [stdout] = note: `#[warn(clippy::filter_map_bool_then)]` on by default [INFO] [stdout] help: use `filter` then `map` instead [INFO] [stdout] | [INFO] [stdout] 7 ~ .filter(|&(pos, c)| (*c == 'X')).map(|(pos, c)| OrdinalDirection::all() [INFO] [stdout] 8 + .iter() [INFO] [stdout] 9 + .filter(|direction| { [INFO] [stdout] 10 + let m = direction.add_unsigned(&pos, 1); [INFO] [stdout] 11 + let a = direction.add_unsigned(&pos, 2); [INFO] [stdout] 12 + let s = direction.add_unsigned(&pos, 3); [INFO] [stdout] 13 + grid.get_virtual(m).is_some_and(|&c| c == 'M') [INFO] [stdout] 14 + && grid.get_virtual(a).is_some_and(|&c| c == 'A') [INFO] [stdout] 15 + && grid.get_virtual(s).is_some_and(|&c| c == 'S') [INFO] [stdout] 16 + }) [INFO] [stdout] 17 + .count()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/day19/src/main.rs:10:13 [INFO] [stdout] | [INFO] [stdout] 10 | / if &design[cursor..n] == *pattern { [INFO] [stdout] 11 | | if is_possible_design(design, n, patterns) { [INFO] [stdout] 12 | | return true; [INFO] [stdout] 13 | | } [INFO] [stdout] 14 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 10 ~ if &design[cursor..n] == *pattern [INFO] [stdout] 11 ~ && is_possible_design(design, n, patterns) { [INFO] [stdout] 12 | return true; [INFO] [stdout] 13 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/day15/src/main.rs:140:68 [INFO] [stdout] | [INFO] [stdout] 140 | ... let next_left = direction.add_unsigned(&bumped_left, 1); [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `bumped_left` [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] --> crates/day15/src/main.rs:163:46 [INFO] [stdout] | [INFO] [stdout] 163 | ... grid.replace(&bumped_left, Item::Empty); [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `bumped_left` [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] --> crates/day11/src/main.rs:21:15 [INFO] [stdout] | [INFO] [stdout] 21 | } else if (stone_val.ilog10() + 1) % 2 == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `(stone_val.ilog10() + 1).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] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/day6/src/main.rs:102:57 [INFO] [stdout] | [INFO] [stdout] 102 | .filter(|(pos, floor)| initial_visited.contains(&pos) && **floor == Floor::Empty) [INFO] [stdout] | ^^^^ help: change this to: `pos` [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: iterating on a map's values [INFO] [stdout] --> crates/day22/src/main.rs:62:5 [INFO] [stdout] | [INFO] [stdout] 62 | / sequence_map [INFO] [stdout] 63 | | .iter() [INFO] [stdout] 64 | | .map(|(_, bananas)| *bananas) [INFO] [stdout] | |_____________________________________^ help: try: `sequence_map.values().map(|bananas| *bananas)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_kv_map [INFO] [stdout] = note: `#[warn(clippy::iter_kv_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> crates/day21/src/main.rs:88:29 [INFO] [stdout] | [INFO] [stdout] 88 | fn sequence_from_path(path: &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] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 88 - fn sequence_from_path(path: &Vec) -> Vec { [INFO] [stdout] 88 + fn sequence_from_path(path: &[Position]) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/day21/src/main.rs:94:60 [INFO] [stdout] | [INFO] [stdout] 94 | let direction = CardinalDirection::from_cmp(by.cmp(&ay), bx.cmp(&ax)).unwrap(); [INFO] [stdout] | ^^^ help: change this to: `ay` [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] --> crates/day21/src/main.rs:94:73 [INFO] [stdout] | [INFO] [stdout] 94 | let direction = CardinalDirection::from_cmp(by.cmp(&ay), bx.cmp(&ax)).unwrap(); [INFO] [stdout] | ^^^ help: change this to: `ax` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/day21/src/main.rs:191:60 [INFO] [stdout] | [INFO] [stdout] 191 | let lock_paths = &lock_paths[&(lock_key_to_pos[&curr], lock_key_to_pos[next])]; [INFO] [stdout] | ^^^^^ help: change this to: `curr` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/day25/src/main.rs:26:36 [INFO] [stdout] | [INFO] [stdout] 26 | .map(|grid| Grid::from_str(&grid, Tile::from)) [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: consider using `sort_by_key` [INFO] [stdout] --> crates/day3/src/main.rs:20:5 [INFO] [stdout] | [INFO] [stdout] 20 | instructions.sort_by(|a, b| a.start().cmp(&b.start())); [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] 20 - instructions.sort_by(|a, b| a.start().cmp(&b.start())); [INFO] [stdout] 20 + instructions.sort_by_key(|a| a.start()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 20.93s [INFO] running `Command { std: "docker" "inspect" "a26458b99ec00164c9af117627a78257553c5add4474d320a19c14b46ba9aed0", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "a26458b99ec00164c9af117627a78257553c5add4474d320a19c14b46ba9aed0", kill_on_drop: false }` [INFO] [stdout] a26458b99ec00164c9af117627a78257553c5add4474d320a19c14b46ba9aed0