[INFO] cloning repository https://github.com/inqbus406/aoc24 [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/inqbus406/aoc24" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Finqbus406%2Faoc24", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Finqbus406%2Faoc24'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] b10c9ef84008cb243abb58e8356f889042a15448 [INFO] linting inqbus406/aoc24 against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Finqbus406%2Faoc24" "/workspace/builds/worker-3-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-3-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/inqbus406/aoc24 [INFO] finished tweaking git repo https://github.com/inqbus406/aoc24 [INFO] tweaked toml for git repo https://github.com/inqbus406/aoc24 written to /workspace/builds/worker-3-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/inqbus406/aoc24 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/inqbus406/aoc24 already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 5e49c593de372cb4f963fbbaa7e1fc7ca178040ebd4bc94ef0dbad3aff29e40a [INFO] running `Command { std: "docker" "start" "-a" "5e49c593de372cb4f963fbbaa7e1fc7ca178040ebd4bc94ef0dbad3aff29e40a", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "5e49c593de372cb4f963fbbaa7e1fc7ca178040ebd4bc94ef0dbad3aff29e40a", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "5e49c593de372cb4f963fbbaa7e1fc7ca178040ebd4bc94ef0dbad3aff29e40a", kill_on_drop: false }` [INFO] [stdout] 5e49c593de372cb4f963fbbaa7e1fc7ca178040ebd4bc94ef0dbad3aff29e40a [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 1f642f9a38f8c2d80bb3be9703807cf7a10e10898b7379b002d61e5bc3800510 [INFO] running `Command { std: "docker" "start" "-a" "1f642f9a38f8c2d80bb3be9703807cf7a10e10898b7379b002d61e5bc3800510", kill_on_drop: false }` [INFO] [stderr] Checking either v1.15.0 [INFO] [stderr] Compiling syn v2.0.104 [INFO] [stderr] Checking aho-corasick v1.1.3 [INFO] [stderr] Compiling thiserror v2.0.17 [INFO] [stderr] Checking ahash v0.8.12 [INFO] [stderr] Checking cached_proc_macro_types v0.1.1 [INFO] [stderr] Checking day23 v0.1.0 (/opt/rustwide/workdir/day23) [INFO] [stderr] Checking day24 v0.1.0 (/opt/rustwide/workdir/day24) [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> day23/src/main.rs:45:10 [INFO] [stdout] | [INFO] [stdout] 45 | for (i, node) in connections.iter().enumerate() { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `node` [INFO] [stdout] --> day23/src/main.rs:45:13 [INFO] [stdout] | [INFO] [stdout] 45 | for (i, node) in connections.iter().enumerate() { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_node` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> day23/src/main.rs:35:23 [INFO] [stdout] | [INFO] [stdout] 35 | fn part1(connections: &Vec<(String, String)>) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 35 - fn part1(connections: &Vec<(String, String)>) -> usize { [INFO] [stdout] 35 + fn part1(connections: &[(String, String)]) -> usize { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking day25 v0.1.0 (/opt/rustwide/workdir/day25) [INFO] [stdout] warning: name `AND` contains a capitalized acronym [INFO] [stdout] --> day24/src/main.rs:42:5 [INFO] [stdout] | [INFO] [stdout] 42 | AND, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `And` [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 `XOR` contains a capitalized acronym [INFO] [stdout] --> day24/src/main.rs:44:5 [INFO] [stdout] | [INFO] [stdout] 44 | XOR, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Xor` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> day24/src/main.rs:104:39 [INFO] [stdout] | [INFO] [stdout] 104 | let gate = Gate::from_str(&tokens[1]).unwrap(); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `tokens[1]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> day23/src/main.rs:45:10 [INFO] [stdout] | [INFO] [stdout] 45 | for (i, node) in connections.iter().enumerate() { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `node` [INFO] [stdout] --> day23/src/main.rs:45:13 [INFO] [stdout] | [INFO] [stdout] 45 | for (i, node) in connections.iter().enumerate() { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_node` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> day23/src/main.rs:35:23 [INFO] [stdout] | [INFO] [stdout] 35 | fn part1(connections: &Vec<(String, String)>) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 35 - fn part1(connections: &Vec<(String, String)>) -> usize { [INFO] [stdout] 35 + fn part1(connections: &[(String, String)]) -> usize { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is only used to index `v` [INFO] [stdout] --> day25/src/main.rs:95:22 [INFO] [stdout] | [INFO] [stdout] 95 | for j in 1..v.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] 95 - for j in 1..v.len() { [INFO] [stdout] 95 + for in v.iter().skip(1) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking itertools v0.13.0 [INFO] [stderr] Checking itertools v0.14.0 [INFO] [stdout] warning: the loop variable `j` is only used to index `v` [INFO] [stdout] --> day25/src/main.rs:95:22 [INFO] [stdout] | [INFO] [stdout] 95 | for j in 1..v.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] 95 - for j in 1..v.len() { [INFO] [stdout] 95 + for in v.iter().skip(1) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking day19 v0.1.0 (/opt/rustwide/workdir/day19) [INFO] [stderr] Checking day09 v0.1.0 (/opt/rustwide/workdir/day09) [INFO] [stdout] warning: name `AND` contains a capitalized acronym [INFO] [stdout] --> day24/src/main.rs:42:5 [INFO] [stdout] | [INFO] [stdout] 42 | AND, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `And` [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 `XOR` contains a capitalized acronym [INFO] [stdout] --> day24/src/main.rs:44:5 [INFO] [stdout] | [INFO] [stdout] 44 | XOR, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Xor` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> day24/src/main.rs:104:39 [INFO] [stdout] | [INFO] [stdout] 104 | let gate = Gate::from_str(&tokens[1]).unwrap(); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `tokens[1]` [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: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> day09/src/main.rs:9:17 [INFO] [stdout] | [INFO] [stdout] 9 | let input = reader.lines().nth(0).unwrap()?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `reader.lines().next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] = note: `#[warn(clippy::iter_nth_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `result` [INFO] [stdout] --> day09/src/main.rs:136:18 [INFO] [stdout] | [INFO] [stdout] 136 | for i in block.start..(block.start + block.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] 136 - for i in block.start..(block.start + block.len) { [INFO] [stdout] 136 + for in result.iter_mut().skip(block.start).take(block.len) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> day09/src/main.rs:147:9 [INFO] [stdout] | [INFO] [stdout] 147 | / match n { [INFO] [stdout] 148 | | Some(v) => checksum += i * v, [INFO] [stdout] 149 | | None => {} [INFO] [stdout] 150 | | } [INFO] [stdout] | |_________^ help: try: `if let Some(v) = n { checksum += i * v }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> day09/src/main.rs:155:18 [INFO] [stdout] | [INFO] [stdout] 155 | fn is_compact(v: &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] 155 - fn is_compact(v: &Vec>) -> bool { [INFO] [stdout] 155 + fn is_compact(v: &[Option]) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking day01 v0.1.0 (/opt/rustwide/workdir/day01) [INFO] [stderr] Checking day07 v0.1.0 (/opt/rustwide/workdir/day07) [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> day19/src/main.rs:45:14 [INFO] [stdout] | [INFO] [stdout] 45 | .map(|s| String::from(s)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `String::from` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> day19/src/main.rs:72:43 [INFO] [stdout] | [INFO] [stdout] 72 | if is_possible(substring, &towels) { [INFO] [stdout] | ^^^^^^^ help: change this to: `towels` [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 day15 v0.1.0 (/opt/rustwide/workdir/day15) [INFO] [stderr] Checking day04 v0.1.0 (/opt/rustwide/workdir/day04) [INFO] [stderr] Checking day11 v0.1.0 (/opt/rustwide/workdir/day11) [INFO] [stdout] warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> day04/src/main.rs:38:49 [INFO] [stdout] | [INFO] [stdout] 38 | result += count_xmas(&String::from_iter(line.clone().into_iter())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()` [INFO] [stdout] --> /rustc/3645249d79dfb136b5d8de3ce153d19d6698d92d/library/core/src/iter/traits/collect.rs:152:20 [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] help: consider removing the `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 38 - result += count_xmas(&String::from_iter(line.clone().into_iter())); [INFO] [stdout] 38 + result += count_xmas(&String::from_iter(line.clone())); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> day04/src/main.rs:39:55 [INFO] [stdout] | [INFO] [stdout] 39 | result += count_xmas(&diag_string(0, i, true, &xword)); [INFO] [stdout] | ^^^^^^ help: change this to: `xword` [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] --> day04/src/main.rs:40:56 [INFO] [stdout] | [INFO] [stdout] 40 | result += count_xmas(&diag_string(0, i, false, &xword)); [INFO] [stdout] | ^^^^^^ help: change this to: `xword` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> day04/src/main.rs:43:55 [INFO] [stdout] | [INFO] [stdout] 43 | result += count_xmas(&diag_string(j, 0, true, &xword)); [INFO] [stdout] | ^^^^^^ help: change this to: `xword` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> day04/src/main.rs:44:70 [INFO] [stdout] | [INFO] [stdout] 44 | result += count_xmas(&diag_string(j, xword.len() - 1, false, &xword)); [INFO] [stdout] | ^^^^^^ help: change this to: `xword` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> day04/src/main.rs:47:50 [INFO] [stdout] | [INFO] [stdout] 47 | result += count_xmas(&vertical_string(i, &xword)); [INFO] [stdout] | ^^^^^^ help: change this to: `xword` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> day04/src/main.rs:57:56 [INFO] [stdout] | [INFO] [stdout] 57 | if xword[j][i] == 'A' && check_for_x(i, j, &xword) { [INFO] [stdout] | ^^^^^^ help: change this to: `xword` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> day04/src/main.rs:66:43 [INFO] [stdout] | [INFO] [stdout] 66 | fn check_for_x(x: usize, y: usize, xword: &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] 66 - fn check_for_x(x: usize, y: usize, xword: &Vec>) -> bool { [INFO] [stdout] 66 + fn check_for_x(x: usize, y: usize, xword: &[Vec]) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> day04/src/main.rs:87:37 [INFO] [stdout] | [INFO] [stdout] 87 | fn vertical_string(x: usize, xword: &Vec>) -> String { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 87 - fn vertical_string(x: usize, xword: &Vec>) -> String { [INFO] [stdout] 87 + fn vertical_string(x: usize, xword: &[Vec]) -> String { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> day04/src/main.rs:94:58 [INFO] [stdout] | [INFO] [stdout] 94 | fn diag_string(x: usize, y: usize, descend: bool, xword: &Vec>) -> String { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 94 - fn diag_string(x: usize, y: usize, descend: bool, xword: &Vec>) -> String { [INFO] [stdout] 94 + fn diag_string(x: usize, y: usize, descend: bool, xword: &[Vec]) -> String { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking day06 v0.1.0 (/opt/rustwide/workdir/day06) [INFO] [stdout] warning: found call to `str::trim` before `str::split_whitespace` [INFO] [stdout] --> day11/src/main.rs:46:27 [INFO] [stdout] | [INFO] [stdout] 46 | for s in line.trim().split_whitespace() { [INFO] [stdout] | ^^^^^^^ help: remove `trim()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trim_split_whitespace [INFO] [stdout] = note: `#[warn(clippy::trim_split_whitespace)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> day11/src/main.rs:72:12 [INFO] [stdout] | [INFO] [stdout] 72 | if num_string.len() % 2 == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `num_string.len().is_multiple_of(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> day15/src/main.rs:118:27 [INFO] [stdout] | [INFO] [stdout] 118 | if !self.is_valid(&pos) { [INFO] [stdout] | ^^^^ help: change this to: `pos` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Position` which implements the `Copy` trait [INFO] [stdout] --> day15/src/main.rs:163:22 [INFO] [stdout] | [INFO] [stdout] 163 | let orig_b = b.clone(); [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*b` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Position` which implements the `Copy` trait [INFO] [stdout] --> day15/src/main.rs:191:13 [INFO] [stdout] | [INFO] [stdout] 191 | b.clone() [INFO] [stdout] | ^^^^^^^^^ help: try removing the `clone` call: `b` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Position` which implements the `Copy` trait [INFO] [stdout] --> day15/src/main.rs:209:22 [INFO] [stdout] | [INFO] [stdout] 209 | let orig_b = b.clone(); [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*b` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Position` which implements the `Copy` trait [INFO] [stdout] --> day15/src/main.rs:233:13 [INFO] [stdout] | [INFO] [stdout] 233 | b.clone() [INFO] [stdout] | ^^^^^^^^^ help: try removing the `clone` call: `b` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> day15/src/main.rs:271:9 [INFO] [stdout] | [INFO] [stdout] 271 | self.x_size = self.x_size * 2; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.x_size *= 2` [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] [stderr] Checking day10 v0.1.0 (/opt/rustwide/workdir/day10) [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> day15/src/main.rs:118:27 [INFO] [stdout] | [INFO] [stdout] 118 | if !self.is_valid(&pos) { [INFO] [stdout] | ^^^^ help: change this to: `pos` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Position` which implements the `Copy` trait [INFO] [stdout] --> day15/src/main.rs:163:22 [INFO] [stdout] | [INFO] [stdout] 163 | let orig_b = b.clone(); [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*b` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Position` which implements the `Copy` trait [INFO] [stdout] --> day15/src/main.rs:191:13 [INFO] [stdout] | [INFO] [stdout] 191 | b.clone() [INFO] [stdout] | ^^^^^^^^^ help: try removing the `clone` call: `b` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking day16 v0.1.0 (/opt/rustwide/workdir/day16) [INFO] [stdout] warning: using `clone` on type `Position` which implements the `Copy` trait [INFO] [stdout] --> day15/src/main.rs:209:22 [INFO] [stdout] | [INFO] [stdout] 209 | let orig_b = b.clone(); [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*b` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Position` which implements the `Copy` trait [INFO] [stdout] --> day15/src/main.rs:233:13 [INFO] [stdout] | [INFO] [stdout] 233 | b.clone() [INFO] [stdout] | ^^^^^^^^^ help: try removing the `clone` call: `b` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> day15/src/main.rs:271:9 [INFO] [stdout] | [INFO] [stdout] 271 | self.x_size = self.x_size * 2; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.x_size *= 2` [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 function `part2` doesn't need a mutable reference [INFO] [stdout] --> day06/src/main.rs:185:26 [INFO] [stdout] | [INFO] [stdout] 185 | assert_eq!(part2(&mut map, init_guard_pos), 6); [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] = note: `#[warn(clippy::unnecessary_mut_passed)]` on by default [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 185 - assert_eq!(part2(&mut map, init_guard_pos), 6); [INFO] [stdout] 185 + assert_eq!(part2(&map, init_guard_pos), 6); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking day14 v0.1.0 (/opt/rustwide/workdir/day14) [INFO] [stderr] Checking day02 v0.1.0 (/opt/rustwide/workdir/day02) [INFO] [stdout] warning: called `.iter().count()` on a `HashSet` [INFO] [stdout] --> day10/src/main.rs:72:22 [INFO] [stdout] | [INFO] [stdout] 72 | .map(|p| self.explore(p).iter().count()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.explore(p).len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_count [INFO] [stdout] = note: `#[warn(clippy::iter_count)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `n @ _` pattern can be written as just `n` [INFO] [stdout] --> day14/src/main.rs:164:21 [INFO] [stdout] | [INFO] [stdout] 164 | n @ _ => print!("{n}"), [INFO] [stdout] | ^^^^^ help: try: `n` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking day18 v0.1.0 (/opt/rustwide/workdir/day18) [INFO] [stdout] warning: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> day14/src/main.rs:78:30 [INFO] [stdout] | [INFO] [stdout] 78 | let x_velocity = nums[2] as i32; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `nums[2]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> day14/src/main.rs:79:30 [INFO] [stdout] | [INFO] [stdout] 79 | let y_velocity = nums[3] as i32; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `nums[3]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `print!()` with a format string that ends in a single newline [INFO] [stdout] --> day14/src/main.rs:167:13 [INFO] [stdout] | [INFO] [stdout] 167 | print!("\n"); [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_with_newline [INFO] [stdout] = note: `#[warn(clippy::print_with_newline)]` on by default [INFO] [stdout] help: use `println!` instead [INFO] [stdout] | [INFO] [stdout] 167 - print!("\n"); [INFO] [stdout] 167 + println!(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `LinkedList` [INFO] [stdout] --> day18/src/main.rs:1:33 [INFO] [stdout] | [INFO] [stdout] 1 | use std::collections::{HashSet, LinkedList, VecDeque}; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Position` which implements the `Copy` trait [INFO] [stdout] --> day16/src/main.rs:168:18 [INFO] [stdout] | [INFO] [stdout] 168 | loc: self.visited.keys().nth(0).unwrap().clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*self.visited.keys().nth(0).unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Position` which implements the `Copy` trait [INFO] [stdout] --> day16/src/main.rs:220:23 [INFO] [stdout] | [INFO] [stdout] 220 | let current = pos.clone(); [INFO] [stdout] | ^^^^^^^^^^^ help: try dereferencing it: `*pos` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> day16/src/main.rs:256:29 [INFO] [stdout] | [INFO] [stdout] 256 | self.walls.contains(&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] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: found call to `str::trim` before `str::split_whitespace` [INFO] [stdout] --> day11/src/main.rs:46:27 [INFO] [stdout] | [INFO] [stdout] 46 | for s in line.trim().split_whitespace() { [INFO] [stdout] | ^^^^^^^ help: remove `trim()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trim_split_whitespace [INFO] [stdout] = note: `#[warn(clippy::trim_split_whitespace)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> day11/src/main.rs:72:12 [INFO] [stdout] | [INFO] [stdout] 72 | if num_string.len() % 2 == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `num_string.len().is_multiple_of(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `n @ _` pattern can be written as just `n` [INFO] [stdout] --> day14/src/main.rs:164:21 [INFO] [stdout] | [INFO] [stdout] 164 | n @ _ => print!("{n}"), [INFO] [stdout] | ^^^^^ help: try: `n` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> day14/src/main.rs:78:30 [INFO] [stdout] | [INFO] [stdout] 78 | let x_velocity = nums[2] as i32; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `nums[2]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> day14/src/main.rs:79:30 [INFO] [stdout] | [INFO] [stdout] 79 | let y_velocity = nums[3] as i32; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `nums[3]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `print!()` with a format string that ends in a single newline [INFO] [stdout] --> day14/src/main.rs:167:13 [INFO] [stdout] | [INFO] [stdout] 167 | print!("\n"); [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_with_newline [INFO] [stdout] = note: `#[warn(clippy::print_with_newline)]` on by default [INFO] [stdout] help: use `println!` instead [INFO] [stdout] | [INFO] [stdout] 167 - print!("\n"); [INFO] [stdout] 167 + println!(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `from_file` is never used [INFO] [stdout] --> day18/src/main.rs:85:8 [INFO] [stdout] | [INFO] [stdout] 84 | impl Maze { [INFO] [stdout] | --------- associated function in this implementation [INFO] [stdout] 85 | fn from_file( [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Position` which implements the `Copy` trait [INFO] [stdout] --> day18/src/main.rs:128:46 [INFO] [stdout] | [INFO] [stdout] 128 | .for_each(|pos| _ = walls.insert(pos.clone())); [INFO] [stdout] | ^^^^^^^^^^^ help: try dereferencing it: `*pos` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Position` which implements the `Copy` trait [INFO] [stdout] --> day18/src/main.rs:165:26 [INFO] [stdout] | [INFO] [stdout] 165 | loc: neighbor.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try dereferencing it: `*neighbor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `LinkedList` [INFO] [stdout] --> day18/src/main.rs:1:33 [INFO] [stdout] | [INFO] [stdout] 1 | use std::collections::{HashSet, LinkedList, VecDeque}; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking day17 v0.1.0 (/opt/rustwide/workdir/day17) [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> day19/src/main.rs:45:14 [INFO] [stdout] | [INFO] [stdout] 45 | .map(|s| String::from(s)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `String::from` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> day19/src/main.rs:72:43 [INFO] [stdout] | [INFO] [stdout] 72 | if is_possible(substring, &towels) { [INFO] [stdout] | ^^^^^^^ help: change this to: `towels` [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: associated function `from_file` is never used [INFO] [stdout] --> day18/src/main.rs:85:8 [INFO] [stdout] | [INFO] [stdout] 84 | impl Maze { [INFO] [stdout] | --------- associated function in this implementation [INFO] [stdout] 85 | fn from_file( [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Position` which implements the `Copy` trait [INFO] [stdout] --> day18/src/main.rs:128:46 [INFO] [stdout] | [INFO] [stdout] 128 | .for_each(|pos| _ = walls.insert(pos.clone())); [INFO] [stdout] | ^^^^^^^^^^^ help: try dereferencing it: `*pos` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Position` which implements the `Copy` trait [INFO] [stdout] --> day18/src/main.rs:165:26 [INFO] [stdout] | [INFO] [stdout] 165 | loc: neighbor.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try dereferencing it: `*neighbor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> day17/src/main.rs:9:9 [INFO] [stdout] | [INFO] [stdout] 9 | let mut outputs = machine.run(); [INFO] [stdout] | ----^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `reg_a` is never read [INFO] [stdout] --> day17/src/main.rs:22:28 [INFO] [stdout] | [INFO] [stdout] 22 | let mut reg_a: usize = 0; [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.iter().count()` on a `HashSet` [INFO] [stdout] --> day10/src/main.rs:72:22 [INFO] [stdout] | [INFO] [stdout] 72 | .map(|p| self.explore(p).iter().count()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.explore(p).len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_count [INFO] [stdout] = note: `#[warn(clippy::iter_count)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> day17/src/main.rs:152:21 [INFO] [stdout] | [INFO] [stdout] 152 | self.reg_a = self.reg_a >> combo_operand; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.reg_a >>= combo_operand` [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:155:21 [INFO] [stdout] | [INFO] [stdout] 155 | self.reg_b = self.reg_b ^ literal_operand as usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.reg_b ^= literal_operand as usize` [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: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> day17/src/main.rs:158:34 [INFO] [stdout] | [INFO] [stdout] 158 | self.reg_b = (combo_operand % 8) as usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(combo_operand % 8)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> day17/src/main.rs:167:21 [INFO] [stdout] | [INFO] [stdout] 167 | self.reg_b = self.reg_b ^ self.reg_c; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.reg_b ^= self.reg_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: variable does not need to be mutable [INFO] [stdout] --> day17/src/main.rs:9:9 [INFO] [stdout] | [INFO] [stdout] 9 | let mut outputs = machine.run(); [INFO] [stdout] | ----^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `reg_a` is never read [INFO] [stdout] --> day17/src/main.rs:22:28 [INFO] [stdout] | [INFO] [stdout] 22 | let mut reg_a: usize = 0; [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> day17/src/main.rs:152:21 [INFO] [stdout] | [INFO] [stdout] 152 | self.reg_a = self.reg_a >> combo_operand; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.reg_a >>= combo_operand` [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:155:21 [INFO] [stdout] | [INFO] [stdout] 155 | self.reg_b = self.reg_b ^ literal_operand as usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.reg_b ^= literal_operand as usize` [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: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> day17/src/main.rs:158:34 [INFO] [stdout] | [INFO] [stdout] 158 | self.reg_b = (combo_operand % 8) as usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(combo_operand % 8)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> day17/src/main.rs:167:21 [INFO] [stdout] | [INFO] [stdout] 167 | self.reg_b = self.reg_b ^ self.reg_c; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.reg_b ^= self.reg_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: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> day09/src/main.rs:9:17 [INFO] [stdout] | [INFO] [stdout] 9 | let input = reader.lines().nth(0).unwrap()?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `reader.lines().next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] = note: `#[warn(clippy::iter_nth_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `result` [INFO] [stdout] --> day09/src/main.rs:136:18 [INFO] [stdout] | [INFO] [stdout] 136 | for i in block.start..(block.start + block.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] 136 - for i in block.start..(block.start + block.len) { [INFO] [stdout] 136 + for in result.iter_mut().skip(block.start).take(block.len) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> day09/src/main.rs:147:9 [INFO] [stdout] | [INFO] [stdout] 147 | / match n { [INFO] [stdout] 148 | | Some(v) => checksum += i * v, [INFO] [stdout] 149 | | None => {} [INFO] [stdout] 150 | | } [INFO] [stdout] | |_________^ help: try: `if let Some(v) = n { checksum += i * v }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> day09/src/main.rs:155:18 [INFO] [stdout] | [INFO] [stdout] 155 | fn is_compact(v: &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] 155 - fn is_compact(v: &Vec>) -> bool { [INFO] [stdout] 155 + fn is_compact(v: &[Option]) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> day09/src/main.rs:169:21 [INFO] [stdout] | [INFO] [stdout] 169 | let input = reader.lines().nth(0).unwrap()?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `reader.lines().next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> day09/src/main.rs:179:21 [INFO] [stdout] | [INFO] [stdout] 179 | let input = reader.lines().nth(0).unwrap()?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `reader.lines().next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> day04/src/main.rs:38:49 [INFO] [stdout] | [INFO] [stdout] 38 | result += count_xmas(&String::from_iter(line.clone().into_iter())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()` [INFO] [stdout] --> /rustc/3645249d79dfb136b5d8de3ce153d19d6698d92d/library/core/src/iter/traits/collect.rs:152:20 [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] help: consider removing the `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 38 - result += count_xmas(&String::from_iter(line.clone().into_iter())); [INFO] [stdout] 38 + result += count_xmas(&String::from_iter(line.clone())); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> day04/src/main.rs:39:55 [INFO] [stdout] | [INFO] [stdout] 39 | result += count_xmas(&diag_string(0, i, true, &xword)); [INFO] [stdout] | ^^^^^^ help: change this to: `xword` [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] --> day04/src/main.rs:40:56 [INFO] [stdout] | [INFO] [stdout] 40 | result += count_xmas(&diag_string(0, i, false, &xword)); [INFO] [stdout] | ^^^^^^ help: change this to: `xword` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> day04/src/main.rs:43:55 [INFO] [stdout] | [INFO] [stdout] 43 | result += count_xmas(&diag_string(j, 0, true, &xword)); [INFO] [stdout] | ^^^^^^ help: change this to: `xword` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> day04/src/main.rs:44:70 [INFO] [stdout] | [INFO] [stdout] 44 | result += count_xmas(&diag_string(j, xword.len() - 1, false, &xword)); [INFO] [stdout] | ^^^^^^ help: change this to: `xword` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> day04/src/main.rs:47:50 [INFO] [stdout] | [INFO] [stdout] 47 | result += count_xmas(&vertical_string(i, &xword)); [INFO] [stdout] | ^^^^^^ help: change this to: `xword` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> day04/src/main.rs:57:56 [INFO] [stdout] | [INFO] [stdout] 57 | if xword[j][i] == 'A' && check_for_x(i, j, &xword) { [INFO] [stdout] | ^^^^^^ help: change this to: `xword` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> day04/src/main.rs:66:43 [INFO] [stdout] | [INFO] [stdout] 66 | fn check_for_x(x: usize, y: usize, xword: &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] 66 - fn check_for_x(x: usize, y: usize, xword: &Vec>) -> bool { [INFO] [stdout] 66 + fn check_for_x(x: usize, y: usize, xword: &[Vec]) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> day04/src/main.rs:87:37 [INFO] [stdout] | [INFO] [stdout] 87 | fn vertical_string(x: usize, xword: &Vec>) -> String { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 87 - fn vertical_string(x: usize, xword: &Vec>) -> String { [INFO] [stdout] 87 + fn vertical_string(x: usize, xword: &[Vec]) -> String { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> day04/src/main.rs:94:58 [INFO] [stdout] | [INFO] [stdout] 94 | fn diag_string(x: usize, y: usize, descend: bool, xword: &Vec>) -> String { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 94 - fn diag_string(x: usize, y: usize, descend: bool, xword: &Vec>) -> String { [INFO] [stdout] 94 + fn diag_string(x: usize, y: usize, descend: bool, xword: &[Vec]) -> String { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking regex-automata v0.4.9 [INFO] [stdout] warning: using `clone` on type `Position` which implements the `Copy` trait [INFO] [stdout] --> day16/src/main.rs:168:18 [INFO] [stdout] | [INFO] [stdout] 168 | loc: self.visited.keys().nth(0).unwrap().clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*self.visited.keys().nth(0).unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Position` which implements the `Copy` trait [INFO] [stdout] --> day16/src/main.rs:220:23 [INFO] [stdout] | [INFO] [stdout] 220 | let current = pos.clone(); [INFO] [stdout] | ^^^^^^^^^^^ help: try dereferencing it: `*pos` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> day16/src/main.rs:256:29 [INFO] [stdout] | [INFO] [stdout] 256 | self.walls.contains(&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] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking day12 v0.1.0 (/opt/rustwide/workdir/day12) [INFO] [stderr] Checking day05 v0.1.0 (/opt/rustwide/workdir/day05) [INFO] [stderr] Checking day08 v0.1.0 (/opt/rustwide/workdir/day08) [INFO] [stderr] Checking day20 v0.1.0 (/opt/rustwide/workdir/day20) [INFO] [stdout] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> day05/src/main.rs:28:15 [INFO] [stdout] | [INFO] [stdout] 28 | while let Ok(_) = reader.read_line(&mut buffer) { [INFO] [stdout] | ----------^^^^^-------------------------------- help: try: `while reader.read_line(&mut buffer).is_ok()` [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: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> day05/src/main.rs:42:15 [INFO] [stdout] | [INFO] [stdout] 42 | while let Ok(_) = reader.read_line(&mut buffer) { [INFO] [stdout] | ----------^^^^^-------------------------------- help: try: `while reader.read_line(&mut buffer).is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> day05/src/main.rs:57:30 [INFO] [stdout] | [INFO] [stdout] 57 | .filter(|p| is_valid(&p, &rules)) [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] = 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] --> day05/src/main.rs:57:34 [INFO] [stdout] | [INFO] [stdout] 57 | .filter(|p| is_valid(&p, &rules)) [INFO] [stdout] | ^^^^^^ help: change this to: `rules` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> day05/src/main.rs:66:34 [INFO] [stdout] | [INFO] [stdout] 66 | .filter(|p| !is_valid(p, &rules)) [INFO] [stdout] | ^^^^^^ help: change this to: `rules` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> day05/src/main.rs:71:33 [INFO] [stdout] | [INFO] [stdout] 71 | while !is_valid(&fixed, &rules) { [INFO] [stdout] | ^^^^^^ help: change this to: `rules` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> day05/src/main.rs:72:35 [INFO] [stdout] | [INFO] [stdout] 72 | fix_pages(&mut fixed, &rules); [INFO] [stdout] | ^^^^^^ help: change this to: `rules` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> day05/src/main.rs:80:21 [INFO] [stdout] | [INFO] [stdout] 80 | fn fix_pages(pages: &mut Vec, rules: &Rules) { [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] 80 ~ fn fix_pages(pages: &mut [usize], rules: &Rules) { [INFO] [stdout] 81 ~ for combination in pages.to_owned().iter().combinations(2) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> day12/src/main.rs:24:9 [INFO] [stdout] | [INFO] [stdout] 24 | / if !crops.contains_key(&c) { [INFO] [stdout] 25 | | let mut set = HashSet::new(); [INFO] [stdout] 26 | | set.insert(current_point); [INFO] [stdout] 27 | | crops.insert(c, vec![set]); [INFO] [stdout] ... | [INFO] [stdout] 41 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry [INFO] [stdout] = note: `#[warn(clippy::map_entry)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 24 ~ if let std::collections::hash_map::Entry::Vacant(e) = crops.entry(c) { [INFO] [stdout] 25 + let mut set = HashSet::new(); [INFO] [stdout] 26 + set.insert(current_point); [INFO] [stdout] 27 + e.insert(vec![set]); [INFO] [stdout] 28 + } else { [INFO] [stdout] 29 + let mut found = false; [INFO] [stdout] 30 + for group in crops.get_mut(&c).unwrap() { [INFO] [stdout] 31 + if group.iter().any(|point| point.adjacent(¤t_point)) { [INFO] [stdout] 32 + group.insert(current_point); [INFO] [stdout] 33 + found = true; [INFO] [stdout] 34 + } [INFO] [stdout] 35 + } [INFO] [stdout] 36 + if !found { [INFO] [stdout] 37 + let mut set = HashSet::new(); [INFO] [stdout] 38 + set.insert(current_point); [INFO] [stdout] 39 + crops.get_mut(&c).unwrap().push(set); [INFO] [stdout] 40 + } [INFO] [stdout] 41 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> day12/src/main.rs:24:9 [INFO] [stdout] | [INFO] [stdout] 24 | / if !crops.contains_key(&c) { [INFO] [stdout] 25 | | let mut set = HashSet::new(); [INFO] [stdout] 26 | | set.insert(current_point); [INFO] [stdout] 27 | | crops.insert(c, vec![set]); [INFO] [stdout] ... | [INFO] [stdout] 41 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry [INFO] [stdout] = note: `#[warn(clippy::map_entry)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 24 ~ if let std::collections::hash_map::Entry::Vacant(e) = crops.entry(c) { [INFO] [stdout] 25 + let mut set = HashSet::new(); [INFO] [stdout] 26 + set.insert(current_point); [INFO] [stdout] 27 + e.insert(vec![set]); [INFO] [stdout] 28 + } else { [INFO] [stdout] 29 + let mut found = false; [INFO] [stdout] 30 + for group in crops.get_mut(&c).unwrap() { [INFO] [stdout] 31 + if group.iter().any(|point| point.adjacent(¤t_point)) { [INFO] [stdout] 32 + group.insert(current_point); [INFO] [stdout] 33 + found = true; [INFO] [stdout] 34 + } [INFO] [stdout] 35 + } [INFO] [stdout] 36 + if !found { [INFO] [stdout] 37 + let mut set = HashSet::new(); [INFO] [stdout] 38 + set.insert(current_point); [INFO] [stdout] 39 + crops.get_mut(&c).unwrap().push(set); [INFO] [stdout] 40 + } [INFO] [stdout] 41 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's values [INFO] [stdout] --> day12/src/main.rs:52:25 [INFO] [stdout] | [INFO] [stdout] 52 | for (_, regions) in &mut crops { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] = note: `#[warn(clippy::for_kv_map)]` on by default [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 52 - for (_, regions) in &mut crops { [INFO] [stdout] 52 + for regions in crops.values_mut() { [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:93:45 [INFO] [stdout] | [INFO] [stdout] 93 | .map(|p| corners(p, region, &map)) [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: you seem to want to iterate on a map's values [INFO] [stdout] --> day12/src/main.rs:52:25 [INFO] [stdout] | [INFO] [stdout] 52 | for (_, regions) in &mut crops { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] = note: `#[warn(clippy::for_kv_map)]` on by default [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 52 - for (_, regions) in &mut crops { [INFO] [stdout] 52 + for regions in crops.values_mut() { [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:93:45 [INFO] [stdout] | [INFO] [stdout] 93 | .map(|p| corners(p, region, &map)) [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:193:23 [INFO] [stdout] | [INFO] [stdout] 193 | fn combine_sets(sets: &Vec>) -> Vec> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 193 ~ fn combine_sets(sets: &[HashSet]) -> Vec> { [INFO] [stdout] 194 | let mut regions_coalesced = Vec::new(); [INFO] [stdout] ... [INFO] [stdout] 209 | } [INFO] [stdout] 210 ~ sets.to_owned() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> day12/src/main.rs:193:23 [INFO] [stdout] | [INFO] [stdout] 193 | fn combine_sets(sets: &Vec>) -> Vec> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 193 ~ fn combine_sets(sets: &[HashSet]) -> Vec> { [INFO] [stdout] 194 | let mut regions_coalesced = Vec::new(); [INFO] [stdout] ... [INFO] [stdout] 209 | } [INFO] [stdout] 210 ~ sets.to_owned() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Position` which implements the `Copy` trait [INFO] [stdout] --> day20/src/main.rs:187:29 [INFO] [stdout] | [INFO] [stdout] 187 | self.visited.insert(self.start.clone(), 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.start` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Position` which implements the `Copy` trait [INFO] [stdout] --> day20/src/main.rs:189:18 [INFO] [stdout] | [INFO] [stdout] 189 | loc: self.visited.keys().nth(0).unwrap().clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*self.visited.keys().nth(0).unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> day20/src/main.rs:253:29 [INFO] [stdout] | [INFO] [stdout] 253 | self.walls.contains(&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] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> day05/src/main.rs:28:15 [INFO] [stdout] | [INFO] [stdout] 28 | while let Ok(_) = reader.read_line(&mut buffer) { [INFO] [stdout] | ----------^^^^^-------------------------------- help: try: `while reader.read_line(&mut buffer).is_ok()` [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: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> day05/src/main.rs:42:15 [INFO] [stdout] | [INFO] [stdout] 42 | while let Ok(_) = reader.read_line(&mut buffer) { [INFO] [stdout] | ----------^^^^^-------------------------------- help: try: `while reader.read_line(&mut buffer).is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> day05/src/main.rs:57:30 [INFO] [stdout] | [INFO] [stdout] 57 | .filter(|p| is_valid(&p, &rules)) [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] = 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] --> day05/src/main.rs:57:34 [INFO] [stdout] | [INFO] [stdout] 57 | .filter(|p| is_valid(&p, &rules)) [INFO] [stdout] | ^^^^^^ help: change this to: `rules` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> day05/src/main.rs:66:34 [INFO] [stdout] | [INFO] [stdout] 66 | .filter(|p| !is_valid(p, &rules)) [INFO] [stdout] | ^^^^^^ help: change this to: `rules` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> day05/src/main.rs:71:33 [INFO] [stdout] | [INFO] [stdout] 71 | while !is_valid(&fixed, &rules) { [INFO] [stdout] | ^^^^^^ help: change this to: `rules` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> day05/src/main.rs:72:35 [INFO] [stdout] | [INFO] [stdout] 72 | fix_pages(&mut fixed, &rules); [INFO] [stdout] | ^^^^^^ help: change this to: `rules` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> day05/src/main.rs:80:21 [INFO] [stdout] | [INFO] [stdout] 80 | fn fix_pages(pages: &mut Vec, rules: &Rules) { [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] 80 ~ fn fix_pages(pages: &mut [usize], rules: &Rules) { [INFO] [stdout] 81 ~ for combination in pages.to_owned().iter().combinations(2) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking day22 v0.1.0 (/opt/rustwide/workdir/day22) [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> day22/src/main.rs:60:34 [INFO] [stdout] | [INFO] [stdout] 60 | fn find_first_occurrence(deltas: &Vec, sequence: &Vec) -> Option { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 60 - fn find_first_occurrence(deltas: &Vec, sequence: &Vec) -> Option { [INFO] [stdout] 60 + fn find_first_occurrence(deltas: &[i64], sequence: &Vec) -> Option { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Position` which implements the `Copy` trait [INFO] [stdout] --> day20/src/main.rs:187:29 [INFO] [stdout] | [INFO] [stdout] 187 | self.visited.insert(self.start.clone(), 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.start` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Position` which implements the `Copy` trait [INFO] [stdout] --> day20/src/main.rs:189:18 [INFO] [stdout] | [INFO] [stdout] 189 | loc: self.visited.keys().nth(0).unwrap().clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*self.visited.keys().nth(0).unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> day20/src/main.rs:253:29 [INFO] [stdout] | [INFO] [stdout] 253 | self.walls.contains(&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] = 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] --> day22/src/main.rs:60:34 [INFO] [stdout] | [INFO] [stdout] 60 | fn find_first_occurrence(deltas: &Vec, sequence: &Vec) -> Option { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 60 - fn find_first_occurrence(deltas: &Vec, sequence: &Vec) -> Option { [INFO] [stdout] 60 + fn find_first_occurrence(deltas: &[i64], sequence: &Vec) -> Option { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking regex v1.11.1 [INFO] [stderr] Checking day03 v0.1.0 (/opt/rustwide/workdir/day03) [INFO] [stderr] Checking day13 v0.1.0 (/opt/rustwide/workdir/day13) [INFO] [stderr] Compiling darling_core v0.20.11 [INFO] [stderr] Compiling thiserror-impl v2.0.17 [INFO] [stderr] Compiling darling_macro v0.20.11 [INFO] [stderr] Compiling darling v0.20.11 [INFO] [stderr] Compiling cached_proc_macro v0.25.0 [INFO] [stderr] Checking cached v0.56.0 [INFO] [stderr] Checking day21 v0.1.0 (/opt/rustwide/workdir/day21) [INFO] [stdout] warning: methods with the following characteristics: (`to_*` and `self` type is `Copy`) usually take `self` by value [INFO] [stdout] --> day21/src/main.rs:156:16 [INFO] [stdout] | [INFO] [stdout] 156 | fn to_char(&self) -> char { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] = note: `#[warn(clippy::wrong_self_convention)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `TClusterKey` which implements the `Copy` trait [INFO] [stdout] --> day21/src/main.rs:230:27 [INFO] [stdout] | [INFO] [stdout] 230 | path.push(next.clone()); [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `next` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> day21/src/main.rs:257:9 [INFO] [stdout] | [INFO] [stdout] 242 | / let result = [ [INFO] [stdout] 243 | | TClusterKey::Up, [INFO] [stdout] 244 | | TClusterKey::Down, [INFO] [stdout] 245 | | TClusterKey::Left, [INFO] [stdout] ... | [INFO] [stdout] 254 | | }) [INFO] [stdout] 255 | | .collect(); [INFO] [stdout] | |___________________- unnecessary `let` binding [INFO] [stdout] 256 | [INFO] [stdout] 257 | result [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 242 ~ [INFO] [stdout] 243 | [INFO] [stdout] 244 ~ [ [INFO] [stdout] 245 + TClusterKey::Up, [INFO] [stdout] 246 + TClusterKey::Down, [INFO] [stdout] 247 + TClusterKey::Left, [INFO] [stdout] 248 + TClusterKey::Right, [INFO] [stdout] 249 + ] [INFO] [stdout] 250 + .into_iter() [INFO] [stdout] 251 + .filter(|pos| start.next(&pos).is_some()) [INFO] [stdout] 252 + .filter(|pos| start.next(&pos).unwrap().position() != (0, 3)) // Don't step in the gap [INFO] [stdout] 253 + .filter(|pos| { [INFO] [stdout] 254 + Self::manhattan_distance(&start.next(&pos).unwrap(), end) [INFO] [stdout] 255 + < Self::manhattan_distance(start, end) [INFO] [stdout] 256 + }) [INFO] [stdout] 257 + .collect() [INFO] [stdout] | [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:249:34 [INFO] [stdout] | [INFO] [stdout] 249 | .filter(|pos| start.next(&pos).is_some()) [INFO] [stdout] | ^^^^ help: change this to: `pos` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> day21/src/main.rs:250:34 [INFO] [stdout] | [INFO] [stdout] 250 | .filter(|pos| start.next(&pos).unwrap().position() != (0, 3)) // Don't step in the gap [INFO] [stdout] | ^^^^ help: change this to: `pos` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> day21/src/main.rs:252:50 [INFO] [stdout] | [INFO] [stdout] 252 | Self::manhattan_distance(&start.next(&pos).unwrap(), end) [INFO] [stdout] | ^^^^ help: change this to: `pos` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> day21/src/main.rs:331:8 [INFO] [stdout] | [INFO] [stdout] 331 | if !(start_pos == (0, 1) && end_pos.1 == 0) && !vertical.is_empty() && !horizontal.is_empty() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!(vertical.is_empty() || horizontal.is_empty() || start_pos == (0, 1) && end_pos.1 == 0)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> day21/src/main.rs:331:8 [INFO] [stdout] | [INFO] [stdout] 331 | if !(start_pos == (0, 1) && end_pos.1 == 0) && !vertical.is_empty() && !horizontal.is_empty() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!(vertical.is_empty() || start_pos == (0, 1) && end_pos.1 == 0)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods with the following characteristics: (`to_*` and `self` type is `Copy`) usually take `self` by value [INFO] [stdout] --> day21/src/main.rs:156:16 [INFO] [stdout] | [INFO] [stdout] 156 | fn to_char(&self) -> char { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] = note: `#[warn(clippy::wrong_self_convention)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `TClusterKey` which implements the `Copy` trait [INFO] [stdout] --> day21/src/main.rs:230:27 [INFO] [stdout] | [INFO] [stdout] 230 | path.push(next.clone()); [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `next` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> day21/src/main.rs:257:9 [INFO] [stdout] | [INFO] [stdout] 242 | / let result = [ [INFO] [stdout] 243 | | TClusterKey::Up, [INFO] [stdout] 244 | | TClusterKey::Down, [INFO] [stdout] 245 | | TClusterKey::Left, [INFO] [stdout] ... | [INFO] [stdout] 254 | | }) [INFO] [stdout] 255 | | .collect(); [INFO] [stdout] | |___________________- unnecessary `let` binding [INFO] [stdout] 256 | [INFO] [stdout] 257 | result [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 242 ~ [INFO] [stdout] 243 | [INFO] [stdout] 244 ~ [ [INFO] [stdout] 245 + TClusterKey::Up, [INFO] [stdout] 246 + TClusterKey::Down, [INFO] [stdout] 247 + TClusterKey::Left, [INFO] [stdout] 248 + TClusterKey::Right, [INFO] [stdout] 249 + ] [INFO] [stdout] 250 + .into_iter() [INFO] [stdout] 251 + .filter(|pos| start.next(&pos).is_some()) [INFO] [stdout] 252 + .filter(|pos| start.next(&pos).unwrap().position() != (0, 3)) // Don't step in the gap [INFO] [stdout] 253 + .filter(|pos| { [INFO] [stdout] 254 + Self::manhattan_distance(&start.next(&pos).unwrap(), end) [INFO] [stdout] 255 + < Self::manhattan_distance(start, end) [INFO] [stdout] 256 + }) [INFO] [stdout] 257 + .collect() [INFO] [stdout] | [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:249:34 [INFO] [stdout] | [INFO] [stdout] 249 | .filter(|pos| start.next(&pos).is_some()) [INFO] [stdout] | ^^^^ help: change this to: `pos` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> day21/src/main.rs:250:34 [INFO] [stdout] | [INFO] [stdout] 250 | .filter(|pos| start.next(&pos).unwrap().position() != (0, 3)) // Don't step in the gap [INFO] [stdout] | ^^^^ help: change this to: `pos` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> day21/src/main.rs:252:50 [INFO] [stdout] | [INFO] [stdout] 252 | Self::manhattan_distance(&start.next(&pos).unwrap(), end) [INFO] [stdout] | ^^^^ help: change this to: `pos` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> day21/src/main.rs:331:8 [INFO] [stdout] | [INFO] [stdout] 331 | if !(start_pos == (0, 1) && end_pos.1 == 0) && !vertical.is_empty() && !horizontal.is_empty() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!(vertical.is_empty() || horizontal.is_empty() || start_pos == (0, 1) && end_pos.1 == 0)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> day21/src/main.rs:331:8 [INFO] [stdout] | [INFO] [stdout] 331 | if !(start_pos == (0, 1) && end_pos.1 == 0) && !vertical.is_empty() && !horizontal.is_empty() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!(vertical.is_empty() || start_pos == (0, 1) && end_pos.1 == 0)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 23.36s [INFO] running `Command { std: "docker" "inspect" "1f642f9a38f8c2d80bb3be9703807cf7a10e10898b7379b002d61e5bc3800510", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "1f642f9a38f8c2d80bb3be9703807cf7a10e10898b7379b002d61e5bc3800510", kill_on_drop: false }` [INFO] [stdout] 1f642f9a38f8c2d80bb3be9703807cf7a10e10898b7379b002d61e5bc3800510