[INFO] cloning repository https://github.com/quidrex/aoc2024 [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/quidrex/aoc2024" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fquidrex%2Faoc2024", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fquidrex%2Faoc2024'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 0627413de92cb7cbda1d03322cf74632df21b6ac [INFO] linting quidrex/aoc2024 against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fquidrex%2Faoc2024" "/workspace/builds/worker-6-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-6-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/quidrex/aoc2024 [INFO] finished tweaking git repo https://github.com/quidrex/aoc2024 [INFO] tweaked toml for git repo https://github.com/quidrex/aoc2024 written to /workspace/builds/worker-6-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/quidrex/aoc2024 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/quidrex/aoc2024 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-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-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] 9d720c9f5553a84251c5046c3285877ec0c23ec26ecf43e7bb3b5141144cf2f5 [INFO] running `Command { std: "docker" "start" "-a" "9d720c9f5553a84251c5046c3285877ec0c23ec26ecf43e7bb3b5141144cf2f5", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "9d720c9f5553a84251c5046c3285877ec0c23ec26ecf43e7bb3b5141144cf2f5", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "9d720c9f5553a84251c5046c3285877ec0c23ec26ecf43e7bb3b5141144cf2f5", kill_on_drop: false }` [INFO] [stdout] 9d720c9f5553a84251c5046c3285877ec0c23ec26ecf43e7bb3b5141144cf2f5 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-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] e9299b4315259a31e9eb3ca7d3b3de6e42b5516c86f0819e9387f0492ab020c9 [INFO] running `Command { std: "docker" "start" "-a" "e9299b4315259a31e9eb3ca7d3b3de6e42b5516c86f0819e9387f0492ab020c9", kill_on_drop: false }` [INFO] [stderr] Compiling num-traits v0.2.19 [INFO] [stderr] Compiling rustversion v1.0.18 [INFO] [stderr] Compiling matrixmultiply v0.3.9 [INFO] [stderr] Compiling anyhow v1.0.94 [INFO] [stderr] Compiling syn v2.0.89 [INFO] [stderr] Checking num-integer v0.1.46 [INFO] [stderr] Checking num-complex v0.4.6 [INFO] [stderr] Checking num-bigint v0.4.6 [INFO] [stderr] Checking num-iter v0.1.45 [INFO] [stderr] Checking ndarray v0.16.1 [INFO] [stderr] Compiling enum-map-derive v0.17.0 [INFO] [stderr] Compiling strum_macros v0.26.4 [INFO] [stderr] Checking enum-map v2.7.3 [INFO] [stderr] Checking num-rational v0.4.2 [INFO] [stderr] Checking num v0.4.3 [INFO] [stderr] Checking strum v0.26.3 [INFO] [stderr] Checking aoc2024 v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/util/grid.rs:3:1 [INFO] [stdout] | [INFO] [stdout] 3 | mod grid; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] = note: `#[warn(clippy::module_inception)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `from_str` can be confused for the standard trait method `std::str::FromStr::from_str` [INFO] [stdout] --> src/util/grid/grid.rs:38:5 [INFO] [stdout] | [INFO] [stdout] 38 | / pub fn from_str(s: &str) -> Self [INFO] [stdout] 39 | | where [INFO] [stdout] 40 | | T: FromStr, [INFO] [stdout] 41 | | ::Err: Debug, [INFO] [stdout] ... | [INFO] [stdout] 59 | | Grid::from_vec(Coord(row + 1, col), vec) [INFO] [stdout] 60 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::str::FromStr` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] = note: `#[warn(clippy::should_implement_trait)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::ops::Range` [INFO] [stdout] --> src/util/grid/grid.rs:91:9 [INFO] [stdout] | [INFO] [stdout] 91 | / (0..self.dim.0) [INFO] [stdout] 92 | | .into_iter() [INFO] [stdout] | |________________________^ help: consider removing `.into_iter()`: `(0..self.dim.0)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::ops::Range` [INFO] [stdout] --> src/util/grid/grid.rs:93:29 [INFO] [stdout] | [INFO] [stdout] 93 | .flat_map(|row| (0..self.dim.1).into_iter().map(move |col| Coord(row, col))) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `(0..self.dim.1)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:36:34 [INFO] [stdout] | [INFO] [stdout] 36 | Some((a, b)) => (T::from(&a), T::from(&b)), [INFO] [stdout] | ^^ help: change this to: `a` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:36:47 [INFO] [stdout] | [INFO] [stdout] 36 | Some((a, b)) => (T::from(&a), T::from(&b)), [INFO] [stdout] | ^^ help: change this to: `b` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:37:26 [INFO] [stdout] | [INFO] [stdout] 37 | None => (T::from(&test_input), T::from(&test_input)), [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `test_input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:37:48 [INFO] [stdout] | [INFO] [stdout] 37 | None => (T::from(&test_input), T::from(&test_input)), [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `test_input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:40:24 [INFO] [stdout] | [INFO] [stdout] 40 | let main = T::from(&main_input); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `main_input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/util/grid.rs:3:1 [INFO] [stdout] | [INFO] [stdout] 3 | mod grid; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] = note: `#[warn(clippy::module_inception)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `from_str` can be confused for the standard trait method `std::str::FromStr::from_str` [INFO] [stdout] --> src/util/grid/grid.rs:38:5 [INFO] [stdout] | [INFO] [stdout] 38 | / pub fn from_str(s: &str) -> Self [INFO] [stdout] 39 | | where [INFO] [stdout] 40 | | T: FromStr, [INFO] [stdout] 41 | | ::Err: Debug, [INFO] [stdout] ... | [INFO] [stdout] 59 | | Grid::from_vec(Coord(row + 1, col), vec) [INFO] [stdout] 60 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::str::FromStr` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] = note: `#[warn(clippy::should_implement_trait)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::ops::Range` [INFO] [stdout] --> src/util/grid/grid.rs:91:9 [INFO] [stdout] | [INFO] [stdout] 91 | / (0..self.dim.0) [INFO] [stdout] 92 | | .into_iter() [INFO] [stdout] | |________________________^ help: consider removing `.into_iter()`: `(0..self.dim.0)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::ops::Range` [INFO] [stdout] --> src/util/grid/grid.rs:93:29 [INFO] [stdout] | [INFO] [stdout] 93 | .flat_map(|row| (0..self.dim.1).into_iter().map(move |col| Coord(row, col))) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `(0..self.dim.1)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/bin/day21/main.rs:120:62 [INFO] [stdout] | [INFO] [stdout] 120 | NumericButton::Accept | NumericButton::Digit0 => match other { [INFO] [stdout] | ______________________________________________________________^ [INFO] [stdout] 121 | | NumericButton::Digit7 | NumericButton::Digit4 | NumericButton::Digit1 => true, [INFO] [stdout] 122 | | _ => false, [INFO] [stdout] 123 | | }, [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 120 - NumericButton::Accept | NumericButton::Digit0 => match other { [INFO] [stdout] 121 - NumericButton::Digit7 | NumericButton::Digit4 | NumericButton::Digit1 => true, [INFO] [stdout] 122 - _ => false, [INFO] [stdout] 123 - }, [INFO] [stdout] 120 + NumericButton::Accept | NumericButton::Digit0 => matches!(other, NumericButton::Digit7 | NumericButton::Digit4 | NumericButton::Digit1), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/bin/day21/main.rs:124:86 [INFO] [stdout] | [INFO] [stdout] 124 | NumericButton::Digit7 | NumericButton::Digit4 | NumericButton::Digit1 => match other { [INFO] [stdout] | ______________________________________________________________________________________^ [INFO] [stdout] 125 | | NumericButton::Accept | NumericButton::Digit0 => true, [INFO] [stdout] 126 | | _ => false, [INFO] [stdout] 127 | | }, [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 124 - NumericButton::Digit7 | NumericButton::Digit4 | NumericButton::Digit1 => match other { [INFO] [stdout] 125 - NumericButton::Accept | NumericButton::Digit0 => true, [INFO] [stdout] 126 - _ => false, [INFO] [stdout] 127 - }, [INFO] [stdout] 124 + NumericButton::Digit7 | NumericButton::Digit4 | NumericButton::Digit1 => matches!(other, NumericButton::Accept | NumericButton::Digit0), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/bin/day21/main.rs:158:40 [INFO] [stdout] | [INFO] [stdout] 158 | DirectionalButton::Left => match other { [INFO] [stdout] | ________________________________________^ [INFO] [stdout] 159 | | DirectionalButton::Accept | DirectionalButton::Up => true, [INFO] [stdout] 160 | | _ => false, [INFO] [stdout] 161 | | }, [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 158 - DirectionalButton::Left => match other { [INFO] [stdout] 159 - DirectionalButton::Accept | DirectionalButton::Up => true, [INFO] [stdout] 160 - _ => false, [INFO] [stdout] 161 - }, [INFO] [stdout] 158 + DirectionalButton::Left => matches!(other, DirectionalButton::Accept | DirectionalButton::Up), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/bin/day21/main.rs:162:66 [INFO] [stdout] | [INFO] [stdout] 162 | DirectionalButton::Accept | DirectionalButton::Up => match other { [INFO] [stdout] | __________________________________________________________________^ [INFO] [stdout] 163 | | DirectionalButton::Left => true, [INFO] [stdout] 164 | | _ => false, [INFO] [stdout] 165 | | }, [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 162 - DirectionalButton::Accept | DirectionalButton::Up => match other { [INFO] [stdout] 163 - DirectionalButton::Left => true, [INFO] [stdout] 164 - _ => false, [INFO] [stdout] 165 - }, [INFO] [stdout] 162 + DirectionalButton::Accept | DirectionalButton::Up => matches!(other, DirectionalButton::Left), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this pattern takes a reference on something that is being dereferenced [INFO] [stdout] --> src/bin/day21/main.rs:221:14 [INFO] [stdout] | [INFO] [stdout] 221 | for (&ref sequence, &sequence_count) in sequences.iter() { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] = note: `#[warn(clippy::needless_borrowed_reference)]` on by default [INFO] [stdout] help: try removing the `&ref` part [INFO] [stdout] | [INFO] [stdout] 221 - for (&ref sequence, &sequence_count) in sequences.iter() { [INFO] [stdout] 221 + for (sequence, &sequence_count) in sequences.iter() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:36:34 [INFO] [stdout] | [INFO] [stdout] 36 | Some((a, b)) => (T::from(&a), T::from(&b)), [INFO] [stdout] | ^^ help: change this to: `a` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:36:47 [INFO] [stdout] | [INFO] [stdout] 36 | Some((a, b)) => (T::from(&a), T::from(&b)), [INFO] [stdout] | ^^ help: change this to: `b` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:37:26 [INFO] [stdout] | [INFO] [stdout] 37 | None => (T::from(&test_input), T::from(&test_input)), [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `test_input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:37:48 [INFO] [stdout] | [INFO] [stdout] 37 | None => (T::from(&test_input), T::from(&test_input)), [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `test_input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:40:24 [INFO] [stdout] | [INFO] [stdout] 40 | let main = T::from(&main_input); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `main_input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day19/main.rs:51:32 [INFO] [stdout] | [INFO] [stdout] 51 | let mut nfa = Nfa::new(&self); [INFO] [stdout] | ^^^^^ help: change this to: `self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day19/main.rs:60:32 [INFO] [stdout] | [INFO] [stdout] 60 | let mut nfa = Nfa::new(&self); [INFO] [stdout] | ^^^^^ help: change this to: `self` [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] --> src/bin/day19/main.rs:51:32 [INFO] [stdout] | [INFO] [stdout] 51 | let mut nfa = Nfa::new(&self); [INFO] [stdout] | ^^^^^ help: change this to: `self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day19/main.rs:60:32 [INFO] [stdout] | [INFO] [stdout] 60 | let mut nfa = Nfa::new(&self); [INFO] [stdout] | ^^^^^ help: change this to: `self` [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: redundant field names in struct initialization [INFO] [stdout] --> src/bin/day18/main.rs:117:44 [INFO] [stdout] | [INFO] [stdout] 117 | heap_blueprint.push(Node { dist: dist, idx }) [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `dist` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/bin/day18/main.rs:162:42 [INFO] [stdout] | [INFO] [stdout] 162 | heap.push(Node { dist: dist, idx }) [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `dist` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `itertools::Itertools` [INFO] [stdout] --> src/bin/day23/main.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use itertools::Itertools; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day02/main.rs:42:59 [INFO] [stdout] | [INFO] [stdout] 42 | self.reports.iter().filter(|report| Self::is_safe(&report)).count() as i32 [INFO] [stdout] | ^^^^^^^ help: change this to: `report` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day02/main.rs:49:34 [INFO] [stdout] | [INFO] [stdout] 49 | if Self::is_safe(&report) { [INFO] [stdout] | ^^^^^^^ help: change this to: `report` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/bin/day02/main.rs:70:13 [INFO] [stdout] | [INFO] [stdout] 70 | delta >= 1 && delta <= 3 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(1..=3).contains(&delta)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/bin/day23/main.rs:15:18 [INFO] [stdout] | [INFO] [stdout] 15 | ((value[0] - 'a' as u8) as u16) * 26 + (value[1] - 'a' as u8) as u16 [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'a'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] = note: `#[warn(clippy::char_lit_as_u8)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/bin/day23/main.rs:15:56 [INFO] [stdout] | [INFO] [stdout] 15 | ((value[0] - 'a' as u8) as u16) * 26 + (value[1] - 'a' as u8) as u16 [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'a'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/bin/day23/main.rs:19:27 [INFO] [stdout] | [INFO] [stdout] 19 | [(value / 26) as u8 + 'a' as u8, (value % 26) as u8 + 'a' as u8] [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'a'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/bin/day23/main.rs:19:59 [INFO] [stdout] | [INFO] [stdout] 19 | [(value / 26) as u8 + 'a' as u8, (value % 26) as u8 + 'a' as u8] [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'a'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/bin/day23/main.rs:57:38 [INFO] [stdout] | [INFO] [stdout] 57 | let src_range = pack_vertex(['t' as u8, 'a' as u8])..=pack_vertex(['t' as u8, 'z' as u8]); [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b't'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/bin/day23/main.rs:57:49 [INFO] [stdout] | [INFO] [stdout] 57 | let src_range = pack_vertex(['t' as u8, 'a' as u8])..=pack_vertex(['t' as u8, 'z' as u8]); [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'a'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/bin/day23/main.rs:57:76 [INFO] [stdout] | [INFO] [stdout] 57 | let src_range = pack_vertex(['t' as u8, 'a' as u8])..=pack_vertex(['t' as u8, 'z' as u8]); [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b't'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/bin/day23/main.rs:57:87 [INFO] [stdout] | [INFO] [stdout] 57 | let src_range = pack_vertex(['t' as u8, 'a' as u8])..=pack_vertex(['t' as u8, 'z' as u8]); [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'z'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day18/main.rs:44:22 [INFO] [stdout] | [INFO] [stdout] 44 | Context::new(&self, self.initial_bytes_dropped) [INFO] [stdout] | ^^^^^ help: change this to: `self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day18/main.rs:50:40 [INFO] [stdout] | [INFO] [stdout] 50 | let mut context = Context::new(&self, self.initial_bytes_dropped); [INFO] [stdout] | ^^^^^ help: change this to: `self` [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: casting a character literal to `u8` truncates [INFO] [stdout] --> src/bin/day25/main.rs:24:60 [INFO] [stdout] | [INFO] [stdout] 24 | .map(|row| (grid_str[row * 6 + col] == '#' as u8) as u8) [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'#'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] = note: `#[warn(clippy::char_lit_as_u8)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/bin/day25/main.rs:29:31 [INFO] [stdout] | [INFO] [stdout] 29 | if grid_str[0] == '#' as u8 { [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'#'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/bin/day18/main.rs:159:17 [INFO] [stdout] | [INFO] [stdout] 159 | / if self.wall_grid.get(idx) == Some(&false) { [INFO] [stdout] 160 | | if dist < self.dist_grid[idx] { [INFO] [stdout] 161 | | self.dist_grid[idx] = dist; [INFO] [stdout] 162 | | heap.push(Node { dist: dist, idx }) [INFO] [stdout] 163 | | } [INFO] [stdout] 164 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 159 ~ if self.wall_grid.get(idx) == Some(&false) [INFO] [stdout] 160 ~ && dist < self.dist_grid[idx] { [INFO] [stdout] 161 | self.dist_grid[idx] = dist; [INFO] [stdout] 162 | heap.push(Node { dist: dist, idx }) [INFO] [stdout] 163 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `itertools::Itertools` [INFO] [stdout] --> src/bin/day23/main.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use itertools::Itertools; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/bin/day23/main.rs:15:18 [INFO] [stdout] | [INFO] [stdout] 15 | ((value[0] - 'a' as u8) as u16) * 26 + (value[1] - 'a' as u8) as u16 [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'a'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] = note: `#[warn(clippy::char_lit_as_u8)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/bin/day23/main.rs:15:56 [INFO] [stdout] | [INFO] [stdout] 15 | ((value[0] - 'a' as u8) as u16) * 26 + (value[1] - 'a' as u8) as u16 [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'a'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/bin/day23/main.rs:19:27 [INFO] [stdout] | [INFO] [stdout] 19 | [(value / 26) as u8 + 'a' as u8, (value % 26) as u8 + 'a' as u8] [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'a'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/bin/day23/main.rs:19:59 [INFO] [stdout] | [INFO] [stdout] 19 | [(value / 26) as u8 + 'a' as u8, (value % 26) as u8 + 'a' as u8] [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'a'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/bin/day23/main.rs:57:38 [INFO] [stdout] | [INFO] [stdout] 57 | let src_range = pack_vertex(['t' as u8, 'a' as u8])..=pack_vertex(['t' as u8, 'z' as u8]); [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b't'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `let...else` may be rewritten with the `?` operator [INFO] [stdout] --> src/bin/day05/main.rs:61:17 [INFO] [stdout] | [INFO] [stdout] 61 | / let Some(mut check) = self.check_update(update) else { [INFO] [stdout] 62 | | return None; [INFO] [stdout] 63 | | }; [INFO] [stdout] | |__________________^ help: replace it with: `let mut check = self.check_update(update)?;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] = note: `#[warn(clippy::question_mark)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day05/main.rs:76:36 [INFO] [stdout] | [INFO] [stdout] 76 | fn check_update(&self, update: &Vec) -> Option<(usize, usize)> { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 76 - fn check_update(&self, update: &Vec) -> Option<(usize, usize)> { [INFO] [stdout] 76 + fn check_update(&self, update: &[i32]) -> Option<(usize, usize)> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/bin/day23/main.rs:57:49 [INFO] [stdout] | [INFO] [stdout] 57 | let src_range = pack_vertex(['t' as u8, 'a' as u8])..=pack_vertex(['t' as u8, 'z' as u8]); [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'a'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/bin/day23/main.rs:57:76 [INFO] [stdout] | [INFO] [stdout] 57 | let src_range = pack_vertex(['t' as u8, 'a' as u8])..=pack_vertex(['t' as u8, 'z' as u8]); [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b't'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/bin/day23/main.rs:57:87 [INFO] [stdout] | [INFO] [stdout] 57 | let src_range = pack_vertex(['t' as u8, 'a' as u8])..=pack_vertex(['t' as u8, 'z' as u8]); [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'z'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/bin/day04/main.rs:30:14 [INFO] [stdout] | [INFO] [stdout] 30 | .map(&str::chars) [INFO] [stdout] | ______________^ [INFO] [stdout] 31 | | .flatten() [INFO] [stdout] | |______________________^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(&str::chars)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] = note: `#[warn(clippy::map_flatten)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `repeat().take()` can be written more concisely [INFO] [stdout] --> src/bin/day09/main.rs:30:17 [INFO] [stdout] | [INFO] [stdout] 30 | / repeat(idx as i32) [INFO] [stdout] 31 | | .take(lens.next().unwrap() as usize) [INFO] [stdout] | |________________________________________________________^ help: consider using `repeat_n()` instead: `std::iter::repeat_n(idx as i32, lens.next().unwrap() as usize)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n [INFO] [stdout] = note: `#[warn(clippy::manual_repeat_n)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `repeat().take()` can be written more concisely [INFO] [stdout] --> src/bin/day09/main.rs:32:28 [INFO] [stdout] | [INFO] [stdout] 32 | .chain(repeat(-1).take(lens.next().unwrap_or(0) as usize)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n(-1, lens.next().unwrap_or(0) as usize)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `EMPTY` contains a capitalized acronym [INFO] [stdout] --> src/bin/day06/main.rs:28:5 [INFO] [stdout] | [INFO] [stdout] 28 | EMPTY, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Empty` [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 `GUARD` contains a capitalized acronym [INFO] [stdout] --> src/bin/day06/main.rs:29:5 [INFO] [stdout] | [INFO] [stdout] 29 | GUARD, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Guard` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `OBSTRUCTED` contains a capitalized acronym [INFO] [stdout] --> src/bin/day06/main.rs:30:5 [INFO] [stdout] | [INFO] [stdout] 30 | OBSTRUCTED, [INFO] [stdout] | ^^^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Obstructed` [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: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/bin/day06/main.rs:41:14 [INFO] [stdout] | [INFO] [stdout] 41 | .map(|line| { [INFO] [stdout] | ______________^ [INFO] [stdout] 42 | | line.chars().map(|elem| match elem { [INFO] [stdout] 43 | | '.' => Position::EMPTY, [INFO] [stdout] 44 | | '^' => Position::GUARD, [INFO] [stdout] ... | [INFO] [stdout] 48 | | }) [INFO] [stdout] 49 | | .flatten() [INFO] [stdout] | |______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] = note: `#[warn(clippy::map_flatten)]` on by default [INFO] [stdout] help: try replacing `map` with `flat_map` and remove the `.flatten()` [INFO] [stdout] | [INFO] [stdout] 41 ~ .flat_map(|line| { [INFO] [stdout] 42 + line.chars().map(|elem| match elem { [INFO] [stdout] 43 + '.' => Position::EMPTY, [INFO] [stdout] 44 + '^' => Position::GUARD, [INFO] [stdout] 45 + '#' => Position::OBSTRUCTED, [INFO] [stdout] 46 + _ => panic!(), [INFO] [stdout] 47 + }) [INFO] [stdout] 48 + }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/bin/day06/main.rs:100:16 [INFO] [stdout] | [INFO] [stdout] 100 | if &self.grid[next_pos] == &Position::OBSTRUCTED { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] = note: `#[warn(clippy::op_ref)]` on by default [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 100 - if &self.grid[next_pos] == &Position::OBSTRUCTED { [INFO] [stdout] 100 + if self.grid[next_pos] == Position::OBSTRUCTED { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> src/bin/day06/main.rs:101:49 [INFO] [stdout] | [INFO] [stdout] 101 | self.guard.1 = (self.guard.1.1, self.guard.1.0 * -1); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: consider using: `-self.guard.1.0` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] = note: `#[warn(clippy::neg_multiply)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/bin/day04/main.rs:30:14 [INFO] [stdout] | [INFO] [stdout] 30 | .map(&str::chars) [INFO] [stdout] | ______________^ [INFO] [stdout] 31 | | .flatten() [INFO] [stdout] | |______________________^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(&str::chars)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] = note: `#[warn(clippy::map_flatten)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `Self::detect_perimeter` doesn't need a mutable reference [INFO] [stdout] --> src/bin/day12/main.rs:103:61 [INFO] [stdout] | [INFO] [stdout] 103 | Self::detect_perimeter(&mut region_metrics, &mut last_val, val); [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] 103 - Self::detect_perimeter(&mut region_metrics, &mut last_val, val); [INFO] [stdout] 103 + Self::detect_perimeter(&mut region_metrics, &last_val, val); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `Self::detect_perimeter` doesn't need a mutable reference [INFO] [stdout] --> src/bin/day12/main.rs:117:61 [INFO] [stdout] | [INFO] [stdout] 117 | Self::detect_perimeter(&mut region_metrics, &mut last_val, val); [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] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 117 - Self::detect_perimeter(&mut region_metrics, &mut last_val, val); [INFO] [stdout] 117 + Self::detect_perimeter(&mut region_metrics, &last_val, val); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/bin/day12/main.rs:135:20 [INFO] [stdout] | [INFO] [stdout] 135 | if last_val[0] != val[0] || last_val[0] == val[0] && last_val[1] == val[0] { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 135 - if last_val[0] != val[0] || last_val[0] == val[0] && last_val[1] == val[0] { [INFO] [stdout] 135 + if !(last_val[0] == val[0] && last_val[1] != val[0]) { [INFO] [stdout] | [INFO] [stdout] 135 - if last_val[0] != val[0] || last_val[0] == val[0] && last_val[1] == val[0] { [INFO] [stdout] 135 + if last_val[0] != val[0] || last_val[1] == val[0] { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/bin/day12/main.rs:142:20 [INFO] [stdout] | [INFO] [stdout] 142 | if last_val[1] != val[1] || last_val[0] == val[1] && last_val[1] == val[1] { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 142 - if last_val[1] != val[1] || last_val[0] == val[1] && last_val[1] == val[1] { [INFO] [stdout] 142 + if !(last_val[1] == val[1] && last_val[0] != val[1]) { [INFO] [stdout] | [INFO] [stdout] 142 - if last_val[1] != val[1] || last_val[0] == val[1] && last_val[1] == val[1] { [INFO] [stdout] 142 + if last_val[1] != val[1] || last_val[0] == val[1] { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day12/main.rs:127:25 [INFO] [stdout] | [INFO] [stdout] 127 | region_metrics: &mut 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] 127 - region_metrics: &mut Vec, [INFO] [stdout] 127 + region_metrics: &mut [RegionMetrics], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day20/main.rs:41:40 [INFO] [stdout] | [INFO] [stdout] 41 | let mut context = Context::new(&self); [INFO] [stdout] | ^^^^^ help: change this to: `self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day20/main.rs:47:40 [INFO] [stdout] | [INFO] [stdout] 47 | let mut context = Context::new(&self); [INFO] [stdout] | ^^^^^ help: change this to: `self` [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: casting a character literal to `u8` truncates [INFO] [stdout] --> src/bin/day25/main.rs:24:60 [INFO] [stdout] | [INFO] [stdout] 24 | .map(|row| (grid_str[row * 6 + col] == '#' as u8) as u8) [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'#'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] = note: `#[warn(clippy::char_lit_as_u8)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/bin/day25/main.rs:29:31 [INFO] [stdout] | [INFO] [stdout] 29 | if grid_str[0] == '#' as u8 { [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'#'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `repeat().take()` can be written more concisely [INFO] [stdout] --> src/bin/day09/main.rs:30:17 [INFO] [stdout] | [INFO] [stdout] 30 | / repeat(idx as i32) [INFO] [stdout] 31 | | .take(lens.next().unwrap() as usize) [INFO] [stdout] | |________________________________________________________^ help: consider using `repeat_n()` instead: `std::iter::repeat_n(idx as i32, lens.next().unwrap() as usize)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n [INFO] [stdout] = note: `#[warn(clippy::manual_repeat_n)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `repeat().take()` can be written more concisely [INFO] [stdout] --> src/bin/day09/main.rs:32:28 [INFO] [stdout] | [INFO] [stdout] 32 | .chain(repeat(-1).take(lens.next().unwrap_or(0) as usize)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n(-1, lens.next().unwrap_or(0) as usize)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day20/main.rs:41:40 [INFO] [stdout] | [INFO] [stdout] 41 | let mut context = Context::new(&self); [INFO] [stdout] | ^^^^^ help: change this to: `self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day20/main.rs:47:40 [INFO] [stdout] | [INFO] [stdout] 47 | let mut context = Context::new(&self); [INFO] [stdout] | ^^^^^ help: change this to: `self` [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: redundant field names in struct initialization [INFO] [stdout] --> src/bin/day18/main.rs:117:44 [INFO] [stdout] | [INFO] [stdout] 117 | heap_blueprint.push(Node { dist: dist, idx }) [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `dist` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/bin/day18/main.rs:162:42 [INFO] [stdout] | [INFO] [stdout] 162 | heap.push(Node { dist: dist, idx }) [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `dist` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `Self::detect_perimeter` doesn't need a mutable reference [INFO] [stdout] --> src/bin/day12/main.rs:103:61 [INFO] [stdout] | [INFO] [stdout] 103 | Self::detect_perimeter(&mut region_metrics, &mut last_val, val); [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] 103 - Self::detect_perimeter(&mut region_metrics, &mut last_val, val); [INFO] [stdout] 103 + Self::detect_perimeter(&mut region_metrics, &last_val, val); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `Self::detect_perimeter` doesn't need a mutable reference [INFO] [stdout] --> src/bin/day12/main.rs:117:61 [INFO] [stdout] | [INFO] [stdout] 117 | Self::detect_perimeter(&mut region_metrics, &mut last_val, val); [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] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 117 - Self::detect_perimeter(&mut region_metrics, &mut last_val, val); [INFO] [stdout] 117 + Self::detect_perimeter(&mut region_metrics, &last_val, val); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/bin/day12/main.rs:135:20 [INFO] [stdout] | [INFO] [stdout] 135 | if last_val[0] != val[0] || last_val[0] == val[0] && last_val[1] == val[0] { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 135 - if last_val[0] != val[0] || last_val[0] == val[0] && last_val[1] == val[0] { [INFO] [stdout] 135 + if !(last_val[0] == val[0] && last_val[1] != val[0]) { [INFO] [stdout] | [INFO] [stdout] 135 - if last_val[0] != val[0] || last_val[0] == val[0] && last_val[1] == val[0] { [INFO] [stdout] 135 + if last_val[0] != val[0] || last_val[1] == val[0] { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/bin/day12/main.rs:142:20 [INFO] [stdout] | [INFO] [stdout] 142 | if last_val[1] != val[1] || last_val[0] == val[1] && last_val[1] == val[1] { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 142 - if last_val[1] != val[1] || last_val[0] == val[1] && last_val[1] == val[1] { [INFO] [stdout] 142 + if !(last_val[1] == val[1] && last_val[0] != val[1]) { [INFO] [stdout] | [INFO] [stdout] 142 - if last_val[1] != val[1] || last_val[0] == val[1] && last_val[1] == val[1] { [INFO] [stdout] 142 + if last_val[1] != val[1] || last_val[0] == val[1] { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day12/main.rs:127:25 [INFO] [stdout] | [INFO] [stdout] 127 | region_metrics: &mut 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] 127 - region_metrics: &mut Vec, [INFO] [stdout] 127 + region_metrics: &mut [RegionMetrics], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `unpack_wire` is never used [INFO] [stdout] --> src/bin/day24/main.rs:48:4 [INFO] [stdout] | [INFO] [stdout] 48 | fn unpack_wire(value: &Wire) -> String { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `resolve_required_wires` and `adds_up` are never used [INFO] [stdout] --> src/bin/day24/main.rs:205:8 [INFO] [stdout] | [INFO] [stdout] 127 | impl Input { [INFO] [stdout] | ---------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 205 | fn resolve_required_wires(&self, wire: Wire) -> HashSet { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 220 | fn adds_up(&self, x_wires: &[Wire], y_wires: &[Wire], z_wires: &[Wire]) -> bool { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/bin/day24/main.rs:37:30 [INFO] [stdout] | [INFO] [stdout] 37 | '0'..='9' => c - '0' as u8, [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'0'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] = note: `#[warn(clippy::char_lit_as_u8)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/bin/day24/main.rs:38:30 [INFO] [stdout] | [INFO] [stdout] 38 | 'a'..='z' => c - 'a' as u8 + 10, [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'a'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/bin/day24/main.rs:57:26 [INFO] [stdout] | [INFO] [stdout] 57 | 0..=9 => v + '0' as u8, [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'0'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/bin/day24/main.rs:58:33 [INFO] [stdout] | [INFO] [stdout] 58 | 10..=36 => v - 10 + 'a' as u8, [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'a'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/bin/day24/main.rs:161:52 [INFO] [stdout] | [INFO] [stdout] 161 | clone.gates.keys().for_each(|&output_wire| match output_wire { [INFO] [stdout] | ____________________________________________________^ [INFO] [stdout] 162 | | MIN_Z_WIRE..=MAX_Z_WIRE => z_wires.push(output_wire), [INFO] [stdout] 163 | | _ => {} [INFO] [stdout] 164 | | }); [INFO] [stdout] | |_________^ help: try: `if let MIN_Z_WIRE..=MAX_Z_WIRE = output_wire { z_wires.push(output_wire) }` [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: name `ADD` contains a capitalized acronym [INFO] [stdout] --> src/bin/day07/main.rs:24:5 [INFO] [stdout] | [INFO] [stdout] 24 | ADD, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Add` [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 `MUL` contains a capitalized acronym [INFO] [stdout] --> src/bin/day07/main.rs:25:5 [INFO] [stdout] | [INFO] [stdout] 25 | MUL, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Mul` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `CONCAT` contains a capitalized acronym [INFO] [stdout] --> src/bin/day07/main.rs:26:5 [INFO] [stdout] | [INFO] [stdout] 26 | CONCAT, [INFO] [stdout] | ^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Concat` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `ADD` contains a capitalized acronym [INFO] [stdout] --> src/bin/day07/main.rs:24:5 [INFO] [stdout] | [INFO] [stdout] 24 | ADD, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Add` [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 `MUL` contains a capitalized acronym [INFO] [stdout] --> src/bin/day07/main.rs:25:5 [INFO] [stdout] | [INFO] [stdout] 25 | MUL, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Mul` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `CONCAT` contains a capitalized acronym [INFO] [stdout] --> src/bin/day07/main.rs:26:5 [INFO] [stdout] | [INFO] [stdout] 26 | CONCAT, [INFO] [stdout] | ^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Concat` [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: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/bin/day07/main.rs:75:14 [INFO] [stdout] | [INFO] [stdout] 75 | .map(|l| { [INFO] [stdout] | ______________^ [INFO] [stdout] 76 | | Op::iter() [INFO] [stdout] 77 | | .filter(|op| allow_concat || op != &Op::CONCAT) [INFO] [stdout] 78 | | .map(move |op| match op { [INFO] [stdout] ... | [INFO] [stdout] 83 | | }) [INFO] [stdout] 84 | | .flatten() [INFO] [stdout] | |______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] = note: `#[warn(clippy::map_flatten)]` on by default [INFO] [stdout] help: try replacing `map` with `flat_map` and remove the `.flatten()` [INFO] [stdout] | [INFO] [stdout] 75 ~ .flat_map(|l| { [INFO] [stdout] 76 + Op::iter() [INFO] [stdout] 77 + .filter(|op| allow_concat || op != &Op::CONCAT) [INFO] [stdout] 78 + .map(move |op| match op { [INFO] [stdout] 79 + Op::ADD => l + r, [INFO] [stdout] 80 + Op::MUL => l * r, [INFO] [stdout] 81 + Op::CONCAT => (l.to_string() + &r.to_string()).parse::().unwrap(), [INFO] [stdout] 82 + }) [INFO] [stdout] 83 + }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/bin/day07/main.rs:75:14 [INFO] [stdout] | [INFO] [stdout] 75 | .map(|l| { [INFO] [stdout] | ______________^ [INFO] [stdout] 76 | | Op::iter() [INFO] [stdout] 77 | | .filter(|op| allow_concat || op != &Op::CONCAT) [INFO] [stdout] 78 | | .map(move |op| match op { [INFO] [stdout] ... | [INFO] [stdout] 83 | | }) [INFO] [stdout] 84 | | .flatten() [INFO] [stdout] | |______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] = note: `#[warn(clippy::map_flatten)]` on by default [INFO] [stdout] help: try replacing `map` with `flat_map` and remove the `.flatten()` [INFO] [stdout] | [INFO] [stdout] 75 ~ .flat_map(|l| { [INFO] [stdout] 76 + Op::iter() [INFO] [stdout] 77 + .filter(|op| allow_concat || op != &Op::CONCAT) [INFO] [stdout] 78 + .map(move |op| match op { [INFO] [stdout] 79 + Op::ADD => l + r, [INFO] [stdout] 80 + Op::MUL => l * r, [INFO] [stdout] 81 + Op::CONCAT => (l.to_string() + &r.to_string()).parse::().unwrap(), [INFO] [stdout] 82 + }) [INFO] [stdout] 83 + }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `unpack_wire` is never used [INFO] [stdout] --> src/bin/day24/main.rs:48:4 [INFO] [stdout] | [INFO] [stdout] 48 | fn unpack_wire(value: &Wire) -> String { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `resolve_required_wires` and `adds_up` are never used [INFO] [stdout] --> src/bin/day24/main.rs:205:8 [INFO] [stdout] | [INFO] [stdout] 127 | impl Input { [INFO] [stdout] | ---------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 205 | fn resolve_required_wires(&self, wire: Wire) -> HashSet { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 220 | fn adds_up(&self, x_wires: &[Wire], y_wires: &[Wire], z_wires: &[Wire]) -> bool { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/bin/day24/main.rs:37:30 [INFO] [stdout] | [INFO] [stdout] 37 | '0'..='9' => c - '0' as u8, [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'0'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] = note: `#[warn(clippy::char_lit_as_u8)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/bin/day24/main.rs:38:30 [INFO] [stdout] | [INFO] [stdout] 38 | 'a'..='z' => c - 'a' as u8 + 10, [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'a'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/bin/day24/main.rs:57:26 [INFO] [stdout] | [INFO] [stdout] 57 | 0..=9 => v + '0' as u8, [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'0'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/bin/day24/main.rs:58:33 [INFO] [stdout] | [INFO] [stdout] 58 | 10..=36 => v - 10 + 'a' as u8, [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'a'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/bin/day24/main.rs:161:52 [INFO] [stdout] | [INFO] [stdout] 161 | clone.gates.keys().for_each(|&output_wire| match output_wire { [INFO] [stdout] | ____________________________________________________^ [INFO] [stdout] 162 | | MIN_Z_WIRE..=MAX_Z_WIRE => z_wires.push(output_wire), [INFO] [stdout] 163 | | _ => {} [INFO] [stdout] 164 | | }); [INFO] [stdout] | |_________^ help: try: `if let MIN_Z_WIRE..=MAX_Z_WIRE = output_wire { z_wires.push(output_wire) }` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day02/main.rs:42:59 [INFO] [stdout] | [INFO] [stdout] 42 | self.reports.iter().filter(|report| Self::is_safe(&report)).count() as i32 [INFO] [stdout] | ^^^^^^^ help: change this to: `report` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day02/main.rs:49:34 [INFO] [stdout] | [INFO] [stdout] 49 | if Self::is_safe(&report) { [INFO] [stdout] | ^^^^^^^ help: change this to: `report` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/bin/day02/main.rs:70:13 [INFO] [stdout] | [INFO] [stdout] 70 | delta >= 1 && delta <= 3 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(1..=3).contains(&delta)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `let...else` may be rewritten with the `?` operator [INFO] [stdout] --> src/bin/day05/main.rs:61:17 [INFO] [stdout] | [INFO] [stdout] 61 | / let Some(mut check) = self.check_update(update) else { [INFO] [stdout] 62 | | return None; [INFO] [stdout] 63 | | }; [INFO] [stdout] | |__________________^ help: replace it with: `let mut check = self.check_update(update)?;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] = note: `#[warn(clippy::question_mark)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day05/main.rs:76:36 [INFO] [stdout] | [INFO] [stdout] 76 | fn check_update(&self, update: &Vec) -> Option<(usize, usize)> { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 76 - fn check_update(&self, update: &Vec) -> Option<(usize, usize)> { [INFO] [stdout] 76 + fn check_update(&self, update: &[i32]) -> Option<(usize, usize)> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/bin/day21/main.rs:120:62 [INFO] [stdout] | [INFO] [stdout] 120 | NumericButton::Accept | NumericButton::Digit0 => match other { [INFO] [stdout] | ______________________________________________________________^ [INFO] [stdout] 121 | | NumericButton::Digit7 | NumericButton::Digit4 | NumericButton::Digit1 => true, [INFO] [stdout] 122 | | _ => false, [INFO] [stdout] 123 | | }, [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 120 - NumericButton::Accept | NumericButton::Digit0 => match other { [INFO] [stdout] 121 - NumericButton::Digit7 | NumericButton::Digit4 | NumericButton::Digit1 => true, [INFO] [stdout] 122 - _ => false, [INFO] [stdout] 123 - }, [INFO] [stdout] 120 + NumericButton::Accept | NumericButton::Digit0 => matches!(other, NumericButton::Digit7 | NumericButton::Digit4 | NumericButton::Digit1), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/bin/day21/main.rs:124:86 [INFO] [stdout] | [INFO] [stdout] 124 | NumericButton::Digit7 | NumericButton::Digit4 | NumericButton::Digit1 => match other { [INFO] [stdout] | ______________________________________________________________________________________^ [INFO] [stdout] 125 | | NumericButton::Accept | NumericButton::Digit0 => true, [INFO] [stdout] 126 | | _ => false, [INFO] [stdout] 127 | | }, [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 124 - NumericButton::Digit7 | NumericButton::Digit4 | NumericButton::Digit1 => match other { [INFO] [stdout] 125 - NumericButton::Accept | NumericButton::Digit0 => true, [INFO] [stdout] 126 - _ => false, [INFO] [stdout] 127 - }, [INFO] [stdout] 124 + NumericButton::Digit7 | NumericButton::Digit4 | NumericButton::Digit1 => matches!(other, NumericButton::Accept | NumericButton::Digit0), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/bin/day21/main.rs:158:40 [INFO] [stdout] | [INFO] [stdout] 158 | DirectionalButton::Left => match other { [INFO] [stdout] | ________________________________________^ [INFO] [stdout] 159 | | DirectionalButton::Accept | DirectionalButton::Up => true, [INFO] [stdout] 160 | | _ => false, [INFO] [stdout] 161 | | }, [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 158 - DirectionalButton::Left => match other { [INFO] [stdout] 159 - DirectionalButton::Accept | DirectionalButton::Up => true, [INFO] [stdout] 160 - _ => false, [INFO] [stdout] 161 - }, [INFO] [stdout] 158 + DirectionalButton::Left => matches!(other, DirectionalButton::Accept | DirectionalButton::Up), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/bin/day21/main.rs:162:66 [INFO] [stdout] | [INFO] [stdout] 162 | DirectionalButton::Accept | DirectionalButton::Up => match other { [INFO] [stdout] | __________________________________________________________________^ [INFO] [stdout] 163 | | DirectionalButton::Left => true, [INFO] [stdout] 164 | | _ => false, [INFO] [stdout] 165 | | }, [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 162 - DirectionalButton::Accept | DirectionalButton::Up => match other { [INFO] [stdout] 163 - DirectionalButton::Left => true, [INFO] [stdout] 164 - _ => false, [INFO] [stdout] 165 - }, [INFO] [stdout] 162 + DirectionalButton::Accept | DirectionalButton::Up => matches!(other, DirectionalButton::Left), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this pattern takes a reference on something that is being dereferenced [INFO] [stdout] --> src/bin/day21/main.rs:221:14 [INFO] [stdout] | [INFO] [stdout] 221 | for (&ref sequence, &sequence_count) in sequences.iter() { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference [INFO] [stdout] = note: `#[warn(clippy::needless_borrowed_reference)]` on by default [INFO] [stdout] help: try removing the `&ref` part [INFO] [stdout] | [INFO] [stdout] 221 - for (&ref sequence, &sequence_count) in sequences.iter() { [INFO] [stdout] 221 + for (sequence, &sequence_count) in sequences.iter() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `EMPTY` contains a capitalized acronym [INFO] [stdout] --> src/bin/day06/main.rs:28:5 [INFO] [stdout] | [INFO] [stdout] 28 | EMPTY, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Empty` [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 `GUARD` contains a capitalized acronym [INFO] [stdout] --> src/bin/day06/main.rs:29:5 [INFO] [stdout] | [INFO] [stdout] 29 | GUARD, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Guard` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `OBSTRUCTED` contains a capitalized acronym [INFO] [stdout] --> src/bin/day06/main.rs:30:5 [INFO] [stdout] | [INFO] [stdout] 30 | OBSTRUCTED, [INFO] [stdout] | ^^^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Obstructed` [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: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/bin/day06/main.rs:41:14 [INFO] [stdout] | [INFO] [stdout] 41 | .map(|line| { [INFO] [stdout] | ______________^ [INFO] [stdout] 42 | | line.chars().map(|elem| match elem { [INFO] [stdout] 43 | | '.' => Position::EMPTY, [INFO] [stdout] 44 | | '^' => Position::GUARD, [INFO] [stdout] ... | [INFO] [stdout] 48 | | }) [INFO] [stdout] 49 | | .flatten() [INFO] [stdout] | |______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] = note: `#[warn(clippy::map_flatten)]` on by default [INFO] [stdout] help: try replacing `map` with `flat_map` and remove the `.flatten()` [INFO] [stdout] | [INFO] [stdout] 41 ~ .flat_map(|line| { [INFO] [stdout] 42 + line.chars().map(|elem| match elem { [INFO] [stdout] 43 + '.' => Position::EMPTY, [INFO] [stdout] 44 + '^' => Position::GUARD, [INFO] [stdout] 45 + '#' => Position::OBSTRUCTED, [INFO] [stdout] 46 + _ => panic!(), [INFO] [stdout] 47 + }) [INFO] [stdout] 48 + }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day18/main.rs:44:22 [INFO] [stdout] | [INFO] [stdout] 44 | Context::new(&self, self.initial_bytes_dropped) [INFO] [stdout] | ^^^^^ help: change this to: `self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day18/main.rs:50:40 [INFO] [stdout] | [INFO] [stdout] 50 | let mut context = Context::new(&self, self.initial_bytes_dropped); [INFO] [stdout] | ^^^^^ help: change this to: `self` [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: needlessly taken reference of both operands [INFO] [stdout] --> src/bin/day06/main.rs:100:16 [INFO] [stdout] | [INFO] [stdout] 100 | if &self.grid[next_pos] == &Position::OBSTRUCTED { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] = note: `#[warn(clippy::op_ref)]` on by default [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 100 - if &self.grid[next_pos] == &Position::OBSTRUCTED { [INFO] [stdout] 100 + if self.grid[next_pos] == Position::OBSTRUCTED { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> src/bin/day06/main.rs:101:49 [INFO] [stdout] | [INFO] [stdout] 101 | self.guard.1 = (self.guard.1.1, self.guard.1.0 * -1); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: consider using: `-self.guard.1.0` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] = note: `#[warn(clippy::neg_multiply)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/bin/day18/main.rs:159:17 [INFO] [stdout] | [INFO] [stdout] 159 | / if self.wall_grid.get(idx) == Some(&false) { [INFO] [stdout] 160 | | if dist < self.dist_grid[idx] { [INFO] [stdout] 161 | | self.dist_grid[idx] = dist; [INFO] [stdout] 162 | | heap.push(Node { dist: dist, idx }) [INFO] [stdout] 163 | | } [INFO] [stdout] 164 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 159 ~ if self.wall_grid.get(idx) == Some(&false) [INFO] [stdout] 160 ~ && dist < self.dist_grid[idx] { [INFO] [stdout] 161 | self.dist_grid[idx] = dist; [INFO] [stdout] 162 | heap.push(Node { dist: dist, idx }) [INFO] [stdout] 163 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day17/main.rs:103:17 [INFO] [stdout] | [INFO] [stdout] 103 | self.r[0] = self.r[0] >> self.combo_op(op); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.r[0] >>= self.combo_op(op)` [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] --> src/bin/day17/main.rs:103:17 [INFO] [stdout] | [INFO] [stdout] 103 | self.r[0] = self.r[0] >> self.combo_op(op); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.r[0] >>= self.combo_op(op)` [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] Finished `dev` profile [unoptimized + debuginfo] target(s) in 10.71s [INFO] running `Command { std: "docker" "inspect" "e9299b4315259a31e9eb3ca7d3b3de6e42b5516c86f0819e9387f0492ab020c9", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "e9299b4315259a31e9eb3ca7d3b3de6e42b5516c86f0819e9387f0492ab020c9", kill_on_drop: false }` [INFO] [stdout] e9299b4315259a31e9eb3ca7d3b3de6e42b5516c86f0819e9387f0492ab020c9