[INFO] cloning repository https://github.com/TobiasBengtsson/arc-rust [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/TobiasBengtsson/arc-rust" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FTobiasBengtsson%2Farc-rust", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FTobiasBengtsson%2Farc-rust'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] b282c6302c99e2d987f6c9d9ba07fe51ec78d7c2 [INFO] linting TobiasBengtsson/arc-rust against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FTobiasBengtsson%2Farc-rust" "/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/TobiasBengtsson/arc-rust [INFO] finished tweaking git repo https://github.com/TobiasBengtsson/arc-rust [INFO] tweaked toml for git repo https://github.com/TobiasBengtsson/arc-rust written to /workspace/builds/worker-0-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/TobiasBengtsson/arc-rust 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/TobiasBengtsson/arc-rust 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 quickcheck_macros v1.0.0 [INFO] [stderr] Downloaded nonempty v0.10.0 [INFO] [stderr] Downloaded wasm-bindgen-macro v0.2.97 [INFO] [stderr] Downloaded wasm-bindgen-shared v0.2.97 [INFO] [stderr] Downloaded clap_lex v0.7.3 [INFO] [stderr] Downloaded anstyle-wincon v3.0.6 [INFO] [stderr] Downloaded wasm-bindgen-backend v0.2.97 [INFO] [stderr] Downloaded quickcheck v1.0.3 [INFO] [stderr] Downloaded js-sys v0.3.74 [INFO] [stderr] Downloaded clap v4.5.21 [INFO] [stderr] Downloaded cc v1.2.2 [INFO] [stderr] Downloaded bytemuck v1.20.0 [INFO] [stderr] Downloaded ureq v2.11.0 [INFO] [stderr] Downloaded wasm-bindgen v0.2.97 [INFO] [stderr] Downloaded clap_builder v4.5.21 [INFO] [stderr] Downloaded indexmap v2.7.0 [INFO] [stderr] Downloaded wasm-bindgen-macro-support v0.2.97 [INFO] [stderr] Downloaded webpki-roots v0.26.7 [INFO] [stderr] Downloaded rustls v0.23.19 [INFO] [stderr] Downloaded libc v0.2.167 [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] b76c7a68b3441b8b110f81ff1b60c4de2d3657a261261925f881f1d226330b6d [INFO] running `Command { std: "docker" "start" "-a" "b76c7a68b3441b8b110f81ff1b60c4de2d3657a261261925f881f1d226330b6d", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "b76c7a68b3441b8b110f81ff1b60c4de2d3657a261261925f881f1d226330b6d", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "b76c7a68b3441b8b110f81ff1b60c4de2d3657a261261925f881f1d226330b6d", kill_on_drop: false }` [INFO] [stdout] b76c7a68b3441b8b110f81ff1b60c4de2d3657a261261925f881f1d226330b6d [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] bbf3e0da9f071a4434c7b1639bf90216204f285591d59864d3c32077e0325baf [INFO] running `Command { std: "docker" "start" "-a" "bbf3e0da9f071a4434c7b1639bf90216204f285591d59864d3c32077e0325baf", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.92 [INFO] [stderr] Compiling unicode-ident v1.0.14 [INFO] [stderr] Compiling libc v0.2.167 [INFO] [stderr] Checking writeable v0.5.5 [INFO] [stderr] Checking litemap v0.7.3 [INFO] [stderr] Compiling serde v1.0.215 [INFO] [stderr] Checking icu_locid_transform_data v1.5.0 [INFO] [stderr] Compiling cc v1.2.2 [INFO] [stderr] Compiling crossbeam-utils v0.8.20 [INFO] [stderr] Checking icu_properties_data v1.5.0 [INFO] [stderr] Checking smallvec v1.13.2 [INFO] [stderr] Checking memchr v2.7.4 [INFO] [stderr] Checking icu_normalizer_data v1.5.0 [INFO] [stderr] Checking write16 v1.0.0 [INFO] [stderr] Checking utf16_iter v1.0.5 [INFO] [stderr] Checking rustls-pki-types v1.10.0 [INFO] [stderr] Checking log v0.4.22 [INFO] [stderr] Checking hashbrown v0.15.2 [INFO] [stderr] Compiling num-traits v0.2.19 [INFO] [stderr] Compiling uncased v0.9.10 [INFO] [stderr] Checking aho-corasick v1.1.3 [INFO] [stderr] Checking percent-encoding v2.3.1 [INFO] [stderr] Compiling quote v1.0.37 [INFO] [stderr] Compiling rustls v0.23.19 [INFO] [stderr] Compiling syn v2.0.90 [INFO] [stderr] Checking crossbeam-epoch v0.9.18 [INFO] [stderr] Checking winnow v0.6.20 [INFO] [stderr] Checking miniz_oxide v0.8.0 [INFO] [stderr] Checking indexmap v2.7.0 [INFO] [stderr] Checking crossbeam-deque v0.8.5 [INFO] [stderr] Checking getrandom v0.2.15 [INFO] [stderr] Checking form_urlencoded v1.2.1 [INFO] [stderr] Checking rand_core v0.6.4 [INFO] [stderr] Compiling figment v0.10.19 [INFO] [stderr] Checking yansi v1.0.1 [INFO] [stderr] Checking inlinable_string v0.1.15 [INFO] [stderr] Checking once_cell v1.20.2 [INFO] [stderr] Checking clap_lex v0.7.3 [INFO] [stderr] Checking regex-automata v0.4.9 [INFO] [stderr] Checking either v1.13.0 [INFO] [stderr] Checking clap_builder v4.5.21 [INFO] [stderr] Compiling ring v0.17.8 [INFO] [stderr] Checking flate2 v1.0.35 [INFO] [stderr] Checking rand v0.8.5 [INFO] [stderr] Checking rayon-core v1.12.1 [INFO] [stderr] Compiling syn v1.0.109 [INFO] [stderr] Checking webpki-roots v0.26.7 [INFO] [stderr] Checking iana-time-zone v0.1.61 [INFO] [stderr] Checking rayon v1.10.0 [INFO] [stderr] Checking itertools v0.13.0 [INFO] [stderr] Checking chrono v0.4.38 [INFO] [stderr] Checking nonempty v0.10.0 [INFO] [stderr] Checking regex v1.11.1 [INFO] [stderr] Checking env_logger v0.8.4 [INFO] [stderr] Checking quickcheck v1.0.3 [INFO] [stderr] Checking rustls-webpki v0.102.8 [INFO] [stderr] Compiling synstructure v0.13.1 [INFO] [stderr] Compiling proc-macro2-diagnostics v0.10.1 [INFO] [stderr] Compiling quickcheck_macros v1.0.0 [INFO] [stderr] Compiling zerofrom-derive v0.1.5 [INFO] [stderr] Compiling yoke-derive v0.7.5 [INFO] [stderr] Compiling zerovec-derive v0.10.3 [INFO] [stderr] Compiling displaydoc v0.2.5 [INFO] [stderr] Compiling icu_provider_macros v1.5.0 [INFO] [stderr] Compiling serde_derive v1.0.215 [INFO] [stderr] Compiling pear_codegen v0.2.9 [INFO] [stderr] Compiling clap_derive v4.5.18 [INFO] [stderr] Checking pear v0.2.9 [INFO] [stderr] Checking zerofrom v0.1.4 [INFO] [stderr] Checking yoke v0.7.4 [INFO] [stderr] Checking zerovec v0.10.4 [INFO] [stderr] Checking clap v4.5.21 [INFO] [stderr] Checking tinystr v0.7.6 [INFO] [stderr] Checking icu_collections v1.5.0 [INFO] [stderr] Checking icu_locid v1.5.0 [INFO] [stderr] Checking icu_provider v1.5.0 [INFO] [stderr] Checking icu_locid_transform v1.5.0 [INFO] [stderr] Checking icu_properties v1.5.1 [INFO] [stderr] Checking serde_spanned v0.6.8 [INFO] [stderr] Checking toml_datetime v0.6.8 [INFO] [stderr] Checking toml_edit v0.22.22 [INFO] [stderr] Checking icu_normalizer v1.5.0 [INFO] [stderr] Checking idna_adapter v1.2.0 [INFO] [stderr] Checking idna v1.0.3 [INFO] [stderr] Checking url v2.5.4 [INFO] [stderr] Checking ureq v2.11.0 [INFO] [stderr] Checking toml v0.8.19 [INFO] [stderr] Checking aoc-rust v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/main.rs:14:1 [INFO] [stdout] | [INFO] [stdout] 14 | use clap; [INFO] [stdout] | ^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] = note: `#[warn(clippy::single_component_path_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `#[macro_use]` import [INFO] [stdout] --> src/main.rs:2:1 [INFO] [stdout] | [INFO] [stdout] 2 | #[macro_use] [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 `#[macro_use]` import [INFO] [stdout] --> src/main.rs:6:1 [INFO] [stdout] | [INFO] [stdout] 6 | #[macro_use] [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/main.rs:14:1 [INFO] [stdout] | [INFO] [stdout] 14 | use clap; [INFO] [stdout] | ^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] = note: `#[warn(clippy::single_component_path_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `number` [INFO] [stdout] --> src/y2024/day11.rs:58:15 [INFO] [stdout] | [INFO] [stdout] 58 | for (&number, &count) in star_multiset.iter() { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_number` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `c` [INFO] [stdout] --> src/y2024/day12.rs:100:21 [INFO] [stdout] | [INFO] [stdout] 100 | for (x, c) in row.iter().enumerate() { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_c` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `c` [INFO] [stdout] --> src/y2024/day12.rs:126:21 [INFO] [stdout] | [INFO] [stdout] 126 | for (x, c) in row.iter().enumerate() { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_c` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/y2024/day16.rs:12:22 [INFO] [stdout] | [INFO] [stdout] 12 | fn part_1(&self, input: String) -> String { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/y2024/day16.rs:16:22 [INFO] [stdout] | [INFO] [stdout] 16 | fn part_2(&self, input: String) -> String { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/y2024/day17.rs:12:22 [INFO] [stdout] | [INFO] [stdout] 12 | fn part_1(&self, input: String) -> String { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/y2024/day17.rs:16:22 [INFO] [stdout] | [INFO] [stdout] 16 | fn part_2(&self, input: String) -> String { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/y2024/day18.rs:12:22 [INFO] [stdout] | [INFO] [stdout] 12 | fn part_1(&self, input: String) -> String { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/y2024/day18.rs:16:22 [INFO] [stdout] | [INFO] [stdout] 16 | fn part_2(&self, input: String) -> String { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/y2024/day19.rs:12:22 [INFO] [stdout] | [INFO] [stdout] 12 | fn part_1(&self, input: String) -> String { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/y2024/day19.rs:16:22 [INFO] [stdout] | [INFO] [stdout] 16 | fn part_2(&self, input: String) -> String { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/y2024/day2.rs:12:22 [INFO] [stdout] | [INFO] [stdout] 12 | fn part_1(&self, input: String) -> String { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/y2024/day2.rs:16:22 [INFO] [stdout] | [INFO] [stdout] 16 | fn part_2(&self, input: String) -> String { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/y2024/day20.rs:12:22 [INFO] [stdout] | [INFO] [stdout] 12 | fn part_1(&self, input: String) -> String { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/y2024/day20.rs:16:22 [INFO] [stdout] | [INFO] [stdout] 16 | fn part_2(&self, input: String) -> String { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/y2024/day21.rs:12:22 [INFO] [stdout] | [INFO] [stdout] 12 | fn part_1(&self, input: String) -> String { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/y2024/day21.rs:16:22 [INFO] [stdout] | [INFO] [stdout] 16 | fn part_2(&self, input: String) -> String { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `p3` is never read [INFO] [stdout] --> src/y2024/day22.rs:114:46 [INFO] [stdout] | [INFO] [stdout] 114 | let (mut p0, mut p1, mut p2, mut p3) = (i8::MAX, i8::MAX, i8::MAX, i8::MAX); [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/y2024/day23.rs:12:22 [INFO] [stdout] | [INFO] [stdout] 12 | fn part_1(&self, input: String) -> String { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/y2024/day23.rs:16:22 [INFO] [stdout] | [INFO] [stdout] 16 | fn part_2(&self, input: String) -> String { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/y2024/day24.rs:12:22 [INFO] [stdout] | [INFO] [stdout] 12 | fn part_1(&self, input: String) -> String { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/y2024/day24.rs:16:22 [INFO] [stdout] | [INFO] [stdout] 16 | fn part_2(&self, input: String) -> String { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/y2024/day25.rs:12:22 [INFO] [stdout] | [INFO] [stdout] 12 | fn part_1(&self, input: String) -> String { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/y2024/day25.rs:16:22 [INFO] [stdout] | [INFO] [stdout] 16 | fn part_2(&self, input: String) -> String { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `column` [INFO] [stdout] --> src/y2024/day4.rs:84:22 [INFO] [stdout] | [INFO] [stdout] 84 | for (ju, column) in row.clone().iter().enumerate() { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_column` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/y2024/day5.rs:104:21 [INFO] [stdout] | [INFO] [stdout] 104 | let mut spl = line.split(','); [INFO] [stdout] | ----^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/y2024/day5.rs:148:21 [INFO] [stdout] | [INFO] [stdout] 148 | let mut spl = line.split(','); [INFO] [stdout] | ----^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `max_x` and `max_y` are never read [INFO] [stdout] --> src/y2024/day15.rs:76:5 [INFO] [stdout] | [INFO] [stdout] 74 | struct Map { [INFO] [stdout] | --- fields in this struct [INFO] [stdout] 75 | m: Vec>, [INFO] [stdout] 76 | max_x: usize, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 77 | max_y: usize, [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `check_ok_ref` is never used [INFO] [stdout] --> src/y2024/day5.rs:73:8 [INFO] [stdout] | [INFO] [stdout] 57 | impl Sln { [INFO] [stdout] | -------- associated function in this implementation [INFO] [stdout] ... [INFO] [stdout] 73 | fn check_ok_ref(rules: &Vec<(usize, usize)>, u: &Vec<&usize>) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/utils/mod.rs:55:1 [INFO] [stdout] | [INFO] [stdout] 55 | / impl Default for Point { [INFO] [stdout] 56 | | fn default() -> Self { [INFO] [stdout] 57 | | Self { [INFO] [stdout] 58 | | x: Default::default(), [INFO] [stdout] ... | [INFO] [stdout] 62 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute [INFO] [stdout] | [INFO] [stdout] 11 + #[derive(Default)] [INFO] [stdout] 12 | pub struct Point { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/y2024/day10.rs:27:42 [INFO] [stdout] | [INFO] [stdout] 27 | let sub = Self::hike(&map, p); [INFO] [stdout] | ^^^^ help: change this to: `map` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/y2024/day12.rs:13:20 [INFO] [stdout] | [INFO] [stdout] 13 | fn lookup(map: &Vec>, p: Point) -> Option<&char> { [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] 13 - fn lookup(map: &Vec>, p: Point) -> Option<&char> { [INFO] [stdout] 13 + fn lookup(map: &[Vec], p: Point) -> Option<&char> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/y2024/day12.rs:68:20 [INFO] [stdout] | [INFO] [stdout] 68 | if !(area.contains(&p.up()) && !area.contains(&p.up().left())) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!area.contains(&p.up()) || area.contains(&p.up().left())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/y2024/day12.rs:73:20 [INFO] [stdout] | [INFO] [stdout] 73 | if !(area.contains(&p.up()) && !area.contains(&p.up().right())) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!area.contains(&p.up()) || area.contains(&p.up().right())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/y2024/day12.rs:78:20 [INFO] [stdout] | [INFO] [stdout] 78 | if !(area.contains(&p.left()) && !area.contains(&p.left().up())) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!area.contains(&p.left()) || area.contains(&p.left().up())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/y2024/day12.rs:83:20 [INFO] [stdout] | [INFO] [stdout] 83 | if !(area.contains(&p.left()) && !area.contains(&p.left().down())) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!area.contains(&p.left()) || area.contains(&p.left().down())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/y2024/day12.rs:67:13 [INFO] [stdout] | [INFO] [stdout] 67 | / if !area.contains(&p.left()) { [INFO] [stdout] 68 | | if !(area.contains(&p.up()) && !area.contains(&p.up().left())) { [INFO] [stdout] 69 | | fence_count += 1; [INFO] [stdout] 70 | | } [INFO] [stdout] 71 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 67 ~ if !area.contains(&p.left()) [INFO] [stdout] 68 ~ && !(area.contains(&p.up()) && !area.contains(&p.up().left())) { [INFO] [stdout] 69 | fence_count += 1; [INFO] [stdout] 70 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/y2024/day12.rs:72:13 [INFO] [stdout] | [INFO] [stdout] 72 | / if !area.contains(&p.right()) { [INFO] [stdout] 73 | | if !(area.contains(&p.up()) && !area.contains(&p.up().right())) { [INFO] [stdout] 74 | | fence_count += 1; [INFO] [stdout] 75 | | } [INFO] [stdout] 76 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 72 ~ if !area.contains(&p.right()) [INFO] [stdout] 73 ~ && !(area.contains(&p.up()) && !area.contains(&p.up().right())) { [INFO] [stdout] 74 | fence_count += 1; [INFO] [stdout] 75 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/y2024/day12.rs:77:13 [INFO] [stdout] | [INFO] [stdout] 77 | / if !area.contains(&p.up()) { [INFO] [stdout] 78 | | if !(area.contains(&p.left()) && !area.contains(&p.left().up())) { [INFO] [stdout] 79 | | fence_count += 1; [INFO] [stdout] 80 | | } [INFO] [stdout] 81 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 77 ~ if !area.contains(&p.up()) [INFO] [stdout] 78 ~ && !(area.contains(&p.left()) && !area.contains(&p.left().up())) { [INFO] [stdout] 79 | fence_count += 1; [INFO] [stdout] 80 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/y2024/day12.rs:82:13 [INFO] [stdout] | [INFO] [stdout] 82 | / if !area.contains(&p.down()) { [INFO] [stdout] 83 | | if !(area.contains(&p.left()) && !area.contains(&p.left().down())) { [INFO] [stdout] 84 | | fence_count += 1; [INFO] [stdout] 85 | | } [INFO] [stdout] 86 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 82 ~ if !area.contains(&p.down()) [INFO] [stdout] 83 ~ && !(area.contains(&p.left()) && !area.contains(&p.left().down())) { [INFO] [stdout] 84 | fence_count += 1; [INFO] [stdout] 85 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: compiling a regex in a loop [INFO] [stdout] --> src/y2024/day14.rs:37:21 [INFO] [stdout] | [INFO] [stdout] 37 | let r = Regex::new(r"^p=(\d+),(\d+) v=(-?\d+),(-?\d+)$").unwrap(); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: move the regex construction outside this loop [INFO] [stdout] --> src/y2024/day14.rs:36:9 [INFO] [stdout] | [INFO] [stdout] 36 | for line in input.lines() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#regex_creation_in_loops [INFO] [stdout] = note: `#[warn(clippy::regex_creation_in_loops)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: compiling a regex in a loop [INFO] [stdout] --> src/y2024/day14.rs:90:21 [INFO] [stdout] | [INFO] [stdout] 90 | let r = Regex::new(r"^p=(\d+),(\d+) v=(-?\d+),(-?\d+)$").unwrap(); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: move the regex construction outside this loop [INFO] [stdout] --> src/y2024/day14.rs:89:9 [INFO] [stdout] | [INFO] [stdout] 89 | for line in input.lines() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#regex_creation_in_loops [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/y2024/day15.rs:102:13 [INFO] [stdout] | [INFO] [stdout] 102 | 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] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 102 - return true; [INFO] [stdout] 102 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/y2024/day15.rs:104:13 [INFO] [stdout] | [INFO] [stdout] 104 | return false; [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] 104 - return false; [INFO] [stdout] 104 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/y2024/day15.rs:108:13 [INFO] [stdout] | [INFO] [stdout] 108 | return self.can_push(m.apply(p), m) && self.can_push(m.apply(p.right()), m); [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] 108 - return self.can_push(m.apply(p), m) && self.can_push(m.apply(p.right()), m); [INFO] [stdout] 108 + self.can_push(m.apply(p), m) && self.can_push(m.apply(p.right()), m) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/y2024/day15.rs:112:13 [INFO] [stdout] | [INFO] [stdout] 112 | return self.can_push(m.apply(p), m) && self.can_push(m.apply(p.left()), m); [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] 112 - return self.can_push(m.apply(p), m) && self.can_push(m.apply(p.left()), m); [INFO] [stdout] 112 + self.can_push(m.apply(p), m) && self.can_push(m.apply(p.left()), m) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/y2024/day15.rs:114:13 [INFO] [stdout] | [INFO] [stdout] 114 | return self.can_push(m.apply(p), m); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 114 - return self.can_push(m.apply(p), m); [INFO] [stdout] 114 + self.can_push(m.apply(p), m) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `y2024::day15::MapTile` [INFO] [stdout] --> src/y2024/day15.rs:127:27 [INFO] [stdout] | [INFO] [stdout] 127 | self.write(p, t.into()); [INFO] [stdout] | ^^^^^^^^ help: consider removing `.into()`: `t` [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: empty string literal in `writeln!` [INFO] [stdout] --> src/y2024/day15.rs:149:13 [INFO] [stdout] | [INFO] [stdout] 149 | 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: importing legacy numeric constants [INFO] [stdout] --> src/y2024/day22.rs:1:33 [INFO] [stdout] | [INFO] [stdout] 1 | use std::{collections::HashMap, i8, u8}; [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `i8::` 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: importing legacy numeric constants [INFO] [stdout] --> src/y2024/day22.rs:1:37 [INFO] [stdout] | [INFO] [stdout] 1 | use std::{collections::HashMap, i8, u8}; [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `u8::` 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] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/y2024/day22.rs:63:20 [INFO] [stdout] | [INFO] [stdout] 63 | if a_b < -9 || a_b > 9 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: use: `!(-9..=9).contains(&a_b)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/y2024/day22.rs:69:24 [INFO] [stdout] | [INFO] [stdout] 69 | if a_b_c < -9 || a_b_c > 9 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: use: `!(-9..=9).contains(&a_b_c)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/y2024/day22.rs:72:24 [INFO] [stdout] | [INFO] [stdout] 72 | if b_c < -9 || b_c > 10 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: use: `!(-9..=10).contains(&b_c)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/y2024/day22.rs:77:28 [INFO] [stdout] | [INFO] [stdout] 77 | if a_b_c_d < -9 || a_b_c_d > 9 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `!(-9..=9).contains(&a_b_c_d)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/y2024/day22.rs:81:28 [INFO] [stdout] | [INFO] [stdout] 81 | if b_c_d < -9 || b_c_d > 9 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: use: `!(-9..=9).contains(&b_c_d)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/y2024/day22.rs:85:28 [INFO] [stdout] | [INFO] [stdout] 85 | if c_d < -9 || c_d > 9 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: use: `!(-9..=9).contains(&c_d)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/y2024/day22.rs:124:51 [INFO] [stdout] | [INFO] [stdout] 124 | ... .and_modify(|bananas| *bananas = *bananas + entry.0 as u64) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `*bananas += entry.0 as u64` [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/y2024/day4.rs:11:18 [INFO] [stdout] | [INFO] [stdout] 11 | fn check_idxs(v: &Vec>, i1: i32, i2: i32, i3: i32, j1: i32, j2: i32, j3: i32) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 11 - fn check_idxs(v: &Vec>, i1: i32, i2: i32, i3: i32, j1: i32, j2: i32, j3: i32) -> bool { [INFO] [stdout] 11 + fn check_idxs(v: &[Vec], i1: i32, i2: i32, i3: i32, j1: i32, j2: i32, j3: i32) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/y2024/day5.rs:62:64 [INFO] [stdout] | [INFO] [stdout] 62 | fn check_ok(forbidden_followers: &ForbiddenFollowerMap, u: &Vec) -> bool { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 62 - fn check_ok(forbidden_followers: &ForbiddenFollowerMap, u: &Vec) -> bool { [INFO] [stdout] 62 + fn check_ok(forbidden_followers: &ForbiddenFollowerMap, u: &[usize]) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/y2024/day5.rs:92:9 [INFO] [stdout] | [INFO] [stdout] 92 | while let Some(line) = lines.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for line 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] = note: `#[warn(clippy::while_let_on_iterator)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/y2024/day5.rs:93:30 [INFO] [stdout] | [INFO] [stdout] 93 | if proc_rules && line == "" { [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#comparison_to_empty [INFO] [stdout] = note: `#[warn(clippy::comparison_to_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.iter().count()` on a `Vec` [INFO] [stdout] --> src/y2024/day5.rs:124:21 [INFO] [stdout] | [INFO] [stdout] 124 | let c = u.iter().count(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `u.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_count [INFO] [stdout] = note: `#[warn(clippy::iter_count)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/y2024/day5.rs:136:9 [INFO] [stdout] | [INFO] [stdout] 136 | while let Some(line) = lines.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for line 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: comparison to empty slice [INFO] [stdout] --> src/y2024/day5.rs:137:30 [INFO] [stdout] | [INFO] [stdout] 137 | if proc_rules && line == "" { [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#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.iter().count()` on a `Vec` [INFO] [stdout] --> src/y2024/day5.rs:184:21 [INFO] [stdout] | [INFO] [stdout] 184 | let c = u.iter().count(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `u.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_count [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/y2024/day6.rs:43:10 [INFO] [stdout] | [INFO] [stdout] 43 | map: &Vec>, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 43 - map: &Vec>, [INFO] [stdout] 43 + map: &[Vec], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/y2024/day6.rs:49:57 [INFO] [stdout] | [INFO] [stdout] 49 | if guard_pos.0 == 0 && guard_direction == North { [INFO] [stdout] | _________________________________________________________^ [INFO] [stdout] 50 | | return false; [INFO] [stdout] 51 | | } else if guard_pos.1 == 0 && guard_direction == West { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/y2024/day6.rs:51:63 [INFO] [stdout] | [INFO] [stdout] 51 | } else if guard_pos.1 == 0 && guard_direction == West { [INFO] [stdout] | _______________________________________________________________^ [INFO] [stdout] 52 | | return false; [INFO] [stdout] 53 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/y2024/day6.rs:115:61 [INFO] [stdout] | [INFO] [stdout] 115 | if guard_pos.0 == 0 && guard_direction == North { [INFO] [stdout] | _____________________________________________________________^ [INFO] [stdout] 116 | | break; [INFO] [stdout] 117 | | } else if guard_pos.1 == 0 && guard_direction == West { [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/y2024/day6.rs:117:67 [INFO] [stdout] | [INFO] [stdout] 117 | } else if guard_pos.1 == 0 && guard_direction == West { [INFO] [stdout] | ___________________________________________________________________^ [INFO] [stdout] 118 | | break; [INFO] [stdout] 119 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/y2024/day6.rs:183:65 [INFO] [stdout] | [INFO] [stdout] 183 | if guard_pos.0 == 0 && guard_direction == North { [INFO] [stdout] | _________________________________________________________________^ [INFO] [stdout] 184 | | break; [INFO] [stdout] 185 | | } else if guard_pos.1 == 0 && guard_direction == West { [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/y2024/day6.rs:185:71 [INFO] [stdout] | [INFO] [stdout] 185 | } else if guard_pos.1 == 0 && guard_direction == West { [INFO] [stdout] | _______________________________________________________________________^ [INFO] [stdout] 186 | | break; [INFO] [stdout] 187 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: found call to `str::trim` before `str::split_whitespace` [INFO] [stdout] --> src/y2024/day7.rs:53:14 [INFO] [stdout] | [INFO] [stdout] 53 | .trim() [INFO] [stdout] | ______________^ [INFO] [stdout] 54 | | .split_whitespace() [INFO] [stdout] | |_____________^ help: remove `trim()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trim_split_whitespace [INFO] [stdout] = note: `#[warn(clippy::trim_split_whitespace)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enclosing `Some` and `?` operator are unneeded [INFO] [stdout] --> src/y2024/day7.rs:88:9 [INFO] [stdout] | [INFO] [stdout] 88 | / Some(match self { [INFO] [stdout] 89 | | Operator::Add => val1.checked_add(val2), [INFO] [stdout] 90 | | Operator::Mul => val1.checked_mul(val2), [INFO] [stdout] 91 | | Operator::Concat => { [INFO] [stdout] ... | [INFO] [stdout] 102 | | }?) [INFO] [stdout] | |___________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark [INFO] [stdout] = note: `#[warn(clippy::needless_question_mark)]` on by default [INFO] [stdout] help: remove the enclosing `Some` and `?` operator [INFO] [stdout] | [INFO] [stdout] 88 ~ match self { [INFO] [stdout] 89 | Operator::Add => val1.checked_add(val2), [INFO] [stdout] ... [INFO] [stdout] 101 | } [INFO] [stdout] 102 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/y2024/day7.rs:107:54 [INFO] [stdout] | [INFO] [stdout] 107 | fn check_possibly_true(eq: &Equation, operators: &Vec) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 107 - fn check_possibly_true(eq: &Equation, operators: &Vec) -> bool { [INFO] [stdout] 107 + fn check_possibly_true(eq: &Equation, operators: &[Operator]) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/y2024/day7.rs:130:25 [INFO] [stdout] | [INFO] [stdout] 130 | .filter(|l| *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: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> src/y2024/day8.rs:24:21 [INFO] [stdout] | [INFO] [stdout] 24 | / if !clusters.contains_key(&cell) { [INFO] [stdout] 25 | | clusters.insert(cell, AntennaCluster::new()); [INFO] [stdout] 26 | | } [INFO] [stdout] | |_____________________^ help: try: `clusters.entry(cell).or_insert_with(|| AntennaCluster::new());` [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: the loop variable `i` is only used to index `hdd` [INFO] [stdout] --> src/y2024/day9.rs:101:30 [INFO] [stdout] | [INFO] [stdout] 101 | for i in (z + 1)..(z + len + 1) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 101 - for i in (z + 1)..(z + len + 1) { [INFO] [stdout] 101 + for in hdd.iter_mut().take((z + len + 1)).skip((z + 1)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `hdd` [INFO] [stdout] --> src/y2024/day9.rs:105:30 [INFO] [stdout] | [INFO] [stdout] 105 | for i in start_a..(start_a + len) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 105 - for i in start_a..(start_a + len) { [INFO] [stdout] 105 + for in hdd.iter_mut().skip(start_a).take(len) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/main.rs:59:29 [INFO] [stdout] | [INFO] [stdout] 59 | std::fs::create_dir_all(&config.input_file_dir.join(format!("{}", year))).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `config.input_file_dir.join(format!("{}", year))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/y2024/day10.rs:24:18 [INFO] [stdout] | [INFO] [stdout] 24 | for p in vec![start.up(), start.down(), start.left(), start.right()] { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[start.up(), start.down(), start.left(), start.right()]` [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: unused variable: `number` [INFO] [stdout] --> src/y2024/day11.rs:58:15 [INFO] [stdout] | [INFO] [stdout] 58 | for (&number, &count) in star_multiset.iter() { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_number` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `c` [INFO] [stdout] --> src/y2024/day12.rs:100:21 [INFO] [stdout] | [INFO] [stdout] 100 | for (x, c) in row.iter().enumerate() { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_c` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `c` [INFO] [stdout] --> src/y2024/day12.rs:126:21 [INFO] [stdout] | [INFO] [stdout] 126 | for (x, c) in row.iter().enumerate() { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_c` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/y2024/day16.rs:12:22 [INFO] [stdout] | [INFO] [stdout] 12 | fn part_1(&self, input: String) -> String { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/y2024/day16.rs:16:22 [INFO] [stdout] | [INFO] [stdout] 16 | fn part_2(&self, input: String) -> String { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/y2024/day17.rs:12:22 [INFO] [stdout] | [INFO] [stdout] 12 | fn part_1(&self, input: String) -> String { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/y2024/day17.rs:16:22 [INFO] [stdout] | [INFO] [stdout] 16 | fn part_2(&self, input: String) -> String { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/y2024/day18.rs:12:22 [INFO] [stdout] | [INFO] [stdout] 12 | fn part_1(&self, input: String) -> String { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/y2024/day18.rs:16:22 [INFO] [stdout] | [INFO] [stdout] 16 | fn part_2(&self, input: String) -> String { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/y2024/day19.rs:12:22 [INFO] [stdout] | [INFO] [stdout] 12 | fn part_1(&self, input: String) -> String { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/y2024/day19.rs:16:22 [INFO] [stdout] | [INFO] [stdout] 16 | fn part_2(&self, input: String) -> String { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/y2024/day2.rs:12:22 [INFO] [stdout] | [INFO] [stdout] 12 | fn part_1(&self, input: String) -> String { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/y2024/day2.rs:16:22 [INFO] [stdout] | [INFO] [stdout] 16 | fn part_2(&self, input: String) -> String { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/y2024/day20.rs:12:22 [INFO] [stdout] | [INFO] [stdout] 12 | fn part_1(&self, input: String) -> String { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/y2024/day20.rs:16:22 [INFO] [stdout] | [INFO] [stdout] 16 | fn part_2(&self, input: String) -> String { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/y2024/day21.rs:12:22 [INFO] [stdout] | [INFO] [stdout] 12 | fn part_1(&self, input: String) -> String { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/y2024/day21.rs:16:22 [INFO] [stdout] | [INFO] [stdout] 16 | fn part_2(&self, input: String) -> String { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `p3` is never read [INFO] [stdout] --> src/y2024/day22.rs:114:46 [INFO] [stdout] | [INFO] [stdout] 114 | let (mut p0, mut p1, mut p2, mut p3) = (i8::MAX, i8::MAX, i8::MAX, i8::MAX); [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/y2024/day23.rs:12:22 [INFO] [stdout] | [INFO] [stdout] 12 | fn part_1(&self, input: String) -> String { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/y2024/day23.rs:16:22 [INFO] [stdout] | [INFO] [stdout] 16 | fn part_2(&self, input: String) -> String { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/y2024/day24.rs:12:22 [INFO] [stdout] | [INFO] [stdout] 12 | fn part_1(&self, input: String) -> String { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/y2024/day24.rs:16:22 [INFO] [stdout] | [INFO] [stdout] 16 | fn part_2(&self, input: String) -> String { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/y2024/day25.rs:12:22 [INFO] [stdout] | [INFO] [stdout] 12 | fn part_1(&self, input: String) -> String { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/y2024/day25.rs:16:22 [INFO] [stdout] | [INFO] [stdout] 16 | fn part_2(&self, input: String) -> String { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `column` [INFO] [stdout] --> src/y2024/day4.rs:84:22 [INFO] [stdout] | [INFO] [stdout] 84 | for (ju, column) in row.clone().iter().enumerate() { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_column` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/y2024/day5.rs:104:21 [INFO] [stdout] | [INFO] [stdout] 104 | let mut spl = line.split(','); [INFO] [stdout] | ----^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/y2024/day5.rs:148:21 [INFO] [stdout] | [INFO] [stdout] 148 | let mut spl = line.split(','); [INFO] [stdout] | ----^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `max_x` and `max_y` are never read [INFO] [stdout] --> src/y2024/day15.rs:76:5 [INFO] [stdout] | [INFO] [stdout] 74 | struct Map { [INFO] [stdout] | --- fields in this struct [INFO] [stdout] 75 | m: Vec>, [INFO] [stdout] 76 | max_x: usize, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 77 | max_y: usize, [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `check_ok_ref` is never used [INFO] [stdout] --> src/y2024/day5.rs:73:8 [INFO] [stdout] | [INFO] [stdout] 57 | impl Sln { [INFO] [stdout] | -------- associated function in this implementation [INFO] [stdout] ... [INFO] [stdout] 73 | fn check_ok_ref(rules: &Vec<(usize, usize)>, u: &Vec<&usize>) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/utils/mod.rs:55:1 [INFO] [stdout] | [INFO] [stdout] 55 | / impl Default for Point { [INFO] [stdout] 56 | | fn default() -> Self { [INFO] [stdout] 57 | | Self { [INFO] [stdout] 58 | | x: Default::default(), [INFO] [stdout] ... | [INFO] [stdout] 62 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute [INFO] [stdout] | [INFO] [stdout] 11 + #[derive(Default)] [INFO] [stdout] 12 | pub struct Point { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/y2024/day10.rs:27:42 [INFO] [stdout] | [INFO] [stdout] 27 | let sub = Self::hike(&map, p); [INFO] [stdout] | ^^^^ help: change this to: `map` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/y2024/day12.rs:13:20 [INFO] [stdout] | [INFO] [stdout] 13 | fn lookup(map: &Vec>, p: Point) -> Option<&char> { [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] 13 - fn lookup(map: &Vec>, p: Point) -> Option<&char> { [INFO] [stdout] 13 + fn lookup(map: &[Vec], p: Point) -> Option<&char> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/y2024/day12.rs:68:20 [INFO] [stdout] | [INFO] [stdout] 68 | if !(area.contains(&p.up()) && !area.contains(&p.up().left())) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!area.contains(&p.up()) || area.contains(&p.up().left())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/y2024/day12.rs:73:20 [INFO] [stdout] | [INFO] [stdout] 73 | if !(area.contains(&p.up()) && !area.contains(&p.up().right())) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!area.contains(&p.up()) || area.contains(&p.up().right())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/y2024/day12.rs:78:20 [INFO] [stdout] | [INFO] [stdout] 78 | if !(area.contains(&p.left()) && !area.contains(&p.left().up())) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!area.contains(&p.left()) || area.contains(&p.left().up())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/y2024/day12.rs:83:20 [INFO] [stdout] | [INFO] [stdout] 83 | if !(area.contains(&p.left()) && !area.contains(&p.left().down())) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!area.contains(&p.left()) || area.contains(&p.left().down())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/y2024/day12.rs:67:13 [INFO] [stdout] | [INFO] [stdout] 67 | / if !area.contains(&p.left()) { [INFO] [stdout] 68 | | if !(area.contains(&p.up()) && !area.contains(&p.up().left())) { [INFO] [stdout] 69 | | fence_count += 1; [INFO] [stdout] 70 | | } [INFO] [stdout] 71 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 67 ~ if !area.contains(&p.left()) [INFO] [stdout] 68 ~ && !(area.contains(&p.up()) && !area.contains(&p.up().left())) { [INFO] [stdout] 69 | fence_count += 1; [INFO] [stdout] 70 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/y2024/day12.rs:72:13 [INFO] [stdout] | [INFO] [stdout] 72 | / if !area.contains(&p.right()) { [INFO] [stdout] 73 | | if !(area.contains(&p.up()) && !area.contains(&p.up().right())) { [INFO] [stdout] 74 | | fence_count += 1; [INFO] [stdout] 75 | | } [INFO] [stdout] 76 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 72 ~ if !area.contains(&p.right()) [INFO] [stdout] 73 ~ && !(area.contains(&p.up()) && !area.contains(&p.up().right())) { [INFO] [stdout] 74 | fence_count += 1; [INFO] [stdout] 75 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/y2024/day12.rs:77:13 [INFO] [stdout] | [INFO] [stdout] 77 | / if !area.contains(&p.up()) { [INFO] [stdout] 78 | | if !(area.contains(&p.left()) && !area.contains(&p.left().up())) { [INFO] [stdout] 79 | | fence_count += 1; [INFO] [stdout] 80 | | } [INFO] [stdout] 81 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 77 ~ if !area.contains(&p.up()) [INFO] [stdout] 78 ~ && !(area.contains(&p.left()) && !area.contains(&p.left().up())) { [INFO] [stdout] 79 | fence_count += 1; [INFO] [stdout] 80 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/y2024/day12.rs:82:13 [INFO] [stdout] | [INFO] [stdout] 82 | / if !area.contains(&p.down()) { [INFO] [stdout] 83 | | if !(area.contains(&p.left()) && !area.contains(&p.left().down())) { [INFO] [stdout] 84 | | fence_count += 1; [INFO] [stdout] 85 | | } [INFO] [stdout] 86 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 82 ~ if !area.contains(&p.down()) [INFO] [stdout] 83 ~ && !(area.contains(&p.left()) && !area.contains(&p.left().down())) { [INFO] [stdout] 84 | fence_count += 1; [INFO] [stdout] 85 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: compiling a regex in a loop [INFO] [stdout] --> src/y2024/day14.rs:37:21 [INFO] [stdout] | [INFO] [stdout] 37 | let r = Regex::new(r"^p=(\d+),(\d+) v=(-?\d+),(-?\d+)$").unwrap(); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: move the regex construction outside this loop [INFO] [stdout] --> src/y2024/day14.rs:36:9 [INFO] [stdout] | [INFO] [stdout] 36 | for line in input.lines() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#regex_creation_in_loops [INFO] [stdout] = note: `#[warn(clippy::regex_creation_in_loops)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: compiling a regex in a loop [INFO] [stdout] --> src/y2024/day14.rs:90:21 [INFO] [stdout] | [INFO] [stdout] 90 | let r = Regex::new(r"^p=(\d+),(\d+) v=(-?\d+),(-?\d+)$").unwrap(); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: move the regex construction outside this loop [INFO] [stdout] --> src/y2024/day14.rs:89:9 [INFO] [stdout] | [INFO] [stdout] 89 | for line in input.lines() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#regex_creation_in_loops [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/y2024/day15.rs:102:13 [INFO] [stdout] | [INFO] [stdout] 102 | 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] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 102 - return true; [INFO] [stdout] 102 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/y2024/day15.rs:104:13 [INFO] [stdout] | [INFO] [stdout] 104 | return false; [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] 104 - return false; [INFO] [stdout] 104 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/y2024/day15.rs:108:13 [INFO] [stdout] | [INFO] [stdout] 108 | return self.can_push(m.apply(p), m) && self.can_push(m.apply(p.right()), m); [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] 108 - return self.can_push(m.apply(p), m) && self.can_push(m.apply(p.right()), m); [INFO] [stdout] 108 + self.can_push(m.apply(p), m) && self.can_push(m.apply(p.right()), m) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/y2024/day15.rs:112:13 [INFO] [stdout] | [INFO] [stdout] 112 | return self.can_push(m.apply(p), m) && self.can_push(m.apply(p.left()), m); [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] 112 - return self.can_push(m.apply(p), m) && self.can_push(m.apply(p.left()), m); [INFO] [stdout] 112 + self.can_push(m.apply(p), m) && self.can_push(m.apply(p.left()), m) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/y2024/day15.rs:114:13 [INFO] [stdout] | [INFO] [stdout] 114 | return self.can_push(m.apply(p), m); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 114 - return self.can_push(m.apply(p), m); [INFO] [stdout] 114 + self.can_push(m.apply(p), m) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `y2024::day15::MapTile` [INFO] [stdout] --> src/y2024/day15.rs:127:27 [INFO] [stdout] | [INFO] [stdout] 127 | self.write(p, t.into()); [INFO] [stdout] | ^^^^^^^^ help: consider removing `.into()`: `t` [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: empty string literal in `writeln!` [INFO] [stdout] --> src/y2024/day15.rs:149:13 [INFO] [stdout] | [INFO] [stdout] 149 | 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: importing legacy numeric constants [INFO] [stdout] --> src/y2024/day22.rs:1:33 [INFO] [stdout] | [INFO] [stdout] 1 | use std::{collections::HashMap, i8, u8}; [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `i8::` 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: importing legacy numeric constants [INFO] [stdout] --> src/y2024/day22.rs:1:37 [INFO] [stdout] | [INFO] [stdout] 1 | use std::{collections::HashMap, i8, u8}; [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `u8::` 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] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/y2024/day22.rs:63:20 [INFO] [stdout] | [INFO] [stdout] 63 | if a_b < -9 || a_b > 9 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: use: `!(-9..=9).contains(&a_b)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/y2024/day22.rs:69:24 [INFO] [stdout] | [INFO] [stdout] 69 | if a_b_c < -9 || a_b_c > 9 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: use: `!(-9..=9).contains(&a_b_c)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/y2024/day22.rs:72:24 [INFO] [stdout] | [INFO] [stdout] 72 | if b_c < -9 || b_c > 10 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: use: `!(-9..=10).contains(&b_c)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/y2024/day22.rs:77:28 [INFO] [stdout] | [INFO] [stdout] 77 | if a_b_c_d < -9 || a_b_c_d > 9 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `!(-9..=9).contains(&a_b_c_d)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/y2024/day22.rs:81:28 [INFO] [stdout] | [INFO] [stdout] 81 | if b_c_d < -9 || b_c_d > 9 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: use: `!(-9..=9).contains(&b_c_d)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/y2024/day22.rs:85:28 [INFO] [stdout] | [INFO] [stdout] 85 | if c_d < -9 || c_d > 9 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: use: `!(-9..=9).contains(&c_d)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/y2024/day22.rs:124:51 [INFO] [stdout] | [INFO] [stdout] 124 | ... .and_modify(|bananas| *bananas = *bananas + entry.0 as u64) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `*bananas += entry.0 as u64` [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/y2024/day4.rs:11:18 [INFO] [stdout] | [INFO] [stdout] 11 | fn check_idxs(v: &Vec>, i1: i32, i2: i32, i3: i32, j1: i32, j2: i32, j3: i32) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 11 - fn check_idxs(v: &Vec>, i1: i32, i2: i32, i3: i32, j1: i32, j2: i32, j3: i32) -> bool { [INFO] [stdout] 11 + fn check_idxs(v: &[Vec], i1: i32, i2: i32, i3: i32, j1: i32, j2: i32, j3: i32) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/y2024/day5.rs:62:64 [INFO] [stdout] | [INFO] [stdout] 62 | fn check_ok(forbidden_followers: &ForbiddenFollowerMap, u: &Vec) -> bool { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 62 - fn check_ok(forbidden_followers: &ForbiddenFollowerMap, u: &Vec) -> bool { [INFO] [stdout] 62 + fn check_ok(forbidden_followers: &ForbiddenFollowerMap, u: &[usize]) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/y2024/day5.rs:92:9 [INFO] [stdout] | [INFO] [stdout] 92 | while let Some(line) = lines.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for line 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] = note: `#[warn(clippy::while_let_on_iterator)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/y2024/day5.rs:93:30 [INFO] [stdout] | [INFO] [stdout] 93 | if proc_rules && line == "" { [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#comparison_to_empty [INFO] [stdout] = note: `#[warn(clippy::comparison_to_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.iter().count()` on a `Vec` [INFO] [stdout] --> src/y2024/day5.rs:124:21 [INFO] [stdout] | [INFO] [stdout] 124 | let c = u.iter().count(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `u.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_count [INFO] [stdout] = note: `#[warn(clippy::iter_count)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/y2024/day5.rs:136:9 [INFO] [stdout] | [INFO] [stdout] 136 | while let Some(line) = lines.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for line 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: comparison to empty slice [INFO] [stdout] --> src/y2024/day5.rs:137:30 [INFO] [stdout] | [INFO] [stdout] 137 | if proc_rules && line == "" { [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#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.iter().count()` on a `Vec` [INFO] [stdout] --> src/y2024/day5.rs:184:21 [INFO] [stdout] | [INFO] [stdout] 184 | let c = u.iter().count(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `u.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_count [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/y2024/day6.rs:43:10 [INFO] [stdout] | [INFO] [stdout] 43 | map: &Vec>, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 43 - map: &Vec>, [INFO] [stdout] 43 + map: &[Vec], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/y2024/day6.rs:49:57 [INFO] [stdout] | [INFO] [stdout] 49 | if guard_pos.0 == 0 && guard_direction == North { [INFO] [stdout] | _________________________________________________________^ [INFO] [stdout] 50 | | return false; [INFO] [stdout] 51 | | } else if guard_pos.1 == 0 && guard_direction == West { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/y2024/day6.rs:51:63 [INFO] [stdout] | [INFO] [stdout] 51 | } else if guard_pos.1 == 0 && guard_direction == West { [INFO] [stdout] | _______________________________________________________________^ [INFO] [stdout] 52 | | return false; [INFO] [stdout] 53 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/y2024/day6.rs:115:61 [INFO] [stdout] | [INFO] [stdout] 115 | if guard_pos.0 == 0 && guard_direction == North { [INFO] [stdout] | _____________________________________________________________^ [INFO] [stdout] 116 | | break; [INFO] [stdout] 117 | | } else if guard_pos.1 == 0 && guard_direction == West { [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/y2024/day6.rs:117:67 [INFO] [stdout] | [INFO] [stdout] 117 | } else if guard_pos.1 == 0 && guard_direction == West { [INFO] [stdout] | ___________________________________________________________________^ [INFO] [stdout] 118 | | break; [INFO] [stdout] 119 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/y2024/day6.rs:183:65 [INFO] [stdout] | [INFO] [stdout] 183 | if guard_pos.0 == 0 && guard_direction == North { [INFO] [stdout] | _________________________________________________________________^ [INFO] [stdout] 184 | | break; [INFO] [stdout] 185 | | } else if guard_pos.1 == 0 && guard_direction == West { [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/y2024/day6.rs:185:71 [INFO] [stdout] | [INFO] [stdout] 185 | } else if guard_pos.1 == 0 && guard_direction == West { [INFO] [stdout] | _______________________________________________________________________^ [INFO] [stdout] 186 | | break; [INFO] [stdout] 187 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: found call to `str::trim` before `str::split_whitespace` [INFO] [stdout] --> src/y2024/day7.rs:53:14 [INFO] [stdout] | [INFO] [stdout] 53 | .trim() [INFO] [stdout] | ______________^ [INFO] [stdout] 54 | | .split_whitespace() [INFO] [stdout] | |_____________^ help: remove `trim()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trim_split_whitespace [INFO] [stdout] = note: `#[warn(clippy::trim_split_whitespace)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enclosing `Some` and `?` operator are unneeded [INFO] [stdout] --> src/y2024/day7.rs:88:9 [INFO] [stdout] | [INFO] [stdout] 88 | / Some(match self { [INFO] [stdout] 89 | | Operator::Add => val1.checked_add(val2), [INFO] [stdout] 90 | | Operator::Mul => val1.checked_mul(val2), [INFO] [stdout] 91 | | Operator::Concat => { [INFO] [stdout] ... | [INFO] [stdout] 102 | | }?) [INFO] [stdout] | |___________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark [INFO] [stdout] = note: `#[warn(clippy::needless_question_mark)]` on by default [INFO] [stdout] help: remove the enclosing `Some` and `?` operator [INFO] [stdout] | [INFO] [stdout] 88 ~ match self { [INFO] [stdout] 89 | Operator::Add => val1.checked_add(val2), [INFO] [stdout] ... [INFO] [stdout] 101 | } [INFO] [stdout] 102 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/y2024/day7.rs:107:54 [INFO] [stdout] | [INFO] [stdout] 107 | fn check_possibly_true(eq: &Equation, operators: &Vec) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 107 - fn check_possibly_true(eq: &Equation, operators: &Vec) -> bool { [INFO] [stdout] 107 + fn check_possibly_true(eq: &Equation, operators: &[Operator]) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/y2024/day7.rs:130:25 [INFO] [stdout] | [INFO] [stdout] 130 | .filter(|l| *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: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> src/y2024/day8.rs:24:21 [INFO] [stdout] | [INFO] [stdout] 24 | / if !clusters.contains_key(&cell) { [INFO] [stdout] 25 | | clusters.insert(cell, AntennaCluster::new()); [INFO] [stdout] 26 | | } [INFO] [stdout] | |_____________________^ help: try: `clusters.entry(cell).or_insert_with(|| AntennaCluster::new());` [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: the loop variable `i` is only used to index `hdd` [INFO] [stdout] --> src/y2024/day9.rs:101:30 [INFO] [stdout] | [INFO] [stdout] 101 | for i in (z + 1)..(z + len + 1) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 101 - for i in (z + 1)..(z + len + 1) { [INFO] [stdout] 101 + for in hdd.iter_mut().take((z + len + 1)).skip((z + 1)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `hdd` [INFO] [stdout] --> src/y2024/day9.rs:105:30 [INFO] [stdout] | [INFO] [stdout] 105 | for i in start_a..(start_a + len) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 105 - for i in start_a..(start_a + len) { [INFO] [stdout] 105 + for in hdd.iter_mut().skip(start_a).take(len) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/main.rs:59:29 [INFO] [stdout] | [INFO] [stdout] 59 | std::fs::create_dir_all(&config.input_file_dir.join(format!("{}", year))).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `config.input_file_dir.join(format!("{}", year))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/y2024/day10.rs:24:18 [INFO] [stdout] | [INFO] [stdout] 24 | for p in vec![start.up(), start.down(), start.left(), start.right()] { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[start.up(), start.down(), start.left(), start.right()]` [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] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 1m 02s [INFO] running `Command { std: "docker" "inspect" "bbf3e0da9f071a4434c7b1639bf90216204f285591d59864d3c32077e0325baf", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "bbf3e0da9f071a4434c7b1639bf90216204f285591d59864d3c32077e0325baf", kill_on_drop: false }` [INFO] [stdout] bbf3e0da9f071a4434c7b1639bf90216204f285591d59864d3c32077e0325baf