[INFO] cloning repository https://github.com/santiberna/aoc-solutions-rust [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/santiberna/aoc-solutions-rust" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fsantiberna%2Faoc-solutions-rust", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fsantiberna%2Faoc-solutions-rust'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 50672de5d80f78da7cf457729dc379c053f008dc [INFO] linting santiberna/aoc-solutions-rust against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fsantiberna%2Faoc-solutions-rust" "/workspace/builds/worker-6-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-6-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/santiberna/aoc-solutions-rust [INFO] finished tweaking git repo https://github.com/santiberna/aoc-solutions-rust [INFO] tweaked toml for git repo https://github.com/santiberna/aoc-solutions-rust written to /workspace/builds/worker-6-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/santiberna/aoc-solutions-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/santiberna/aoc-solutions-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] Downloading crates ... [INFO] [stderr] Downloaded rustls v0.23.34 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 7e2e2abf43fdbc9f6c920eb8a081d8cb461083afe40ae32838a7e18f6d5f09e1 [INFO] running `Command { std: "docker" "start" "-a" "7e2e2abf43fdbc9f6c920eb8a081d8cb461083afe40ae32838a7e18f6d5f09e1", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "7e2e2abf43fdbc9f6c920eb8a081d8cb461083afe40ae32838a7e18f6d5f09e1", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "7e2e2abf43fdbc9f6c920eb8a081d8cb461083afe40ae32838a7e18f6d5f09e1", kill_on_drop: false }` [INFO] [stdout] 7e2e2abf43fdbc9f6c920eb8a081d8cb461083afe40ae32838a7e18f6d5f09e1 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 073ab67e30f575fbfc38f7f3901276edb54683919d01bc793202a11f52d7a060 [INFO] running `Command { std: "docker" "start" "-a" "073ab67e30f575fbfc38f7f3901276edb54683919d01bc793202a11f52d7a060", kill_on_drop: false }` [INFO] [stderr] Compiling num-traits v0.2.19 [INFO] [stderr] Compiling syn v2.0.104 [INFO] [stderr] Compiling ring v0.17.14 [INFO] [stderr] Checking socket2 v0.6.0 [INFO] [stderr] Checking mio v1.0.4 [INFO] [stderr] Checking rustls-pki-types v1.13.0 [INFO] [stderr] Checking getrandom v0.2.16 [INFO] [stderr] Checking futures-util v0.3.31 [INFO] [stderr] Compiling rustls v0.23.34 [INFO] [stderr] Checking bytemuck v1.23.1 [INFO] [stderr] Checking tracing v0.1.41 [INFO] [stderr] Checking crypto-common v0.1.6 [INFO] [stderr] Checking webpki-roots v1.0.3 [INFO] [stderr] Checking safe_arch v0.7.4 [INFO] [stderr] Checking bitflags v2.9.2 [INFO] [stderr] Checking tokio v1.47.1 [INFO] [stderr] Checking regex-automata v0.4.9 [INFO] [stderr] Checking serde_urlencoded v0.7.1 [INFO] [stderr] Checking wide v0.7.33 [INFO] [stderr] Checking digest v0.10.7 [INFO] [stderr] Checking num-integer v0.1.46 [INFO] [stderr] Checking num-complex v0.4.6 [INFO] [stderr] Checking num-bigint v0.4.6 [INFO] [stderr] Checking approx v0.5.1 [INFO] [stderr] Checking num-iter v0.1.45 [INFO] [stderr] Checking md-5 v0.10.6 [INFO] [stderr] Checking num-rational v0.4.2 [INFO] [stderr] Checking simba v0.9.0 [INFO] [stderr] Checking num v0.4.3 [INFO] [stderr] Checking regex v1.11.1 [INFO] [stderr] Compiling synstructure v0.13.2 [INFO] [stderr] Checking hyper v1.7.0 [INFO] [stderr] Checking tower v0.5.2 [INFO] [stderr] Checking rustls-webpki v0.103.7 [INFO] [stderr] Checking tower-http v0.6.6 [INFO] [stderr] Checking hyper-util v0.1.16 [INFO] [stderr] Compiling zerofrom-derive v0.1.6 [INFO] [stderr] Compiling yoke-derive v0.8.0 [INFO] [stderr] Compiling zerovec-derive v0.11.1 [INFO] [stderr] Compiling displaydoc v0.2.5 [INFO] [stderr] Compiling nalgebra-macros v0.2.2 [INFO] [stderr] Checking zerofrom v0.1.6 [INFO] [stderr] Checking yoke v0.8.0 [INFO] [stderr] Checking zerovec v0.11.4 [INFO] [stderr] Checking zerotrie v0.2.2 [INFO] [stderr] Checking tinystr v0.8.1 [INFO] [stderr] Checking potential_utf v0.1.2 [INFO] [stderr] Checking icu_locale_core v2.0.0 [INFO] [stderr] Checking icu_collections v2.0.0 [INFO] [stderr] Checking tokio-rustls v0.26.4 [INFO] [stderr] Checking nalgebra v0.33.2 [INFO] [stderr] Checking hyper-rustls v0.27.7 [INFO] [stderr] Checking icu_provider v2.0.0 [INFO] [stderr] Checking icu_properties v2.0.1 [INFO] [stderr] Checking icu_normalizer v2.0.0 [INFO] [stderr] Checking idna_adapter v1.2.1 [INFO] [stderr] Checking idna v1.0.3 [INFO] [stderr] Checking url v2.5.4 [INFO] [stderr] Checking reqwest v0.12.23 [INFO] [stderr] Checking aoc-solutions-rust v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/y2025/c10.rs:97:1 [INFO] [stdout] | [INFO] [stdout] 97 | / /// [INFO] [stdout] 98 | | [INFO] [stdout] | |_^ [INFO] [stdout] 99 | fn forward_elimination_mod2(mut aug: MatrixVec) -> MatrixVec { [INFO] [stdout] | --------------------------- the comment documents this function [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/y2025/c10.rs:207:1 [INFO] [stdout] | [INFO] [stdout] 207 | / /// [INFO] [stdout] 208 | | [INFO] [stdout] | |_^ [INFO] [stdout] 209 | fn forward_elimination(mut aug: MatrixVec) -> MatrixVec { [INFO] [stdout] | ---------------------- the comment documents this function [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `HashSet` [INFO] [stdout] --> src/y2025/c11.rs:1:33 [INFO] [stdout] | [INFO] [stdout] 1 | use std::collections::{HashMap, HashSet}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/y2025/c12.rs:67:16 [INFO] [stdout] | [INFO] [stdout] 67 | if (find.is_none()) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 67 - if (find.is_none()) { [INFO] [stdout] 67 + if find.is_none() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `HashSet` and `io::Lines` [INFO] [stdout] --> src/y2025/c9.rs:2:29 [INFO] [stdout] | [INFO] [stdout] 2 | collections::{BTreeSet, HashSet}, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] 3 | io::Lines, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/y2025/c10.rs:97:1 [INFO] [stdout] | [INFO] [stdout] 97 | / /// [INFO] [stdout] 98 | | [INFO] [stdout] | |_^ [INFO] [stdout] 99 | fn forward_elimination_mod2(mut aug: MatrixVec) -> MatrixVec { [INFO] [stdout] | --------------------------- the comment documents this function [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/y2025/c10.rs:207:1 [INFO] [stdout] | [INFO] [stdout] 207 | / /// [INFO] [stdout] 208 | | [INFO] [stdout] | |_^ [INFO] [stdout] 209 | fn forward_elimination(mut aug: MatrixVec) -> MatrixVec { [INFO] [stdout] | ---------------------- the comment documents this function [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `HashSet` [INFO] [stdout] --> src/y2025/c11.rs:1:33 [INFO] [stdout] | [INFO] [stdout] 1 | use std::collections::{HashMap, HashSet}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/y2025/c12.rs:67:16 [INFO] [stdout] | [INFO] [stdout] 67 | if (find.is_none()) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 67 - if (find.is_none()) { [INFO] [stdout] 67 + if find.is_none() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `HashSet` and `io::Lines` [INFO] [stdout] --> src/y2025/c9.rs:2:29 [INFO] [stdout] | [INFO] [stdout] 2 | collections::{BTreeSet, HashSet}, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] 3 | io::Lines, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `prev_pivot` is assigned to, but never used [INFO] [stdout] --> src/y2025/c10.rs:215:9 [INFO] [stdout] | [INFO] [stdout] 215 | let mut prev_pivot = 1; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: consider using `_prev_pivot` instead [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `prev_pivot` is never read [INFO] [stdout] --> src/y2025/c10.rs:243:9 [INFO] [stdout] | [INFO] [stdout] 243 | prev_pivot = pivot_val; [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: `inverted` [INFO] [stdout] --> src/y2025/c11.rs:153:9 [INFO] [stdout] | [INFO] [stdout] 153 | let inverted = inverted_graph(&map); [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_inverted` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/y2025/c12.rs:206:9 [INFO] [stdout] | [INFO] [stdout] 206 | let mut answer2 = 0; [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: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/utility/assembunny.rs:57:33 [INFO] [stdout] | [INFO] [stdout] 57 | pub fn run(&mut self, code: &mut Vec) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 57 - pub fn run(&mut self, code: &mut Vec) -> Option { [INFO] [stdout] 57 + pub fn run(&mut self, code: &mut [Instruction]) -> Option { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> src/y2016/c11_generator_elevators.rs:118:17 [INFO] [stdout] | [INFO] [stdout] 118 | / match item { [INFO] [stdout] 119 | | &Item::Chip(i) => new_state.items[i].0 = new_floor, [INFO] [stdout] 120 | | &Item::Gen(i) => new_state.items[i].1 = new_floor, [INFO] [stdout] 121 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] = note: `#[warn(clippy::match_ref_pats)]` on by default [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 118 ~ match *item { [INFO] [stdout] 119 ~ Item::Chip(i) => new_state.items[i].0 = new_floor, [INFO] [stdout] 120 ~ Item::Gen(i) => new_state.items[i].1 = new_floor, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/y2016/c13_generate_maze.rs:13:9 [INFO] [stdout] | [INFO] [stdout] 13 | (num as u32).count_ones() % 2 == 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `(num as u32).count_ones().is_multiple_of(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/y2016/c15_disc_capsule_fall.rs:32:28 [INFO] [stdout] | [INFO] [stdout] 32 | fn constructive_crt(input: &Vec<(i64, i64)>) -> i64 { [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] 32 - fn constructive_crt(input: &Vec<(i64, i64)>) -> i64 { [INFO] [stdout] 32 + fn constructive_crt(input: &[(i64, i64)]) -> i64 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/y2016/c16_dragon_curve_fill.rs:21:18 [INFO] [stdout] | [INFO] [stdout] 21 | .map(|c| if c[0] == c[1] { true } else { false }) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can reduce it to: `c[0] == c[1]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] = note: `#[warn(clippy::needless_bool)]` 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/y2016/c16_dragon_curve_fill.rs:26:25 [INFO] [stdout] | [INFO] [stdout] 26 | fn bits_to_string(bits: &Vec) -> String { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 26 - fn bits_to_string(bits: &Vec) -> String { [INFO] [stdout] 26 + fn bits_to_string(bits: &[bool]) -> String { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/y2016/c16_dragon_curve_fill.rs:32:25 [INFO] [stdout] | [INFO] [stdout] 32 | fn calc_checksum(input: &Vec, size: usize) -> 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] 32 ~ fn calc_checksum(input: &[bool], size: usize) -> Vec { [INFO] [stdout] 33 ~ let mut input = input.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/y2016/c16_dragon_curve_fill.rs:41:11 [INFO] [stdout] | [INFO] [stdout] 41 | while input.len() % 2 == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace with: `input.len().is_multiple_of(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/y2016/c16_dragon_curve_fill.rs:49:46 [INFO] [stdout] | [INFO] [stdout] 49 | let input: Vec = input.chars().map(|c| parse_bit(c)).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `parse_bit` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/y2016/c17_hash_door_locks.rs:65:38 [INFO] [stdout] | [INFO] [stdout] 65 | let available_doors = open_doors(&path); [INFO] [stdout] | ^^^^^ help: change this to: `path` [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: equality checks against false can be replaced by a negation [INFO] [stdout] --> src/y2016/c17_hash_door_locks.rs:69:12 [INFO] [stdout] | [INFO] [stdout] 69 | if b == false { [INFO] [stdout] | ^^^^^^^^^^ help: try: `!b` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/y2016/c18_generating_traps.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | / (left && center && !right) [INFO] [stdout] 3 | | || (!left && center && right) [INFO] [stdout] | |_____________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 2 - (left && center && !right) [INFO] [stdout] 3 - || (!left && center && right) [INFO] [stdout] 2 + !(!center || left && right || !left && !right) [INFO] [stdout] | [INFO] [stdout] 2 - (left && center && !right) [INFO] [stdout] 3 - || (!left && center && right) [INFO] [stdout] 2 + (right || left) && (!right || !left) && center [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/y2016/c18_generating_traps.rs:37:18 [INFO] [stdout] | [INFO] [stdout] 37 | .map(|c| if c == '^' { true } else { false }) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can reduce it to: `c == '^'` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `LEFT` contains a capitalized acronym [INFO] [stdout] --> src/y2016/c1_taxi_driving.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | LEFT, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Left` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `RIGHT` contains a capitalized acronym [INFO] [stdout] --> src/y2016/c1_taxi_driving.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | RIGHT, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Right` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/y2016/c1_taxi_driving.rs:44:24 [INFO] [stdout] | [INFO] [stdout] 44 | fn track_travel(items: &Vec<(Turn, i32)>) -> IVec2 { [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] 44 - fn track_travel(items: &Vec<(Turn, i32)>) -> IVec2 { [INFO] [stdout] 44 + fn track_travel(items: &[(Turn, i32)]) -> IVec2 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/y2016/c1_taxi_driving.rs:58:13 [INFO] [stdout] | [INFO] [stdout] 58 | position = position + direction; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `position += direction` [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: equality checks against false can be replaced by a negation [INFO] [stdout] --> src/y2016/c1_taxi_driving.rs:61:16 [INFO] [stdout] | [INFO] [stdout] 61 | if success == false { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `!success` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> src/y2016/c21_scramble_password.rs:59:5 [INFO] [stdout] | [INFO] [stdout] 59 | / match instruction { [INFO] [stdout] 60 | | &Instruction::MovePosition(from, to) => { [INFO] [stdout] 61 | | let v = vec.remove(from); [INFO] [stdout] 62 | | vec.insert(to, v); [INFO] [stdout] ... | [INFO] [stdout] 82 | | &Instruction::SwapPosition(a, b) => vec.swap(a, b), [INFO] [stdout] 83 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 59 ~ match *instruction { [INFO] [stdout] 60 ~ Instruction::MovePosition(from, to) => { [INFO] [stdout] 61 | let v = vec.remove(from); [INFO] [stdout] 62 | vec.insert(to, v); [INFO] [stdout] 63 | } [INFO] [stdout] 64 ~ Instruction::ReversePositions(start, end) => { [INFO] [stdout] 65 | vec[start..=end].reverse(); [INFO] [stdout] 66 | } [INFO] [stdout] 67 ~ Instruction::RotateBasedOnLetter(a) => { [INFO] [stdout] 68 | let pos = vec.iter().position(|&c| c == a).unwrap(); [INFO] [stdout] ... [INFO] [stdout] 74 | } [INFO] [stdout] 75 ~ Instruction::RotateLeft(s) => vec.rotate_left(s), [INFO] [stdout] 76 ~ Instruction::RotateRight(s) => vec.rotate_right(s), [INFO] [stdout] 77 ~ Instruction::SwapLetter(a, b) => { [INFO] [stdout] 78 | let pos1 = vec.iter().position(|&c| c == a).unwrap(); [INFO] [stdout] ... [INFO] [stdout] 81 | } [INFO] [stdout] 82 ~ Instruction::SwapPosition(a, b) => vec.swap(a, b), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> src/y2016/c21_scramble_password.rs:114:5 [INFO] [stdout] | [INFO] [stdout] 114 | / match instruction { [INFO] [stdout] 115 | | &Instruction::MovePosition(from, to) => { [INFO] [stdout] 116 | | let v = vec.remove(to); [INFO] [stdout] 117 | | vec.insert(from, v); [INFO] [stdout] ... | [INFO] [stdout] 132 | | &Instruction::SwapPosition(a, b) => vec.swap(a, b), [INFO] [stdout] 133 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 114 ~ match *instruction { [INFO] [stdout] 115 ~ Instruction::MovePosition(from, to) => { [INFO] [stdout] 116 | let v = vec.remove(to); [INFO] [stdout] 117 | vec.insert(from, v); [INFO] [stdout] 118 | } [INFO] [stdout] 119 ~ Instruction::ReversePositions(start, end) => { [INFO] [stdout] 120 | vec[start..=end].reverse(); [INFO] [stdout] 121 | } [INFO] [stdout] 122 ~ Instruction::RotateBasedOnLetter(a) => { [INFO] [stdout] 123 | return invert_rotate_based_on_letter(vec, a); [INFO] [stdout] 124 | } [INFO] [stdout] 125 ~ Instruction::RotateLeft(s) => vec.rotate_right(s), [INFO] [stdout] 126 ~ Instruction::RotateRight(s) => vec.rotate_left(s), [INFO] [stdout] 127 ~ Instruction::SwapLetter(a, b) => { [INFO] [stdout] 128 | let pos1 = vec.iter().position(|&c| c == a).unwrap(); [INFO] [stdout] ... [INFO] [stdout] 131 | } [INFO] [stdout] 132 ~ Instruction::SwapPosition(a, b) => vec.swap(a, b), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/y2016/c22_filesystem_storage.rs:75:55 [INFO] [stdout] | [INFO] [stdout] 75 | if !std::ptr::eq(a, b) && viable_transfer(&a, &b) { [INFO] [stdout] | ^^ help: change this to: `a` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/y2016/c22_filesystem_storage.rs:75:59 [INFO] [stdout] | [INFO] [stdout] 75 | if !std::ptr::eq(a, b) && viable_transfer(&a, &b) { [INFO] [stdout] | ^^ help: change this to: `b` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/y2016/c23_cracking_safe.rs:3:20 [INFO] [stdout] | [INFO] [stdout] 3 | fn run_seven(code: &Vec) -> i64 { [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] 3 ~ fn run_seven(code: &[assembunny::Instruction]) -> i64 { [INFO] [stdout] 4 | let mut vm = assembunny::VirtualMachine::default(); [INFO] [stdout] 5 | *vm.get_register_mut('a') = 7; [INFO] [stdout] 6 ~ vm.run(&mut code.to_owned()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/y2016/c23_cracking_safe.rs:10:21 [INFO] [stdout] | [INFO] [stdout] 10 | fn run_twelve(code: &Vec) -> i64 { [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] 10 ~ fn run_twelve(code: &[assembunny::Instruction]) -> i64 { [INFO] [stdout] 11 | let mut vm = assembunny::VirtualMachine::default(); [INFO] [stdout] 12 | *vm.get_register_mut('a') = 12; [INFO] [stdout] 13 ~ vm.run(&mut code.to_owned()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/y2016/c2_code_walk.rs:22:17 [INFO] [stdout] | [INFO] [stdout] 22 | fn part1(items: &Vec>) -> i64 { [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] 22 - fn part1(items: &Vec>) -> i64 { [INFO] [stdout] 22 + fn part1(items: &[Vec]) -> i64 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/y2016/c2_code_walk.rs:28:13 [INFO] [stdout] | [INFO] [stdout] 28 | current = current + *dir; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `current += *dir` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/y2016/c2_code_walk.rs:40:17 [INFO] [stdout] | [INFO] [stdout] 40 | fn part2(items: &Vec>) -> String { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 40 - fn part2(items: &Vec>) -> String { [INFO] [stdout] 40 + fn part2(items: &[Vec]) -> String { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/y2016/c3_triangle_check.rs:13:34 [INFO] [stdout] | [INFO] [stdout] 13 | fn transform_vertical(triangles: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 13 - fn transform_vertical(triangles: &Vec) -> Vec { [INFO] [stdout] 13 + fn transform_vertical(triangles: &[Triangle]) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/y2016/c3_triangle_check.rs:14:13 [INFO] [stdout] | [INFO] [stdout] 14 | assert!(triangles.len() % 3 == 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `triangles.len().is_multiple_of(3)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `[i64; 3]` which implements the `Copy` trait [INFO] [stdout] --> src/y2016/c3_triangle_check.rs:35:17 [INFO] [stdout] | [INFO] [stdout] 35 | let mut t = triangle.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try dereferencing it: `*triangle` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/y2016/c4_room_checksums.rs:73:8 [INFO] [stdout] | [INFO] [stdout] 73 | if c >= 'a' && c <= 'z' { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: use: `('a'..='z').contains(&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] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/y2016/c4_room_checksums.rs:98:22 [INFO] [stdout] | [INFO] [stdout] 98 | if eval_room(&room) { [INFO] [stdout] | ^^^^^ help: change this to: `room` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is only used to index `contents` [INFO] [stdout] --> src/y2016/c6_jumbled_message.rs:18:18 [INFO] [stdout] | [INFO] [stdout] 18 | for j in 0..contents.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 18 - for j in 0..contents.len() { [INFO] [stdout] 18 + for in &contents { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used consecutive `str::replace` call [INFO] [stdout] --> src/y2016/c7_ipv7_check.rs:24:14 [INFO] [stdout] | [INFO] [stdout] 24 | .replace('[', " ") [INFO] [stdout] | ______________^ [INFO] [stdout] 25 | | .replace(']', " ") [INFO] [stdout] | |______________________________^ help: replace with: `replace(['[', ']'], " ")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_str_replace [INFO] [stdout] = note: `#[warn(clippy::collapsible_str_replace)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> src/y2016/c8_screen_code.rs:70:5 [INFO] [stdout] | [INFO] [stdout] 70 | / match ins { [INFO] [stdout] 71 | | &Instruction::Rect { x, y } => { [INFO] [stdout] 72 | | if state.x < x && state.y < y { [INFO] [stdout] 73 | | State { [INFO] [stdout] ... | [INFO] [stdout] 104 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 70 ~ match *ins { [INFO] [stdout] 71 ~ Instruction::Rect { x, y } => { [INFO] [stdout] 72 | if state.x < x && state.y < y { [INFO] [stdout] ... [INFO] [stdout] 81 | } [INFO] [stdout] 82 ~ Instruction::ShiftColumn { col, amount } => { [INFO] [stdout] 83 | if state.x == col { [INFO] [stdout] ... [INFO] [stdout] 92 | } [INFO] [stdout] 93 ~ Instruction::ShiftRow { row, amount } => { [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/y2016/c8_screen_code.rs:107:30 [INFO] [stdout] | [INFO] [stdout] 107 | fn print_2d_bool_array(data: &Vec, width: usize) { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 107 - fn print_2d_bool_array(data: &Vec, width: usize) { [INFO] [stdout] 107 + fn print_2d_bool_array(data: &[bool], width: usize) { [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/y2022/c5_move_crates.rs:48:19 [INFO] [stdout] | [INFO] [stdout] 48 | fn get_top(state: &Vec>) -> String { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 48 - fn get_top(state: &Vec>) -> String { [INFO] [stdout] 48 + fn get_top(state: &[VecDeque]) -> String { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/y2022/c5_move_crates.rs:92:33 [INFO] [stdout] | [INFO] [stdout] 92 | .map(|s| parse_commands(*s).unwrap()) [INFO] [stdout] | ^^ help: try: `s` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] = note: `#[warn(clippy::explicit_auto_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/y2022/c6_signal_fix.rs:24:19 [INFO] [stdout] | [INFO] [stdout] 24 | .position(|slice| all_unique(slice)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `all_unique` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/y2022/c6_signal_fix.rs:31:19 [INFO] [stdout] | [INFO] [stdout] 31 | .position(|slice| all_unique(slice)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `all_unique` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `skip(..).next()` on an iterator [INFO] [stdout] --> src/y2022/c7_filesystem.rs:58:44 [INFO] [stdout] | [INFO] [stdout] 58 | Command::Cd(s.trim().split(' ').skip(1).next().unwrap().to_string()) [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: use `nth` instead: `.nth(1)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_skip_next [INFO] [stdout] = note: `#[warn(clippy::iter_skip_next)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/y2022/c7_filesystem.rs:153:43 [INFO] [stdout] | [INFO] [stdout] 153 | let mut visitor = |node: &Node| match node.deref() { [INFO] [stdout] | ___________________________________________^ [INFO] [stdout] 154 | | Item::Directory(name) => directories.push((name.clone(), directory_size(node))), [INFO] [stdout] 155 | | _ => {} [INFO] [stdout] 156 | | }; [INFO] [stdout] | |_____^ help: try: `if let Item::Directory(name) = node.deref() { directories.push((name.clone(), directory_size(node))) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statement with no effect [INFO] [stdout] --> src/y2022/c8_count_trees.rs:15:9 [INFO] [stdout] | [INFO] [stdout] 15 | true; [INFO] [stdout] | -^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: did you mean to return it?: `return` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect [INFO] [stdout] = note: `#[warn(clippy::no_effect)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `.map(...).any(identity)` [INFO] [stdout] --> src/y2022/c8_count_trees.rs:89:18 [INFO] [stdout] | [INFO] [stdout] 89 | .map(|d| traverse_direction(&grid, current, d.clone(), source)) [INFO] [stdout] | __________________^ [INFO] [stdout] 90 | | .any(|b| b); [INFO] [stdout] | |___________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_all_any_identity [INFO] [stdout] = note: `#[warn(clippy::map_all_any_identity)]` on by default [INFO] [stdout] help: use `.any(...)` instead [INFO] [stdout] | [INFO] [stdout] 89 - .map(|d| traverse_direction(&grid, current, d.clone(), source)) [INFO] [stdout] 90 - .any(|b| b); [INFO] [stdout] 89 + .any(|d| traverse_direction(&grid, current, d.clone(), source)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Matrix, Const<1>, ArrayStorage>` which implements the `Copy` trait [INFO] [stdout] --> src/y2022/c8_count_trees.rs:89:61 [INFO] [stdout] | [INFO] [stdout] 89 | .map(|d| traverse_direction(&grid, current, d.clone(), source)) [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*d` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Matrix, Const<1>, ArrayStorage>` which implements the `Copy` trait [INFO] [stdout] --> src/y2022/c8_count_trees.rs:93:61 [INFO] [stdout] | [INFO] [stdout] 93 | let score = score_direction(&grid, current, d.clone(), source); [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*d` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Matrix, Const<1>, ArrayStorage>` which implements the `Copy` trait [INFO] [stdout] --> src/y2022/c9_rope_follow.rs:35:24 [INFO] [stdout] | [INFO] [stdout] 35 | return tail.clone(); [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*tail` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Matrix, Const<1>, ArrayStorage>` which implements the `Copy` trait [INFO] [stdout] --> src/y2022/c9_rope_follow.rs:79:28 [INFO] [stdout] | [INFO] [stdout] 79 | hashset.insert(tail.clone()); [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `tail` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Matrix, Const<1>, ArrayStorage>` which implements the `Copy` trait [INFO] [stdout] --> src/y2022/c9_rope_follow.rs:105:28 [INFO] [stdout] | [INFO] [stdout] 105 | hashset.insert(rope.last().unwrap().clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*rope.last().unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `c` is used to index `coeficients` [INFO] [stdout] --> src/y2025/c10.rs:85:18 [INFO] [stdout] | [INFO] [stdout] 85 | for c in 0..coeficients.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 85 - for c in 0..coeficients.len() { [INFO] [stdout] 85 + for (c, ) in coeficients.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `target` [INFO] [stdout] --> src/y2025/c10.rs:89:14 [INFO] [stdout] | [INFO] [stdout] 89 | for i in 0..target.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 89 - for i in 0..target.len() { [INFO] [stdout] 89 + for (i, ) in target.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `col` is used to index `vars` [INFO] [stdout] --> src/y2025/c10.rs:152:24 [INFO] [stdout] | [INFO] [stdout] 152 | for col in (pivot_col + 1)..n { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 152 - for col in (pivot_col + 1)..n { [INFO] [stdout] 152 + for (col, ) in vars.iter().enumerate().take(n).skip((pivot_col + 1)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `col` is used to index `vars` [INFO] [stdout] --> src/y2025/c10.rs:273:24 [INFO] [stdout] | [INFO] [stdout] 273 | for col in (pivot_col + 1)..n { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 273 - for col in (pivot_col + 1)..n { [INFO] [stdout] 273 + for (col, ) in vars.iter().enumerate().take(n).skip((pivot_col + 1)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is used to index `sol` [INFO] [stdout] --> src/y2025/c10.rs:373:18 [INFO] [stdout] | [INFO] [stdout] 373 | for j in 0..n { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 373 - for j in 0..n { [INFO] [stdout] 373 + for (j, ) in sol.iter().enumerate().take(n) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/y2025/c11.rs:79:5 [INFO] [stdout] | [INFO] [stdout] 79 | return 0; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 79 - return 0; [INFO] [stdout] 79 + 0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/y2025/c11.rs:74:39 [INFO] [stdout] | [INFO] [stdout] 74 | count += count_paths(map, &edge, target); [INFO] [stdout] | ^^^^^ help: change this to: `edge` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/y2025/c11.rs:110:5 [INFO] [stdout] | [INFO] [stdout] 110 | return 0; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 110 - return 0; [INFO] [stdout] 110 + 0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/y2025/c11.rs:105:47 [INFO] [stdout] | [INFO] [stdout] 105 | count += count_paths_fft_dac(map, &edge, target, reached); [INFO] [stdout] | ^^^^^ help: change this to: `edge` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/y2025/c11.rs:146:5 [INFO] [stdout] | [INFO] [stdout] 145 | let result = count_paths_inner(&mut memo, map, start, target); [INFO] [stdout] | -------------------------------------------------------------- unnecessary `let` binding [INFO] [stdout] 146 | result [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 145 ~ [INFO] [stdout] 146 ~ count_paths_inner(&mut memo, map, start, target) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/y2025/c11.rs:141:9 [INFO] [stdout] | [INFO] [stdout] 141 | return 0; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 141 - return 0; [INFO] [stdout] 141 + 0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/y2025/c11.rs:131:62 [INFO] [stdout] | [INFO] [stdout] 131 | let value = count_paths_inner(memo, map, &edge, target); [INFO] [stdout] | ^^^^^ help: change this to: `edge` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/y2025/c12.rs:113:13 [INFO] [stdout] | [INFO] [stdout] 113 | / if *box_v.get(by, bx).unwrap() { [INFO] [stdout] 114 | | if *grid.get(y + by, x + bx).unwrap() { [INFO] [stdout] 115 | | return false; [INFO] [stdout] 116 | | } [INFO] [stdout] 117 | | } [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] 113 ~ if *box_v.get(by, bx).unwrap() [INFO] [stdout] 114 ~ && *grid.get(y + by, x + bx).unwrap() { [INFO] [stdout] 115 | return false; [INFO] [stdout] 116 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/y2025/c2.rs:15:8 [INFO] [stdout] | [INFO] [stdout] 15 | if s.len() % 2 != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace with: `!s.len().is_multiple_of(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/y2025/c2.rs:40:5 [INFO] [stdout] | [INFO] [stdout] 40 | assert_eq!(eval_number(11), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_assert_comparison)]` on by default [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 40 - assert_eq!(eval_number(11), true); [INFO] [stdout] 40 + assert!(eval_number(11)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::ops::RangeInclusive` [INFO] [stdout] --> src/y2025/c2.rs:59:19 [INFO] [stdout] | [INFO] [stdout] 59 | let sum = (a..=b) [INFO] [stdout] | ___________________^ [INFO] [stdout] 60 | | .into_iter() [INFO] [stdout] | |________________________^ help: consider removing `.into_iter()`: `(a..=b)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::ops::RangeInclusive` [INFO] [stdout] --> src/y2025/c2.rs:65:19 [INFO] [stdout] | [INFO] [stdout] 65 | let sum = (a..=b) [INFO] [stdout] | ___________________^ [INFO] [stdout] 66 | | .into_iter() [INFO] [stdout] | |________________________^ help: consider removing `.into_iter()`: `(a..=b)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/y2025/c3.rs:15:32 [INFO] [stdout] | [INFO] [stdout] 15 | for (_, d) in digits.iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_enumerate_index [INFO] [stdout] = note: `#[warn(clippy::unused_enumerate_index)]` on by default [INFO] [stdout] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 15 - for (_, d) in digits.iter().enumerate() { [INFO] [stdout] 15 + for d in digits.iter() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/y2025/c4.rs:22:28 [INFO] [stdout] | [INFO] [stdout] 22 | if x >= width || x < 0 { [INFO] [stdout] | ____________________________^ [INFO] [stdout] 23 | | None [INFO] [stdout] 24 | | } else if y >= height || y < 0 { [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/y2025/c4.rs:24:36 [INFO] [stdout] | [INFO] [stdout] 24 | } else if y >= height || y < 0 { [INFO] [stdout] | ____________________________________^ [INFO] [stdout] 25 | | None [INFO] [stdout] 26 | | } else { [INFO] [stdout] | |_____^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/y2025/c5.rs:16:5 [INFO] [stdout] | [INFO] [stdout] 16 | 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] 16 - return false; [INFO] [stdout] 16 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/y2025/c5.rs:28:47 [INFO] [stdout] | [INFO] [stdout] 28 | fn find_overlap(set: &HashSet<(i64, i64)>) -> Option<((i64, i64), (i64, i64), (i64, i64))> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/y2025/c5.rs:39:5 [INFO] [stdout] | [INFO] [stdout] 39 | return None; [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] 39 - return None; [INFO] [stdout] 39 + None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/y2025/c5.rs:31:16 [INFO] [stdout] | [INFO] [stdout] 31 | if &a == &b { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] = note: `#[warn(clippy::op_ref)]` on by default [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 31 - if &a == &b { [INFO] [stdout] 31 + if a == b { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/y2025/c5.rs:52:30 [INFO] [stdout] | [INFO] [stdout] 52 | .map(|s| parse_range(*s)) [INFO] [stdout] | ^^ help: try: `s` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `ADD` contains a capitalized acronym [INFO] [stdout] --> src/y2025/c6.rs:13:5 [INFO] [stdout] | [INFO] [stdout] 13 | ADD, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Add` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `MUL` contains a capitalized acronym [INFO] [stdout] --> src/y2025/c6.rs:14:5 [INFO] [stdout] | [INFO] [stdout] 14 | MUL, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Mul` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/y2025/c6.rs:39:49 [INFO] [stdout] | [INFO] [stdout] 39 | .map(|s| parsing::parse_all_numbers(*s)) [INFO] [stdout] | ^^ help: try: `s` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> src/y2025/c6.rs:70:18 [INFO] [stdout] | [INFO] [stdout] 70 | .zip(problem_sizes.into_iter()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()` [INFO] [stdout] --> /rustc/91021ccc790478a1a89c003e7d32b8d155ae6aae/library/core/src/iter/traits/iterator.rs:629:11 [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] help: consider removing the `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 70 - .zip(problem_sizes.into_iter()) [INFO] [stdout] 70 + .zip(problem_sizes) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/y2025/c6.rs:79:24 [INFO] [stdout] | [INFO] [stdout] 79 | if char.is_digit(10) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `char.is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] = note: `#[warn(clippy::is_digit_ascii_radix)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/y2025/c8.rs:43:5 [INFO] [stdout] | [INFO] [stdout] 42 | let distance = nalgebra::distance(&p1, &p2); [INFO] [stdout] | -------------------------------------------- unnecessary `let` binding [INFO] [stdout] 43 | distance [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 42 ~ [INFO] [stdout] 43 ~ nalgebra::distance(&p1, &p2) [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/y2025/c8.rs:47:13 [INFO] [stdout] | [INFO] [stdout] 47 | coords: &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] 47 - coords: &Vec, [INFO] [stdout] 47 + coords: &[IVec3], [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/y2025/c8.rs:48:16 [INFO] [stdout] | [INFO] [stdout] 48 | distances: &Vec<(f32, usize, usize)>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 48 - distances: &Vec<(f32, usize, usize)>, [INFO] [stdout] 48 + distances: &[(f32, usize, usize)], [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/y2025/c8.rs:87:28 [INFO] [stdout] | [INFO] [stdout] 87 | fn last_connection(coords: &Vec, distances: &Vec<(f32, usize, usize)>) -> (IVec3, IVec3) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 87 - fn last_connection(coords: &Vec, distances: &Vec<(f32, usize, usize)>) -> (IVec3, IVec3) { [INFO] [stdout] 87 + fn last_connection(coords: &[IVec3], distances: &Vec<(f32, usize, usize)>) -> (IVec3, IVec3) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Some` variant of the iterator element is used [INFO] [stdout] --> src/y2025/c8.rs:165:9 [INFO] [stdout] | [INFO] [stdout] 165 | / for v in &circuit_numbers { [INFO] [stdout] 166 | | if let Some(v) = v { [INFO] [stdout] 167 | | counts[*v] += 1 [INFO] [stdout] 168 | | } [INFO] [stdout] 169 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/y2025/c8.rs:166:13 [INFO] [stdout] | [INFO] [stdout] 166 | / if let Some(v) = v { [INFO] [stdout] 167 | | counts[*v] += 1 [INFO] [stdout] 168 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] = note: `#[warn(clippy::manual_flatten)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 165 ~ for v in circuit_numbers.iter().flatten() { [INFO] [stdout] 166 + counts[*v] += 1 [INFO] [stdout] 167 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/y2025/c9.rs:38:39 [INFO] [stdout] | [INFO] [stdout] 38 | fn polygon_lines(coords: &[IVec2]) -> (Vec<(IVec2, IVec2)>, Vec<(IVec2, IVec2)>) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/y2025/c9.rs:52:9 [INFO] [stdout] | [INFO] [stdout] 52 | b.sort_by(|p1, p2| p1.0.y.cmp(&p2.0.y)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] = note: `#[warn(clippy::unnecessary_sort_by)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 52 - b.sort_by(|p1, p2| p1.0.y.cmp(&p2.0.y)); [INFO] [stdout] 52 + b.sort_by_key(|p1| p1.0.y); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/y2025/c9.rs:53:9 [INFO] [stdout] | [INFO] [stdout] 53 | a.sort_by(|p1, p2| p1.0.x.cmp(&p2.0.x)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 53 - a.sort_by(|p1, p2| p1.0.x.cmp(&p2.0.x)); [INFO] [stdout] 53 + a.sort_by_key(|p1| p1.0.x); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/y2025/c9.rs:56:9 [INFO] [stdout] | [INFO] [stdout] 56 | a.sort_by(|p1, p2| p1.0.y.cmp(&p2.0.y)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 56 - a.sort_by(|p1, p2| p1.0.y.cmp(&p2.0.y)); [INFO] [stdout] 56 + a.sort_by_key(|p1| p1.0.y); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/y2025/c9.rs:57:9 [INFO] [stdout] | [INFO] [stdout] 57 | b.sort_by(|p1, p2| p1.0.x.cmp(&p2.0.x)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 57 - b.sort_by(|p1, p2| p1.0.x.cmp(&p2.0.x)); [INFO] [stdout] 57 + b.sort_by_key(|p1| p1.0.x); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` branch is empty [INFO] [stdout] --> src/y2025/c9.rs:99:13 [INFO] [stdout] | [INFO] [stdout] 99 | if parity % 2 == 1 {} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: you can remove it [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_ifs [INFO] [stdout] = note: `#[warn(clippy::needless_ifs)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/y2022/c9_rope_follow.rs:57:5 [INFO] [stdout] | [INFO] [stdout] 57 | vec![dir].repeat(count.trim().parse().unwrap()) [INFO] [stdout] | ^^^^^^^^^ help: you can use an array directly: `[dir]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/y2022/c9_rope_follow.rs:89:24 [INFO] [stdout] | [INFO] [stdout] 89 | let mut rope = vec![IVec2::default()].repeat(9); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[IVec2::default()]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `prev_pivot` is assigned to, but never used [INFO] [stdout] --> src/y2025/c10.rs:215:9 [INFO] [stdout] | [INFO] [stdout] 215 | let mut prev_pivot = 1; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: consider using `_prev_pivot` instead [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `prev_pivot` is never read [INFO] [stdout] --> src/y2025/c10.rs:243:9 [INFO] [stdout] | [INFO] [stdout] 243 | prev_pivot = pivot_val; [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: `inverted` [INFO] [stdout] --> src/y2025/c11.rs:153:9 [INFO] [stdout] | [INFO] [stdout] 153 | let inverted = inverted_graph(&map); [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_inverted` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/y2025/c12.rs:206:9 [INFO] [stdout] | [INFO] [stdout] 206 | let mut answer2 = 0; [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: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/utility/assembunny.rs:57:33 [INFO] [stdout] | [INFO] [stdout] 57 | pub fn run(&mut self, code: &mut Vec) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 57 - pub fn run(&mut self, code: &mut Vec) -> Option { [INFO] [stdout] 57 + pub fn run(&mut self, code: &mut [Instruction]) -> Option { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> src/y2016/c11_generator_elevators.rs:118:17 [INFO] [stdout] | [INFO] [stdout] 118 | / match item { [INFO] [stdout] 119 | | &Item::Chip(i) => new_state.items[i].0 = new_floor, [INFO] [stdout] 120 | | &Item::Gen(i) => new_state.items[i].1 = new_floor, [INFO] [stdout] 121 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] = note: `#[warn(clippy::match_ref_pats)]` on by default [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 118 ~ match *item { [INFO] [stdout] 119 ~ Item::Chip(i) => new_state.items[i].0 = new_floor, [INFO] [stdout] 120 ~ Item::Gen(i) => new_state.items[i].1 = new_floor, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/y2016/c13_generate_maze.rs:13:9 [INFO] [stdout] | [INFO] [stdout] 13 | (num as u32).count_ones() % 2 == 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `(num as u32).count_ones().is_multiple_of(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/y2016/c15_disc_capsule_fall.rs:32:28 [INFO] [stdout] | [INFO] [stdout] 32 | fn constructive_crt(input: &Vec<(i64, i64)>) -> i64 { [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] 32 - fn constructive_crt(input: &Vec<(i64, i64)>) -> i64 { [INFO] [stdout] 32 + fn constructive_crt(input: &[(i64, i64)]) -> i64 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/y2016/c16_dragon_curve_fill.rs:21:18 [INFO] [stdout] | [INFO] [stdout] 21 | .map(|c| if c[0] == c[1] { true } else { false }) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can reduce it to: `c[0] == c[1]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] = note: `#[warn(clippy::needless_bool)]` 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/y2016/c16_dragon_curve_fill.rs:26:25 [INFO] [stdout] | [INFO] [stdout] 26 | fn bits_to_string(bits: &Vec) -> String { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 26 - fn bits_to_string(bits: &Vec) -> String { [INFO] [stdout] 26 + fn bits_to_string(bits: &[bool]) -> String { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/y2016/c16_dragon_curve_fill.rs:32:25 [INFO] [stdout] | [INFO] [stdout] 32 | fn calc_checksum(input: &Vec, size: usize) -> 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] 32 ~ fn calc_checksum(input: &[bool], size: usize) -> Vec { [INFO] [stdout] 33 ~ let mut input = input.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/y2016/c16_dragon_curve_fill.rs:41:11 [INFO] [stdout] | [INFO] [stdout] 41 | while input.len() % 2 == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace with: `input.len().is_multiple_of(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/y2016/c16_dragon_curve_fill.rs:49:46 [INFO] [stdout] | [INFO] [stdout] 49 | let input: Vec = input.chars().map(|c| parse_bit(c)).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `parse_bit` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/y2016/c17_hash_door_locks.rs:65:38 [INFO] [stdout] | [INFO] [stdout] 65 | let available_doors = open_doors(&path); [INFO] [stdout] | ^^^^^ help: change this to: `path` [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: equality checks against false can be replaced by a negation [INFO] [stdout] --> src/y2016/c17_hash_door_locks.rs:69:12 [INFO] [stdout] | [INFO] [stdout] 69 | if b == false { [INFO] [stdout] | ^^^^^^^^^^ help: try: `!b` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/y2016/c18_generating_traps.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | / (left && center && !right) [INFO] [stdout] 3 | | || (!left && center && right) [INFO] [stdout] | |_____________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 2 - (left && center && !right) [INFO] [stdout] 3 - || (!left && center && right) [INFO] [stdout] 2 + !(!center || left && right || !left && !right) [INFO] [stdout] | [INFO] [stdout] 2 - (left && center && !right) [INFO] [stdout] 3 - || (!left && center && right) [INFO] [stdout] 2 + (right || left) && (!right || !left) && center [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/y2016/c18_generating_traps.rs:37:18 [INFO] [stdout] | [INFO] [stdout] 37 | .map(|c| if c == '^' { true } else { false }) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can reduce it to: `c == '^'` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `LEFT` contains a capitalized acronym [INFO] [stdout] --> src/y2016/c1_taxi_driving.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | LEFT, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Left` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `RIGHT` contains a capitalized acronym [INFO] [stdout] --> src/y2016/c1_taxi_driving.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | RIGHT, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Right` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/y2016/c1_taxi_driving.rs:44:24 [INFO] [stdout] | [INFO] [stdout] 44 | fn track_travel(items: &Vec<(Turn, i32)>) -> IVec2 { [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] 44 - fn track_travel(items: &Vec<(Turn, i32)>) -> IVec2 { [INFO] [stdout] 44 + fn track_travel(items: &[(Turn, i32)]) -> IVec2 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/y2016/c1_taxi_driving.rs:58:13 [INFO] [stdout] | [INFO] [stdout] 58 | position = position + direction; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `position += direction` [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: equality checks against false can be replaced by a negation [INFO] [stdout] --> src/y2016/c1_taxi_driving.rs:61:16 [INFO] [stdout] | [INFO] [stdout] 61 | if success == false { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `!success` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> src/y2016/c21_scramble_password.rs:59:5 [INFO] [stdout] | [INFO] [stdout] 59 | / match instruction { [INFO] [stdout] 60 | | &Instruction::MovePosition(from, to) => { [INFO] [stdout] 61 | | let v = vec.remove(from); [INFO] [stdout] 62 | | vec.insert(to, v); [INFO] [stdout] ... | [INFO] [stdout] 82 | | &Instruction::SwapPosition(a, b) => vec.swap(a, b), [INFO] [stdout] 83 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 59 ~ match *instruction { [INFO] [stdout] 60 ~ Instruction::MovePosition(from, to) => { [INFO] [stdout] 61 | let v = vec.remove(from); [INFO] [stdout] 62 | vec.insert(to, v); [INFO] [stdout] 63 | } [INFO] [stdout] 64 ~ Instruction::ReversePositions(start, end) => { [INFO] [stdout] 65 | vec[start..=end].reverse(); [INFO] [stdout] 66 | } [INFO] [stdout] 67 ~ Instruction::RotateBasedOnLetter(a) => { [INFO] [stdout] 68 | let pos = vec.iter().position(|&c| c == a).unwrap(); [INFO] [stdout] ... [INFO] [stdout] 74 | } [INFO] [stdout] 75 ~ Instruction::RotateLeft(s) => vec.rotate_left(s), [INFO] [stdout] 76 ~ Instruction::RotateRight(s) => vec.rotate_right(s), [INFO] [stdout] 77 ~ Instruction::SwapLetter(a, b) => { [INFO] [stdout] 78 | let pos1 = vec.iter().position(|&c| c == a).unwrap(); [INFO] [stdout] ... [INFO] [stdout] 81 | } [INFO] [stdout] 82 ~ Instruction::SwapPosition(a, b) => vec.swap(a, b), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> src/y2016/c21_scramble_password.rs:114:5 [INFO] [stdout] | [INFO] [stdout] 114 | / match instruction { [INFO] [stdout] 115 | | &Instruction::MovePosition(from, to) => { [INFO] [stdout] 116 | | let v = vec.remove(to); [INFO] [stdout] 117 | | vec.insert(from, v); [INFO] [stdout] ... | [INFO] [stdout] 132 | | &Instruction::SwapPosition(a, b) => vec.swap(a, b), [INFO] [stdout] 133 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 114 ~ match *instruction { [INFO] [stdout] 115 ~ Instruction::MovePosition(from, to) => { [INFO] [stdout] 116 | let v = vec.remove(to); [INFO] [stdout] 117 | vec.insert(from, v); [INFO] [stdout] 118 | } [INFO] [stdout] 119 ~ Instruction::ReversePositions(start, end) => { [INFO] [stdout] 120 | vec[start..=end].reverse(); [INFO] [stdout] 121 | } [INFO] [stdout] 122 ~ Instruction::RotateBasedOnLetter(a) => { [INFO] [stdout] 123 | return invert_rotate_based_on_letter(vec, a); [INFO] [stdout] 124 | } [INFO] [stdout] 125 ~ Instruction::RotateLeft(s) => vec.rotate_right(s), [INFO] [stdout] 126 ~ Instruction::RotateRight(s) => vec.rotate_left(s), [INFO] [stdout] 127 ~ Instruction::SwapLetter(a, b) => { [INFO] [stdout] 128 | let pos1 = vec.iter().position(|&c| c == a).unwrap(); [INFO] [stdout] ... [INFO] [stdout] 131 | } [INFO] [stdout] 132 ~ Instruction::SwapPosition(a, b) => vec.swap(a, b), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/y2016/c22_filesystem_storage.rs:75:55 [INFO] [stdout] | [INFO] [stdout] 75 | if !std::ptr::eq(a, b) && viable_transfer(&a, &b) { [INFO] [stdout] | ^^ help: change this to: `a` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/y2016/c22_filesystem_storage.rs:75:59 [INFO] [stdout] | [INFO] [stdout] 75 | if !std::ptr::eq(a, b) && viable_transfer(&a, &b) { [INFO] [stdout] | ^^ help: change this to: `b` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/y2016/c23_cracking_safe.rs:3:20 [INFO] [stdout] | [INFO] [stdout] 3 | fn run_seven(code: &Vec) -> i64 { [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] 3 ~ fn run_seven(code: &[assembunny::Instruction]) -> i64 { [INFO] [stdout] 4 | let mut vm = assembunny::VirtualMachine::default(); [INFO] [stdout] 5 | *vm.get_register_mut('a') = 7; [INFO] [stdout] 6 ~ vm.run(&mut code.to_owned()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/y2016/c23_cracking_safe.rs:10:21 [INFO] [stdout] | [INFO] [stdout] 10 | fn run_twelve(code: &Vec) -> i64 { [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] 10 ~ fn run_twelve(code: &[assembunny::Instruction]) -> i64 { [INFO] [stdout] 11 | let mut vm = assembunny::VirtualMachine::default(); [INFO] [stdout] 12 | *vm.get_register_mut('a') = 12; [INFO] [stdout] 13 ~ vm.run(&mut code.to_owned()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/y2016/c2_code_walk.rs:22:17 [INFO] [stdout] | [INFO] [stdout] 22 | fn part1(items: &Vec>) -> i64 { [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] 22 - fn part1(items: &Vec>) -> i64 { [INFO] [stdout] 22 + fn part1(items: &[Vec]) -> i64 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/y2016/c2_code_walk.rs:28:13 [INFO] [stdout] | [INFO] [stdout] 28 | current = current + *dir; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `current += *dir` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/y2016/c2_code_walk.rs:40:17 [INFO] [stdout] | [INFO] [stdout] 40 | fn part2(items: &Vec>) -> String { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 40 - fn part2(items: &Vec>) -> String { [INFO] [stdout] 40 + fn part2(items: &[Vec]) -> String { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/y2016/c3_triangle_check.rs:13:34 [INFO] [stdout] | [INFO] [stdout] 13 | fn transform_vertical(triangles: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 13 - fn transform_vertical(triangles: &Vec) -> Vec { [INFO] [stdout] 13 + fn transform_vertical(triangles: &[Triangle]) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/y2016/c3_triangle_check.rs:14:13 [INFO] [stdout] | [INFO] [stdout] 14 | assert!(triangles.len() % 3 == 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `triangles.len().is_multiple_of(3)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `[i64; 3]` which implements the `Copy` trait [INFO] [stdout] --> src/y2016/c3_triangle_check.rs:35:17 [INFO] [stdout] | [INFO] [stdout] 35 | let mut t = triangle.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try dereferencing it: `*triangle` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/y2016/c4_room_checksums.rs:73:8 [INFO] [stdout] | [INFO] [stdout] 73 | if c >= 'a' && c <= 'z' { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: use: `('a'..='z').contains(&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] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/y2016/c4_room_checksums.rs:98:22 [INFO] [stdout] | [INFO] [stdout] 98 | if eval_room(&room) { [INFO] [stdout] | ^^^^^ help: change this to: `room` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is only used to index `contents` [INFO] [stdout] --> src/y2016/c6_jumbled_message.rs:18:18 [INFO] [stdout] | [INFO] [stdout] 18 | for j in 0..contents.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 18 - for j in 0..contents.len() { [INFO] [stdout] 18 + for in &contents { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used consecutive `str::replace` call [INFO] [stdout] --> src/y2016/c7_ipv7_check.rs:24:14 [INFO] [stdout] | [INFO] [stdout] 24 | .replace('[', " ") [INFO] [stdout] | ______________^ [INFO] [stdout] 25 | | .replace(']', " ") [INFO] [stdout] | |______________________________^ help: replace with: `replace(['[', ']'], " ")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_str_replace [INFO] [stdout] = note: `#[warn(clippy::collapsible_str_replace)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> src/y2016/c8_screen_code.rs:70:5 [INFO] [stdout] | [INFO] [stdout] 70 | / match ins { [INFO] [stdout] 71 | | &Instruction::Rect { x, y } => { [INFO] [stdout] 72 | | if state.x < x && state.y < y { [INFO] [stdout] 73 | | State { [INFO] [stdout] ... | [INFO] [stdout] 104 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 70 ~ match *ins { [INFO] [stdout] 71 ~ Instruction::Rect { x, y } => { [INFO] [stdout] 72 | if state.x < x && state.y < y { [INFO] [stdout] ... [INFO] [stdout] 81 | } [INFO] [stdout] 82 ~ Instruction::ShiftColumn { col, amount } => { [INFO] [stdout] 83 | if state.x == col { [INFO] [stdout] ... [INFO] [stdout] 92 | } [INFO] [stdout] 93 ~ Instruction::ShiftRow { row, amount } => { [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/y2016/c8_screen_code.rs:107:30 [INFO] [stdout] | [INFO] [stdout] 107 | fn print_2d_bool_array(data: &Vec, width: usize) { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 107 - fn print_2d_bool_array(data: &Vec, width: usize) { [INFO] [stdout] 107 + fn print_2d_bool_array(data: &[bool], width: usize) { [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/y2022/c5_move_crates.rs:48:19 [INFO] [stdout] | [INFO] [stdout] 48 | fn get_top(state: &Vec>) -> String { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 48 - fn get_top(state: &Vec>) -> String { [INFO] [stdout] 48 + fn get_top(state: &[VecDeque]) -> String { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/y2022/c5_move_crates.rs:92:33 [INFO] [stdout] | [INFO] [stdout] 92 | .map(|s| parse_commands(*s).unwrap()) [INFO] [stdout] | ^^ help: try: `s` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] = note: `#[warn(clippy::explicit_auto_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/y2022/c6_signal_fix.rs:24:19 [INFO] [stdout] | [INFO] [stdout] 24 | .position(|slice| all_unique(slice)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `all_unique` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/y2022/c6_signal_fix.rs:31:19 [INFO] [stdout] | [INFO] [stdout] 31 | .position(|slice| all_unique(slice)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `all_unique` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `skip(..).next()` on an iterator [INFO] [stdout] --> src/y2022/c7_filesystem.rs:58:44 [INFO] [stdout] | [INFO] [stdout] 58 | Command::Cd(s.trim().split(' ').skip(1).next().unwrap().to_string()) [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: use `nth` instead: `.nth(1)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_skip_next [INFO] [stdout] = note: `#[warn(clippy::iter_skip_next)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/y2022/c7_filesystem.rs:153:43 [INFO] [stdout] | [INFO] [stdout] 153 | let mut visitor = |node: &Node| match node.deref() { [INFO] [stdout] | ___________________________________________^ [INFO] [stdout] 154 | | Item::Directory(name) => directories.push((name.clone(), directory_size(node))), [INFO] [stdout] 155 | | _ => {} [INFO] [stdout] 156 | | }; [INFO] [stdout] | |_____^ help: try: `if let Item::Directory(name) = node.deref() { directories.push((name.clone(), directory_size(node))) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statement with no effect [INFO] [stdout] --> src/y2022/c8_count_trees.rs:15:9 [INFO] [stdout] | [INFO] [stdout] 15 | true; [INFO] [stdout] | -^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: did you mean to return it?: `return` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect [INFO] [stdout] = note: `#[warn(clippy::no_effect)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `.map(...).any(identity)` [INFO] [stdout] --> src/y2022/c8_count_trees.rs:89:18 [INFO] [stdout] | [INFO] [stdout] 89 | .map(|d| traverse_direction(&grid, current, d.clone(), source)) [INFO] [stdout] | __________________^ [INFO] [stdout] 90 | | .any(|b| b); [INFO] [stdout] | |___________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_all_any_identity [INFO] [stdout] = note: `#[warn(clippy::map_all_any_identity)]` on by default [INFO] [stdout] help: use `.any(...)` instead [INFO] [stdout] | [INFO] [stdout] 89 - .map(|d| traverse_direction(&grid, current, d.clone(), source)) [INFO] [stdout] 90 - .any(|b| b); [INFO] [stdout] 89 + .any(|d| traverse_direction(&grid, current, d.clone(), source)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Matrix, Const<1>, ArrayStorage>` which implements the `Copy` trait [INFO] [stdout] --> src/y2022/c8_count_trees.rs:89:61 [INFO] [stdout] | [INFO] [stdout] 89 | .map(|d| traverse_direction(&grid, current, d.clone(), source)) [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*d` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Matrix, Const<1>, ArrayStorage>` which implements the `Copy` trait [INFO] [stdout] --> src/y2022/c8_count_trees.rs:93:61 [INFO] [stdout] | [INFO] [stdout] 93 | let score = score_direction(&grid, current, d.clone(), source); [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*d` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Matrix, Const<1>, ArrayStorage>` which implements the `Copy` trait [INFO] [stdout] --> src/y2022/c9_rope_follow.rs:35:24 [INFO] [stdout] | [INFO] [stdout] 35 | return tail.clone(); [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*tail` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Matrix, Const<1>, ArrayStorage>` which implements the `Copy` trait [INFO] [stdout] --> src/y2022/c9_rope_follow.rs:79:28 [INFO] [stdout] | [INFO] [stdout] 79 | hashset.insert(tail.clone()); [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `tail` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Matrix, Const<1>, ArrayStorage>` which implements the `Copy` trait [INFO] [stdout] --> src/y2022/c9_rope_follow.rs:105:28 [INFO] [stdout] | [INFO] [stdout] 105 | hashset.insert(rope.last().unwrap().clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*rope.last().unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `c` is used to index `coeficients` [INFO] [stdout] --> src/y2025/c10.rs:85:18 [INFO] [stdout] | [INFO] [stdout] 85 | for c in 0..coeficients.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 85 - for c in 0..coeficients.len() { [INFO] [stdout] 85 + for (c, ) in coeficients.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `target` [INFO] [stdout] --> src/y2025/c10.rs:89:14 [INFO] [stdout] | [INFO] [stdout] 89 | for i in 0..target.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 89 - for i in 0..target.len() { [INFO] [stdout] 89 + for (i, ) in target.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `col` is used to index `vars` [INFO] [stdout] --> src/y2025/c10.rs:152:24 [INFO] [stdout] | [INFO] [stdout] 152 | for col in (pivot_col + 1)..n { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 152 - for col in (pivot_col + 1)..n { [INFO] [stdout] 152 + for (col, ) in vars.iter().enumerate().take(n).skip((pivot_col + 1)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `col` is used to index `vars` [INFO] [stdout] --> src/y2025/c10.rs:273:24 [INFO] [stdout] | [INFO] [stdout] 273 | for col in (pivot_col + 1)..n { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 273 - for col in (pivot_col + 1)..n { [INFO] [stdout] 273 + for (col, ) in vars.iter().enumerate().take(n).skip((pivot_col + 1)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is used to index `sol` [INFO] [stdout] --> src/y2025/c10.rs:373:18 [INFO] [stdout] | [INFO] [stdout] 373 | for j in 0..n { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 373 - for j in 0..n { [INFO] [stdout] 373 + for (j, ) in sol.iter().enumerate().take(n) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/y2025/c11.rs:79:5 [INFO] [stdout] | [INFO] [stdout] 79 | return 0; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 79 - return 0; [INFO] [stdout] 79 + 0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/y2025/c11.rs:74:39 [INFO] [stdout] | [INFO] [stdout] 74 | count += count_paths(map, &edge, target); [INFO] [stdout] | ^^^^^ help: change this to: `edge` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/y2025/c11.rs:110:5 [INFO] [stdout] | [INFO] [stdout] 110 | return 0; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 110 - return 0; [INFO] [stdout] 110 + 0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/y2025/c11.rs:105:47 [INFO] [stdout] | [INFO] [stdout] 105 | count += count_paths_fft_dac(map, &edge, target, reached); [INFO] [stdout] | ^^^^^ help: change this to: `edge` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/y2025/c11.rs:146:5 [INFO] [stdout] | [INFO] [stdout] 145 | let result = count_paths_inner(&mut memo, map, start, target); [INFO] [stdout] | -------------------------------------------------------------- unnecessary `let` binding [INFO] [stdout] 146 | result [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 145 ~ [INFO] [stdout] 146 ~ count_paths_inner(&mut memo, map, start, target) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/y2025/c11.rs:141:9 [INFO] [stdout] | [INFO] [stdout] 141 | return 0; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 141 - return 0; [INFO] [stdout] 141 + 0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/y2025/c11.rs:131:62 [INFO] [stdout] | [INFO] [stdout] 131 | let value = count_paths_inner(memo, map, &edge, target); [INFO] [stdout] | ^^^^^ help: change this to: `edge` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/y2025/c12.rs:113:13 [INFO] [stdout] | [INFO] [stdout] 113 | / if *box_v.get(by, bx).unwrap() { [INFO] [stdout] 114 | | if *grid.get(y + by, x + bx).unwrap() { [INFO] [stdout] 115 | | return false; [INFO] [stdout] 116 | | } [INFO] [stdout] 117 | | } [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] 113 ~ if *box_v.get(by, bx).unwrap() [INFO] [stdout] 114 ~ && *grid.get(y + by, x + bx).unwrap() { [INFO] [stdout] 115 | return false; [INFO] [stdout] 116 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/y2025/c2.rs:15:8 [INFO] [stdout] | [INFO] [stdout] 15 | if s.len() % 2 != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace with: `!s.len().is_multiple_of(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::ops::RangeInclusive` [INFO] [stdout] --> src/y2025/c2.rs:59:19 [INFO] [stdout] | [INFO] [stdout] 59 | let sum = (a..=b) [INFO] [stdout] | ___________________^ [INFO] [stdout] 60 | | .into_iter() [INFO] [stdout] | |________________________^ help: consider removing `.into_iter()`: `(a..=b)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::ops::RangeInclusive` [INFO] [stdout] --> src/y2025/c2.rs:65:19 [INFO] [stdout] | [INFO] [stdout] 65 | let sum = (a..=b) [INFO] [stdout] | ___________________^ [INFO] [stdout] 66 | | .into_iter() [INFO] [stdout] | |________________________^ help: consider removing `.into_iter()`: `(a..=b)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to use `.enumerate()` and immediately discard the index [INFO] [stdout] --> src/y2025/c3.rs:15:32 [INFO] [stdout] | [INFO] [stdout] 15 | for (_, d) in digits.iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_enumerate_index [INFO] [stdout] = note: `#[warn(clippy::unused_enumerate_index)]` on by default [INFO] [stdout] help: remove the `.enumerate()` call [INFO] [stdout] | [INFO] [stdout] 15 - for (_, d) in digits.iter().enumerate() { [INFO] [stdout] 15 + for d in digits.iter() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/y2025/c4.rs:22:28 [INFO] [stdout] | [INFO] [stdout] 22 | if x >= width || x < 0 { [INFO] [stdout] | ____________________________^ [INFO] [stdout] 23 | | None [INFO] [stdout] 24 | | } else if y >= height || y < 0 { [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/y2025/c4.rs:24:36 [INFO] [stdout] | [INFO] [stdout] 24 | } else if y >= height || y < 0 { [INFO] [stdout] | ____________________________________^ [INFO] [stdout] 25 | | None [INFO] [stdout] 26 | | } else { [INFO] [stdout] | |_____^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/y2025/c5.rs:16:5 [INFO] [stdout] | [INFO] [stdout] 16 | 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] 16 - return false; [INFO] [stdout] 16 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/y2025/c5.rs:28:47 [INFO] [stdout] | [INFO] [stdout] 28 | fn find_overlap(set: &HashSet<(i64, i64)>) -> Option<((i64, i64), (i64, i64), (i64, i64))> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/y2025/c5.rs:39:5 [INFO] [stdout] | [INFO] [stdout] 39 | return None; [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] 39 - return None; [INFO] [stdout] 39 + None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/y2025/c5.rs:31:16 [INFO] [stdout] | [INFO] [stdout] 31 | if &a == &b { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] = note: `#[warn(clippy::op_ref)]` on by default [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 31 - if &a == &b { [INFO] [stdout] 31 + if a == b { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/y2025/c5.rs:52:30 [INFO] [stdout] | [INFO] [stdout] 52 | .map(|s| parse_range(*s)) [INFO] [stdout] | ^^ help: try: `s` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `ADD` contains a capitalized acronym [INFO] [stdout] --> src/y2025/c6.rs:13:5 [INFO] [stdout] | [INFO] [stdout] 13 | ADD, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Add` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `MUL` contains a capitalized acronym [INFO] [stdout] --> src/y2025/c6.rs:14:5 [INFO] [stdout] | [INFO] [stdout] 14 | MUL, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Mul` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/y2025/c6.rs:39:49 [INFO] [stdout] | [INFO] [stdout] 39 | .map(|s| parsing::parse_all_numbers(*s)) [INFO] [stdout] | ^^ help: try: `s` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> src/y2025/c6.rs:70:18 [INFO] [stdout] | [INFO] [stdout] 70 | .zip(problem_sizes.into_iter()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()` [INFO] [stdout] --> /rustc/91021ccc790478a1a89c003e7d32b8d155ae6aae/library/core/src/iter/traits/iterator.rs:629:11 [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] help: consider removing the `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 70 - .zip(problem_sizes.into_iter()) [INFO] [stdout] 70 + .zip(problem_sizes) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/y2025/c6.rs:79:24 [INFO] [stdout] | [INFO] [stdout] 79 | if char.is_digit(10) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `char.is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] = note: `#[warn(clippy::is_digit_ascii_radix)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/y2025/c8.rs:43:5 [INFO] [stdout] | [INFO] [stdout] 42 | let distance = nalgebra::distance(&p1, &p2); [INFO] [stdout] | -------------------------------------------- unnecessary `let` binding [INFO] [stdout] 43 | distance [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 42 ~ [INFO] [stdout] 43 ~ nalgebra::distance(&p1, &p2) [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/y2025/c8.rs:47:13 [INFO] [stdout] | [INFO] [stdout] 47 | coords: &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] 47 - coords: &Vec, [INFO] [stdout] 47 + coords: &[IVec3], [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/y2025/c8.rs:48:16 [INFO] [stdout] | [INFO] [stdout] 48 | distances: &Vec<(f32, usize, usize)>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 48 - distances: &Vec<(f32, usize, usize)>, [INFO] [stdout] 48 + distances: &[(f32, usize, usize)], [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/y2025/c8.rs:87:28 [INFO] [stdout] | [INFO] [stdout] 87 | fn last_connection(coords: &Vec, distances: &Vec<(f32, usize, usize)>) -> (IVec3, IVec3) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 87 - fn last_connection(coords: &Vec, distances: &Vec<(f32, usize, usize)>) -> (IVec3, IVec3) { [INFO] [stdout] 87 + fn last_connection(coords: &[IVec3], distances: &Vec<(f32, usize, usize)>) -> (IVec3, IVec3) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Some` variant of the iterator element is used [INFO] [stdout] --> src/y2025/c8.rs:165:9 [INFO] [stdout] | [INFO] [stdout] 165 | / for v in &circuit_numbers { [INFO] [stdout] 166 | | if let Some(v) = v { [INFO] [stdout] 167 | | counts[*v] += 1 [INFO] [stdout] 168 | | } [INFO] [stdout] 169 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/y2025/c8.rs:166:13 [INFO] [stdout] | [INFO] [stdout] 166 | / if let Some(v) = v { [INFO] [stdout] 167 | | counts[*v] += 1 [INFO] [stdout] 168 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] = note: `#[warn(clippy::manual_flatten)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 165 ~ for v in circuit_numbers.iter().flatten() { [INFO] [stdout] 166 + counts[*v] += 1 [INFO] [stdout] 167 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/y2025/c9.rs:38:39 [INFO] [stdout] | [INFO] [stdout] 38 | fn polygon_lines(coords: &[IVec2]) -> (Vec<(IVec2, IVec2)>, Vec<(IVec2, IVec2)>) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/y2025/c9.rs:52:9 [INFO] [stdout] | [INFO] [stdout] 52 | b.sort_by(|p1, p2| p1.0.y.cmp(&p2.0.y)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] = note: `#[warn(clippy::unnecessary_sort_by)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 52 - b.sort_by(|p1, p2| p1.0.y.cmp(&p2.0.y)); [INFO] [stdout] 52 + b.sort_by_key(|p1| p1.0.y); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/y2025/c9.rs:53:9 [INFO] [stdout] | [INFO] [stdout] 53 | a.sort_by(|p1, p2| p1.0.x.cmp(&p2.0.x)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 53 - a.sort_by(|p1, p2| p1.0.x.cmp(&p2.0.x)); [INFO] [stdout] 53 + a.sort_by_key(|p1| p1.0.x); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/y2025/c9.rs:56:9 [INFO] [stdout] | [INFO] [stdout] 56 | a.sort_by(|p1, p2| p1.0.y.cmp(&p2.0.y)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 56 - a.sort_by(|p1, p2| p1.0.y.cmp(&p2.0.y)); [INFO] [stdout] 56 + a.sort_by_key(|p1| p1.0.y); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/y2025/c9.rs:57:9 [INFO] [stdout] | [INFO] [stdout] 57 | b.sort_by(|p1, p2| p1.0.x.cmp(&p2.0.x)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 57 - b.sort_by(|p1, p2| p1.0.x.cmp(&p2.0.x)); [INFO] [stdout] 57 + b.sort_by_key(|p1| p1.0.x); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` branch is empty [INFO] [stdout] --> src/y2025/c9.rs:99:13 [INFO] [stdout] | [INFO] [stdout] 99 | if parity % 2 == 1 {} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: you can remove it [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_ifs [INFO] [stdout] = note: `#[warn(clippy::needless_ifs)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/y2022/c9_rope_follow.rs:57:5 [INFO] [stdout] | [INFO] [stdout] 57 | vec![dir].repeat(count.trim().parse().unwrap()) [INFO] [stdout] | ^^^^^^^^^ help: you can use an array directly: `[dir]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/y2022/c9_rope_follow.rs:89:24 [INFO] [stdout] | [INFO] [stdout] 89 | let mut rope = vec![IVec2::default()].repeat(9); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[IVec2::default()]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 54.91s [INFO] running `Command { std: "docker" "inspect" "073ab67e30f575fbfc38f7f3901276edb54683919d01bc793202a11f52d7a060", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "073ab67e30f575fbfc38f7f3901276edb54683919d01bc793202a11f52d7a060", kill_on_drop: false }` [INFO] [stdout] 073ab67e30f575fbfc38f7f3901276edb54683919d01bc793202a11f52d7a060