[INFO] cloning repository https://github.com/CPTblackadder/advent_of_code_2024 [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/CPTblackadder/advent_of_code_2024" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FCPTblackadder%2Fadvent_of_code_2024", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FCPTblackadder%2Fadvent_of_code_2024'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 4c36b301d94ccae39f0eb905443a25289c30ee89 [INFO] linting CPTblackadder/advent_of_code_2024 against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FCPTblackadder%2Fadvent_of_code_2024" "/workspace/builds/worker-0-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-0-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/CPTblackadder/advent_of_code_2024 [INFO] finished tweaking git repo https://github.com/CPTblackadder/advent_of_code_2024 [INFO] tweaked toml for git repo https://github.com/CPTblackadder/advent_of_code_2024 written to /workspace/builds/worker-0-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/CPTblackadder/advent_of_code_2024 on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/CPTblackadder/advent_of_code_2024 already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded priority-queue v2.1.1 [INFO] [stderr] Downloaded cached_proc_macro v0.23.0 [INFO] [stderr] Downloaded deprecate-until v0.1.1 [INFO] [stderr] Downloaded count-digits v0.5.1 [INFO] [stderr] Downloaded cached v0.54.0 [INFO] [stderr] Downloaded pathfinding v4.12.0 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-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] bb0d8b6125474406211816d5c2497fc31258d659c378299646c6813b806b5d93 [INFO] running `Command { std: "docker" "start" "-a" "bb0d8b6125474406211816d5c2497fc31258d659c378299646c6813b806b5d93", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "bb0d8b6125474406211816d5c2497fc31258d659c378299646c6813b806b5d93", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "bb0d8b6125474406211816d5c2497fc31258d659c378299646c6813b806b5d93", kill_on_drop: false }` [INFO] [stdout] bb0d8b6125474406211816d5c2497fc31258d659c378299646c6813b806b5d93 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-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] 1269163bd59a46160b21af2a616e7f9e477afaeb6dacd12398a903f006fd3f03 [INFO] running `Command { std: "docker" "start" "-a" "1269163bd59a46160b21af2a616e7f9e477afaeb6dacd12398a903f006fd3f03", kill_on_drop: false }` [INFO] [stderr] Compiling semver v1.0.24 [INFO] [stderr] Compiling thiserror v2.0.7 [INFO] [stderr] Compiling syn v2.0.90 [INFO] [stderr] Compiling rustversion v1.0.18 [INFO] [stderr] Checking indexmap v2.7.0 [INFO] [stderr] Checking integer-sqrt v0.1.5 [INFO] [stderr] Checking hashbrown v0.14.5 [INFO] [stderr] Checking rustc-hash v2.1.0 [INFO] [stderr] Checking web-time v1.1.0 [INFO] [stderr] Checking cached_proc_macro_types v0.1.1 [INFO] [stderr] Checking bit-vec v0.8.0 [INFO] [stderr] Checking rayon v1.10.0 [INFO] [stderr] Checking itertools v0.13.0 [INFO] [stderr] Checking bit-set v0.8.0 [INFO] [stderr] Checking count-digits v0.5.1 [INFO] [stderr] Checking strum v0.26.3 [INFO] [stderr] Checking priority-queue v2.1.1 [INFO] [stderr] Compiling darling_core v0.20.10 [INFO] [stderr] Compiling thiserror-impl v2.0.7 [INFO] [stderr] Compiling thiserror-impl v1.0.69 [INFO] [stderr] Compiling deprecate-until v0.1.1 [INFO] [stderr] Compiling strum_macros v0.26.4 [INFO] [stderr] Checking thiserror v1.0.69 [INFO] [stderr] Checking pathfinding v4.12.0 [INFO] [stderr] Compiling darling_macro v0.20.10 [INFO] [stderr] Compiling darling v0.20.10 [INFO] [stderr] Compiling cached_proc_macro v0.23.0 [INFO] [stderr] Checking cached v0.54.0 [INFO] [stderr] Checking advent_of_code_2024 v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: bound is defined in more than one place [INFO] [stdout] --> src/day_02.rs:31:41 [INFO] [stdout] | [INFO] [stdout] 31 | fn check_for_safety_with_error_area<'a, T: Iterator>(mut s: T) -> Option [INFO] [stdout] | ^ [INFO] [stdout] 32 | where [INFO] [stdout] 33 | T: Debug + Clone, [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations [INFO] [stdout] = note: `#[warn(clippy::multiple_bound_locations)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/day_21.rs:26:16 [INFO] [stdout] | [INFO] [stdout] 26 | Self { pos: pos } [INFO] [stdout] | ^^^^^^^^ help: replace it with: `pos` [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/day_21.rs:82:13 [INFO] [stdout] | [INFO] [stdout] 82 | pos: pos, [INFO] [stdout] | ^^^^^^^^ help: replace it with: `pos` [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: redundant field names in struct initialization [INFO] [stdout] --> src/day_21.rs:151:16 [INFO] [stdout] | [INFO] [stdout] 151 | Self { pos: pos } [INFO] [stdout] | ^^^^^^^^ help: replace it with: `pos` [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: `IntoParallelIterator` [INFO] [stdout] --> src/day_24.rs:3:19 [INFO] [stdout] | [INFO] [stdout] 3 | use rayon::iter::{IntoParallelIterator, ParallelBridge, ParallelIterator}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::iter::zip` [INFO] [stdout] --> src/day_24.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use std::iter::zip; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `fs::File` [INFO] [stdout] --> src/day_24.rs:11:5 [INFO] [stdout] | [INFO] [stdout] 11 | fs::File, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Circuit` and `SimplerCircuitBase` [INFO] [stdout] --> src/day_24/tests.rs:1:13 [INFO] [stdout] | [INFO] [stdout] 1 | use super::{Circuit, SimplerCircuitBase}; [INFO] [stdout] | ^^^^^^^ ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `else` branch is empty [INFO] [stdout] --> src/day_24.rs:736:15 [INFO] [stdout] | [INFO] [stdout] 736 | } else { [INFO] [stdout] | _______________^ [INFO] [stdout] 737 | | } [INFO] [stdout] | |_____________^ help: you can remove it [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_else [INFO] [stdout] = note: `#[warn(clippy::needless_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: bound is defined in more than one place [INFO] [stdout] --> src/day_02.rs:31:41 [INFO] [stdout] | [INFO] [stdout] 31 | fn check_for_safety_with_error_area<'a, T: Iterator>(mut s: T) -> Option [INFO] [stdout] | ^ [INFO] [stdout] 32 | where [INFO] [stdout] 33 | T: Debug + Clone, [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations [INFO] [stdout] = note: `#[warn(clippy::multiple_bound_locations)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/day_21.rs:26:16 [INFO] [stdout] | [INFO] [stdout] 26 | Self { pos: pos } [INFO] [stdout] | ^^^^^^^^ help: replace it with: `pos` [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/day_21.rs:82:13 [INFO] [stdout] | [INFO] [stdout] 82 | pos: pos, [INFO] [stdout] | ^^^^^^^^ help: replace it with: `pos` [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: redundant field names in struct initialization [INFO] [stdout] --> src/day_21.rs:151:16 [INFO] [stdout] | [INFO] [stdout] 151 | Self { pos: pos } [INFO] [stdout] | ^^^^^^^^ help: replace it with: `pos` [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: `IntoParallelIterator` [INFO] [stdout] --> src/day_24.rs:3:19 [INFO] [stdout] | [INFO] [stdout] 3 | use rayon::iter::{IntoParallelIterator, ParallelBridge, ParallelIterator}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::iter::zip` [INFO] [stdout] --> src/day_24.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use std::iter::zip; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `fs::File` [INFO] [stdout] --> src/day_24.rs:11:5 [INFO] [stdout] | [INFO] [stdout] 11 | fs::File, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `else` branch is empty [INFO] [stdout] --> src/day_24.rs:736:15 [INFO] [stdout] | [INFO] [stdout] 736 | } else { [INFO] [stdout] | _______________^ [INFO] [stdout] 737 | | } [INFO] [stdout] | |_____________^ help: you can remove it [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_else [INFO] [stdout] = note: `#[warn(clippy::needless_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::io::Write` [INFO] [stdout] --> src/day_24.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use std::io::Write; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::io::Write` [INFO] [stdout] --> src/day_24.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use std::io::Write; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `value` [INFO] [stdout] --> src/day_24.rs:221:17 [INFO] [stdout] | [INFO] [stdout] 221 | let value = Some(&x[5..6] == "1"); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_value` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::ops::Range` [INFO] [stdout] --> src/day_01.rs:19:9 [INFO] [stdout] | [INFO] [stdout] 19 | / (0..v1.len()) [INFO] [stdout] 20 | | .into_iter() [INFO] [stdout] | |________________________^ help: consider removing `.into_iter()`: `(0..v1.len())` [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::str::SplitWhitespace<'_>` [INFO] [stdout] --> src/day_02.rs:8:17 [INFO] [stdout] | [INFO] [stdout] 8 | let mut s = input_str.split_whitespace().into_iter(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `input_str.split_whitespace()` [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: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/day_02.rs:59:12 [INFO] [stdout] | [INFO] [stdout] 59 | if let Some(_) = check_for_safety_with_error_area(input_str.split_whitespace()) { [INFO] [stdout] | -------^^^^^^^----------------------------------------------------------------- help: try: `if check_for_safety_with_error_area(input_str.split_whitespace()).is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::ops::Range` [INFO] [stdout] --> src/day_02.rs:60:9 [INFO] [stdout] | [INFO] [stdout] 60 | / (0..input_str.split_whitespace().count()) [INFO] [stdout] 61 | | .into_iter() [INFO] [stdout] | |________________________^ help: consider removing `.into_iter()`: `(0..input_str.split_whitespace().count())` [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: comparison to empty slice [INFO] [stdout] --> src/day_05.rs:36:20 [INFO] [stdout] | [INFO] [stdout] 36 | if l == "" { [INFO] [stdout] | ^^^^^^^ help: using `is_empty` is clearer and more explicit: `l.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] = note: `#[warn(clippy::comparison_to_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/day_05.rs:70:20 [INFO] [stdout] | [INFO] [stdout] 70 | if l == "" { [INFO] [stdout] | ^^^^^^^ help: using `is_empty` is clearer and more explicit: `l.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `map` over `inspect` [INFO] [stdout] --> src/day_05.rs:92:14 [INFO] [stdout] | [INFO] [stdout] 92 | .map(|x| { [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_inspect [INFO] [stdout] = note: `#[warn(clippy::manual_inspect)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 92 ~ .inspect(|x| { [INFO] [stdout] 93 | x.sort_by(|x, y| { [INFO] [stdout] ... [INFO] [stdout] 100 | } [INFO] [stdout] 101 ~ }); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day_06.rs:28:30 [INFO] [stdout] | [INFO] [stdout] 28 | c = x.translate(dir, &grid); [INFO] [stdout] | ^^^^^ help: change this to: `grid` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day_06.rs:32:38 [INFO] [stdout] | [INFO] [stdout] 32 | c = x.translate(dir, &grid); [INFO] [stdout] | ^^^^^ help: change this to: `grid` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day_06.rs:36:46 [INFO] [stdout] | [INFO] [stdout] 36 | c = x.translate(dir, &grid); [INFO] [stdout] | ^^^^^ help: change this to: `grid` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day_06.rs:51:30 [INFO] [stdout] | [INFO] [stdout] 51 | c = x.translate(dir, &grid); [INFO] [stdout] | ^^^^^ help: change this to: `grid` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day_06.rs:59:38 [INFO] [stdout] | [INFO] [stdout] 59 | c = x.translate(dir, &grid); [INFO] [stdout] | ^^^^^ help: change this to: `grid` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day_06.rs:63:46 [INFO] [stdout] | [INFO] [stdout] 63 | c = x.translate(dir, &grid); [INFO] [stdout] | ^^^^^ help: change this to: `grid` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day_06.rs:74:19 [INFO] [stdout] | [INFO] [stdout] 74 | been_through: &Vec<(Coord, Direction)>, [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] 74 - been_through: &Vec<(Coord, Direction)>, [INFO] [stdout] 74 + been_through: &[(Coord, Direction)], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day_06.rs:88:30 [INFO] [stdout] | [INFO] [stdout] 88 | c = x.translate(dir, &grid); [INFO] [stdout] | ^^^^^ help: change this to: `grid` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day_06.rs:92:38 [INFO] [stdout] | [INFO] [stdout] 92 | c = x.translate(dir, &grid); [INFO] [stdout] | ^^^^^ help: change this to: `grid` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day_06.rs:96:46 [INFO] [stdout] | [INFO] [stdout] 96 | c = x.translate(dir, &grid); [INFO] [stdout] | ^^^^^ help: change this to: `grid` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/day_06.rs:161:12 [INFO] [stdout] | [INFO] [stdout] 161 | if !path_grid[x].is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `path_grid[x].is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: if let can be simplified with `.unwrap_or_default()` [INFO] [stdout] --> src/day_07.rs:75:9 [INFO] [stdout] | [INFO] [stdout] 75 | / if let Some(r) = check_value_with_concat(self.correct_value, 0, &self.rhs) { [INFO] [stdout] 76 | | r [INFO] [stdout] 77 | | } else { [INFO] [stdout] 78 | | 0 [INFO] [stdout] 79 | | } [INFO] [stdout] | |_________^ help: replace it with: `check_value_with_concat(self.correct_value, 0, &self.rhs).unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::manual_unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: if let can be simplified with `.unwrap_or_default()` [INFO] [stdout] --> src/day_07.rs:83:9 [INFO] [stdout] | [INFO] [stdout] 83 | / if let Some(r) = check_value(self.correct_value, 0, &self.rhs) { [INFO] [stdout] 84 | | r [INFO] [stdout] 85 | | } else { [INFO] [stdout] 86 | | 0 [INFO] [stdout] 87 | | } [INFO] [stdout] | |_________^ help: replace it with: `check_value(self.correct_value, 0, &self.rhs).unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::ops::Range` [INFO] [stdout] --> src/day_09.rs:173:34 [INFO] [stdout] | [INFO] [stdout] 173 | s += d.value() * (i..(i + d.length)).into_iter().sum::() as i64; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `(i..(i + d.length))` [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: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/day_11.rs:42:15 [INFO] [stdout] | [INFO] [stdout] 42 | } else if n.count_digits() % 2 == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `n.count_digits().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: returning the result of a `let` binding from a block [INFO] [stdout] --> src/day_11.rs:95:13 [INFO] [stdout] | [INFO] [stdout] 93 | / let v = [INFO] [stdout] 94 | | count_numbers_after_applying_rule_no_cache(a, number_of_times_to_apply_rule - 1); [INFO] [stdout] | |_________________________________________________________________________________________________- unnecessary `let` binding [INFO] [stdout] 95 | v [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] 93 ~ [INFO] [stdout] 94 ~ count_numbers_after_applying_rule_no_cache(a, number_of_times_to_apply_rule - 1) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/day_11.rs:104:13 [INFO] [stdout] | [INFO] [stdout] 98 | / let v = [INFO] [stdout] 99 | | count_numbers_after_applying_rule_no_cache(a, number_of_times_to_apply_rule - 1) [INFO] [stdout] 100 | | + count_numbers_after_applying_rule_no_cache( [INFO] [stdout] 101 | | b, [INFO] [stdout] 102 | | number_of_times_to_apply_rule - 1, [INFO] [stdout] 103 | | ); [INFO] [stdout] | |______________________- unnecessary `let` binding [INFO] [stdout] 104 | v [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] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 98 ~ [INFO] [stdout] 99 ~ count_numbers_after_applying_rule_no_cache(a, number_of_times_to_apply_rule - 1) [INFO] [stdout] 100 + + count_numbers_after_applying_rule_no_cache( [INFO] [stdout] 101 + b, [INFO] [stdout] 102 + number_of_times_to_apply_rule - 1, [INFO] [stdout] 103 + ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/day_13.rs:17:5 [INFO] [stdout] | [INFO] [stdout] 17 | return a * d - b * c; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 17 - return a * d - b * c; [INFO] [stdout] 17 + a * d - b * c [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/day_13.rs:109:13 [INFO] [stdout] | [INFO] [stdout] 109 | m.prize = m.prize + Coord::new(10000000000000, 10000000000000); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `m.prize += Coord::new(10000000000000, 10000000000000)` [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: redundant closure [INFO] [stdout] --> src/day_14.rs:58:23 [INFO] [stdout] | [INFO] [stdout] 58 | input.lines().map(|l| Robot::parse(l)).collect_vec() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Robot::parse` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.fold` can be written more succinctly using another method [INFO] [stdout] --> src/day_14.rs:99:10 [INFO] [stdout] | [INFO] [stdout] 99 | .fold(1, |x, y| x * y) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `product::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fold [INFO] [stdout] = note: `#[warn(clippy::unnecessary_fold)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/day_15.rs:95:5 [INFO] [stdout] | [INFO] [stdout] 95 | return tiles_to_move; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 95 - return tiles_to_move; [INFO] [stdout] 95 + tiles_to_move [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> src/day_15.rs:90:9 [INFO] [stdout] | [INFO] [stdout] 90 | / if !tiles_to_move.contains_key(&x) { [INFO] [stdout] 91 | | tiles_to_move.insert(x, LargeBoxTile::Empty); [INFO] [stdout] 92 | | } [INFO] [stdout] | |_________^ help: try: `tiles_to_move.entry(x).or_insert(LargeBoxTile::Empty);` [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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/day_15.rs:121:8 [INFO] [stdout] | [INFO] [stdout] 121 | if tiles_to_move.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!tiles_to_move.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/day_15.rs:139:8 [INFO] [stdout] | [INFO] [stdout] 139 | if tiles_to_move.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!tiles_to_move.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/day_15.rs:168:71 [INFO] [stdout] | [INFO] [stdout] 168 | let mut grid = Grid::from_string(s.next().unwrap(), true).map(|x| Tile::from_char(x)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Tile::from_char` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this OR pattern can be rewritten using a range [INFO] [stdout] --> src/day_17.rs:32:17 [INFO] [stdout] | [INFO] [stdout] 32 | 0 | 1 | 2 | 3 => self.program[i * 2 + 1].to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `0..=3` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_patterns [INFO] [stdout] = note: `#[warn(clippy::manual_range_patterns)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `writeln!` [INFO] [stdout] --> src/day_17.rs:55:9 [INFO] [stdout] | [INFO] [stdout] 55 | writeln!(f, "")?; [INFO] [stdout] | ^^^^^^^^^^----^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#writeln_empty_string [INFO] [stdout] = note: `#[warn(clippy::writeln_empty_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/day_17.rs:96:17 [INFO] [stdout] | [INFO] [stdout] 96 | self.register_b = self.register_b ^ operand as i64; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.register_b ^= operand as i64` [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: manual implementation of an assign operation [INFO] [stdout] --> src/day_17.rs:117:17 [INFO] [stdout] | [INFO] [stdout] 117 | self.register_b = self.register_b ^ self.register_c; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.register_b ^= self.register_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: length comparison to zero [INFO] [stdout] --> src/day_17.rs:258:16 [INFO] [stdout] | [INFO] [stdout] 258 | if r.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!r.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/day_18.rs:56:16 [INFO] [stdout] | [INFO] [stdout] 56 | if astar( [INFO] [stdout] | ________________^ [INFO] [stdout] 57 | | &start, [INFO] [stdout] 58 | | |x| { [INFO] [stdout] 59 | | x.get_bounded_neighbours(&g, false) [INFO] [stdout] ... | [INFO] [stdout] 66 | | |x| *x == finish, [INFO] [stdout] 67 | | ) == None [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] = note: `#[warn(clippy::partialeq_to_none)]` on by default [INFO] [stdout] help: use `Option::is_none()` instead [INFO] [stdout] | [INFO] [stdout] 56 ~ if astar( [INFO] [stdout] 57 + &start, [INFO] [stdout] 58 + |x| { [INFO] [stdout] 59 + x.get_bounded_neighbours(&g, false) [INFO] [stdout] 60 + .iter() [INFO] [stdout] 61 + .filter(|x| g[**x] != '#') [INFO] [stdout] 62 + .map(|x| (*x, 1)) [INFO] [stdout] 63 + .collect_vec() [INFO] [stdout] 64 + }, [INFO] [stdout] 65 + |x| x.non_diagnal_distance(&finish), [INFO] [stdout] 66 + |x| *x == finish, [INFO] [stdout] 67 + ).is_none() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/day_19.rs:10:8 [INFO] [stdout] | [INFO] [stdout] 10 | if line.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `line.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/day_19.rs:25:8 [INFO] [stdout] | [INFO] [stdout] 25 | if line.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `line.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/day_19.rs:32:49 [INFO] [stdout] | [INFO] [stdout] 32 | count_pattern_possibilities(&line[x.len()..], patterns) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/day_19.rs:31:17 [INFO] [stdout] | [INFO] [stdout] 31 | if line.starts_with(x) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] = note: `#[warn(clippy::manual_strip)]` on by default [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 31 ~ if let Some() = line.strip_prefix(x) { [INFO] [stdout] 32 ~ count_pattern_possibilities(, patterns) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `Iterator::last` on a `DoubleEndedIterator`; this will needlessly iterate the entire iterator [INFO] [stdout] --> src/day_20.rs:54:17 [INFO] [stdout] | [INFO] [stdout] 54 | / Direction::iter() [INFO] [stdout] 55 | | .filter(|d| { [INFO] [stdout] 56 | | c.translate(*d, &grid).is_some() [INFO] [stdout] 57 | | && cost[c.translate_no_bounds(*d)].is_none() [INFO] [stdout] 58 | | && grid[c.translate_no_bounds(*d)] != '#' [INFO] [stdout] 59 | | }) [INFO] [stdout] 60 | | .last() [INFO] [stdout] | |___________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_ended_iterator_last [INFO] [stdout] = note: `#[warn(clippy::double_ended_iterator_last)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 60 - .last() [INFO] [stdout] 60 + .next_back() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `Iterator::last` on a `DoubleEndedIterator`; this will needlessly iterate the entire iterator [INFO] [stdout] --> src/day_20.rs:96:17 [INFO] [stdout] | [INFO] [stdout] 96 | / Direction::iter() [INFO] [stdout] 97 | | .filter(|d| { [INFO] [stdout] 98 | | c.translate(*d, &grid).is_some() [INFO] [stdout] 99 | | && cost[c.translate_no_bounds(*d)].is_none() [INFO] [stdout] 100 | | && grid[c.translate_no_bounds(*d)] != '#' [INFO] [stdout] 101 | | }) [INFO] [stdout] 102 | | .last() [INFO] [stdout] | |___________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_ended_iterator_last [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 102 - .last() [INFO] [stdout] 102 + .next_back() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `value` [INFO] [stdout] --> src/day_24.rs:221:17 [INFO] [stdout] | [INFO] [stdout] 221 | let value = Some(&x[5..6] == "1"); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_value` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/day_21.rs:234:5 [INFO] [stdout] | [INFO] [stdout] 234 | while let Some(next_char) = chars.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for next_char in chars` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] = note: `#[warn(clippy::while_let_on_iterator)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> src/day_21.rs:410:31 [INFO] [stdout] | [INFO] [stdout] 410 | .min_set_by_key(|x| x.into_iter().map(|z| z.len()).sum::()) [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] = note: `#[warn(clippy::into_iter_on_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/day_21.rs:428:17 [INFO] [stdout] | [INFO] [stdout] 428 | input.chars().nth(0).unwrap(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `input.chars().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: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> src/day_21.rs:460:31 [INFO] [stdout] | [INFO] [stdout] 460 | .min_set_by_key(|x| x.into_iter().map(|z| z.len()).sum::()) [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: importing legacy numeric constants [INFO] [stdout] --> src/day_22.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::i64; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `i64::` will resolve to the respective associated constant [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the function definition [INFO] [stdout] --> src/day_23.rs:47:23 [INFO] [stdout] | [INFO] [stdout] 47 | fn add_to_map<'a>(a: usize, b: usize, h: &mut HashMap) { [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] = note: `#[warn(clippy::extra_unused_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: iterating on a map's values [INFO] [stdout] --> src/day_23.rs:85:13 [INFO] [stdout] | [INFO] [stdout] 85 | map.iter().map(|(_,y)|y.len()).sum::() / string_mapping.len() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.values().map(|y| y.len())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_kv_map [INFO] [stdout] = note: `#[warn(clippy::iter_kv_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to one [INFO] [stdout] --> src/day_23.rs:124:12 [INFO] [stdout] | [INFO] [stdout] 124 | if set.len() >= 1 { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!set.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: iterating on a map's keys [INFO] [stdout] --> src/day_23.rs:146:15 [INFO] [stdout] | [INFO] [stdout] 146 | let set = graph [INFO] [stdout] | _______________^ [INFO] [stdout] 147 | | .map [INFO] [stdout] 148 | | .iter() [INFO] [stdout] 149 | | .map(|(x, _)| get_largest_set_for_item(&graph, *x)) [INFO] [stdout] | |___________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_kv_map [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 146 ~ let set = graph [INFO] [stdout] 147 + .map.keys().map(|x| get_largest_set_for_item(&graph, *x)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/day_23.rs:176:16 [INFO] [stdout] | [INFO] [stdout] 176 | if new_neighbours.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!new_neighbours.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `XOR` contains a capitalized acronym [INFO] [stdout] --> src/day_24.rs:23:5 [INFO] [stdout] | [INFO] [stdout] 23 | 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] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `AND` contains a capitalized acronym [INFO] [stdout] --> src/day_24.rs:24:5 [INFO] [stdout] | [INFO] [stdout] 24 | 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] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/day_24.rs:126:14 [INFO] [stdout] | [INFO] [stdout] 126 | .map(|x| x.borrow().get_outputs()) [INFO] [stdout] | ______________^ [INFO] [stdout] 127 | | .flatten() [INFO] [stdout] | |______________________^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(|x| x.borrow().get_outputs())` [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 loop could be written as a `for` loop [INFO] [stdout] --> src/day_24.rs:215:9 [INFO] [stdout] | [INFO] [stdout] 215 | while let Some(x) = lines.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for x in lines.by_ref()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/day_24.rs:216:16 [INFO] [stdout] | [INFO] [stdout] 216 | if x == "" { [INFO] [stdout] | ^^^^^^^ help: using `is_empty` is clearer and more explicit: `x.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/day_24.rs:232:9 [INFO] [stdout] | [INFO] [stdout] 232 | while let Some(x) = lines.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for x in lines` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/day_24.rs:313:27 [INFO] [stdout] | [INFO] [stdout] 313 | .any(|(i, x)| x.outputs.len() > 0 || output_wires.contains(&WireID(i)))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!x.outputs.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day_24.rs:346:35 [INFO] [stdout] | [INFO] [stdout] 346 | fn get_outputs(&self, values: &Vec>) -> u64 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 346 - fn get_outputs(&self, values: &Vec>) -> u64 { [INFO] [stdout] 346 + fn get_outputs(&self, values: &[Option]) -> u64 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/day_24.rs:349:13 [INFO] [stdout] | [INFO] [stdout] 349 | v = v << 1; [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `v <<= 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/day_24.rs:359:13 [INFO] [stdout] | [INFO] [stdout] 359 | in_1 = in_1 >> 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `in_1 >>= 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/day_24.rs:365:13 [INFO] [stdout] | [INFO] [stdout] 365 | in_2 = in_2 >> 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `in_2 >>= 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/day_24.rs:384:13 [INFO] [stdout] | [INFO] [stdout] 384 | i = i << 1; [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `i <<= 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/day_24.rs:440:27 [INFO] [stdout] | [INFO] [stdout] 440 | .any(|(i, x)| x.outputs.len() > 0 || self.output_wires.contains(&WireID(i)))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!x.outputs.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/day_24.rs:541:13 [INFO] [stdout] | [INFO] [stdout] 541 | in_1 = in_1 >> 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `in_1 >>= 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/day_24.rs:547:13 [INFO] [stdout] | [INFO] [stdout] 547 | in_2 = in_2 >> 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `in_2 >>= 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/day_24.rs:576:13 [INFO] [stdout] | [INFO] [stdout] 576 | i = i << 1; [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `i <<= 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/day_24.rs:610:13 [INFO] [stdout] | [INFO] [stdout] 610 | i = i << 1; [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `i <<= 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/day_24.rs:640:9 [INFO] [stdout] | [INFO] [stdout] 640 | while let Some(x) = lines.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for x in lines.by_ref()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/day_24.rs:641:16 [INFO] [stdout] | [INFO] [stdout] 641 | if x == "" { [INFO] [stdout] | ^^^^^^^ help: using `is_empty` is clearer and more explicit: `x.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/day_24.rs:655:9 [INFO] [stdout] | [INFO] [stdout] 655 | while let Some(x) = lines.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for x in lines` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/day_24.rs:709:17 [INFO] [stdout] | [INFO] [stdout] 709 | in_1 = in_1 >> 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `in_1 >>= 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/day_24.rs:717:17 [INFO] [stdout] | [INFO] [stdout] 717 | in_2 = in_2 >> 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `in_2 >>= 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/day_24.rs:756:9 [INFO] [stdout] | [INFO] [stdout] 756 | return true; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 756 - return true; [INFO] [stdout] 756 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/day_24.rs:772:13 [INFO] [stdout] | [INFO] [stdout] 772 | i = i << 1; [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `i <<= 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/day_24.rs:787:13 [INFO] [stdout] | [INFO] [stdout] 787 | i = i << 1; [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `i <<= 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/day_25.rs:23:20 [INFO] [stdout] | [INFO] [stdout] 23 | fn get_key_or_lock<'a>(input: [&'a str; 7]) -> Either<[u8; 5], [u8; 5]> { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 23 - fn get_key_or_lock<'a>(input: [&'a str; 7]) -> Either<[u8; 5], [u8; 5]> { [INFO] [stdout] 23 + fn get_key_or_lock(input: [&str; 7]) -> Either<[u8; 5], [u8; 5]> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/grid.rs:55:9 [INFO] [stdout] | [INFO] [stdout] 55 | let g; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] = note: `#[warn(clippy::needless_late_init)]` on by default [INFO] [stdout] help: move the declaration `g` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 55 ~ [INFO] [stdout] 56 ~ let g = if reverse { [INFO] [stdout] 57 ~ input.lines().rev().map(|x| x.chars().collect()).collect() [INFO] [stdout] 58 | } else { [INFO] [stdout] 59 ~ input.lines().map(|x| x.chars().collect()).collect() [INFO] [stdout] 60 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/grid.rs:168:44 [INFO] [stdout] | [INFO] [stdout] 168 | .map(|x| x.into_iter().map(|y| func(y)).collect_vec()) [INFO] [stdout] | ^^^^^^^^^^^ help: replace the closure with the function itself: `&mut func` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/day_21.rs:88:9 [INFO] [stdout] | [INFO] [stdout] 88 | vec!['>', '^', '<', 'v'] [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `['>', '^', '<', 'v']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/day_21.rs:474:9 [INFO] [stdout] | [INFO] [stdout] 474 | vec!['>', '^', '<', 'v', 'A'] [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `['>', '^', '<', 'v', 'A']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::ops::Range` [INFO] [stdout] --> src/day_01.rs:19:9 [INFO] [stdout] | [INFO] [stdout] 19 | / (0..v1.len()) [INFO] [stdout] 20 | | .into_iter() [INFO] [stdout] | |________________________^ help: consider removing `.into_iter()`: `(0..v1.len())` [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::str::SplitWhitespace<'_>` [INFO] [stdout] --> src/day_02.rs:8:17 [INFO] [stdout] | [INFO] [stdout] 8 | let mut s = input_str.split_whitespace().into_iter(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `input_str.split_whitespace()` [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: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/day_02.rs:59:12 [INFO] [stdout] | [INFO] [stdout] 59 | if let Some(_) = check_for_safety_with_error_area(input_str.split_whitespace()) { [INFO] [stdout] | -------^^^^^^^----------------------------------------------------------------- help: try: `if check_for_safety_with_error_area(input_str.split_whitespace()).is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::ops::Range` [INFO] [stdout] --> src/day_02.rs:60:9 [INFO] [stdout] | [INFO] [stdout] 60 | / (0..input_str.split_whitespace().count()) [INFO] [stdout] 61 | | .into_iter() [INFO] [stdout] | |________________________^ help: consider removing `.into_iter()`: `(0..input_str.split_whitespace().count())` [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: comparison to empty slice [INFO] [stdout] --> src/day_05.rs:36:20 [INFO] [stdout] | [INFO] [stdout] 36 | if l == "" { [INFO] [stdout] | ^^^^^^^ help: using `is_empty` is clearer and more explicit: `l.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] = note: `#[warn(clippy::comparison_to_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/day_05.rs:70:20 [INFO] [stdout] | [INFO] [stdout] 70 | if l == "" { [INFO] [stdout] | ^^^^^^^ help: using `is_empty` is clearer and more explicit: `l.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `map` over `inspect` [INFO] [stdout] --> src/day_05.rs:92:14 [INFO] [stdout] | [INFO] [stdout] 92 | .map(|x| { [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_inspect [INFO] [stdout] = note: `#[warn(clippy::manual_inspect)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 92 ~ .inspect(|x| { [INFO] [stdout] 93 | x.sort_by(|x, y| { [INFO] [stdout] ... [INFO] [stdout] 100 | } [INFO] [stdout] 101 ~ }); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day_06.rs:28:30 [INFO] [stdout] | [INFO] [stdout] 28 | c = x.translate(dir, &grid); [INFO] [stdout] | ^^^^^ help: change this to: `grid` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day_06.rs:32:38 [INFO] [stdout] | [INFO] [stdout] 32 | c = x.translate(dir, &grid); [INFO] [stdout] | ^^^^^ help: change this to: `grid` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day_06.rs:36:46 [INFO] [stdout] | [INFO] [stdout] 36 | c = x.translate(dir, &grid); [INFO] [stdout] | ^^^^^ help: change this to: `grid` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day_06.rs:51:30 [INFO] [stdout] | [INFO] [stdout] 51 | c = x.translate(dir, &grid); [INFO] [stdout] | ^^^^^ help: change this to: `grid` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day_06.rs:59:38 [INFO] [stdout] | [INFO] [stdout] 59 | c = x.translate(dir, &grid); [INFO] [stdout] | ^^^^^ help: change this to: `grid` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day_06.rs:63:46 [INFO] [stdout] | [INFO] [stdout] 63 | c = x.translate(dir, &grid); [INFO] [stdout] | ^^^^^ help: change this to: `grid` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day_06.rs:74:19 [INFO] [stdout] | [INFO] [stdout] 74 | been_through: &Vec<(Coord, Direction)>, [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] 74 - been_through: &Vec<(Coord, Direction)>, [INFO] [stdout] 74 + been_through: &[(Coord, Direction)], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day_06.rs:88:30 [INFO] [stdout] | [INFO] [stdout] 88 | c = x.translate(dir, &grid); [INFO] [stdout] | ^^^^^ help: change this to: `grid` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day_06.rs:92:38 [INFO] [stdout] | [INFO] [stdout] 92 | c = x.translate(dir, &grid); [INFO] [stdout] | ^^^^^ help: change this to: `grid` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day_06.rs:96:46 [INFO] [stdout] | [INFO] [stdout] 96 | c = x.translate(dir, &grid); [INFO] [stdout] | ^^^^^ help: change this to: `grid` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/day_06.rs:161:12 [INFO] [stdout] | [INFO] [stdout] 161 | if !path_grid[x].is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `path_grid[x].is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: if let can be simplified with `.unwrap_or_default()` [INFO] [stdout] --> src/day_07.rs:75:9 [INFO] [stdout] | [INFO] [stdout] 75 | / if let Some(r) = check_value_with_concat(self.correct_value, 0, &self.rhs) { [INFO] [stdout] 76 | | r [INFO] [stdout] 77 | | } else { [INFO] [stdout] 78 | | 0 [INFO] [stdout] 79 | | } [INFO] [stdout] | |_________^ help: replace it with: `check_value_with_concat(self.correct_value, 0, &self.rhs).unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::manual_unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: if let can be simplified with `.unwrap_or_default()` [INFO] [stdout] --> src/day_07.rs:83:9 [INFO] [stdout] | [INFO] [stdout] 83 | / if let Some(r) = check_value(self.correct_value, 0, &self.rhs) { [INFO] [stdout] 84 | | r [INFO] [stdout] 85 | | } else { [INFO] [stdout] 86 | | 0 [INFO] [stdout] 87 | | } [INFO] [stdout] | |_________^ help: replace it with: `check_value(self.correct_value, 0, &self.rhs).unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::ops::Range` [INFO] [stdout] --> src/day_09.rs:173:34 [INFO] [stdout] | [INFO] [stdout] 173 | s += d.value() * (i..(i + d.length)).into_iter().sum::() as i64; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `(i..(i + d.length))` [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: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/day_11.rs:42:15 [INFO] [stdout] | [INFO] [stdout] 42 | } else if n.count_digits() % 2 == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `n.count_digits().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: returning the result of a `let` binding from a block [INFO] [stdout] --> src/day_11.rs:95:13 [INFO] [stdout] | [INFO] [stdout] 93 | / let v = [INFO] [stdout] 94 | | count_numbers_after_applying_rule_no_cache(a, number_of_times_to_apply_rule - 1); [INFO] [stdout] | |_________________________________________________________________________________________________- unnecessary `let` binding [INFO] [stdout] 95 | v [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] 93 ~ [INFO] [stdout] 94 ~ count_numbers_after_applying_rule_no_cache(a, number_of_times_to_apply_rule - 1) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/day_11.rs:104:13 [INFO] [stdout] | [INFO] [stdout] 98 | / let v = [INFO] [stdout] 99 | | count_numbers_after_applying_rule_no_cache(a, number_of_times_to_apply_rule - 1) [INFO] [stdout] 100 | | + count_numbers_after_applying_rule_no_cache( [INFO] [stdout] 101 | | b, [INFO] [stdout] 102 | | number_of_times_to_apply_rule - 1, [INFO] [stdout] 103 | | ); [INFO] [stdout] | |______________________- unnecessary `let` binding [INFO] [stdout] 104 | v [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] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 98 ~ [INFO] [stdout] 99 ~ count_numbers_after_applying_rule_no_cache(a, number_of_times_to_apply_rule - 1) [INFO] [stdout] 100 + + count_numbers_after_applying_rule_no_cache( [INFO] [stdout] 101 + b, [INFO] [stdout] 102 + number_of_times_to_apply_rule - 1, [INFO] [stdout] 103 + ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/day_13.rs:17:5 [INFO] [stdout] | [INFO] [stdout] 17 | return a * d - b * c; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 17 - return a * d - b * c; [INFO] [stdout] 17 + a * d - b * c [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/day_13.rs:109:13 [INFO] [stdout] | [INFO] [stdout] 109 | m.prize = m.prize + Coord::new(10000000000000, 10000000000000); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `m.prize += Coord::new(10000000000000, 10000000000000)` [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: redundant closure [INFO] [stdout] --> src/day_14.rs:58:23 [INFO] [stdout] | [INFO] [stdout] 58 | input.lines().map(|l| Robot::parse(l)).collect_vec() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Robot::parse` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.fold` can be written more succinctly using another method [INFO] [stdout] --> src/day_14.rs:99:10 [INFO] [stdout] | [INFO] [stdout] 99 | .fold(1, |x, y| x * y) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `product::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fold [INFO] [stdout] = note: `#[warn(clippy::unnecessary_fold)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/day_15.rs:95:5 [INFO] [stdout] | [INFO] [stdout] 95 | return tiles_to_move; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 95 - return tiles_to_move; [INFO] [stdout] 95 + tiles_to_move [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> src/day_15.rs:90:9 [INFO] [stdout] | [INFO] [stdout] 90 | / if !tiles_to_move.contains_key(&x) { [INFO] [stdout] 91 | | tiles_to_move.insert(x, LargeBoxTile::Empty); [INFO] [stdout] 92 | | } [INFO] [stdout] | |_________^ help: try: `tiles_to_move.entry(x).or_insert(LargeBoxTile::Empty);` [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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/day_15.rs:121:8 [INFO] [stdout] | [INFO] [stdout] 121 | if tiles_to_move.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!tiles_to_move.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/day_15.rs:139:8 [INFO] [stdout] | [INFO] [stdout] 139 | if tiles_to_move.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!tiles_to_move.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/day_15.rs:168:71 [INFO] [stdout] | [INFO] [stdout] 168 | let mut grid = Grid::from_string(s.next().unwrap(), true).map(|x| Tile::from_char(x)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Tile::from_char` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this OR pattern can be rewritten using a range [INFO] [stdout] --> src/day_17.rs:32:17 [INFO] [stdout] | [INFO] [stdout] 32 | 0 | 1 | 2 | 3 => self.program[i * 2 + 1].to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `0..=3` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_patterns [INFO] [stdout] = note: `#[warn(clippy::manual_range_patterns)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `writeln!` [INFO] [stdout] --> src/day_17.rs:55:9 [INFO] [stdout] | [INFO] [stdout] 55 | writeln!(f, "")?; [INFO] [stdout] | ^^^^^^^^^^----^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#writeln_empty_string [INFO] [stdout] = note: `#[warn(clippy::writeln_empty_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/day_17.rs:96:17 [INFO] [stdout] | [INFO] [stdout] 96 | self.register_b = self.register_b ^ operand as i64; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.register_b ^= operand as i64` [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: manual implementation of an assign operation [INFO] [stdout] --> src/day_17.rs:117:17 [INFO] [stdout] | [INFO] [stdout] 117 | self.register_b = self.register_b ^ self.register_c; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.register_b ^= self.register_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: length comparison to zero [INFO] [stdout] --> src/day_17.rs:258:16 [INFO] [stdout] | [INFO] [stdout] 258 | if r.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!r.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/day_18.rs:56:16 [INFO] [stdout] | [INFO] [stdout] 56 | if astar( [INFO] [stdout] | ________________^ [INFO] [stdout] 57 | | &start, [INFO] [stdout] 58 | | |x| { [INFO] [stdout] 59 | | x.get_bounded_neighbours(&g, false) [INFO] [stdout] ... | [INFO] [stdout] 66 | | |x| *x == finish, [INFO] [stdout] 67 | | ) == None [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] = note: `#[warn(clippy::partialeq_to_none)]` on by default [INFO] [stdout] help: use `Option::is_none()` instead [INFO] [stdout] | [INFO] [stdout] 56 ~ if astar( [INFO] [stdout] 57 + &start, [INFO] [stdout] 58 + |x| { [INFO] [stdout] 59 + x.get_bounded_neighbours(&g, false) [INFO] [stdout] 60 + .iter() [INFO] [stdout] 61 + .filter(|x| g[**x] != '#') [INFO] [stdout] 62 + .map(|x| (*x, 1)) [INFO] [stdout] 63 + .collect_vec() [INFO] [stdout] 64 + }, [INFO] [stdout] 65 + |x| x.non_diagnal_distance(&finish), [INFO] [stdout] 66 + |x| *x == finish, [INFO] [stdout] 67 + ).is_none() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/day_19.rs:10:8 [INFO] [stdout] | [INFO] [stdout] 10 | if line.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `line.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/day_19.rs:25:8 [INFO] [stdout] | [INFO] [stdout] 25 | if line.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `line.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/day_19.rs:32:49 [INFO] [stdout] | [INFO] [stdout] 32 | count_pattern_possibilities(&line[x.len()..], patterns) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/day_19.rs:31:17 [INFO] [stdout] | [INFO] [stdout] 31 | if line.starts_with(x) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] = note: `#[warn(clippy::manual_strip)]` on by default [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 31 ~ if let Some() = line.strip_prefix(x) { [INFO] [stdout] 32 ~ count_pattern_possibilities(, patterns) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `Iterator::last` on a `DoubleEndedIterator`; this will needlessly iterate the entire iterator [INFO] [stdout] --> src/day_20.rs:54:17 [INFO] [stdout] | [INFO] [stdout] 54 | / Direction::iter() [INFO] [stdout] 55 | | .filter(|d| { [INFO] [stdout] 56 | | c.translate(*d, &grid).is_some() [INFO] [stdout] 57 | | && cost[c.translate_no_bounds(*d)].is_none() [INFO] [stdout] 58 | | && grid[c.translate_no_bounds(*d)] != '#' [INFO] [stdout] 59 | | }) [INFO] [stdout] 60 | | .last() [INFO] [stdout] | |___________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_ended_iterator_last [INFO] [stdout] = note: `#[warn(clippy::double_ended_iterator_last)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 60 - .last() [INFO] [stdout] 60 + .next_back() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `Iterator::last` on a `DoubleEndedIterator`; this will needlessly iterate the entire iterator [INFO] [stdout] --> src/day_20.rs:96:17 [INFO] [stdout] | [INFO] [stdout] 96 | / Direction::iter() [INFO] [stdout] 97 | | .filter(|d| { [INFO] [stdout] 98 | | c.translate(*d, &grid).is_some() [INFO] [stdout] 99 | | && cost[c.translate_no_bounds(*d)].is_none() [INFO] [stdout] 100 | | && grid[c.translate_no_bounds(*d)] != '#' [INFO] [stdout] 101 | | }) [INFO] [stdout] 102 | | .last() [INFO] [stdout] | |___________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_ended_iterator_last [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 102 - .last() [INFO] [stdout] 102 + .next_back() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/day_21.rs:234:5 [INFO] [stdout] | [INFO] [stdout] 234 | while let Some(next_char) = chars.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for next_char in chars` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] = note: `#[warn(clippy::while_let_on_iterator)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> src/day_21.rs:410:31 [INFO] [stdout] | [INFO] [stdout] 410 | .min_set_by_key(|x| x.into_iter().map(|z| z.len()).sum::()) [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] = note: `#[warn(clippy::into_iter_on_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/day_21.rs:428:17 [INFO] [stdout] | [INFO] [stdout] 428 | input.chars().nth(0).unwrap(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `input.chars().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: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> src/day_21.rs:460:31 [INFO] [stdout] | [INFO] [stdout] 460 | .min_set_by_key(|x| x.into_iter().map(|z| z.len()).sum::()) [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: importing legacy numeric constants [INFO] [stdout] --> src/day_22.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::i64; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `i64::` will resolve to the respective associated constant [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the function definition [INFO] [stdout] --> src/day_23.rs:47:23 [INFO] [stdout] | [INFO] [stdout] 47 | fn add_to_map<'a>(a: usize, b: usize, h: &mut HashMap) { [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] = note: `#[warn(clippy::extra_unused_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: iterating on a map's values [INFO] [stdout] --> src/day_23.rs:85:13 [INFO] [stdout] | [INFO] [stdout] 85 | map.iter().map(|(_,y)|y.len()).sum::() / string_mapping.len() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.values().map(|y| y.len())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_kv_map [INFO] [stdout] = note: `#[warn(clippy::iter_kv_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to one [INFO] [stdout] --> src/day_23.rs:124:12 [INFO] [stdout] | [INFO] [stdout] 124 | if set.len() >= 1 { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!set.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: iterating on a map's keys [INFO] [stdout] --> src/day_23.rs:146:15 [INFO] [stdout] | [INFO] [stdout] 146 | let set = graph [INFO] [stdout] | _______________^ [INFO] [stdout] 147 | | .map [INFO] [stdout] 148 | | .iter() [INFO] [stdout] 149 | | .map(|(x, _)| get_largest_set_for_item(&graph, *x)) [INFO] [stdout] | |___________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_kv_map [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 146 ~ let set = graph [INFO] [stdout] 147 + .map.keys().map(|x| get_largest_set_for_item(&graph, *x)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/day_23.rs:176:16 [INFO] [stdout] | [INFO] [stdout] 176 | if new_neighbours.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!new_neighbours.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `XOR` contains a capitalized acronym [INFO] [stdout] --> src/day_24.rs:23:5 [INFO] [stdout] | [INFO] [stdout] 23 | 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] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `AND` contains a capitalized acronym [INFO] [stdout] --> src/day_24.rs:24:5 [INFO] [stdout] | [INFO] [stdout] 24 | 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] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/day_24.rs:126:14 [INFO] [stdout] | [INFO] [stdout] 126 | .map(|x| x.borrow().get_outputs()) [INFO] [stdout] | ______________^ [INFO] [stdout] 127 | | .flatten() [INFO] [stdout] | |______________________^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(|x| x.borrow().get_outputs())` [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 loop could be written as a `for` loop [INFO] [stdout] --> src/day_24.rs:215:9 [INFO] [stdout] | [INFO] [stdout] 215 | while let Some(x) = lines.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for x in lines.by_ref()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/day_24.rs:216:16 [INFO] [stdout] | [INFO] [stdout] 216 | if x == "" { [INFO] [stdout] | ^^^^^^^ help: using `is_empty` is clearer and more explicit: `x.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/day_24.rs:232:9 [INFO] [stdout] | [INFO] [stdout] 232 | while let Some(x) = lines.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for x in lines` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/day_24.rs:313:27 [INFO] [stdout] | [INFO] [stdout] 313 | .any(|(i, x)| x.outputs.len() > 0 || output_wires.contains(&WireID(i)))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!x.outputs.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day_24.rs:346:35 [INFO] [stdout] | [INFO] [stdout] 346 | fn get_outputs(&self, values: &Vec>) -> u64 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 346 - fn get_outputs(&self, values: &Vec>) -> u64 { [INFO] [stdout] 346 + fn get_outputs(&self, values: &[Option]) -> u64 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/day_24.rs:349:13 [INFO] [stdout] | [INFO] [stdout] 349 | v = v << 1; [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `v <<= 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/day_24.rs:359:13 [INFO] [stdout] | [INFO] [stdout] 359 | in_1 = in_1 >> 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `in_1 >>= 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/day_24.rs:365:13 [INFO] [stdout] | [INFO] [stdout] 365 | in_2 = in_2 >> 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `in_2 >>= 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/day_24.rs:384:13 [INFO] [stdout] | [INFO] [stdout] 384 | i = i << 1; [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `i <<= 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/day_24.rs:440:27 [INFO] [stdout] | [INFO] [stdout] 440 | .any(|(i, x)| x.outputs.len() > 0 || self.output_wires.contains(&WireID(i)))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!x.outputs.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/day_24.rs:541:13 [INFO] [stdout] | [INFO] [stdout] 541 | in_1 = in_1 >> 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `in_1 >>= 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/day_24.rs:547:13 [INFO] [stdout] | [INFO] [stdout] 547 | in_2 = in_2 >> 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `in_2 >>= 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/day_24.rs:576:13 [INFO] [stdout] | [INFO] [stdout] 576 | i = i << 1; [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `i <<= 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/day_24.rs:610:13 [INFO] [stdout] | [INFO] [stdout] 610 | i = i << 1; [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `i <<= 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/day_24.rs:640:9 [INFO] [stdout] | [INFO] [stdout] 640 | while let Some(x) = lines.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for x in lines.by_ref()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/day_24.rs:641:16 [INFO] [stdout] | [INFO] [stdout] 641 | if x == "" { [INFO] [stdout] | ^^^^^^^ help: using `is_empty` is clearer and more explicit: `x.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/day_24.rs:655:9 [INFO] [stdout] | [INFO] [stdout] 655 | while let Some(x) = lines.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for x in lines` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/day_24.rs:709:17 [INFO] [stdout] | [INFO] [stdout] 709 | in_1 = in_1 >> 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `in_1 >>= 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/day_24.rs:717:17 [INFO] [stdout] | [INFO] [stdout] 717 | in_2 = in_2 >> 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `in_2 >>= 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/day_24.rs:756:9 [INFO] [stdout] | [INFO] [stdout] 756 | return true; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 756 - return true; [INFO] [stdout] 756 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/day_24.rs:772:13 [INFO] [stdout] | [INFO] [stdout] 772 | i = i << 1; [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `i <<= 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/day_24.rs:787:13 [INFO] [stdout] | [INFO] [stdout] 787 | i = i << 1; [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `i <<= 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/day_25.rs:23:20 [INFO] [stdout] | [INFO] [stdout] 23 | fn get_key_or_lock<'a>(input: [&'a str; 7]) -> Either<[u8; 5], [u8; 5]> { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 23 - fn get_key_or_lock<'a>(input: [&'a str; 7]) -> Either<[u8; 5], [u8; 5]> { [INFO] [stdout] 23 + fn get_key_or_lock(input: [&str; 7]) -> Either<[u8; 5], [u8; 5]> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/grid.rs:55:9 [INFO] [stdout] | [INFO] [stdout] 55 | let g; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] = note: `#[warn(clippy::needless_late_init)]` on by default [INFO] [stdout] help: move the declaration `g` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 55 ~ [INFO] [stdout] 56 ~ let g = if reverse { [INFO] [stdout] 57 ~ input.lines().rev().map(|x| x.chars().collect()).collect() [INFO] [stdout] 58 | } else { [INFO] [stdout] 59 ~ input.lines().map(|x| x.chars().collect()).collect() [INFO] [stdout] 60 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/grid.rs:168:44 [INFO] [stdout] | [INFO] [stdout] 168 | .map(|x| x.into_iter().map(|y| func(y)).collect_vec()) [INFO] [stdout] | ^^^^^^^^^^^ help: replace the closure with the function itself: `&mut func` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/day_21.rs:88:9 [INFO] [stdout] | [INFO] [stdout] 88 | vec!['>', '^', '<', 'v'] [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `['>', '^', '<', 'v']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/day_21.rs:474:9 [INFO] [stdout] | [INFO] [stdout] 474 | vec!['>', '^', '<', 'v', 'A'] [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `['>', '^', '<', 'v', 'A']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 24.74s [INFO] running `Command { std: "docker" "inspect" "1269163bd59a46160b21af2a616e7f9e477afaeb6dacd12398a903f006fd3f03", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "1269163bd59a46160b21af2a616e7f9e477afaeb6dacd12398a903f006fd3f03", kill_on_drop: false }` [INFO] [stdout] 1269163bd59a46160b21af2a616e7f9e477afaeb6dacd12398a903f006fd3f03