[INFO] cloning repository https://github.com/skaggmannen/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/skaggmannen/aoc-2024" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fskaggmannen%2Faoc-2024", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fskaggmannen%2Faoc-2024'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] f8513424e54aaeef96133e71a0d2d8de4db68d42 [INFO] linting skaggmannen/aoc-2024 against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fskaggmannen%2Faoc-2024" "/workspace/builds/worker-5-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-5-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/skaggmannen/aoc-2024 [INFO] finished tweaking git repo https://github.com/skaggmannen/aoc-2024 [INFO] tweaked toml for git repo https://github.com/skaggmannen/aoc-2024 written to /workspace/builds/worker-5-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/skaggmannen/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/skaggmannen/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 dot_graph v0.2.3 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-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] 9afbd8525b93936e4aeb29c18df02c84e20c7155974ebd9c6faa722bec9781f8 [INFO] running `Command { std: "docker" "start" "-a" "9afbd8525b93936e4aeb29c18df02c84e20c7155974ebd9c6faa722bec9781f8", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "9afbd8525b93936e4aeb29c18df02c84e20c7155974ebd9c6faa722bec9781f8", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "9afbd8525b93936e4aeb29c18df02c84e20c7155974ebd9c6faa722bec9781f8", kill_on_drop: false }` [INFO] [stdout] 9afbd8525b93936e4aeb29c18df02c84e20c7155974ebd9c6faa722bec9781f8 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-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] 5d2dfcae2f97bcd75f51010605f621b34ced5a2c7f862edb1059db514bf1a150 [INFO] running `Command { std: "docker" "start" "-a" "5d2dfcae2f97bcd75f51010605f621b34ced5a2c7f862edb1059db514bf1a150", kill_on_drop: false }` [INFO] [stderr] Checking util v0.1.0 (/opt/rustwide/workdir/util) [INFO] [stderr] Checking dot_graph v0.2.3 [INFO] [stderr] Checking day15 v0.1.0 (/opt/rustwide/workdir/day15) [INFO] [stderr] Checking day11 v0.1.0 (/opt/rustwide/workdir/day11) [INFO] [stderr] Checking day12 v0.1.0 (/opt/rustwide/workdir/day12) [INFO] [stderr] Checking day8 v0.1.0 (/opt/rustwide/workdir/day8) [INFO] [stderr] Checking day10 v0.1.0 (/opt/rustwide/workdir/day10) [INFO] [stderr] Checking day13 v0.1.0 (/opt/rustwide/workdir/day13) [INFO] [stderr] Checking day18 v0.1.0 (/opt/rustwide/workdir/day18) [INFO] [stderr] Checking day14 v0.1.0 (/opt/rustwide/workdir/day14) [INFO] [stderr] Checking day5 v0.1.0 (/opt/rustwide/workdir/day5) [INFO] [stderr] Checking dayXX v0.1.0 (/opt/rustwide/workdir/dayXX) [INFO] [stderr] Checking day22 v0.1.0 (/opt/rustwide/workdir/day22) [INFO] [stderr] Checking day1 v0.1.0 (/opt/rustwide/workdir/day1) [INFO] [stderr] Checking day16 v0.1.0 (/opt/rustwide/workdir/day16) [INFO] [stderr] Checking day2 v0.1.0 (/opt/rustwide/workdir/day2) [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> day22/src/main.rs:39:16 [INFO] [stdout] | [INFO] [stdout] 39 | prices(&s) [INFO] [stdout] | ^^ help: change this to: `s` [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] --> day22/src/main.rs:43:17 [INFO] [stdout] | [INFO] [stdout] 43 | changes(&p) [INFO] [stdout] | ^^ help: change this to: `p` [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: the loop variable `j` is used to index `sequences` [INFO] [stdout] --> day22/src/main.rs:56:22 [INFO] [stdout] | [INFO] [stdout] 56 | for j in 1..buyers.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 56 - for j in 1..buyers.len() { [INFO] [stdout] 56 + for (j, ) in sequences.iter().enumerate().take(buyers.len()).skip(1) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> day22/src/main.rs:132:9 [INFO] [stdout] | [INFO] [stdout] 132 | self.secret = self.secret % 16777216; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.secret %= 16777216` [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 `.is_multiple_of()` [INFO] [stdout] --> day11/src/main.rs:48:15 [INFO] [stdout] | [INFO] [stdout] 48 | } else if count_digits(stone) % 2 == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `count_digits(stone).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: useless use of `format!` [INFO] [stdout] --> day18/src/main.rs:17:9 [INFO] [stdout] | [INFO] [stdout] 17 | format!("this is impossible!") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"this is impossible!".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> day18/src/main.rs:32:5 [INFO] [stdout] | [INFO] [stdout] 32 | format!("this is impossible!") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"this is impossible!".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `w.get(0)` [INFO] [stdout] --> day2/src/main.rs:26:21 [INFO] [stdout] | [INFO] [stdout] 26 | let first = w.get(0).unwrap(); [INFO] [stdout] | ^^^^^^^^ help: try: `w.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> day18/src/main.rs:159:9 [INFO] [stdout] | [INFO] [stdout] 159 | return other.steps.cmp(&self.steps) [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] 159 - return other.steps.cmp(&self.steps) [INFO] [stdout] 159 + other.steps.cmp(&self.steps) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-canonical implementation of `partial_cmp` on an `Ord` type [INFO] [stdout] --> day18/src/main.rs:163:1 [INFO] [stdout] | [INFO] [stdout] 163 | / impl PartialOrd for Path { [INFO] [stdout] 164 | | fn partial_cmp(&self, other: &Self) -> Option { [INFO] [stdout] 165 | | return other.steps.partial_cmp(&self.steps) [INFO] [stdout] 166 | | } [INFO] [stdout] 167 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_canonical_partial_ord_impl [INFO] [stdout] = note: `#[warn(clippy::non_canonical_partial_ord_impl)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 164 - fn partial_cmp(&self, other: &Self) -> Option { [INFO] [stdout] 165 - return other.steps.partial_cmp(&self.steps) [INFO] [stdout] 166 - } [INFO] [stdout] 164 + fn partial_cmp(&self, other: &Self) -> Option { Some(self.cmp(other)) } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> day18/src/main.rs:165:9 [INFO] [stdout] | [INFO] [stdout] 165 | return other.steps.partial_cmp(&self.steps) [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 165 - return other.steps.partial_cmp(&self.steps) [INFO] [stdout] 165 + other.steps.partial_cmp(&self.steps) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `y` is used to index `lines` [INFO] [stdout] --> day16/src/main.rs:38:18 [INFO] [stdout] | [INFO] [stdout] 38 | for y in 0..lines.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 38 - for y in 0..lines.len() { [INFO] [stdout] 38 + for (y, ) in lines.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `x` is used to index `line` [INFO] [stdout] --> day16/src/main.rs:40:22 [INFO] [stdout] | [INFO] [stdout] 40 | for x in 0..line.len() { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 40 - for x in 0..line.len() { [INFO] [stdout] 40 + for (x, ) in line.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> day16/src/main.rs:107:26 [INFO] [stdout] | [INFO] [stdout] 107 | let mut visited: HashMap<((i32, i32), (i32, i32)), i32> = HashMap::new(); [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 use of `format!` [INFO] [stdout] --> day14/src/main.rs:23:5 [INFO] [stdout] | [INFO] [stdout] 23 | format!("Find the christams tree above 👆") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Find the christams tree above 👆".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> day14/src/main.rs:37:18 [INFO] [stdout] | [INFO] [stdout] 37 | .map(|s| Robot::parse(s)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Robot::parse` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-canonical implementation of `partial_cmp` on an `Ord` type [INFO] [stdout] --> day16/src/main.rs:318:1 [INFO] [stdout] | [INFO] [stdout] 318 | / impl PartialOrd for Reindeer { [INFO] [stdout] 319 | | fn partial_cmp(&self, other: &Self) -> Option { [INFO] [stdout] 320 | | other.score.partial_cmp(&self.score) [INFO] [stdout] 321 | | } [INFO] [stdout] 322 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_canonical_partial_ord_impl [INFO] [stdout] = note: `#[warn(clippy::non_canonical_partial_ord_impl)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 319 - fn partial_cmp(&self, other: &Self) -> Option { [INFO] [stdout] 320 - other.score.partial_cmp(&self.score) [INFO] [stdout] 321 - } [INFO] [stdout] 319 + fn partial_cmp(&self, other: &Self) -> Option { Some(self.cmp(other)) } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> day14/src/main.rs:107:24 [INFO] [stdout] | [INFO] [stdout] 107 | if let Some(_) = counts.get(&(x, y)) { [INFO] [stdout] | -------^^^^^^^---------------------- help: try: `if counts.get(&(x, y)).is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking day20 v0.1.0 (/opt/rustwide/workdir/day20) [INFO] [stderr] Checking day4 v0.1.0 (/opt/rustwide/workdir/day4) [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> day13/src/main.rs:37:14 [INFO] [stdout] | [INFO] [stdout] 37 | .map(|s| parse_machine(s)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `parse_machine` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking aoc-2024 v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> day5/src/main.rs:77:53 [INFO] [stdout] | [INFO] [stdout] 77 | fn is_valid(rules: &HashMap>, update: &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] 77 - fn is_valid(rules: &HashMap>, update: &Vec) -> bool { [INFO] [stdout] 77 + fn is_valid(rules: &HashMap>, update: &[u32]) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> day22/src/main.rs:39:16 [INFO] [stdout] | [INFO] [stdout] 39 | prices(&s) [INFO] [stdout] | ^^ help: change this to: `s` [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] --> day22/src/main.rs:43:17 [INFO] [stdout] | [INFO] [stdout] 43 | changes(&p) [INFO] [stdout] | ^^ help: change this to: `p` [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: the loop variable `j` is used to index `sequences` [INFO] [stdout] --> day22/src/main.rs:56:22 [INFO] [stdout] | [INFO] [stdout] 56 | for j in 1..buyers.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 56 - for j in 1..buyers.len() { [INFO] [stdout] 56 + for (j, ) in sequences.iter().enumerate().take(buyers.len()).skip(1) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> day12/src/main.rs:44:35 [INFO] [stdout] | [INFO] [stdout] 44 | result += find_region(&map, (row, col), &mut visited); [INFO] [stdout] | ^^^^ help: change this to: `map` [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] --> day12/src/main.rs:50:21 [INFO] [stdout] | [INFO] [stdout] 50 | fn find_region(map: &Vec>, start: Point, visited: &mut HashSet) -> u64 { [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] 50 - fn find_region(map: &Vec>, start: Point, visited: &mut HashSet) -> u64 { [INFO] [stdout] 50 + fn find_region(map: &[Vec], start: Point, visited: &mut HashSet) -> u64 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> day22/src/main.rs:132:9 [INFO] [stdout] | [INFO] [stdout] 132 | self.secret = self.secret % 16777216; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.secret %= 16777216` [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: the loop variable `y` is used to index `cells` [INFO] [stdout] --> day15/src/main.rs:101:18 [INFO] [stdout] | [INFO] [stdout] 101 | for y in 0..cells.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 101 - for y in 0..cells.len() { [INFO] [stdout] 101 + for (y, ) in cells.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `x` is used to index `cells` [INFO] [stdout] --> day15/src/main.rs:102:22 [INFO] [stdout] | [INFO] [stdout] 102 | for x in 0..cells[y].len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 102 - for x in 0..cells[y].len() { [INFO] [stdout] 102 + for (x, ) in cells.iter().enumerate().take(cells[y].len()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> day15/src/main.rs:198:19 [INFO] [stdout] | [INFO] [stdout] 198 | } else if !self.get_wall(next).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.get_wall(next).is_none()` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> day12/src/main.rs:122:41 [INFO] [stdout] | [INFO] [stdout] 122 | result += find_region_part2(&map, (row, col), &mut visited); [INFO] [stdout] | ^^^^ help: change this to: `map` [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 `if` has identical blocks [INFO] [stdout] --> day15/src/main.rs:235:55 [INFO] [stdout] | [INFO] [stdout] 235 | if self.get_wall(first).is_some() { [INFO] [stdout] | _______________________________________________________^ [INFO] [stdout] 236 | | return false; [INFO] [stdout] 237 | | } else if self.get_wall(second).is_some() { [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> day15/src/main.rs:237:63 [INFO] [stdout] | [INFO] [stdout] 237 | } else if self.get_wall(second).is_some() { [INFO] [stdout] | _______________________________________________________________^ [INFO] [stdout] 238 | | return false; [INFO] [stdout] 239 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `y` is used to index `cells` [INFO] [stdout] --> day15/src/main.rs:287:18 [INFO] [stdout] | [INFO] [stdout] 287 | for y in 0..cells.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 287 - for y in 0..cells.len() { [INFO] [stdout] 287 + for (y, ) in cells.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `x` is used to index `cells` [INFO] [stdout] --> day15/src/main.rs:288:22 [INFO] [stdout] | [INFO] [stdout] 288 | for x in 0..cells[y].len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 288 - for x in 0..cells[y].len() { [INFO] [stdout] 288 + for (x, ) in cells.iter().enumerate().take(cells[y].len()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking day24 v0.1.0 (/opt/rustwide/workdir/day24) [INFO] [stdout] warning: casting the result of `i32::abs()` to usize [INFO] [stdout] --> day20/src/main.rs:83:46 [INFO] [stdout] | [INFO] [stdout] 83 | let gain = next_i - i - (dx.abs() as usize) - (dy.abs() as usize); [INFO] [stdout] | ^^^^^^^^ help: replace with: `dx.unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] = note: `#[warn(clippy::cast_abs_to_unsigned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `i32::abs()` to usize [INFO] [stdout] --> day20/src/main.rs:83:68 [INFO] [stdout] | [INFO] [stdout] 83 | let gain = next_i - i - (dx.abs() as usize) - (dy.abs() as usize); [INFO] [stdout] | ^^^^^^^^ help: replace with: `dy.unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> day12/src/main.rs:44:35 [INFO] [stdout] | [INFO] [stdout] 44 | result += find_region(&map, (row, col), &mut visited); [INFO] [stdout] | ^^^^ help: change this to: `map` [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] --> day12/src/main.rs:50:21 [INFO] [stdout] | [INFO] [stdout] 50 | fn find_region(map: &Vec>, start: Point, visited: &mut HashSet) -> u64 { [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] 50 - fn find_region(map: &Vec>, start: Point, visited: &mut HashSet) -> u64 { [INFO] [stdout] 50 + fn find_region(map: &[Vec], start: Point, visited: &mut HashSet) -> u64 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> day12/src/main.rs:122:41 [INFO] [stdout] | [INFO] [stdout] 122 | result += find_region_part2(&map, (row, col), &mut visited); [INFO] [stdout] | ^^^^ help: change this to: `map` [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: useless use of `format!` [INFO] [stdout] --> day24/src/main.rs:44:5 [INFO] [stdout] | [INFO] [stdout] 44 | format!("bkr,mqh,rnq,tfb,vvr,z08,z28,z39") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"bkr,mqh,rnq,tfb,vvr,z08,z28,z39".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking day17 v0.1.0 (/opt/rustwide/workdir/day17) [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> day24/src/main.rs:128:9 [INFO] [stdout] | [INFO] [stdout] 128 | z_outputs.sort_by(|(a, _), (b, _)| a.cmp(&b)); [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] 128 - z_outputs.sort_by(|(a, _), (b, _)| a.cmp(&b)); [INFO] [stdout] 128 + z_outputs.sort_by_key(|(a, _)| *a); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> day24/src/main.rs:128:50 [INFO] [stdout] | [INFO] [stdout] 128 | z_outputs.sort_by(|(a, _), (b, _)| a.cmp(&b)); [INFO] [stdout] | ^^ help: change this to: `b` [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 day3 v0.1.0 (/opt/rustwide/workdir/day3) [INFO] [stderr] Checking day23 v0.1.0 (/opt/rustwide/workdir/day23) [INFO] [stderr] Checking day6 v0.1.0 (/opt/rustwide/workdir/day6) [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> day11/src/main.rs:48:15 [INFO] [stdout] | [INFO] [stdout] 48 | } else if count_digits(stone) % 2 == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `count_digits(stone).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: accessing first element with `w.get(0)` [INFO] [stdout] --> day2/src/main.rs:26:21 [INFO] [stdout] | [INFO] [stdout] 26 | let first = w.get(0).unwrap(); [INFO] [stdout] | ^^^^^^^^ help: try: `w.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` 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] --> day10/src/main.rs:42:26 [INFO] [stdout] | [INFO] [stdout] 42 | fn find_trail_heads(map: &Vec>) -> Vec<(i32, i32)> { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 42 - fn find_trail_heads(map: &Vec>) -> Vec<(i32, i32)> { [INFO] [stdout] 42 + fn find_trail_heads(map: &[Vec]) -> Vec<(i32, i32)> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `i32::abs()` to usize [INFO] [stdout] --> day20/src/main.rs:83:46 [INFO] [stdout] | [INFO] [stdout] 83 | let gain = next_i - i - (dx.abs() as usize) - (dy.abs() as usize); [INFO] [stdout] | ^^^^^^^^ help: replace with: `dx.unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] = note: `#[warn(clippy::cast_abs_to_unsigned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `i32::abs()` to usize [INFO] [stdout] --> day20/src/main.rs:83:68 [INFO] [stdout] | [INFO] [stdout] 83 | let gain = next_i - i - (dx.abs() as usize) - (dy.abs() as usize); [INFO] [stdout] | ^^^^^^^^ help: replace with: `dy.unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> day10/src/main.rs:83:13 [INFO] [stdout] | [INFO] [stdout] 83 | return trail_score(map, (nx, ny), visited); [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] 83 - return trail_score(map, (nx, ny), visited); [INFO] [stdout] 83 + trail_score(map, (nx, ny), visited) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> day10/src/main.rs:85:13 [INFO] [stdout] | [INFO] [stdout] 85 | return 0; [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 85 - return 0; [INFO] [stdout] 85 + 0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> day10/src/main.rs:114:13 [INFO] [stdout] | [INFO] [stdout] 114 | return trail_rating(map, (nx, ny)); [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 114 - return trail_rating(map, (nx, ny)); [INFO] [stdout] 114 + trail_rating(map, (nx, ny)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> day10/src/main.rs:116:13 [INFO] [stdout] | [INFO] [stdout] 116 | return 0; [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 116 - return 0; [INFO] [stdout] 116 + 0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> day10/src/main.rs:42:26 [INFO] [stdout] | [INFO] [stdout] 42 | fn find_trail_heads(map: &Vec>) -> Vec<(i32, i32)> { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 42 - fn find_trail_heads(map: &Vec>) -> Vec<(i32, i32)> { [INFO] [stdout] 42 + fn find_trail_heads(map: &[Vec]) -> Vec<(i32, i32)> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> day10/src/main.rs:83:13 [INFO] [stdout] | [INFO] [stdout] 83 | return trail_score(map, (nx, ny), visited); [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] 83 - return trail_score(map, (nx, ny), visited); [INFO] [stdout] 83 + trail_score(map, (nx, ny), visited) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> day10/src/main.rs:85:13 [INFO] [stdout] | [INFO] [stdout] 85 | return 0; [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 85 - return 0; [INFO] [stdout] 85 + 0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> day10/src/main.rs:114:13 [INFO] [stdout] | [INFO] [stdout] 114 | return trail_rating(map, (nx, ny)); [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 114 - return trail_rating(map, (nx, ny)); [INFO] [stdout] 114 + trail_rating(map, (nx, ny)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> day10/src/main.rs:116:13 [INFO] [stdout] | [INFO] [stdout] 116 | return 0; [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 116 - return 0; [INFO] [stdout] 116 + 0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> day4/src/main.rs:66:21 [INFO] [stdout] | [INFO] [stdout] 66 | fn find_x_mas(grid: &Vec>, row: usize, col: usize) -> 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] 66 - fn find_x_mas(grid: &Vec>, row: usize, col: usize) -> bool { [INFO] [stdout] 66 + fn find_x_mas(grid: &[Vec], row: usize, col: usize) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> day4/src/main.rs:71:21 [INFO] [stdout] | [INFO] [stdout] 71 | let down_left = match (grid[row-1][col-1], grid[row+1][col+1]) { [INFO] [stdout] | _____________________^ [INFO] [stdout] 72 | | ('M', 'S') => true, [INFO] [stdout] 73 | | ('S', 'M') => true, [INFO] [stdout] 74 | | _ => false, [INFO] [stdout] 75 | | }; [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] 71 - let down_left = match (grid[row-1][col-1], grid[row+1][col+1]) { [INFO] [stdout] 72 - ('M', 'S') => true, [INFO] [stdout] 73 - ('S', 'M') => true, [INFO] [stdout] 74 - _ => false, [INFO] [stdout] 75 - }; [INFO] [stdout] 71 + let down_left = matches!((grid[row-1][col-1], grid[row+1][col+1]), ('M', 'S') | ('S', 'M')); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> day4/src/main.rs:77:22 [INFO] [stdout] | [INFO] [stdout] 77 | let down_right = match (grid[row-1][col+1], grid[row+1][col-1]) { [INFO] [stdout] | ______________________^ [INFO] [stdout] 78 | | ('M', 'S') => true, [INFO] [stdout] 79 | | ('S', 'M') => true, [INFO] [stdout] 80 | | _ => false, [INFO] [stdout] 81 | | }; [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] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 77 - let down_right = match (grid[row-1][col+1], grid[row+1][col-1]) { [INFO] [stdout] 78 - ('M', 'S') => true, [INFO] [stdout] 79 - ('S', 'M') => true, [INFO] [stdout] 80 - _ => false, [INFO] [stdout] 81 - }; [INFO] [stdout] 77 + let down_right = matches!((grid[row-1][col+1], grid[row+1][col-1]), ('M', 'S') | ('S', 'M')); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking day19 v0.1.0 (/opt/rustwide/workdir/day19) [INFO] [stderr] Checking day7 v0.1.0 (/opt/rustwide/workdir/day7) [INFO] [stdout] warning: the loop variable `y` is used to index `lines` [INFO] [stdout] --> day16/src/main.rs:38:18 [INFO] [stdout] | [INFO] [stdout] 38 | for y in 0..lines.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 38 - for y in 0..lines.len() { [INFO] [stdout] 38 + for (y, ) in lines.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `x` is used to index `line` [INFO] [stdout] --> day16/src/main.rs:40:22 [INFO] [stdout] | [INFO] [stdout] 40 | for x in 0..line.len() { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 40 - for x in 0..line.len() { [INFO] [stdout] 40 + for (x, ) in line.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking day21 v0.1.0 (/opt/rustwide/workdir/day21) [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> day16/src/main.rs:107:26 [INFO] [stdout] | [INFO] [stdout] 107 | let mut visited: HashMap<((i32, i32), (i32, i32)), i32> = HashMap::new(); [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: non-canonical implementation of `partial_cmp` on an `Ord` type [INFO] [stdout] --> day16/src/main.rs:318:1 [INFO] [stdout] | [INFO] [stdout] 318 | / impl PartialOrd for Reindeer { [INFO] [stdout] 319 | | fn partial_cmp(&self, other: &Self) -> Option { [INFO] [stdout] 320 | | other.score.partial_cmp(&self.score) [INFO] [stdout] 321 | | } [INFO] [stdout] 322 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_canonical_partial_ord_impl [INFO] [stdout] = note: `#[warn(clippy::non_canonical_partial_ord_impl)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 319 - fn partial_cmp(&self, other: &Self) -> Option { [INFO] [stdout] 320 - other.score.partial_cmp(&self.score) [INFO] [stdout] 321 - } [INFO] [stdout] 319 + fn partial_cmp(&self, other: &Self) -> Option { Some(self.cmp(other)) } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> day17/src/main.rs:14:5 [INFO] [stdout] | [INFO] [stdout] 14 | format!("{}", p.output.iter().map(|v| v.to_string()).collect::>().join(",")) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `p.output.iter().map(|v| v.to_string()).collect::>().join(",").to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> day17/src/main.rs:24:5 [INFO] [stdout] | [INFO] [stdout] 24 | format!("this is impossible!") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"this is impossible!".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> day17/src/main.rs:144:21 [INFO] [stdout] | [INFO] [stdout] 144 | self.b = self.b ^ literal; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.b ^= literal` [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 an assign operation [INFO] [stdout] --> day17/src/main.rs:148:21 [INFO] [stdout] | [INFO] [stdout] 148 | self.b = self.b ^ self.c; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.b ^= self.c` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `ADV` contains a capitalized acronym [INFO] [stdout] --> day17/src/main.rs:188:5 [INFO] [stdout] | [INFO] [stdout] 188 | ADV { combo: i64 }, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Adv` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `BDV` contains a capitalized acronym [INFO] [stdout] --> day17/src/main.rs:189:5 [INFO] [stdout] | [INFO] [stdout] 189 | BDV { combo: i64 }, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Bdv` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `CDV` contains a capitalized acronym [INFO] [stdout] --> day17/src/main.rs:190:5 [INFO] [stdout] | [INFO] [stdout] 190 | CDV { combo: i64 }, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Cdv` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `BXL` contains a capitalized acronym [INFO] [stdout] --> day17/src/main.rs:191:5 [INFO] [stdout] | [INFO] [stdout] 191 | BXL { literal: i64 }, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Bxl` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `BXC` contains a capitalized acronym [INFO] [stdout] --> day17/src/main.rs:192:5 [INFO] [stdout] | [INFO] [stdout] 192 | BXC { v: i64 }, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter (notice the capitalization): `Bxc` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `BST` contains a capitalized acronym [INFO] [stdout] --> day17/src/main.rs:193:5 [INFO] [stdout] | [INFO] [stdout] 193 | BST { combo: i64 }, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Bst` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `JNZ` contains a capitalized acronym [INFO] [stdout] --> day17/src/main.rs:194:5 [INFO] [stdout] | [INFO] [stdout] 194 | JNZ { literal: i64 }, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Jnz` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `OUT` contains a capitalized acronym [INFO] [stdout] --> day17/src/main.rs:195:5 [INFO] [stdout] | [INFO] [stdout] 195 | OUT { combo: i64 }, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Out` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: direct implementation of `ToString` [INFO] [stdout] --> day17/src/main.rs:214:1 [INFO] [stdout] | [INFO] [stdout] 214 | / impl ToString for Instruction { [INFO] [stdout] 215 | | fn to_string(&self) -> String { [INFO] [stdout] 216 | | match self { [INFO] [stdout] 217 | | Instruction::ADV { combo } => format!("{},{}", 0, combo), [INFO] [stdout] ... | [INFO] [stdout] 227 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: prefer implementing `Display` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_trait_impl [INFO] [stdout] = note: `#[warn(clippy::to_string_trait_impl)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> day24/src/main.rs:44:5 [INFO] [stdout] | [INFO] [stdout] 44 | format!("bkr,mqh,rnq,tfb,vvr,z08,z28,z39") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"bkr,mqh,rnq,tfb,vvr,z08,z28,z39".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> day24/src/main.rs:128:9 [INFO] [stdout] | [INFO] [stdout] 128 | z_outputs.sort_by(|(a, _), (b, _)| a.cmp(&b)); [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] 128 - z_outputs.sort_by(|(a, _), (b, _)| a.cmp(&b)); [INFO] [stdout] 128 + z_outputs.sort_by_key(|(a, _)| *a); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> day23/src/main.rs:19:5 [INFO] [stdout] | [INFO] [stdout] 19 | format!("{}", problem.largest_network().join(",")) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `problem.largest_network().join(",").to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> day24/src/main.rs:128:50 [INFO] [stdout] | [INFO] [stdout] 128 | z_outputs.sort_by(|(a, _), (b, _)| a.cmp(&b)); [INFO] [stdout] | ^^ help: change this to: `b` [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: the loop variable `j` is only used to index `others` [INFO] [stdout] --> day23/src/main.rs:52:26 [INFO] [stdout] | [INFO] [stdout] 52 | for j in i+1..others.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 52 - for j in i+1..others.len() { [INFO] [stdout] 52 + for in others.iter().skip(i+1) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is only used to index `others` [INFO] [stdout] --> day23/src/main.rs:83:34 [INFO] [stdout] | [INFO] [stdout] 83 | 'outer: for j in i+1..others.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 83 - 'outer: for j in i+1..others.len() { [INFO] [stdout] 83 + 'outer: for in others.iter().skip(i+1) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> day23/src/main.rs:86:56 [INFO] [stdout] | [INFO] [stdout] 86 | if !self.computers[c].contains(&n) { [INFO] [stdout] | ^^ help: change this to: `n` [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: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> day19/src/main.rs:61:31 [INFO] [stdout] | [INFO] [stdout] 61 | fn available_combinations<'a>(&self, design: &'a str, memory: &mut HashMap) -> usize { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 61 - fn available_combinations<'a>(&self, design: &'a str, memory: &mut HashMap) -> usize { [INFO] [stdout] 61 + fn available_combinations(&self, design: &str, memory: &mut HashMap) -> usize { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> day19/src/main.rs:78:9 [INFO] [stdout] | [INFO] [stdout] 78 | return result; [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] 78 - return result; [INFO] [stdout] 78 + result [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking day9 v0.1.0 (/opt/rustwide/workdir/day9) [INFO] [stdout] warning: the loop variable `y` is used to index `cells` [INFO] [stdout] --> day15/src/main.rs:101:18 [INFO] [stdout] | [INFO] [stdout] 101 | for y in 0..cells.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 101 - for y in 0..cells.len() { [INFO] [stdout] 101 + for (y, ) in cells.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `x` is used to index `cells` [INFO] [stdout] --> day15/src/main.rs:102:22 [INFO] [stdout] | [INFO] [stdout] 102 | for x in 0..cells[y].len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 102 - for x in 0..cells[y].len() { [INFO] [stdout] 102 + for (x, ) in cells.iter().enumerate().take(cells[y].len()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> day15/src/main.rs:198:19 [INFO] [stdout] | [INFO] [stdout] 198 | } else if !self.get_wall(next).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.get_wall(next).is_none()` [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 `if` has identical blocks [INFO] [stdout] --> day15/src/main.rs:235:55 [INFO] [stdout] | [INFO] [stdout] 235 | if self.get_wall(first).is_some() { [INFO] [stdout] | _______________________________________________________^ [INFO] [stdout] 236 | | return false; [INFO] [stdout] 237 | | } else if self.get_wall(second).is_some() { [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> day15/src/main.rs:237:63 [INFO] [stdout] | [INFO] [stdout] 237 | } else if self.get_wall(second).is_some() { [INFO] [stdout] | _______________________________________________________________^ [INFO] [stdout] 238 | | return false; [INFO] [stdout] 239 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> day3/src/main.rs:36:17 [INFO] [stdout] | [INFO] [stdout] 36 | return 0; [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] 36 - return 0; [INFO] [stdout] 36 + 0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> day3/src/main.rs:40:17 [INFO] [stdout] | [INFO] [stdout] 40 | return 0; [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 40 - return 0; [INFO] [stdout] 40 + 0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> day3/src/main.rs:46:21 [INFO] [stdout] | [INFO] [stdout] 46 | return a * b; [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 46 - return a * b; [INFO] [stdout] 46 + a * b [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> day3/src/main.rs:48:21 [INFO] [stdout] | [INFO] [stdout] 48 | return 0; [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 48 - return 0; [INFO] [stdout] 48 + 0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> day3/src/main.rs:51:18 [INFO] [stdout] | [INFO] [stdout] 51 | _ => return 0, [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 51 - _ => return 0, [INFO] [stdout] 51 + _ => 0, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `filter` for `Some` followed by `unwrap` [INFO] [stdout] --> day3/src/main.rs:31:43 [INFO] [stdout] | [INFO] [stdout] 31 | let mut groups = m.iter().skip(1).filter(|x| x.is_some()).map(|x| x.unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `flatten` instead: `flatten()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_filter_map [INFO] [stdout] = note: `#[warn(clippy::option_filter_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> day3/src/main.rs:43:17 [INFO] [stdout] | [INFO] [stdout] 43 | / if enabled { [INFO] [stdout] 44 | | let a = groups.next().unwrap().as_str().parse::().unwrap(); [INFO] [stdout] 45 | | let b = groups.next().unwrap().as_str().parse::().unwrap(); [INFO] [stdout] 46 | | return a * b; [INFO] [stdout] 47 | | } else { [INFO] [stdout] 48 | | return 0; [INFO] [stdout] 49 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 42 ~ "mul" [INFO] [stdout] 43 ~ if enabled => { [INFO] [stdout] 44 | let a = groups.next().unwrap().as_str().parse::().unwrap(); [INFO] [stdout] 45 | let b = groups.next().unwrap().as_str().parse::().unwrap(); [INFO] [stdout] 46 | return a * b; [INFO] [stdout] 47 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> day19/src/main.rs:61:31 [INFO] [stdout] | [INFO] [stdout] 61 | fn available_combinations<'a>(&self, design: &'a str, memory: &mut HashMap) -> usize { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 61 - fn available_combinations<'a>(&self, design: &'a str, memory: &mut HashMap) -> usize { [INFO] [stdout] 61 + fn available_combinations(&self, design: &str, memory: &mut HashMap) -> usize { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> day19/src/main.rs:78:9 [INFO] [stdout] | [INFO] [stdout] 78 | return result; [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] 78 - return result; [INFO] [stdout] 78 + result [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `y` is used to index `cells` [INFO] [stdout] --> day15/src/main.rs:287:18 [INFO] [stdout] | [INFO] [stdout] 287 | for y in 0..cells.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 287 - for y in 0..cells.len() { [INFO] [stdout] 287 + for (y, ) in cells.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `x` is used to index `cells` [INFO] [stdout] --> day15/src/main.rs:288:22 [INFO] [stdout] | [INFO] [stdout] 288 | for x in 0..cells[y].len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 288 - for x in 0..cells[y].len() { [INFO] [stdout] 288 + for (x, ) in cells.iter().enumerate().take(cells[y].len()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> day7/src/main.rs:11:24 [INFO] [stdout] | [INFO] [stdout] 11 | const OPERATORS: [&'static str; 2] = ["+", "*"]; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] = note: `#[warn(clippy::redundant_static_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> day7/src/main.rs:32:24 [INFO] [stdout] | [INFO] [stdout] 32 | const OPERATORS: [&'static str; 3] = ["+", "*", "||"]; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> day13/src/main.rs:37:14 [INFO] [stdout] | [INFO] [stdout] 37 | .map(|s| parse_machine(s)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `parse_machine` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> day4/src/main.rs:66:21 [INFO] [stdout] | [INFO] [stdout] 66 | fn find_x_mas(grid: &Vec>, row: usize, col: usize) -> 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] 66 - fn find_x_mas(grid: &Vec>, row: usize, col: usize) -> bool { [INFO] [stdout] 66 + fn find_x_mas(grid: &[Vec], row: usize, col: usize) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> day17/src/main.rs:14:5 [INFO] [stdout] | [INFO] [stdout] 14 | format!("{}", p.output.iter().map(|v| v.to_string()).collect::>().join(",")) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `p.output.iter().map(|v| v.to_string()).collect::>().join(",").to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> day17/src/main.rs:24:5 [INFO] [stdout] | [INFO] [stdout] 24 | format!("this is impossible!") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"this is impossible!".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> day6/src/main.rs:25:37 [INFO] [stdout] | [INFO] [stdout] 25 | if (x, y) == original.guard { [INFO] [stdout] | _____________________________________^ [INFO] [stdout] 26 | | continue; [INFO] [stdout] 27 | | } else if original.obstructions.contains_key(&(x, y)) { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> day6/src/main.rs:27:63 [INFO] [stdout] | [INFO] [stdout] 27 | } else if original.obstructions.contains_key(&(x, y)) { [INFO] [stdout] | _______________________________________________________________^ [INFO] [stdout] 28 | | continue; [INFO] [stdout] 29 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> day4/src/main.rs:71:21 [INFO] [stdout] | [INFO] [stdout] 71 | let down_left = match (grid[row-1][col-1], grid[row+1][col+1]) { [INFO] [stdout] | _____________________^ [INFO] [stdout] 72 | | ('M', 'S') => true, [INFO] [stdout] 73 | | ('S', 'M') => true, [INFO] [stdout] 74 | | _ => false, [INFO] [stdout] 75 | | }; [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] 71 - let down_left = match (grid[row-1][col-1], grid[row+1][col+1]) { [INFO] [stdout] 72 - ('M', 'S') => true, [INFO] [stdout] 73 - ('S', 'M') => true, [INFO] [stdout] 74 - _ => false, [INFO] [stdout] 75 - }; [INFO] [stdout] 71 + let down_left = matches!((grid[row-1][col-1], grid[row+1][col+1]), ('M', 'S') | ('S', 'M')); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> day4/src/main.rs:77:22 [INFO] [stdout] | [INFO] [stdout] 77 | let down_right = match (grid[row-1][col+1], grid[row+1][col-1]) { [INFO] [stdout] | ______________________^ [INFO] [stdout] 78 | | ('M', 'S') => true, [INFO] [stdout] 79 | | ('S', 'M') => true, [INFO] [stdout] 80 | | _ => false, [INFO] [stdout] 81 | | }; [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] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 77 - let down_right = match (grid[row-1][col+1], grid[row+1][col-1]) { [INFO] [stdout] 78 - ('M', 'S') => true, [INFO] [stdout] 79 - ('S', 'M') => true, [INFO] [stdout] 80 - _ => false, [INFO] [stdout] 81 - }; [INFO] [stdout] 77 + let down_right = matches!((grid[row-1][col+1], grid[row+1][col-1]), ('M', 'S') | ('S', 'M')); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> day17/src/main.rs:144:21 [INFO] [stdout] | [INFO] [stdout] 144 | self.b = self.b ^ literal; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.b ^= literal` [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 an assign operation [INFO] [stdout] --> day17/src/main.rs:148:21 [INFO] [stdout] | [INFO] [stdout] 148 | self.b = self.b ^ self.c; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.b ^= self.c` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `ADV` contains a capitalized acronym [INFO] [stdout] --> day17/src/main.rs:188:5 [INFO] [stdout] | [INFO] [stdout] 188 | ADV { combo: i64 }, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Adv` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `BDV` contains a capitalized acronym [INFO] [stdout] --> day17/src/main.rs:189:5 [INFO] [stdout] | [INFO] [stdout] 189 | BDV { combo: i64 }, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Bdv` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `CDV` contains a capitalized acronym [INFO] [stdout] --> day17/src/main.rs:190:5 [INFO] [stdout] | [INFO] [stdout] 190 | CDV { combo: i64 }, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Cdv` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `BXL` contains a capitalized acronym [INFO] [stdout] --> day17/src/main.rs:191:5 [INFO] [stdout] | [INFO] [stdout] 191 | BXL { literal: i64 }, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Bxl` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `BXC` contains a capitalized acronym [INFO] [stdout] --> day17/src/main.rs:192:5 [INFO] [stdout] | [INFO] [stdout] 192 | BXC { v: i64 }, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter (notice the capitalization): `Bxc` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `BST` contains a capitalized acronym [INFO] [stdout] --> day17/src/main.rs:193:5 [INFO] [stdout] | [INFO] [stdout] 193 | BST { combo: i64 }, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Bst` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `JNZ` contains a capitalized acronym [INFO] [stdout] --> day17/src/main.rs:194:5 [INFO] [stdout] | [INFO] [stdout] 194 | JNZ { literal: i64 }, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Jnz` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `OUT` contains a capitalized acronym [INFO] [stdout] --> day17/src/main.rs:195:5 [INFO] [stdout] | [INFO] [stdout] 195 | OUT { combo: i64 }, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Out` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: direct implementation of `ToString` [INFO] [stdout] --> day17/src/main.rs:214:1 [INFO] [stdout] | [INFO] [stdout] 214 | / impl ToString for Instruction { [INFO] [stdout] 215 | | fn to_string(&self) -> String { [INFO] [stdout] 216 | | match self { [INFO] [stdout] 217 | | Instruction::ADV { combo } => format!("{},{}", 0, combo), [INFO] [stdout] ... | [INFO] [stdout] 227 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: prefer implementing `Display` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_trait_impl [INFO] [stdout] = note: `#[warn(clippy::to_string_trait_impl)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `if let .. else` expression looks like `matches!` macro [INFO] [stdout] --> day9/src/main.rs:67:21 [INFO] [stdout] | [INFO] [stdout] 67 | / if let Block::Free = b { [INFO] [stdout] 68 | | true [INFO] [stdout] 69 | | } else { [INFO] [stdout] 70 | | false [INFO] [stdout] 71 | | } [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] 67 - if let Block::Free = b { [INFO] [stdout] 68 - true [INFO] [stdout] 69 - } else { [INFO] [stdout] 70 - false [INFO] [stdout] 71 - } [INFO] [stdout] 67 + matches!(b, Block::Free) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking day25 v0.1.0 (/opt/rustwide/workdir/day25) [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> day23/src/main.rs:19:5 [INFO] [stdout] | [INFO] [stdout] 19 | format!("{}", problem.largest_network().join(",")) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `problem.largest_network().join(",").to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is only used to index `others` [INFO] [stdout] --> day23/src/main.rs:52:26 [INFO] [stdout] | [INFO] [stdout] 52 | for j in i+1..others.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 52 - for j in i+1..others.len() { [INFO] [stdout] 52 + for in others.iter().skip(i+1) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is only used to index `others` [INFO] [stdout] --> day23/src/main.rs:83:34 [INFO] [stdout] | [INFO] [stdout] 83 | 'outer: for j in i+1..others.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 83 - 'outer: for j in i+1..others.len() { [INFO] [stdout] 83 + 'outer: for in others.iter().skip(i+1) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> day23/src/main.rs:86:56 [INFO] [stdout] | [INFO] [stdout] 86 | if !self.computers[c].contains(&n) { [INFO] [stdout] | ^^ help: change this to: `n` [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] --> day21/src/main.rs:41:27 [INFO] [stdout] | [INFO] [stdout] 41 | let len = dfs(&code, depth, &type_on_num_pad, &mut mem); [INFO] [stdout] | ^^^^^ help: change this to: `code` [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: the borrowed expression implements the required traits [INFO] [stdout] --> day21/src/main.rs:41:41 [INFO] [stdout] | [INFO] [stdout] 41 | let len = dfs(&code, depth, &type_on_num_pad, &mut mem); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `type_on_num_pad` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> day21/src/main.rs:42:21 [INFO] [stdout] | [INFO] [stdout] 42 | let v = (&code[..code.len() - 1]).parse::().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `code[..code.len() - 1]` [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: the borrowed expression implements the required traits [INFO] [stdout] --> day21/src/main.rs:71:41 [INFO] [stdout] | [INFO] [stdout] 71 | .map(|s| dfs(&s, depth - 1, &type_on_dir_pad, mem)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `type_on_dir_pad` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> day14/src/main.rs:23:5 [INFO] [stdout] | [INFO] [stdout] 23 | format!("Find the christams tree above 👆") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Find the christams tree above 👆".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> day14/src/main.rs:37:18 [INFO] [stdout] | [INFO] [stdout] 37 | .map(|s| Robot::parse(s)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Robot::parse` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> day14/src/main.rs:107:24 [INFO] [stdout] | [INFO] [stdout] 107 | if let Some(_) = counts.get(&(x, y)) { [INFO] [stdout] | -------^^^^^^^---------------------- help: try: `if counts.get(&(x, y)).is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> day7/src/main.rs:11:24 [INFO] [stdout] | [INFO] [stdout] 11 | const OPERATORS: [&'static str; 2] = ["+", "*"]; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] = note: `#[warn(clippy::redundant_static_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> day7/src/main.rs:32:24 [INFO] [stdout] | [INFO] [stdout] 32 | const OPERATORS: [&'static str; 3] = ["+", "*", "||"]; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> day5/src/main.rs:77:53 [INFO] [stdout] | [INFO] [stdout] 77 | fn is_valid(rules: &HashMap>, update: &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] 77 - fn is_valid(rules: &HashMap>, update: &Vec) -> bool { [INFO] [stdout] 77 + fn is_valid(rules: &HashMap>, update: &[u32]) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> day25/src/main.rs:54:32 [INFO] [stdout] | [INFO] [stdout] 54 | if key_matches(&key, &lock) { [INFO] [stdout] | ^^^^ help: change this to: `key` [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] --> day25/src/main.rs:54:38 [INFO] [stdout] | [INFO] [stdout] 54 | if key_matches(&key, &lock) { [INFO] [stdout] | ^^^^^ help: change this to: `lock` [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: the loop variable `x` is used to index `heights` [INFO] [stdout] --> day25/src/main.rs:66:14 [INFO] [stdout] | [INFO] [stdout] 66 | for x in 0..l[0].len() { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 66 - for x in 0..l[0].len() { [INFO] [stdout] 66 + for (x, ) in heights.iter_mut().enumerate().take(l[0].len()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `y` is used to index `l` [INFO] [stdout] --> day25/src/main.rs:67:18 [INFO] [stdout] | [INFO] [stdout] 67 | for y in 0..l.len() { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 67 - for y in 0..l.len() { [INFO] [stdout] 67 + for (y, ) in l.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `x` is used to index `heights` [INFO] [stdout] --> day25/src/main.rs:80:14 [INFO] [stdout] | [INFO] [stdout] 80 | for x in 0..l[0].len() { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 80 - for x in 0..l[0].len() { [INFO] [stdout] 80 + for (x, ) in heights.iter_mut().enumerate().take(l[0].len()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> day3/src/main.rs:36:17 [INFO] [stdout] | [INFO] [stdout] 36 | return 0; [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] 36 - return 0; [INFO] [stdout] 36 + 0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> day3/src/main.rs:40:17 [INFO] [stdout] | [INFO] [stdout] 40 | return 0; [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 40 - return 0; [INFO] [stdout] 40 + 0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> day3/src/main.rs:46:21 [INFO] [stdout] | [INFO] [stdout] 46 | return a * b; [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 46 - return a * b; [INFO] [stdout] 46 + a * b [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> day3/src/main.rs:48:21 [INFO] [stdout] | [INFO] [stdout] 48 | return 0; [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 48 - return 0; [INFO] [stdout] 48 + 0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> day3/src/main.rs:51:18 [INFO] [stdout] | [INFO] [stdout] 51 | _ => return 0, [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 51 - _ => return 0, [INFO] [stdout] 51 + _ => 0, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `filter` for `Some` followed by `unwrap` [INFO] [stdout] --> day3/src/main.rs:31:43 [INFO] [stdout] | [INFO] [stdout] 31 | let mut groups = m.iter().skip(1).filter(|x| x.is_some()).map(|x| x.unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `flatten` instead: `flatten()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_filter_map [INFO] [stdout] = note: `#[warn(clippy::option_filter_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> day3/src/main.rs:43:17 [INFO] [stdout] | [INFO] [stdout] 43 | / if enabled { [INFO] [stdout] 44 | | let a = groups.next().unwrap().as_str().parse::().unwrap(); [INFO] [stdout] 45 | | let b = groups.next().unwrap().as_str().parse::().unwrap(); [INFO] [stdout] 46 | | return a * b; [INFO] [stdout] 47 | | } else { [INFO] [stdout] 48 | | return 0; [INFO] [stdout] 49 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 42 ~ "mul" [INFO] [stdout] 43 ~ if enabled => { [INFO] [stdout] 44 | let a = groups.next().unwrap().as_str().parse::().unwrap(); [INFO] [stdout] 45 | let b = groups.next().unwrap().as_str().parse::().unwrap(); [INFO] [stdout] 46 | return a * b; [INFO] [stdout] 47 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> day25/src/main.rs:54:32 [INFO] [stdout] | [INFO] [stdout] 54 | if key_matches(&key, &lock) { [INFO] [stdout] | ^^^^ help: change this to: `key` [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] --> day25/src/main.rs:54:38 [INFO] [stdout] | [INFO] [stdout] 54 | if key_matches(&key, &lock) { [INFO] [stdout] | ^^^^^ help: change this to: `lock` [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: the loop variable `x` is used to index `heights` [INFO] [stdout] --> day25/src/main.rs:66:14 [INFO] [stdout] | [INFO] [stdout] 66 | for x in 0..l[0].len() { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 66 - for x in 0..l[0].len() { [INFO] [stdout] 66 + for (x, ) in heights.iter_mut().enumerate().take(l[0].len()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `y` is used to index `l` [INFO] [stdout] --> day25/src/main.rs:67:18 [INFO] [stdout] | [INFO] [stdout] 67 | for y in 0..l.len() { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 67 - for y in 0..l.len() { [INFO] [stdout] 67 + for (y, ) in l.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `x` is used to index `heights` [INFO] [stdout] --> day25/src/main.rs:80:14 [INFO] [stdout] | [INFO] [stdout] 80 | for x in 0..l[0].len() { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 80 - for x in 0..l[0].len() { [INFO] [stdout] 80 + for (x, ) in heights.iter_mut().enumerate().take(l[0].len()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> day6/src/main.rs:25:37 [INFO] [stdout] | [INFO] [stdout] 25 | if (x, y) == original.guard { [INFO] [stdout] | _____________________________________^ [INFO] [stdout] 26 | | continue; [INFO] [stdout] 27 | | } else if original.obstructions.contains_key(&(x, y)) { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> day6/src/main.rs:27:63 [INFO] [stdout] | [INFO] [stdout] 27 | } else if original.obstructions.contains_key(&(x, y)) { [INFO] [stdout] | _______________________________________________________________^ [INFO] [stdout] 28 | | continue; [INFO] [stdout] 29 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> day21/src/main.rs:41:27 [INFO] [stdout] | [INFO] [stdout] 41 | let len = dfs(&code, depth, &type_on_num_pad, &mut mem); [INFO] [stdout] | ^^^^^ help: change this to: `code` [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: the borrowed expression implements the required traits [INFO] [stdout] --> day21/src/main.rs:41:41 [INFO] [stdout] | [INFO] [stdout] 41 | let len = dfs(&code, depth, &type_on_num_pad, &mut mem); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `type_on_num_pad` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> day21/src/main.rs:42:21 [INFO] [stdout] | [INFO] [stdout] 42 | let v = (&code[..code.len() - 1]).parse::().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `code[..code.len() - 1]` [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: `if let .. else` expression looks like `matches!` macro [INFO] [stdout] --> day9/src/main.rs:67:21 [INFO] [stdout] | [INFO] [stdout] 67 | / if let Block::Free = b { [INFO] [stdout] 68 | | true [INFO] [stdout] 69 | | } else { [INFO] [stdout] 70 | | false [INFO] [stdout] 71 | | } [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] 67 - if let Block::Free = b { [INFO] [stdout] 68 - true [INFO] [stdout] 69 - } else { [INFO] [stdout] 70 - false [INFO] [stdout] 71 - } [INFO] [stdout] 67 + matches!(b, Block::Free) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> day21/src/main.rs:71:41 [INFO] [stdout] | [INFO] [stdout] 71 | .map(|s| dfs(&s, depth - 1, &type_on_dir_pad, mem)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `type_on_dir_pad` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> day18/src/main.rs:17:9 [INFO] [stdout] | [INFO] [stdout] 17 | format!("this is impossible!") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"this is impossible!".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> day18/src/main.rs:32:5 [INFO] [stdout] | [INFO] [stdout] 32 | format!("this is impossible!") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"this is impossible!".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> day18/src/main.rs:159:9 [INFO] [stdout] | [INFO] [stdout] 159 | return other.steps.cmp(&self.steps) [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] 159 - return other.steps.cmp(&self.steps) [INFO] [stdout] 159 + other.steps.cmp(&self.steps) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-canonical implementation of `partial_cmp` on an `Ord` type [INFO] [stdout] --> day18/src/main.rs:163:1 [INFO] [stdout] | [INFO] [stdout] 163 | / impl PartialOrd for Path { [INFO] [stdout] 164 | | fn partial_cmp(&self, other: &Self) -> Option { [INFO] [stdout] 165 | | return other.steps.partial_cmp(&self.steps) [INFO] [stdout] 166 | | } [INFO] [stdout] 167 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_canonical_partial_ord_impl [INFO] [stdout] = note: `#[warn(clippy::non_canonical_partial_ord_impl)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 164 - fn partial_cmp(&self, other: &Self) -> Option { [INFO] [stdout] 165 - return other.steps.partial_cmp(&self.steps) [INFO] [stdout] 166 - } [INFO] [stdout] 164 + fn partial_cmp(&self, other: &Self) -> Option { Some(self.cmp(other)) } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> day18/src/main.rs:165:9 [INFO] [stdout] | [INFO] [stdout] 165 | return other.steps.partial_cmp(&self.steps) [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 165 - return other.steps.partial_cmp(&self.steps) [INFO] [stdout] 165 + other.steps.partial_cmp(&self.steps) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 2.82s [INFO] running `Command { std: "docker" "inspect" "5d2dfcae2f97bcd75f51010605f621b34ced5a2c7f862edb1059db514bf1a150", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "5d2dfcae2f97bcd75f51010605f621b34ced5a2c7f862edb1059db514bf1a150", kill_on_drop: false }` [INFO] [stdout] 5d2dfcae2f97bcd75f51010605f621b34ced5a2c7f862edb1059db514bf1a150