[INFO] cloning repository https://github.com/denis-selimovic/aoc [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/denis-selimovic/aoc" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fdenis-selimovic%2Faoc", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fdenis-selimovic%2Faoc'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] c53414d8dac3848df33d1f722454dbb40459e3d8 [INFO] linting denis-selimovic/aoc against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fdenis-selimovic%2Faoc" "/workspace/builds/worker-2-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-2-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/denis-selimovic/aoc [INFO] finished tweaking git repo https://github.com/denis-selimovic/aoc [INFO] tweaked toml for git repo https://github.com/denis-selimovic/aoc written to /workspace/builds/worker-2-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/denis-selimovic/aoc 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/denis-selimovic/aoc already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-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] 1f2f0e3b8e55fe5fc01bd38cd29ba48030a1b78cf5dca39d33e7613a170838d1 [INFO] running `Command { std: "docker" "start" "-a" "1f2f0e3b8e55fe5fc01bd38cd29ba48030a1b78cf5dca39d33e7613a170838d1", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "1f2f0e3b8e55fe5fc01bd38cd29ba48030a1b78cf5dca39d33e7613a170838d1", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "1f2f0e3b8e55fe5fc01bd38cd29ba48030a1b78cf5dca39d33e7613a170838d1", kill_on_drop: false }` [INFO] [stdout] 1f2f0e3b8e55fe5fc01bd38cd29ba48030a1b78cf5dca39d33e7613a170838d1 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-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] 19f2406669be923658e9d0ce41acf79457477bc34ead03731f0d7e26aad886dd [INFO] running `Command { std: "docker" "start" "-a" "19f2406669be923658e9d0ce41acf79457477bc34ead03731f0d7e26aad886dd", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.92 [INFO] [stderr] Compiling libc v0.2.167 [INFO] [stderr] Checking pin-project-lite v0.2.15 [INFO] [stderr] Checking bytes v1.9.0 [INFO] [stderr] Compiling cc v1.2.2 [INFO] [stderr] Compiling pkg-config v0.3.31 [INFO] [stderr] Checking once_cell v1.20.2 [INFO] [stderr] Checking itoa v1.0.14 [INFO] [stderr] Checking litemap v0.7.4 [INFO] [stderr] Checking smallvec v1.13.2 [INFO] [stderr] Checking icu_locid_transform_data v1.5.0 [INFO] [stderr] Checking tracing-core v0.1.33 [INFO] [stderr] Compiling httparse v1.9.5 [INFO] [stderr] Compiling openssl v0.10.68 [INFO] [stderr] Checking http v1.1.0 [INFO] [stderr] Checking icu_properties_data v1.5.0 [INFO] [stderr] Checking hashbrown v0.15.2 [INFO] [stderr] Checking futures-util v0.3.31 [INFO] [stderr] Checking tracing v0.1.41 [INFO] [stderr] Compiling native-tls v0.2.12 [INFO] [stderr] Checking icu_normalizer_data v1.5.0 [INFO] [stderr] Compiling quote v1.0.37 [INFO] [stderr] Compiling syn v2.0.90 [INFO] [stderr] Compiling num-traits v0.2.19 [INFO] [stderr] Compiling serde v1.0.215 [INFO] [stderr] Checking mio v1.0.3 [INFO] [stderr] Checking socket2 v0.5.8 [INFO] [stderr] Checking indexmap v2.7.0 [INFO] [stderr] Checking http-body v1.0.1 [INFO] [stderr] Checking log v0.4.22 [INFO] [stderr] Checking clap_lex v0.7.3 [INFO] [stderr] Checking tokio v1.41.1 [INFO] [stderr] Checking rustls-pki-types v1.10.0 [INFO] [stderr] Checking clap_builder v4.5.21 [INFO] [stderr] Compiling openssl-sys v0.9.104 [INFO] [stderr] Checking rustls-pemfile v2.2.0 [INFO] [stderr] Checking ipnet v2.10.1 [INFO] [stderr] Checking itertools v0.13.0 [INFO] [stderr] Checking num-complex v0.4.6 [INFO] [stderr] Checking chrono v0.4.38 [INFO] [stderr] Checking dotenv v0.15.0 [INFO] [stderr] Checking clap v4.5.21 [INFO] [stderr] Checking http-body-util v0.1.2 [INFO] [stderr] Checking serde_urlencoded v0.7.1 [INFO] [stderr] Checking tokio-util v0.7.12 [INFO] [stderr] Checking h2 v0.4.7 [INFO] [stderr] Compiling synstructure v0.13.1 [INFO] [stderr] Compiling zerovec-derive v0.10.3 [INFO] [stderr] Compiling displaydoc v0.2.5 [INFO] [stderr] Compiling icu_provider_macros v1.5.0 [INFO] [stderr] Compiling openssl-macros v0.1.1 [INFO] [stderr] Compiling zerofrom-derive v0.1.5 [INFO] [stderr] Compiling yoke-derive v0.7.5 [INFO] [stderr] Checking zerofrom v0.1.5 [INFO] [stderr] Checking yoke v0.7.5 [INFO] [stderr] Checking zerovec v0.10.4 [INFO] [stderr] Checking hyper v1.5.1 [INFO] [stderr] Checking tinystr v0.7.6 [INFO] [stderr] Checking icu_collections v1.5.0 [INFO] [stderr] Checking icu_locid v1.5.0 [INFO] [stderr] Checking icu_provider v1.5.0 [INFO] [stderr] Checking tokio-native-tls v0.3.1 [INFO] [stderr] Checking hyper-util v0.1.10 [INFO] [stderr] Checking icu_locid_transform v1.5.0 [INFO] [stderr] Checking icu_properties v1.5.1 [INFO] [stderr] Checking hyper-tls v0.6.0 [INFO] [stderr] Checking icu_normalizer v1.5.0 [INFO] [stderr] Checking idna_adapter v1.2.0 [INFO] [stderr] Checking idna v1.0.3 [INFO] [stderr] Checking url v2.5.4 [INFO] [stderr] Checking reqwest v0.12.9 [INFO] [stderr] Checking aoc v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: using `print!()` with a format string that ends in a single newline [INFO] [stdout] --> src/config.rs:27:22 [INFO] [stdout] | [INFO] [stdout] 27 | Ok(_) => print!("Successfully loaded environment\n"), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_with_newline [INFO] [stdout] = note: `#[warn(clippy::print_with_newline)]` on by default [INFO] [stdout] help: use `println!` instead [INFO] [stdout] | [INFO] [stdout] 27 - Ok(_) => print!("Successfully loaded environment\n"), [INFO] [stdout] 27 + Ok(_) => println!("Successfully loaded environment"), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u8` is unnecessary [INFO] [stdout] --> src/plugin.rs:42:21 [INFO] [stdout] | [INFO] [stdout] 42 | map.insert((1 as u8, 2024 as u16), Box::new(day_01::AoC2024Day01)); [INFO] [stdout] | ^^^^^^^ help: try: `1_u8` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u16` is unnecessary [INFO] [stdout] --> src/plugin.rs:42:30 [INFO] [stdout] | [INFO] [stdout] 42 | map.insert((1 as u8, 2024 as u16), Box::new(day_01::AoC2024Day01)); [INFO] [stdout] | ^^^^^^^^^^^ help: try: `2024_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u8` is unnecessary [INFO] [stdout] --> src/plugin.rs:43:21 [INFO] [stdout] | [INFO] [stdout] 43 | map.insert((2 as u8, 2024 as u16), Box::new(day_02::AoC2024Day02)); [INFO] [stdout] | ^^^^^^^ help: try: `2_u8` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u16` is unnecessary [INFO] [stdout] --> src/plugin.rs:43:30 [INFO] [stdout] | [INFO] [stdout] 43 | map.insert((2 as u8, 2024 as u16), Box::new(day_02::AoC2024Day02)); [INFO] [stdout] | ^^^^^^^^^^^ help: try: `2024_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u8` is unnecessary [INFO] [stdout] --> src/plugin.rs:44:21 [INFO] [stdout] | [INFO] [stdout] 44 | map.insert((3 as u8, 2024 as u16), Box::new(day_03::AoC2024Day03)); [INFO] [stdout] | ^^^^^^^ help: try: `3_u8` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u16` is unnecessary [INFO] [stdout] --> src/plugin.rs:44:30 [INFO] [stdout] | [INFO] [stdout] 44 | map.insert((3 as u8, 2024 as u16), Box::new(day_03::AoC2024Day03)); [INFO] [stdout] | ^^^^^^^^^^^ help: try: `2024_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u8` is unnecessary [INFO] [stdout] --> src/plugin.rs:45:21 [INFO] [stdout] | [INFO] [stdout] 45 | map.insert((4 as u8, 2024 as u16), Box::new(day_04::AoC2024Day04)); [INFO] [stdout] | ^^^^^^^ help: try: `4_u8` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u16` is unnecessary [INFO] [stdout] --> src/plugin.rs:45:30 [INFO] [stdout] | [INFO] [stdout] 45 | map.insert((4 as u8, 2024 as u16), Box::new(day_04::AoC2024Day04)); [INFO] [stdout] | ^^^^^^^^^^^ help: try: `2024_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u8` is unnecessary [INFO] [stdout] --> src/plugin.rs:46:21 [INFO] [stdout] | [INFO] [stdout] 46 | map.insert((5 as u8, 2024 as u16), Box::new(day_05::AoC2024Day05)); [INFO] [stdout] | ^^^^^^^ help: try: `5_u8` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u16` is unnecessary [INFO] [stdout] --> src/plugin.rs:46:30 [INFO] [stdout] | [INFO] [stdout] 46 | map.insert((5 as u8, 2024 as u16), Box::new(day_05::AoC2024Day05)); [INFO] [stdout] | ^^^^^^^^^^^ help: try: `2024_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u8` is unnecessary [INFO] [stdout] --> src/plugin.rs:47:21 [INFO] [stdout] | [INFO] [stdout] 47 | map.insert((6 as u8, 2024 as u16), Box::new(day_06::AoC2024Day06)); [INFO] [stdout] | ^^^^^^^ help: try: `6_u8` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u16` is unnecessary [INFO] [stdout] --> src/plugin.rs:47:30 [INFO] [stdout] | [INFO] [stdout] 47 | map.insert((6 as u8, 2024 as u16), Box::new(day_06::AoC2024Day06)); [INFO] [stdout] | ^^^^^^^^^^^ help: try: `2024_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u8` is unnecessary [INFO] [stdout] --> src/plugin.rs:48:21 [INFO] [stdout] | [INFO] [stdout] 48 | map.insert((7 as u8, 2024 as u16), Box::new(day_07::AoC2024Day07)); [INFO] [stdout] | ^^^^^^^ help: try: `7_u8` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u16` is unnecessary [INFO] [stdout] --> src/plugin.rs:48:30 [INFO] [stdout] | [INFO] [stdout] 48 | map.insert((7 as u8, 2024 as u16), Box::new(day_07::AoC2024Day07)); [INFO] [stdout] | ^^^^^^^^^^^ help: try: `2024_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u8` is unnecessary [INFO] [stdout] --> src/plugin.rs:49:21 [INFO] [stdout] | [INFO] [stdout] 49 | map.insert((8 as u8, 2024 as u16), Box::new(day_08::AoC2024Day08)); [INFO] [stdout] | ^^^^^^^ help: try: `8_u8` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u16` is unnecessary [INFO] [stdout] --> src/plugin.rs:49:30 [INFO] [stdout] | [INFO] [stdout] 49 | map.insert((8 as u8, 2024 as u16), Box::new(day_08::AoC2024Day08)); [INFO] [stdout] | ^^^^^^^^^^^ help: try: `2024_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u8` is unnecessary [INFO] [stdout] --> src/plugin.rs:50:21 [INFO] [stdout] | [INFO] [stdout] 50 | map.insert((9 as u8, 2024 as u16), Box::new(day_09::AoC2024Day09)); [INFO] [stdout] | ^^^^^^^ help: try: `9_u8` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u16` is unnecessary [INFO] [stdout] --> src/plugin.rs:50:30 [INFO] [stdout] | [INFO] [stdout] 50 | map.insert((9 as u8, 2024 as u16), Box::new(day_09::AoC2024Day09)); [INFO] [stdout] | ^^^^^^^^^^^ help: try: `2024_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u8` is unnecessary [INFO] [stdout] --> src/plugin.rs:51:21 [INFO] [stdout] | [INFO] [stdout] 51 | map.insert((10 as u8, 2024 as u16), Box::new(day_10::AoC2024Day10)); [INFO] [stdout] | ^^^^^^^^ help: try: `10_u8` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u16` is unnecessary [INFO] [stdout] --> src/plugin.rs:51:31 [INFO] [stdout] | [INFO] [stdout] 51 | map.insert((10 as u8, 2024 as u16), Box::new(day_10::AoC2024Day10)); [INFO] [stdout] | ^^^^^^^^^^^ help: try: `2024_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u8` is unnecessary [INFO] [stdout] --> src/plugin.rs:52:21 [INFO] [stdout] | [INFO] [stdout] 52 | map.insert((11 as u8, 2024 as u16), Box::new(day_11::AoC2024Day11)); [INFO] [stdout] | ^^^^^^^^ help: try: `11_u8` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u16` is unnecessary [INFO] [stdout] --> src/plugin.rs:52:31 [INFO] [stdout] | [INFO] [stdout] 52 | map.insert((11 as u8, 2024 as u16), Box::new(day_11::AoC2024Day11)); [INFO] [stdout] | ^^^^^^^^^^^ help: try: `2024_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u8` is unnecessary [INFO] [stdout] --> src/plugin.rs:53:21 [INFO] [stdout] | [INFO] [stdout] 53 | map.insert((12 as u8, 2024 as u16), Box::new(day_12::AoC2024Day12)); [INFO] [stdout] | ^^^^^^^^ help: try: `12_u8` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u16` is unnecessary [INFO] [stdout] --> src/plugin.rs:53:31 [INFO] [stdout] | [INFO] [stdout] 53 | map.insert((12 as u8, 2024 as u16), Box::new(day_12::AoC2024Day12)); [INFO] [stdout] | ^^^^^^^^^^^ help: try: `2024_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u8` is unnecessary [INFO] [stdout] --> src/plugin.rs:54:21 [INFO] [stdout] | [INFO] [stdout] 54 | map.insert((13 as u8, 2024 as u16), Box::new(day_13::AoC2024Day13)); [INFO] [stdout] | ^^^^^^^^ help: try: `13_u8` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u16` is unnecessary [INFO] [stdout] --> src/plugin.rs:54:31 [INFO] [stdout] | [INFO] [stdout] 54 | map.insert((13 as u8, 2024 as u16), Box::new(day_13::AoC2024Day13)); [INFO] [stdout] | ^^^^^^^^^^^ help: try: `2024_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u8` is unnecessary [INFO] [stdout] --> src/plugin.rs:55:21 [INFO] [stdout] | [INFO] [stdout] 55 | map.insert((14 as u8, 2024 as u16), Box::new(day_14::AoC2024Day14)); [INFO] [stdout] | ^^^^^^^^ help: try: `14_u8` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u16` is unnecessary [INFO] [stdout] --> src/plugin.rs:55:31 [INFO] [stdout] | [INFO] [stdout] 55 | map.insert((14 as u8, 2024 as u16), Box::new(day_14::AoC2024Day14)); [INFO] [stdout] | ^^^^^^^^^^^ help: try: `2024_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u8` is unnecessary [INFO] [stdout] --> src/plugin.rs:56:21 [INFO] [stdout] | [INFO] [stdout] 56 | map.insert((15 as u8, 2024 as u16), Box::new(day_15::AoC2024Day15)); [INFO] [stdout] | ^^^^^^^^ help: try: `15_u8` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u16` is unnecessary [INFO] [stdout] --> src/plugin.rs:56:31 [INFO] [stdout] | [INFO] [stdout] 56 | map.insert((15 as u8, 2024 as u16), Box::new(day_15::AoC2024Day15)); [INFO] [stdout] | ^^^^^^^^^^^ help: try: `2024_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u8` is unnecessary [INFO] [stdout] --> src/plugin.rs:57:21 [INFO] [stdout] | [INFO] [stdout] 57 | map.insert((16 as u8, 2024 as u16), Box::new(day_16::AoC2024Day16)); [INFO] [stdout] | ^^^^^^^^ help: try: `16_u8` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u16` is unnecessary [INFO] [stdout] --> src/plugin.rs:57:31 [INFO] [stdout] | [INFO] [stdout] 57 | map.insert((16 as u8, 2024 as u16), Box::new(day_16::AoC2024Day16)); [INFO] [stdout] | ^^^^^^^^^^^ help: try: `2024_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u8` is unnecessary [INFO] [stdout] --> src/plugin.rs:58:21 [INFO] [stdout] | [INFO] [stdout] 58 | map.insert((17 as u8, 2024 as u16), Box::new(day_17::AoC2024Day17)); [INFO] [stdout] | ^^^^^^^^ help: try: `17_u8` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u16` is unnecessary [INFO] [stdout] --> src/plugin.rs:58:31 [INFO] [stdout] | [INFO] [stdout] 58 | map.insert((17 as u8, 2024 as u16), Box::new(day_17::AoC2024Day17)); [INFO] [stdout] | ^^^^^^^^^^^ help: try: `2024_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u8` is unnecessary [INFO] [stdout] --> src/plugin.rs:59:21 [INFO] [stdout] | [INFO] [stdout] 59 | map.insert((18 as u8, 2024 as u16), Box::new(day_18::AoC2024Day18)); [INFO] [stdout] | ^^^^^^^^ help: try: `18_u8` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u16` is unnecessary [INFO] [stdout] --> src/plugin.rs:59:31 [INFO] [stdout] | [INFO] [stdout] 59 | map.insert((18 as u8, 2024 as u16), Box::new(day_18::AoC2024Day18)); [INFO] [stdout] | ^^^^^^^^^^^ help: try: `2024_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u8` is unnecessary [INFO] [stdout] --> src/plugin.rs:60:21 [INFO] [stdout] | [INFO] [stdout] 60 | map.insert((19 as u8, 2024 as u16), Box::new(day_19::AoC2024Day19)); [INFO] [stdout] | ^^^^^^^^ help: try: `19_u8` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u16` is unnecessary [INFO] [stdout] --> src/plugin.rs:60:31 [INFO] [stdout] | [INFO] [stdout] 60 | map.insert((19 as u8, 2024 as u16), Box::new(day_19::AoC2024Day19)); [INFO] [stdout] | ^^^^^^^^^^^ help: try: `2024_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u8` is unnecessary [INFO] [stdout] --> src/plugin.rs:61:21 [INFO] [stdout] | [INFO] [stdout] 61 | map.insert((20 as u8, 2024 as u16), Box::new(day_20::AoC2024Day20)); [INFO] [stdout] | ^^^^^^^^ help: try: `20_u8` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u16` is unnecessary [INFO] [stdout] --> src/plugin.rs:61:31 [INFO] [stdout] | [INFO] [stdout] 61 | map.insert((20 as u8, 2024 as u16), Box::new(day_20::AoC2024Day20)); [INFO] [stdout] | ^^^^^^^^^^^ help: try: `2024_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u8` is unnecessary [INFO] [stdout] --> src/plugin.rs:62:21 [INFO] [stdout] | [INFO] [stdout] 62 | map.insert((21 as u8, 2024 as u16), Box::new(day_21::AoC2024Day21)); [INFO] [stdout] | ^^^^^^^^ help: try: `21_u8` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u16` is unnecessary [INFO] [stdout] --> src/plugin.rs:62:31 [INFO] [stdout] | [INFO] [stdout] 62 | map.insert((21 as u8, 2024 as u16), Box::new(day_21::AoC2024Day21)); [INFO] [stdout] | ^^^^^^^^^^^ help: try: `2024_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u8` is unnecessary [INFO] [stdout] --> src/plugin.rs:63:21 [INFO] [stdout] | [INFO] [stdout] 63 | map.insert((22 as u8, 2024 as u16), Box::new(day_22::AoC2024Day22)); [INFO] [stdout] | ^^^^^^^^ help: try: `22_u8` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u16` is unnecessary [INFO] [stdout] --> src/plugin.rs:63:31 [INFO] [stdout] | [INFO] [stdout] 63 | map.insert((22 as u8, 2024 as u16), Box::new(day_22::AoC2024Day22)); [INFO] [stdout] | ^^^^^^^^^^^ help: try: `2024_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u8` is unnecessary [INFO] [stdout] --> src/plugin.rs:64:21 [INFO] [stdout] | [INFO] [stdout] 64 | map.insert((23 as u8, 2024 as u16), Box::new(day_23::AoC2024Day23)); [INFO] [stdout] | ^^^^^^^^ help: try: `23_u8` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u16` is unnecessary [INFO] [stdout] --> src/plugin.rs:64:31 [INFO] [stdout] | [INFO] [stdout] 64 | map.insert((23 as u8, 2024 as u16), Box::new(day_23::AoC2024Day23)); [INFO] [stdout] | ^^^^^^^^^^^ help: try: `2024_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u8` is unnecessary [INFO] [stdout] --> src/plugin.rs:65:21 [INFO] [stdout] | [INFO] [stdout] 65 | map.insert((24 as u8, 2024 as u16), Box::new(day_24::AoC2024Day24)); [INFO] [stdout] | ^^^^^^^^ help: try: `24_u8` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u16` is unnecessary [INFO] [stdout] --> src/plugin.rs:65:31 [INFO] [stdout] | [INFO] [stdout] 65 | map.insert((24 as u8, 2024 as u16), Box::new(day_24::AoC2024Day24)); [INFO] [stdout] | ^^^^^^^^^^^ help: try: `2024_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u8` is unnecessary [INFO] [stdout] --> src/plugin.rs:66:21 [INFO] [stdout] | [INFO] [stdout] 66 | map.insert((25 as u8, 2024 as u16), Box::new(day_25::AoC2024Day25)); [INFO] [stdout] | ^^^^^^^^ help: try: `25_u8` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u16` is unnecessary [INFO] [stdout] --> src/plugin.rs:66:31 [INFO] [stdout] | [INFO] [stdout] 66 | map.insert((25 as u8, 2024 as u16), Box::new(day_25::AoC2024Day25)); [INFO] [stdout] | ^^^^^^^^^^^ help: try: `2024_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `&Box`. Consider using just `&T` [INFO] [stdout] --> src/plugin.rs:71:53 [INFO] [stdout] | [INFO] [stdout] 71 | pub fn get_plugin(&self, day: u8, year: u16) -> &Box { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `&dyn Plugin` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box [INFO] [stdout] = note: `#[warn(clippy::borrowed_box)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/reader.rs:67:36 [INFO] [stdout] | [INFO] [stdout] 67 | pub fn to_grid(&self, content: &String) -> Vec> { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 67 - pub fn to_grid(&self, content: &String) -> Vec> { [INFO] [stdout] 67 + pub fn to_grid(&self, content: &str) -> Vec> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/reader.rs:83:34 [INFO] [stdout] | [INFO] [stdout] 83 | pub fn split(&self, content: &String, delimiter: &str) -> 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] 83 - pub fn split(&self, content: &String, delimiter: &str) -> Vec> { [INFO] [stdout] 83 + pub fn split(&self, content: &str, delimiter: &str) -> Vec> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/reader.rs:100:45 [INFO] [stdout] | [INFO] [stdout] 100 | pub fn split_vertically(&self, content: &String, delimiter: &str, total: 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] 100 - pub fn split_vertically(&self, content: &String, delimiter: &str, total: usize) -> Vec> { [INFO] [stdout] 100 + pub fn split_vertically(&self, content: &str, delimiter: &str, total: usize) -> Vec> { [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/aoc_2024/day_02.rs:7:17 [INFO] [stdout] | [INFO] [stdout] 7 | fn is_good(seq: &Vec) -> bool { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 7 ~ fn is_good(seq: &[i32]) -> bool { [INFO] [stdout] 8 ~ let gaps: Vec = seq.to_owned() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc_2024/day_02.rs:41:21 [INFO] [stdout] | [INFO] [stdout] 41 | return 1; [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] 41 - return 1; [INFO] [stdout] 41 + 1 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc_2024/day_02.rs:43:21 [INFO] [stdout] | [INFO] [stdout] 43 | 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] 43 - return 0; [INFO] [stdout] 43 + 0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc_2024/day_02.rs:64:21 [INFO] [stdout] | [INFO] [stdout] 64 | return 1; [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] 64 - return 1; [INFO] [stdout] 64 + 1 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc_2024/day_02.rs:66:21 [INFO] [stdout] | [INFO] [stdout] 66 | 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] 66 - return 0; [INFO] [stdout] 66 + 0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/aoc_2024/day_02.rs:63:39 [INFO] [stdout] | [INFO] [stdout] 63 | if results.iter().any(|vec| is_good(vec)) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `is_good` [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: casting integer literal to `u64` is unnecessary [INFO] [stdout] --> src/aoc_2024/day_03.rs:28:33 [INFO] [stdout] | [INFO] [stdout] 28 | ... 0 as u64 [INFO] [stdout] | ^^^^^^^^ help: try: `0_u64` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u64` is unnecessary [INFO] [stdout] --> src/aoc_2024/day_03.rs:33:30 [INFO] [stdout] | [INFO] [stdout] 33 | ... (0 as u64, 0 as u64) [INFO] [stdout] | ^^^^^^^^ help: try: `0_u64` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u64` is unnecessary [INFO] [stdout] --> src/aoc_2024/day_03.rs:33:40 [INFO] [stdout] | [INFO] [stdout] 33 | ... (0 as u64, 0 as u64) [INFO] [stdout] | ^^^^^^^^ help: try: `0_u64` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u64` is unnecessary [INFO] [stdout] --> src/aoc_2024/day_03.rs:38:26 [INFO] [stdout] | [INFO] [stdout] 38 | (0 as u64, 0 as u64) [INFO] [stdout] | ^^^^^^^^ help: try: `0_u64` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u64` is unnecessary [INFO] [stdout] --> src/aoc_2024/day_03.rs:38:36 [INFO] [stdout] | [INFO] [stdout] 38 | (0 as u64, 0 as u64) [INFO] [stdout] | ^^^^^^^^ help: try: `0_u64` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u64` is unnecessary [INFO] [stdout] --> src/aoc_2024/day_03.rs:42:26 [INFO] [stdout] | [INFO] [stdout] 42 | (0 as u64, 0 as u64) [INFO] [stdout] | ^^^^^^^^ help: try: `0_u64` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u64` is unnecessary [INFO] [stdout] --> src/aoc_2024/day_03.rs:42:36 [INFO] [stdout] | [INFO] [stdout] 42 | (0 as u64, 0 as u64) [INFO] [stdout] | ^^^^^^^^ help: try: `0_u64` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u64` is unnecessary [INFO] [stdout] --> src/aoc_2024/day_03.rs:44:27 [INFO] [stdout] | [INFO] [stdout] 44 | _ => (0 as u64, 0 as u64) [INFO] [stdout] | ^^^^^^^^ help: try: `0_u64` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u64` is unnecessary [INFO] [stdout] --> src/aoc_2024/day_03.rs:44:37 [INFO] [stdout] | [INFO] [stdout] 44 | _ => (0 as u64, 0 as u64) [INFO] [stdout] | ^^^^^^^^ help: try: `0_u64` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc_2024/day_04.rs:29:5 [INFO] [stdout] | [INFO] [stdout] 29 | return x >= 0 && x < m && y >= 0 && y < n; [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] 29 - return x >= 0 && x < m && y >= 0 && y < n; [INFO] [stdout] 29 + x >= 0 && x < m && y >= 0 && y < n [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/aoc_2024/day_04.rs:43:5 [INFO] [stdout] | [INFO] [stdout] 43 | / if new_x >= 0 && new_x < content.len() as i32 { [INFO] [stdout] 44 | | if new_y >= 0 && new_y < content[new_x as usize].len() as i32 { [INFO] [stdout] 45 | | if content[new_x as usize][new_y as usize] == strs[idx + 1] { [INFO] [stdout] 46 | | ans += dfs_part1(content, new_x, new_y, idx + 1, dirs, strs) [INFO] [stdout] ... | [INFO] [stdout] 49 | | } [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] 43 ~ if new_x >= 0 && new_x < content.len() as i32 [INFO] [stdout] 44 ~ && new_y >= 0 && new_y < content[new_x as usize].len() as i32 { [INFO] [stdout] 45 | if content[new_x as usize][new_y as usize] == strs[idx + 1] { [INFO] [stdout] 46 | ans += dfs_part1(content, new_x, new_y, idx + 1, dirs, strs) [INFO] [stdout] 47 | } [INFO] [stdout] 48 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/aoc_2024/day_04.rs:44:9 [INFO] [stdout] | [INFO] [stdout] 44 | / if new_y >= 0 && new_y < content[new_x as usize].len() as i32 { [INFO] [stdout] 45 | | if content[new_x as usize][new_y as usize] == strs[idx + 1] { [INFO] [stdout] 46 | | ans += dfs_part1(content, new_x, new_y, idx + 1, dirs, strs) [INFO] [stdout] 47 | | } [INFO] [stdout] 48 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 44 ~ if new_y >= 0 && new_y < content[new_x as usize].len() as i32 [INFO] [stdout] 45 ~ && content[new_x as usize][new_y as usize] == strs[idx + 1] { [INFO] [stdout] 46 | ans += dfs_part1(content, new_x, new_y, idx + 1, dirs, strs) [INFO] [stdout] 47 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc_2024/day_04.rs:86:9 [INFO] [stdout] | [INFO] [stdout] 86 | return 1; [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] 86 - return 1; [INFO] [stdout] 86 + 1 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc_2024/day_04.rs:88:9 [INFO] [stdout] | [INFO] [stdout] 88 | 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] 88 - return 0; [INFO] [stdout] 88 + 0 [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/aoc_2024/day_04.rs:54:23 [INFO] [stdout] | [INFO] [stdout] 54 | fn dfs_part2(content: &Vec>, x: i32, y: i32, m: i32, n: i32) -> u64 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 54 - fn dfs_part2(content: &Vec>, x: i32, y: i32, m: i32, n: i32) -> u64 { [INFO] [stdout] 54 + fn dfs_part2(content: &[Vec], x: i32, y: i32, m: i32, n: i32) -> u64 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `puzzle` [INFO] [stdout] --> src/aoc_2024/day_04.rs:103:18 [INFO] [stdout] | [INFO] [stdout] 103 | for i in 0..puzzle.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 and enumerate() [INFO] [stdout] | [INFO] [stdout] 103 - for i in 0..puzzle.len() { [INFO] [stdout] 103 + for (i, ) in puzzle.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is used to index `puzzle` [INFO] [stdout] --> src/aoc_2024/day_04.rs:104:22 [INFO] [stdout] | [INFO] [stdout] 104 | for j in 0..puzzle[i].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] 104 - for j in 0..puzzle[i].len() { [INFO] [stdout] 104 + for (j, ) in puzzle.iter().enumerate().take(puzzle[i].len()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/aoc_2024/day_05.rs:20:43 [INFO] [stdout] | [INFO] [stdout] 20 | fn evaluate_lines(s: &str, evaluate_line: fn(&HashMap>, &[i32]) -> Option) -> i32 { [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: redundant closure [INFO] [stdout] --> src/aoc_2024/day_05.rs:27:21 [INFO] [stdout] | [INFO] [stdout] 27 | nums.is_sorted_by(|a, b| cmp(a, b)).then_some(nums[nums.len() / 2]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `cmp` [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/aoc_2024/day_05.rs:33:23 [INFO] [stdout] | [INFO] [stdout] 33 | (!nums.is_sorted_by(|a, b| cmp(a, b))).then(|| { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `&cmp` [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/aoc_2024/day_06.rs:14:63 [INFO] [stdout] | [INFO] [stdout] 14 | fn one_loop(start_x: i32, start_y: i32, start_dir: i32, grid: &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] help: change this to [INFO] [stdout] | [INFO] [stdout] 14 - fn one_loop(start_x: i32, start_y: i32, start_dir: i32, grid: &Vec>) -> Option { [INFO] [stdout] 14 + fn one_loop(start_x: i32, start_y: i32, start_dir: i32, grid: &[Vec]) -> Option { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/aoc_2024/day_06.rs:72:25 [INFO] [stdout] | [INFO] [stdout] 72 | if grid[i as usize][j as usize] == "^" { [INFO] [stdout] | ^^^^^^^^^^ help: try: `{ i }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/aoc_2024/day_06.rs:72:37 [INFO] [stdout] | [INFO] [stdout] 72 | if grid[i as usize][j as usize] == "^" { [INFO] [stdout] | ^^^^^^^^^^ help: try: `{ j }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/aoc_2024/day_07.rs:13:24 [INFO] [stdout] | [INFO] [stdout] 13 | fn load_input(content: &String) -> 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 load_input(content: &String) -> Vec { [INFO] [stdout] 13 + fn load_input(content: &str) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::str::Lines<'_>` [INFO] [stdout] --> src/aoc_2024/day_07.rs:14:5 [INFO] [stdout] | [INFO] [stdout] 14 | / content [INFO] [stdout] 15 | | .lines() [INFO] [stdout] 16 | | .into_iter() [INFO] [stdout] | |____________________^ [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] help: consider removing `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 14 ~ content [INFO] [stdout] 15 + .lines() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `split_once` [INFO] [stdout] --> src/aoc_2024/day_07.rs:18:13 [INFO] [stdout] | [INFO] [stdout] 18 | let mut parts = l.splitn(2, ": "); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 19 | let result = parts.next().unwrap(); [INFO] [stdout] | ----------------------------------- first usage here [INFO] [stdout] 20 | let operands = parts.next().unwrap(); [INFO] [stdout] | ------------------------------------- second usage here [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_split_once [INFO] [stdout] = note: `#[warn(clippy::manual_split_once)]` on by default [INFO] [stdout] help: replace with `split_once` [INFO] [stdout] | [INFO] [stdout] 18 ~ let (result, operands) = l.split_once(": ").unwrap(); [INFO] [stdout] 19 ~ [INFO] [stdout] 20 ~ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::str::Lines<'_>` [INFO] [stdout] --> src/aoc_2024/day_08.rs:23:26 [INFO] [stdout] | [INFO] [stdout] 23 | for (i, line) in content.lines().into_iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `content.lines()` [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: useless conversion to the same type: `std::str::Chars<'_>` [INFO] [stdout] --> src/aoc_2024/day_08.rs:24:28 [INFO] [stdout] | [INFO] [stdout] 24 | for (j, ch) in line.chars().into_iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `line.chars()` [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: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/aoc_2024/day_08.rs:29:37 [INFO] [stdout] | [INFO] [stdout] 29 | positions.entry(ch).or_insert_with(Vec::new).push((i as i32, j as i32)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: importing legacy numeric constants [INFO] [stdout] --> src/aoc_2024/day_09.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::usize; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `usize::` will resolve to the respective associated constant [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/aoc_2024/day_09.rs:15:25 [INFO] [stdout] | [INFO] [stdout] 15 | fn make_layout(content: &String) -> 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] 15 - fn make_layout(content: &String) -> Vec { [INFO] [stdout] 15 + fn make_layout(content: &str) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/aoc_2024/day_09.rs:82:19 [INFO] [stdout] | [INFO] [stdout] 82 | while file_system[n].is_free || (!file_system[n].is_free && file_system[n].file_id != id) { [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] 82 - while file_system[n].is_free || (!file_system[n].is_free && file_system[n].file_id != id) { [INFO] [stdout] 82 + while !(!file_system[n].is_free && file_system[n].file_id == id) { [INFO] [stdout] | [INFO] [stdout] 82 - while file_system[n].is_free || (!file_system[n].is_free && file_system[n].file_id != id) { [INFO] [stdout] 82 + while file_system[n].is_free || file_system[n].file_id != id { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/aoc_2024/day_09.rs:80:25 [INFO] [stdout] | [INFO] [stdout] 80 | let mut n = right as usize; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `right` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/aoc_2024/day_09.rs:119:21 [INFO] [stdout] | [INFO] [stdout] 119 | right = (n - right_cache) as usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(n - right_cache)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> src/aoc_2024/day_10.rs:11:10 [INFO] [stdout] | [INFO] [stdout] 11 | .into_iter() [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] = note: `#[warn(clippy::into_iter_on_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> src/aoc_2024/day_10.rs:14:18 [INFO] [stdout] | [INFO] [stdout] 14 | .into_iter() [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `flat_map` with an identity function [INFO] [stdout] --> src/aoc_2024/day_10.rs:33:10 [INFO] [stdout] | [INFO] [stdout] 33 | .flat_map(|row| row) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `flatten()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#flat_map_identity [INFO] [stdout] = note: `#[warn(clippy::flat_map_identity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> src/aoc_2024/day_10.rs:23:10 [INFO] [stdout] | [INFO] [stdout] 23 | .into_iter() [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> src/aoc_2024/day_10.rs:27:18 [INFO] [stdout] | [INFO] [stdout] 27 | .into_iter() [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/aoc_2024/day_10.rs:70:21 [INFO] [stdout] | [INFO] [stdout] 70 | / if in_range(x, y, m, n) && grid[x as usize][y as usize] - grid[entry.0 as usize][entry.1 as usize] == 1 { [INFO] [stdout] 71 | | if !seen.contains(&(x, y, entry.2, entry.3)) { [INFO] [stdout] 72 | | new_trailheads.push_back((x, y, entry.2, entry.3)); [INFO] [stdout] 73 | | seen.insert((x, y, entry.2, entry.3)); [INFO] [stdout] 74 | | } [INFO] [stdout] 75 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 70 ~ if in_range(x, y, m, n) && grid[x as usize][y as usize] - grid[entry.0 as usize][entry.1 as usize] == 1 [INFO] [stdout] 71 ~ && !seen.contains(&(x, y, entry.2, entry.3)) { [INFO] [stdout] 72 | new_trailheads.push_back((x, y, entry.2, entry.3)); [INFO] [stdout] 73 | seen.insert((x, y, entry.2, entry.3)); [INFO] [stdout] 74 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::collections::hash_map::Values<'_, (i32, i32), i32>` [INFO] [stdout] --> src/aoc_2024/day_10.rs:104:26 [INFO] [stdout] | [INFO] [stdout] 104 | let part1: u64 = mp [INFO] [stdout] | __________________________^ [INFO] [stdout] 105 | | .values() [INFO] [stdout] 106 | | .into_iter() [INFO] [stdout] | |________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] help: consider removing `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 104 ~ let part1: u64 = mp [INFO] [stdout] 105 + .values() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::collections::hash_map::Values<'_, (i32, i32), i32>` [INFO] [stdout] --> src/aoc_2024/day_10.rs:110:26 [INFO] [stdout] | [INFO] [stdout] 110 | let part2: u64 = mp2 [INFO] [stdout] | __________________________^ [INFO] [stdout] 111 | | .values() [INFO] [stdout] 112 | | .into_iter() [INFO] [stdout] | |________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] help: consider removing `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 110 ~ let part2: u64 = mp2 [INFO] [stdout] 111 + .values() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/aoc_2024/day_11.rs:19:12 [INFO] [stdout] | [INFO] [stdout] 19 | if digits % 2 == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: replace with: `digits.is_multiple_of(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::str::Split<'_, &str>` [INFO] [stdout] --> src/aoc_2024/day_11.rs:39:22 [INFO] [stdout] | [INFO] [stdout] 39 | let inputs = puzzle [INFO] [stdout] | ______________________^ [INFO] [stdout] 40 | | .trim_end() [INFO] [stdout] 41 | | .split(" ") [INFO] [stdout] 42 | | .into_iter() [INFO] [stdout] | |________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] help: consider removing `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 39 ~ let inputs = puzzle [INFO] [stdout] 40 + .trim_end() [INFO] [stdout] 41 + .split(" ") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> src/aoc_2024/day_12.rs:27:16 [INFO] [stdout] | [INFO] [stdout] 27 | let diff = s1.difference(&s2).map(|c| *c).collect::, Complex)>>(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `s1.difference(&s2).copied()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] = note: `#[warn(clippy::map_clone)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Complex` which implements the `Copy` trait [INFO] [stdout] --> src/aoc_2024/day_12.rs:50:24 [INFO] [stdout] | [INFO] [stdout] 50 | set.insert(key.clone()); [INFO] [stdout] | ^^^^^^^^^^^ help: try dereferencing it: `*key` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Complex` which implements the `Copy` trait [INFO] [stdout] --> src/aoc_2024/day_12.rs:51:31 [INFO] [stdout] | [INFO] [stdout] 51 | union_find.insert(key.clone(), set); [INFO] [stdout] | ^^^^^^^^^^^ help: try dereferencing it: `*key` [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: you are using an explicit closure for copying elements [INFO] [stdout] --> src/aoc_2024/day_12.rs:60:45 [INFO] [stdout] | [INFO] [stdout] 60 | ... let union = sets_p.union(sets_n).map(|c| *c).collect::>>(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `sets_p.union(sets_n).copied()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/aoc_2024/day_13.rs:41:19 [INFO] [stdout] | [INFO] [stdout] 41 | fn parse(content: &String) -> (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] 41 - fn parse(content: &String) -> (Vec, Vec) { [INFO] [stdout] 41 + fn parse(content: &str) -> (Vec, Vec) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc_2024/day_14.rs:13:5 [INFO] [stdout] | [INFO] [stdout] 13 | return r % y; [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] 13 - return r % y; [INFO] [stdout] 13 + r % y [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/aoc_2024/day_14.rs:11:5 [INFO] [stdout] | [INFO] [stdout] 11 | r = r + y; [INFO] [stdout] | ^^^^^^^^^ help: replace it with: `r += y` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/aoc_2024/day_14.rs:39:21 [INFO] [stdout] | [INFO] [stdout] 39 | fn parse_line(line: &String, reg: &Regex) -> 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] 39 - fn parse_line(line: &String, reg: &Regex) -> Vec { [INFO] [stdout] 39 + fn parse_line(line: &str, reg: &Regex) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/aoc_2024/day_14.rs:46:19 [INFO] [stdout] | [INFO] [stdout] 46 | fn parse(content: &String) -> 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] 46 - fn parse(content: &String) -> Vec { [INFO] [stdout] 46 + fn parse(content: &str) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> src/aoc_2024/day_14.rs:71:10 [INFO] [stdout] | [INFO] [stdout] 71 | .into_iter() [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/aoc_2024/day_15.rs:10:19 [INFO] [stdout] | [INFO] [stdout] 10 | fn parse(content: &String) -> (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] 10 - fn parse(content: &String) -> (Vec>, Vec) { [INFO] [stdout] 10 + fn parse(content: &str) -> (Vec>, Vec) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/aoc_2024/day_15.rs:16:12 [INFO] [stdout] | [INFO] [stdout] 16 | if line.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `line.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> src/aoc_2024/day_15.rs:62:26 [INFO] [stdout] | [INFO] [stdout] 62 | for (i, row) in grid.into_iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> src/aoc_2024/day_15.rs:63:28 [INFO] [stdout] | [INFO] [stdout] 63 | for (j, ch) in row.into_iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/aoc_2024/day_15.rs:77:23 [INFO] [stdout] | [INFO] [stdout] 77 | fn try_box_push(grid: &Vec>, cx: i32, cy: i32, m: i32, n: i32, dir: &(i32, i32)) -> Option<(i32, i32)> { [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] 77 - fn try_box_push(grid: &Vec>, cx: i32, cy: i32, m: i32, n: i32, dir: &(i32, i32)) -> Option<(i32, i32)> { [INFO] [stdout] 77 + fn try_box_push(grid: &[Vec], cx: i32, cy: i32, m: i32, n: i32, dir: &(i32, i32)) -> Option<(i32, i32)> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/aoc_2024/day_15.rs:96:36 [INFO] [stdout] | [INFO] [stdout] 96 | fn try_box_push_horizontally(grid: &mut Vec>, cx: i32, cy: i32, m: i32, n: i32, dir: &(i32, i32)) -> Option<(i32, i32)> { [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] 96 - fn try_box_push_horizontally(grid: &mut Vec>, cx: i32, cy: i32, m: i32, n: i32, dir: &(i32, i32)) -> Option<(i32, i32)> { [INFO] [stdout] 96 + fn try_box_push_horizontally(grid: &mut [Vec], cx: i32, cy: i32, m: i32, n: i32, dir: &(i32, i32)) -> Option<(i32, i32)> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/aoc_2024/day_15.rs:129:34 [INFO] [stdout] | [INFO] [stdout] 129 | fn try_box_push_vertically(grid: &mut Vec>, cx: i32, cy: i32, m: i32, _n: i32, dir: &(i32, i32)) -> Option<(i32, i32)> { [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] 129 - fn try_box_push_vertically(grid: &mut Vec>, cx: i32, cy: i32, m: i32, _n: i32, dir: &(i32, i32)) -> Option<(i32, i32)> { [INFO] [stdout] 129 + fn try_box_push_vertically(grid: &mut [Vec], cx: i32, cy: i32, m: i32, _n: i32, dir: &(i32, i32)) -> Option<(i32, i32)> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/aoc_2024/day_15.rs:137:28 [INFO] [stdout] | [INFO] [stdout] 137 | let mut min_left = (*left) as i32; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `(*left)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/aoc_2024/day_15.rs:138:29 [INFO] [stdout] | [INFO] [stdout] 138 | let mut max_right = (*right) as i32; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `(*right)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `contains()` instead of `iter().any()` is more efficient [INFO] [stdout] --> src/aoc_2024/day_15.rs:152:12 [INFO] [stdout] | [INFO] [stdout] 152 | if slice.iter().any(|&x| x == '#') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `slice.contains(&'#')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_contains [INFO] [stdout] = note: `#[warn(clippy::manual_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::collections::hash_map::Keys<'_, i32, (i32, i32)>` [INFO] [stdout] --> src/aoc_2024/day_15.rs:171:24 [INFO] [stdout] | [INFO] [stdout] 171 | let mut keys = mp.keys().into_iter().collect::>(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `mp.keys()` [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: useless conversion to the same type: `std::collections::hash_map::Keys<'_, i32, (i32, i32)>` [INFO] [stdout] --> src/aoc_2024/day_15.rs:190:24 [INFO] [stdout] | [INFO] [stdout] 190 | let mut keys = mp.keys().into_iter().collect::>(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `mp.keys()` [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: unneeded `return` statement [INFO] [stdout] --> src/aoc_2024/day_15.rs:229:9 [INFO] [stdout] | [INFO] [stdout] 229 | return (nx, ny); [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] 229 - return (nx, ny); [INFO] [stdout] 229 + (nx, ny) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc_2024/day_15.rs:231:9 [INFO] [stdout] | [INFO] [stdout] 231 | return (cx, cy); [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] 231 - return (cx, cy); [INFO] [stdout] 231 + (cx, cy) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc_2024/day_15.rs:238:13 [INFO] [stdout] | [INFO] [stdout] 238 | return (nx, ny); [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] 238 - return (nx, ny); [INFO] [stdout] 238 + (nx, ny) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc_2024/day_15.rs:240:13 [INFO] [stdout] | [INFO] [stdout] 240 | return (cx, cy); [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] 240 - return (cx, cy); [INFO] [stdout] 240 + (cx, cy) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc_2024/day_15.rs:247:21 [INFO] [stdout] | [INFO] [stdout] 247 | return (nx, ny); [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] 247 ~ (nx, ny) [INFO] [stdout] 248 | }, [INFO] [stdout] 249 | None => return (cx, cy) [INFO] [stdout] 250 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc_2024/day_15.rs:249:25 [INFO] [stdout] | [INFO] [stdout] 249 | None => return (cx, cy) [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] 249 ~ None => (cx, cy) [INFO] [stdout] 250 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc_2024/day_15.rs:255:21 [INFO] [stdout] | [INFO] [stdout] 255 | return (nx, ny); [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] 255 ~ (nx, ny) [INFO] [stdout] 256 | }, [INFO] [stdout] 257 | None => return (cx, cy) [INFO] [stdout] 258 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc_2024/day_15.rs:257:25 [INFO] [stdout] | [INFO] [stdout] 257 | None => return (cx, cy) [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] 257 ~ None => (cx, cy) [INFO] [stdout] 258 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/aoc_2024/day_15.rs:233:46 [INFO] [stdout] | [INFO] [stdout] 233 | if let Some((bx, by)) = try_box_push(&grid, nx, ny, m, n, cdir) { [INFO] [stdout] | ^^^^^ help: change this to: `grid` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc_2024/day_15.rs:300:21 [INFO] [stdout] | [INFO] [stdout] 300 | return (100 * i + j) as u64; [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] 300 - return (100 * i + j) as u64; [INFO] [stdout] 300 + (100 * i + j) as u64 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc_2024/day_15.rs:302:21 [INFO] [stdout] | [INFO] [stdout] 302 | 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] 302 - return 0; [INFO] [stdout] 302 + 0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc_2024/day_15.rs:320:21 [INFO] [stdout] | [INFO] [stdout] 320 | return (100 * i + j) as u64; [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] 320 - return (100 * i + j) as u64; [INFO] [stdout] 320 + (100 * i + j) as u64 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc_2024/day_15.rs:322:21 [INFO] [stdout] | [INFO] [stdout] 322 | 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] 322 - return 0; [INFO] [stdout] 322 + 0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: importing legacy numeric constants [INFO] [stdout] --> src/aoc_2024/day_16.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::usize; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `usize::` will resolve to the respective associated constant [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/aoc_2024/day_16.rs:11:23 [INFO] [stdout] | [INFO] [stdout] 11 | fn make_grid(content: &String) -> 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] 11 - fn make_grid(content: &String) -> Vec> { [INFO] [stdout] 11 + fn make_grid(content: &str) -> Vec> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::str::Lines<'_>` [INFO] [stdout] --> src/aoc_2024/day_16.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | / content [INFO] [stdout] 13 | | .lines() [INFO] [stdout] 14 | | .into_iter() [INFO] [stdout] | |____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] help: consider removing `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 12 ~ content [INFO] [stdout] 13 + .lines() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> src/aoc_2024/day_16.rs:23:26 [INFO] [stdout] | [INFO] [stdout] 23 | for (i, row) in grid.into_iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> src/aoc_2024/day_16.rs:24:28 [INFO] [stdout] | [INFO] [stdout] 24 | for (j, ch) in row.into_iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `i32` is unnecessary [INFO] [stdout] --> src/aoc_2024/day_16.rs:59:20 [INFO] [stdout] | [INFO] [stdout] 59 | heap.push((0 as i32, start.0, start.1, (0, 1), vec![start])); [INFO] [stdout] | ^^^^^^^^ help: try: `0_i32` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/aoc_2024/day_16.rs:84:30 [INFO] [stdout] | [INFO] [stdout] 84 | if !in_range(x as i32, y as i32, m as i32, n as i32) { [INFO] [stdout] | ^^^^^^^^ help: try: `x` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/aoc_2024/day_16.rs:84:40 [INFO] [stdout] | [INFO] [stdout] 84 | if !in_range(x as i32, y as i32, m as i32, n as i32) { [INFO] [stdout] | ^^^^^^^^ help: try: `y` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/aoc_2024/day_17.rs:85:24 [INFO] [stdout] | [INFO] [stdout] 85 | fn parse_input(input : &String) -> (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] 85 - fn parse_input(input : &String) -> (Vec, Vec) { [INFO] [stdout] 85 + fn parse_input(input : &str) -> (Vec, Vec) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u64` is unnecessary [INFO] [stdout] --> src/aoc_2024/day_17.rs:169:33 [INFO] [stdout] | [INFO] [stdout] 169 | return (0 as u64, a as u64); [INFO] [stdout] | ^^^^^^^^ help: try: `0_u64` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u64` -> `u64`) [INFO] [stdout] --> src/aoc_2024/day_17.rs:169:43 [INFO] [stdout] | [INFO] [stdout] 169 | return (0 as u64, a as u64); [INFO] [stdout] | ^^^^^^^^ help: try: `a` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: importing legacy numeric constants [INFO] [stdout] --> src/aoc_2024/day_18.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::u64; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `u64::` will resolve to the respective associated constant [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/aoc_2024/day_18.rs:10:25 [INFO] [stdout] | [INFO] [stdout] 10 | fn parse_bytes(content: &String) -> Vec<(i32, i32)> { [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 parse_bytes(content: &String) -> Vec<(i32, i32)> { [INFO] [stdout] 10 + fn parse_bytes(content: &str) -> Vec<(i32, i32)> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::str::Lines<'_>` [INFO] [stdout] --> src/aoc_2024/day_18.rs:11:5 [INFO] [stdout] | [INFO] [stdout] 11 | / content [INFO] [stdout] 12 | | .lines() [INFO] [stdout] 13 | | .into_iter() [INFO] [stdout] | |____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] help: consider removing `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 11 ~ content [INFO] [stdout] 12 + .lines() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> src/aoc_2024/day_18.rs:27:25 [INFO] [stdout] | [INFO] [stdout] 27 | for (y, x) in bytes.into_iter().take(take) { [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/aoc_2024/day_18.rs:38:20 [INFO] [stdout] | [INFO] [stdout] 38 | fn min_steps(grid: &Vec>, start: (i32, i32), end: (i32, i32)) -> 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] help: change this to [INFO] [stdout] | [INFO] [stdout] 38 - fn min_steps(grid: &Vec>, start: (i32, i32), end: (i32, i32)) -> Option { [INFO] [stdout] 38 + fn min_steps(grid: &[Vec], start: (i32, i32), end: (i32, i32)) -> Option { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/aoc_2024/day_18.rs:46:11 [INFO] [stdout] | [INFO] [stdout] 46 | while todo.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!todo.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/aoc_2024/day_18.rs:73:5 [INFO] [stdout] | [INFO] [stdout] 73 | / match seen.get(&end) { [INFO] [stdout] 74 | | Some(x) => Some(*x), [INFO] [stdout] 75 | | None => None, [INFO] [stdout] 76 | | } [INFO] [stdout] | |_____^ help: try: `seen.get(&end).map(|x| *x)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/aoc_2024/day_19.rs:9:25 [INFO] [stdout] | [INFO] [stdout] 9 | fn parse_input(content: &String) -> (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] 9 - fn parse_input(content: &String) -> (Vec, Vec) { [INFO] [stdout] 9 + fn parse_input(content: &str) -> (Vec, Vec) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::str::Lines<'_>` [INFO] [stdout] --> src/aoc_2024/day_19.rs:10:20 [INFO] [stdout] | [INFO] [stdout] 10 | let mut iter = content.lines().into_iter(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `content.lines()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> src/aoc_2024/day_19.rs:43:10 [INFO] [stdout] | [INFO] [stdout] 43 | .into_iter() [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/aoc_2024/day_19.rs:48:8 [INFO] [stdout] | [INFO] [stdout] 48 | if applicable.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `applicable.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/aoc_2024/day_20.rs:12:23 [INFO] [stdout] | [INFO] [stdout] 12 | fn make_grid(content: &String) -> HashMap, char> { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 12 - fn make_grid(content: &String) -> HashMap, char> { [INFO] [stdout] 12 + fn make_grid(content: &str) -> HashMap, char> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::str::Lines<'_>` [INFO] [stdout] --> src/aoc_2024/day_20.rs:13:5 [INFO] [stdout] | [INFO] [stdout] 13 | / content [INFO] [stdout] 14 | | .lines() [INFO] [stdout] 15 | | .into_iter() [INFO] [stdout] | |____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] help: consider removing `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 13 ~ content [INFO] [stdout] 14 + .lines() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/aoc_2024/day_20.rs:58:11 [INFO] [stdout] | [INFO] [stdout] 58 | while todo.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!todo.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: importing legacy numeric constants [INFO] [stdout] --> src/aoc_2024/day_21.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use std::usize; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `usize::` will resolve to the respective associated constant [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/aoc_2024/day_21.rs:217:17 [INFO] [stdout] | [INFO] [stdout] 217 | &next, [INFO] [stdout] | ^^^^^ help: change this to: `next` [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 `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/aoc_2024/day_22.rs:12:25 [INFO] [stdout] | [INFO] [stdout] 12 | fn parse_input(content: &String) -> 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] 12 - fn parse_input(content: &String) -> Vec { [INFO] [stdout] 12 + fn parse_input(content: &str) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/aoc_2024/day_23.rs:23:31 [INFO] [stdout] | [INFO] [stdout] 23 | fn add_edge(&mut self, u: &String, v: &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] 23 ~ fn add_edge(&mut self, u: &str, v: &String) { [INFO] [stdout] 24 ~ self.adj_list.entry(u.to_owned()).or_insert_with(HashSet::new).insert(v.clone()); [INFO] [stdout] 25 ~ self.adj_list.entry(v.clone()).or_insert_with(HashSet::new).insert(u.to_owned()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/aoc_2024/day_23.rs:23:43 [INFO] [stdout] | [INFO] [stdout] 23 | fn add_edge(&mut self, u: &String, v: &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] 23 ~ fn add_edge(&mut self, u: &String, v: &str) { [INFO] [stdout] 24 ~ self.adj_list.entry(u.clone()).or_insert_with(HashSet::new).insert(v.to_owned()); [INFO] [stdout] 25 ~ self.adj_list.entry(v.to_owned()).or_insert_with(HashSet::new).insert(u.clone()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/aoc_2024/day_23.rs:24:40 [INFO] [stdout] | [INFO] [stdout] 24 | self.adj_list.entry(u.clone()).or_insert_with(HashSet::new).insert(v.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/aoc_2024/day_23.rs:25:40 [INFO] [stdout] | [INFO] [stdout] 25 | self.adj_list.entry(v.clone()).or_insert_with(HashSet::new).insert(u.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/aoc_2024/day_23.rs:51:25 [INFO] [stdout] | [INFO] [stdout] 51 | fn parse_input(content: &String) -> Graph { [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] 51 - fn parse_input(content: &String) -> Graph { [INFO] [stdout] 51 + fn parse_input(content: &str) -> Graph { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `AND` contains a capitalized acronym [INFO] [stdout] --> src/aoc_2024/day_24.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 15 | AND, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `And` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `XOR` contains a capitalized acronym [INFO] [stdout] --> src/aoc_2024/day_24.rs:17:5 [INFO] [stdout] | [INFO] [stdout] 17 | XOR, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Xor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/aoc_2024/day_24.rs:28:25 [INFO] [stdout] | [INFO] [stdout] 28 | fn parse_input(content: &String) -> (HashMap, 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] 28 - fn parse_input(content: &String) -> (HashMap, Vec) { [INFO] [stdout] 28 + fn parse_input(content: &str) -> (HashMap, Vec) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/aoc_2024/day_24.rs:74:45 [INFO] [stdout] | [INFO] [stdout] 74 | outbound.entry(rule.v1.to_string()).or_insert_with(Vec::new).push(rule.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/aoc_2024/day_24.rs:75:45 [INFO] [stdout] | [INFO] [stdout] 75 | outbound.entry(rule.v2.to_string()).or_insert_with(Vec::new).push(rule.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/aoc_2024/day_24.rs:85:11 [INFO] [stdout] | [INFO] [stdout] 85 | while todo.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!todo.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/aoc_2024/day_24.rs:101:52 [INFO] [stdout] | [INFO] [stdout] 101 | if let Some(val) = inbound.get(&out) { [INFO] [stdout] | ^^^^ help: change this to: `out` [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/aoc_2024/day_24.rs:103:44 [INFO] [stdout] | [INFO] [stdout] 103 | ... inbound.remove(&out); [INFO] [stdout] | ^^^^ help: change this to: `out` [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 creates an owned instance just for comparison [INFO] [stdout] --> src/aoc_2024/day_24.rs:156:50 [INFO] [stdout] | [INFO] [stdout] 156 | if rule.op == LogicOp::AND && rule.v1 != "x00".to_string() && rule.v2 != "x00".to_string() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `"x00"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] = note: `#[warn(clippy::cmp_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/aoc_2024/day_24.rs:156:82 [INFO] [stdout] | [INFO] [stdout] 156 | if rule.op == LogicOp::AND && rule.v1 != "x00".to_string() && rule.v2 != "x00".to_string() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `"x00"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/aoc_2024/day_06.rs:65:20 [INFO] [stdout] | [INFO] [stdout] 65 | let dirs = vec![(-1, 0), (0, 1), (1, 0), (0, -1)]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[(-1, 0), (0, 1), (1, 0), (0, -1)]` [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/aoc_2024/day_12.rs:16:18 [INFO] [stdout] | [INFO] [stdout] 16 | for d in vec![Complex::new(1, 0), Complex::new(-1, 0), Complex::new(0, -1), Complex::new(0, 1)] { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[Complex::new(1, 0), Complex::new(-1, 0), Complex::new(0, -1), Complex::new(0, 1)]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/aoc_2024/day_12.rs:55:22 [INFO] [stdout] | [INFO] [stdout] 55 | for n in vec![*p + Complex::new(1, 0), p + Complex::new(-1 ,0), p + Complex::new(0, 1), p + Complex::new(0, -1)] { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[*p + Complex::new(1, 0), p + Complex::new(-1 ,0), p + Complex::new(0, 1), p + Complex::new(0, -1)]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/aoc_2024/day_24.rs:150:50 [INFO] [stdout] | [INFO] [stdout] 150 | && does_not_start_with_any(&rule.v1, &vec!['x', 'y', 'z']) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: you can use a slice directly: `&['x', 'y', 'z']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/aoc_2024/day_24.rs:151:50 [INFO] [stdout] | [INFO] [stdout] 151 | && does_not_start_with_any(&rule.v2, &vec!['x', 'y', 'z']) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: you can use a slice directly: `&['x', 'y', 'z']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/aoc_2024/day_24.rs:152:51 [INFO] [stdout] | [INFO] [stdout] 152 | && does_not_start_with_any(&rule.res, &vec!['x', 'y', 'z']) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: you can use a slice directly: `&['x', 'y', 'z']` [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: using `print!()` with a format string that ends in a single newline [INFO] [stdout] --> src/config.rs:27:22 [INFO] [stdout] | [INFO] [stdout] 27 | Ok(_) => print!("Successfully loaded environment\n"), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_with_newline [INFO] [stdout] = note: `#[warn(clippy::print_with_newline)]` on by default [INFO] [stdout] help: use `println!` instead [INFO] [stdout] | [INFO] [stdout] 27 - Ok(_) => print!("Successfully loaded environment\n"), [INFO] [stdout] 27 + Ok(_) => println!("Successfully loaded environment"), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u8` is unnecessary [INFO] [stdout] --> src/plugin.rs:42:21 [INFO] [stdout] | [INFO] [stdout] 42 | map.insert((1 as u8, 2024 as u16), Box::new(day_01::AoC2024Day01)); [INFO] [stdout] | ^^^^^^^ help: try: `1_u8` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u16` is unnecessary [INFO] [stdout] --> src/plugin.rs:42:30 [INFO] [stdout] | [INFO] [stdout] 42 | map.insert((1 as u8, 2024 as u16), Box::new(day_01::AoC2024Day01)); [INFO] [stdout] | ^^^^^^^^^^^ help: try: `2024_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u8` is unnecessary [INFO] [stdout] --> src/plugin.rs:43:21 [INFO] [stdout] | [INFO] [stdout] 43 | map.insert((2 as u8, 2024 as u16), Box::new(day_02::AoC2024Day02)); [INFO] [stdout] | ^^^^^^^ help: try: `2_u8` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u16` is unnecessary [INFO] [stdout] --> src/plugin.rs:43:30 [INFO] [stdout] | [INFO] [stdout] 43 | map.insert((2 as u8, 2024 as u16), Box::new(day_02::AoC2024Day02)); [INFO] [stdout] | ^^^^^^^^^^^ help: try: `2024_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u8` is unnecessary [INFO] [stdout] --> src/plugin.rs:44:21 [INFO] [stdout] | [INFO] [stdout] 44 | map.insert((3 as u8, 2024 as u16), Box::new(day_03::AoC2024Day03)); [INFO] [stdout] | ^^^^^^^ help: try: `3_u8` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u16` is unnecessary [INFO] [stdout] --> src/plugin.rs:44:30 [INFO] [stdout] | [INFO] [stdout] 44 | map.insert((3 as u8, 2024 as u16), Box::new(day_03::AoC2024Day03)); [INFO] [stdout] | ^^^^^^^^^^^ help: try: `2024_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u8` is unnecessary [INFO] [stdout] --> src/plugin.rs:45:21 [INFO] [stdout] | [INFO] [stdout] 45 | map.insert((4 as u8, 2024 as u16), Box::new(day_04::AoC2024Day04)); [INFO] [stdout] | ^^^^^^^ help: try: `4_u8` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u16` is unnecessary [INFO] [stdout] --> src/plugin.rs:45:30 [INFO] [stdout] | [INFO] [stdout] 45 | map.insert((4 as u8, 2024 as u16), Box::new(day_04::AoC2024Day04)); [INFO] [stdout] | ^^^^^^^^^^^ help: try: `2024_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u8` is unnecessary [INFO] [stdout] --> src/plugin.rs:46:21 [INFO] [stdout] | [INFO] [stdout] 46 | map.insert((5 as u8, 2024 as u16), Box::new(day_05::AoC2024Day05)); [INFO] [stdout] | ^^^^^^^ help: try: `5_u8` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u16` is unnecessary [INFO] [stdout] --> src/plugin.rs:46:30 [INFO] [stdout] | [INFO] [stdout] 46 | map.insert((5 as u8, 2024 as u16), Box::new(day_05::AoC2024Day05)); [INFO] [stdout] | ^^^^^^^^^^^ help: try: `2024_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u8` is unnecessary [INFO] [stdout] --> src/plugin.rs:47:21 [INFO] [stdout] | [INFO] [stdout] 47 | map.insert((6 as u8, 2024 as u16), Box::new(day_06::AoC2024Day06)); [INFO] [stdout] | ^^^^^^^ help: try: `6_u8` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u16` is unnecessary [INFO] [stdout] --> src/plugin.rs:47:30 [INFO] [stdout] | [INFO] [stdout] 47 | map.insert((6 as u8, 2024 as u16), Box::new(day_06::AoC2024Day06)); [INFO] [stdout] | ^^^^^^^^^^^ help: try: `2024_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u8` is unnecessary [INFO] [stdout] --> src/plugin.rs:48:21 [INFO] [stdout] | [INFO] [stdout] 48 | map.insert((7 as u8, 2024 as u16), Box::new(day_07::AoC2024Day07)); [INFO] [stdout] | ^^^^^^^ help: try: `7_u8` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u16` is unnecessary [INFO] [stdout] --> src/plugin.rs:48:30 [INFO] [stdout] | [INFO] [stdout] 48 | map.insert((7 as u8, 2024 as u16), Box::new(day_07::AoC2024Day07)); [INFO] [stdout] | ^^^^^^^^^^^ help: try: `2024_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u8` is unnecessary [INFO] [stdout] --> src/plugin.rs:49:21 [INFO] [stdout] | [INFO] [stdout] 49 | map.insert((8 as u8, 2024 as u16), Box::new(day_08::AoC2024Day08)); [INFO] [stdout] | ^^^^^^^ help: try: `8_u8` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u16` is unnecessary [INFO] [stdout] --> src/plugin.rs:49:30 [INFO] [stdout] | [INFO] [stdout] 49 | map.insert((8 as u8, 2024 as u16), Box::new(day_08::AoC2024Day08)); [INFO] [stdout] | ^^^^^^^^^^^ help: try: `2024_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u8` is unnecessary [INFO] [stdout] --> src/plugin.rs:50:21 [INFO] [stdout] | [INFO] [stdout] 50 | map.insert((9 as u8, 2024 as u16), Box::new(day_09::AoC2024Day09)); [INFO] [stdout] | ^^^^^^^ help: try: `9_u8` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u16` is unnecessary [INFO] [stdout] --> src/plugin.rs:50:30 [INFO] [stdout] | [INFO] [stdout] 50 | map.insert((9 as u8, 2024 as u16), Box::new(day_09::AoC2024Day09)); [INFO] [stdout] | ^^^^^^^^^^^ help: try: `2024_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u8` is unnecessary [INFO] [stdout] --> src/plugin.rs:51:21 [INFO] [stdout] | [INFO] [stdout] 51 | map.insert((10 as u8, 2024 as u16), Box::new(day_10::AoC2024Day10)); [INFO] [stdout] | ^^^^^^^^ help: try: `10_u8` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u16` is unnecessary [INFO] [stdout] --> src/plugin.rs:51:31 [INFO] [stdout] | [INFO] [stdout] 51 | map.insert((10 as u8, 2024 as u16), Box::new(day_10::AoC2024Day10)); [INFO] [stdout] | ^^^^^^^^^^^ help: try: `2024_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u8` is unnecessary [INFO] [stdout] --> src/plugin.rs:52:21 [INFO] [stdout] | [INFO] [stdout] 52 | map.insert((11 as u8, 2024 as u16), Box::new(day_11::AoC2024Day11)); [INFO] [stdout] | ^^^^^^^^ help: try: `11_u8` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u16` is unnecessary [INFO] [stdout] --> src/plugin.rs:52:31 [INFO] [stdout] | [INFO] [stdout] 52 | map.insert((11 as u8, 2024 as u16), Box::new(day_11::AoC2024Day11)); [INFO] [stdout] | ^^^^^^^^^^^ help: try: `2024_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u8` is unnecessary [INFO] [stdout] --> src/plugin.rs:53:21 [INFO] [stdout] | [INFO] [stdout] 53 | map.insert((12 as u8, 2024 as u16), Box::new(day_12::AoC2024Day12)); [INFO] [stdout] | ^^^^^^^^ help: try: `12_u8` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u16` is unnecessary [INFO] [stdout] --> src/plugin.rs:53:31 [INFO] [stdout] | [INFO] [stdout] 53 | map.insert((12 as u8, 2024 as u16), Box::new(day_12::AoC2024Day12)); [INFO] [stdout] | ^^^^^^^^^^^ help: try: `2024_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u8` is unnecessary [INFO] [stdout] --> src/plugin.rs:54:21 [INFO] [stdout] | [INFO] [stdout] 54 | map.insert((13 as u8, 2024 as u16), Box::new(day_13::AoC2024Day13)); [INFO] [stdout] | ^^^^^^^^ help: try: `13_u8` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u16` is unnecessary [INFO] [stdout] --> src/plugin.rs:54:31 [INFO] [stdout] | [INFO] [stdout] 54 | map.insert((13 as u8, 2024 as u16), Box::new(day_13::AoC2024Day13)); [INFO] [stdout] | ^^^^^^^^^^^ help: try: `2024_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u8` is unnecessary [INFO] [stdout] --> src/plugin.rs:55:21 [INFO] [stdout] | [INFO] [stdout] 55 | map.insert((14 as u8, 2024 as u16), Box::new(day_14::AoC2024Day14)); [INFO] [stdout] | ^^^^^^^^ help: try: `14_u8` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u16` is unnecessary [INFO] [stdout] --> src/plugin.rs:55:31 [INFO] [stdout] | [INFO] [stdout] 55 | map.insert((14 as u8, 2024 as u16), Box::new(day_14::AoC2024Day14)); [INFO] [stdout] | ^^^^^^^^^^^ help: try: `2024_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u8` is unnecessary [INFO] [stdout] --> src/plugin.rs:56:21 [INFO] [stdout] | [INFO] [stdout] 56 | map.insert((15 as u8, 2024 as u16), Box::new(day_15::AoC2024Day15)); [INFO] [stdout] | ^^^^^^^^ help: try: `15_u8` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u16` is unnecessary [INFO] [stdout] --> src/plugin.rs:56:31 [INFO] [stdout] | [INFO] [stdout] 56 | map.insert((15 as u8, 2024 as u16), Box::new(day_15::AoC2024Day15)); [INFO] [stdout] | ^^^^^^^^^^^ help: try: `2024_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u8` is unnecessary [INFO] [stdout] --> src/plugin.rs:57:21 [INFO] [stdout] | [INFO] [stdout] 57 | map.insert((16 as u8, 2024 as u16), Box::new(day_16::AoC2024Day16)); [INFO] [stdout] | ^^^^^^^^ help: try: `16_u8` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u16` is unnecessary [INFO] [stdout] --> src/plugin.rs:57:31 [INFO] [stdout] | [INFO] [stdout] 57 | map.insert((16 as u8, 2024 as u16), Box::new(day_16::AoC2024Day16)); [INFO] [stdout] | ^^^^^^^^^^^ help: try: `2024_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u8` is unnecessary [INFO] [stdout] --> src/plugin.rs:58:21 [INFO] [stdout] | [INFO] [stdout] 58 | map.insert((17 as u8, 2024 as u16), Box::new(day_17::AoC2024Day17)); [INFO] [stdout] | ^^^^^^^^ help: try: `17_u8` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u16` is unnecessary [INFO] [stdout] --> src/plugin.rs:58:31 [INFO] [stdout] | [INFO] [stdout] 58 | map.insert((17 as u8, 2024 as u16), Box::new(day_17::AoC2024Day17)); [INFO] [stdout] | ^^^^^^^^^^^ help: try: `2024_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u8` is unnecessary [INFO] [stdout] --> src/plugin.rs:59:21 [INFO] [stdout] | [INFO] [stdout] 59 | map.insert((18 as u8, 2024 as u16), Box::new(day_18::AoC2024Day18)); [INFO] [stdout] | ^^^^^^^^ help: try: `18_u8` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u16` is unnecessary [INFO] [stdout] --> src/plugin.rs:59:31 [INFO] [stdout] | [INFO] [stdout] 59 | map.insert((18 as u8, 2024 as u16), Box::new(day_18::AoC2024Day18)); [INFO] [stdout] | ^^^^^^^^^^^ help: try: `2024_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u8` is unnecessary [INFO] [stdout] --> src/plugin.rs:60:21 [INFO] [stdout] | [INFO] [stdout] 60 | map.insert((19 as u8, 2024 as u16), Box::new(day_19::AoC2024Day19)); [INFO] [stdout] | ^^^^^^^^ help: try: `19_u8` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u16` is unnecessary [INFO] [stdout] --> src/plugin.rs:60:31 [INFO] [stdout] | [INFO] [stdout] 60 | map.insert((19 as u8, 2024 as u16), Box::new(day_19::AoC2024Day19)); [INFO] [stdout] | ^^^^^^^^^^^ help: try: `2024_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u8` is unnecessary [INFO] [stdout] --> src/plugin.rs:61:21 [INFO] [stdout] | [INFO] [stdout] 61 | map.insert((20 as u8, 2024 as u16), Box::new(day_20::AoC2024Day20)); [INFO] [stdout] | ^^^^^^^^ help: try: `20_u8` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u16` is unnecessary [INFO] [stdout] --> src/plugin.rs:61:31 [INFO] [stdout] | [INFO] [stdout] 61 | map.insert((20 as u8, 2024 as u16), Box::new(day_20::AoC2024Day20)); [INFO] [stdout] | ^^^^^^^^^^^ help: try: `2024_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u8` is unnecessary [INFO] [stdout] --> src/plugin.rs:62:21 [INFO] [stdout] | [INFO] [stdout] 62 | map.insert((21 as u8, 2024 as u16), Box::new(day_21::AoC2024Day21)); [INFO] [stdout] | ^^^^^^^^ help: try: `21_u8` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u16` is unnecessary [INFO] [stdout] --> src/plugin.rs:62:31 [INFO] [stdout] | [INFO] [stdout] 62 | map.insert((21 as u8, 2024 as u16), Box::new(day_21::AoC2024Day21)); [INFO] [stdout] | ^^^^^^^^^^^ help: try: `2024_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u8` is unnecessary [INFO] [stdout] --> src/plugin.rs:63:21 [INFO] [stdout] | [INFO] [stdout] 63 | map.insert((22 as u8, 2024 as u16), Box::new(day_22::AoC2024Day22)); [INFO] [stdout] | ^^^^^^^^ help: try: `22_u8` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u16` is unnecessary [INFO] [stdout] --> src/plugin.rs:63:31 [INFO] [stdout] | [INFO] [stdout] 63 | map.insert((22 as u8, 2024 as u16), Box::new(day_22::AoC2024Day22)); [INFO] [stdout] | ^^^^^^^^^^^ help: try: `2024_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u8` is unnecessary [INFO] [stdout] --> src/plugin.rs:64:21 [INFO] [stdout] | [INFO] [stdout] 64 | map.insert((23 as u8, 2024 as u16), Box::new(day_23::AoC2024Day23)); [INFO] [stdout] | ^^^^^^^^ help: try: `23_u8` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u16` is unnecessary [INFO] [stdout] --> src/plugin.rs:64:31 [INFO] [stdout] | [INFO] [stdout] 64 | map.insert((23 as u8, 2024 as u16), Box::new(day_23::AoC2024Day23)); [INFO] [stdout] | ^^^^^^^^^^^ help: try: `2024_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u8` is unnecessary [INFO] [stdout] --> src/plugin.rs:65:21 [INFO] [stdout] | [INFO] [stdout] 65 | map.insert((24 as u8, 2024 as u16), Box::new(day_24::AoC2024Day24)); [INFO] [stdout] | ^^^^^^^^ help: try: `24_u8` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u16` is unnecessary [INFO] [stdout] --> src/plugin.rs:65:31 [INFO] [stdout] | [INFO] [stdout] 65 | map.insert((24 as u8, 2024 as u16), Box::new(day_24::AoC2024Day24)); [INFO] [stdout] | ^^^^^^^^^^^ help: try: `2024_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u8` is unnecessary [INFO] [stdout] --> src/plugin.rs:66:21 [INFO] [stdout] | [INFO] [stdout] 66 | map.insert((25 as u8, 2024 as u16), Box::new(day_25::AoC2024Day25)); [INFO] [stdout] | ^^^^^^^^ help: try: `25_u8` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u16` is unnecessary [INFO] [stdout] --> src/plugin.rs:66:31 [INFO] [stdout] | [INFO] [stdout] 66 | map.insert((25 as u8, 2024 as u16), Box::new(day_25::AoC2024Day25)); [INFO] [stdout] | ^^^^^^^^^^^ help: try: `2024_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `&Box`. Consider using just `&T` [INFO] [stdout] --> src/plugin.rs:71:53 [INFO] [stdout] | [INFO] [stdout] 71 | pub fn get_plugin(&self, day: u8, year: u16) -> &Box { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `&dyn Plugin` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box [INFO] [stdout] = note: `#[warn(clippy::borrowed_box)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/reader.rs:67:36 [INFO] [stdout] | [INFO] [stdout] 67 | pub fn to_grid(&self, content: &String) -> Vec> { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 67 - pub fn to_grid(&self, content: &String) -> Vec> { [INFO] [stdout] 67 + pub fn to_grid(&self, content: &str) -> Vec> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/reader.rs:83:34 [INFO] [stdout] | [INFO] [stdout] 83 | pub fn split(&self, content: &String, delimiter: &str) -> 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] 83 - pub fn split(&self, content: &String, delimiter: &str) -> Vec> { [INFO] [stdout] 83 + pub fn split(&self, content: &str, delimiter: &str) -> Vec> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/reader.rs:100:45 [INFO] [stdout] | [INFO] [stdout] 100 | pub fn split_vertically(&self, content: &String, delimiter: &str, total: 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] 100 - pub fn split_vertically(&self, content: &String, delimiter: &str, total: usize) -> Vec> { [INFO] [stdout] 100 + pub fn split_vertically(&self, content: &str, delimiter: &str, total: usize) -> Vec> { [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/aoc_2024/day_02.rs:7:17 [INFO] [stdout] | [INFO] [stdout] 7 | fn is_good(seq: &Vec) -> bool { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 7 ~ fn is_good(seq: &[i32]) -> bool { [INFO] [stdout] 8 ~ let gaps: Vec = seq.to_owned() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc_2024/day_02.rs:41:21 [INFO] [stdout] | [INFO] [stdout] 41 | return 1; [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] 41 - return 1; [INFO] [stdout] 41 + 1 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc_2024/day_02.rs:43:21 [INFO] [stdout] | [INFO] [stdout] 43 | 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] 43 - return 0; [INFO] [stdout] 43 + 0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc_2024/day_02.rs:64:21 [INFO] [stdout] | [INFO] [stdout] 64 | return 1; [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] 64 - return 1; [INFO] [stdout] 64 + 1 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc_2024/day_02.rs:66:21 [INFO] [stdout] | [INFO] [stdout] 66 | 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] 66 - return 0; [INFO] [stdout] 66 + 0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/aoc_2024/day_02.rs:63:39 [INFO] [stdout] | [INFO] [stdout] 63 | if results.iter().any(|vec| is_good(vec)) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `is_good` [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: casting integer literal to `u64` is unnecessary [INFO] [stdout] --> src/aoc_2024/day_03.rs:28:33 [INFO] [stdout] | [INFO] [stdout] 28 | ... 0 as u64 [INFO] [stdout] | ^^^^^^^^ help: try: `0_u64` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u64` is unnecessary [INFO] [stdout] --> src/aoc_2024/day_03.rs:33:30 [INFO] [stdout] | [INFO] [stdout] 33 | ... (0 as u64, 0 as u64) [INFO] [stdout] | ^^^^^^^^ help: try: `0_u64` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u64` is unnecessary [INFO] [stdout] --> src/aoc_2024/day_03.rs:33:40 [INFO] [stdout] | [INFO] [stdout] 33 | ... (0 as u64, 0 as u64) [INFO] [stdout] | ^^^^^^^^ help: try: `0_u64` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u64` is unnecessary [INFO] [stdout] --> src/aoc_2024/day_03.rs:38:26 [INFO] [stdout] | [INFO] [stdout] 38 | (0 as u64, 0 as u64) [INFO] [stdout] | ^^^^^^^^ help: try: `0_u64` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u64` is unnecessary [INFO] [stdout] --> src/aoc_2024/day_03.rs:38:36 [INFO] [stdout] | [INFO] [stdout] 38 | (0 as u64, 0 as u64) [INFO] [stdout] | ^^^^^^^^ help: try: `0_u64` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u64` is unnecessary [INFO] [stdout] --> src/aoc_2024/day_03.rs:42:26 [INFO] [stdout] | [INFO] [stdout] 42 | (0 as u64, 0 as u64) [INFO] [stdout] | ^^^^^^^^ help: try: `0_u64` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u64` is unnecessary [INFO] [stdout] --> src/aoc_2024/day_03.rs:42:36 [INFO] [stdout] | [INFO] [stdout] 42 | (0 as u64, 0 as u64) [INFO] [stdout] | ^^^^^^^^ help: try: `0_u64` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u64` is unnecessary [INFO] [stdout] --> src/aoc_2024/day_03.rs:44:27 [INFO] [stdout] | [INFO] [stdout] 44 | _ => (0 as u64, 0 as u64) [INFO] [stdout] | ^^^^^^^^ help: try: `0_u64` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u64` is unnecessary [INFO] [stdout] --> src/aoc_2024/day_03.rs:44:37 [INFO] [stdout] | [INFO] [stdout] 44 | _ => (0 as u64, 0 as u64) [INFO] [stdout] | ^^^^^^^^ help: try: `0_u64` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc_2024/day_04.rs:29:5 [INFO] [stdout] | [INFO] [stdout] 29 | return x >= 0 && x < m && y >= 0 && y < n; [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] 29 - return x >= 0 && x < m && y >= 0 && y < n; [INFO] [stdout] 29 + x >= 0 && x < m && y >= 0 && y < n [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/aoc_2024/day_04.rs:43:5 [INFO] [stdout] | [INFO] [stdout] 43 | / if new_x >= 0 && new_x < content.len() as i32 { [INFO] [stdout] 44 | | if new_y >= 0 && new_y < content[new_x as usize].len() as i32 { [INFO] [stdout] 45 | | if content[new_x as usize][new_y as usize] == strs[idx + 1] { [INFO] [stdout] 46 | | ans += dfs_part1(content, new_x, new_y, idx + 1, dirs, strs) [INFO] [stdout] ... | [INFO] [stdout] 49 | | } [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] 43 ~ if new_x >= 0 && new_x < content.len() as i32 [INFO] [stdout] 44 ~ && new_y >= 0 && new_y < content[new_x as usize].len() as i32 { [INFO] [stdout] 45 | if content[new_x as usize][new_y as usize] == strs[idx + 1] { [INFO] [stdout] 46 | ans += dfs_part1(content, new_x, new_y, idx + 1, dirs, strs) [INFO] [stdout] 47 | } [INFO] [stdout] 48 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/aoc_2024/day_04.rs:44:9 [INFO] [stdout] | [INFO] [stdout] 44 | / if new_y >= 0 && new_y < content[new_x as usize].len() as i32 { [INFO] [stdout] 45 | | if content[new_x as usize][new_y as usize] == strs[idx + 1] { [INFO] [stdout] 46 | | ans += dfs_part1(content, new_x, new_y, idx + 1, dirs, strs) [INFO] [stdout] 47 | | } [INFO] [stdout] 48 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 44 ~ if new_y >= 0 && new_y < content[new_x as usize].len() as i32 [INFO] [stdout] 45 ~ && content[new_x as usize][new_y as usize] == strs[idx + 1] { [INFO] [stdout] 46 | ans += dfs_part1(content, new_x, new_y, idx + 1, dirs, strs) [INFO] [stdout] 47 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc_2024/day_04.rs:86:9 [INFO] [stdout] | [INFO] [stdout] 86 | return 1; [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] 86 - return 1; [INFO] [stdout] 86 + 1 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc_2024/day_04.rs:88:9 [INFO] [stdout] | [INFO] [stdout] 88 | 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] 88 - return 0; [INFO] [stdout] 88 + 0 [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/aoc_2024/day_04.rs:54:23 [INFO] [stdout] | [INFO] [stdout] 54 | fn dfs_part2(content: &Vec>, x: i32, y: i32, m: i32, n: i32) -> u64 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 54 - fn dfs_part2(content: &Vec>, x: i32, y: i32, m: i32, n: i32) -> u64 { [INFO] [stdout] 54 + fn dfs_part2(content: &[Vec], x: i32, y: i32, m: i32, n: i32) -> u64 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `puzzle` [INFO] [stdout] --> src/aoc_2024/day_04.rs:103:18 [INFO] [stdout] | [INFO] [stdout] 103 | for i in 0..puzzle.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 and enumerate() [INFO] [stdout] | [INFO] [stdout] 103 - for i in 0..puzzle.len() { [INFO] [stdout] 103 + for (i, ) in puzzle.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is used to index `puzzle` [INFO] [stdout] --> src/aoc_2024/day_04.rs:104:22 [INFO] [stdout] | [INFO] [stdout] 104 | for j in 0..puzzle[i].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] 104 - for j in 0..puzzle[i].len() { [INFO] [stdout] 104 + for (j, ) in puzzle.iter().enumerate().take(puzzle[i].len()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/aoc_2024/day_05.rs:20:43 [INFO] [stdout] | [INFO] [stdout] 20 | fn evaluate_lines(s: &str, evaluate_line: fn(&HashMap>, &[i32]) -> Option) -> i32 { [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: redundant closure [INFO] [stdout] --> src/aoc_2024/day_05.rs:27:21 [INFO] [stdout] | [INFO] [stdout] 27 | nums.is_sorted_by(|a, b| cmp(a, b)).then_some(nums[nums.len() / 2]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `cmp` [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/aoc_2024/day_05.rs:33:23 [INFO] [stdout] | [INFO] [stdout] 33 | (!nums.is_sorted_by(|a, b| cmp(a, b))).then(|| { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `&cmp` [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/aoc_2024/day_06.rs:14:63 [INFO] [stdout] | [INFO] [stdout] 14 | fn one_loop(start_x: i32, start_y: i32, start_dir: i32, grid: &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] help: change this to [INFO] [stdout] | [INFO] [stdout] 14 - fn one_loop(start_x: i32, start_y: i32, start_dir: i32, grid: &Vec>) -> Option { [INFO] [stdout] 14 + fn one_loop(start_x: i32, start_y: i32, start_dir: i32, grid: &[Vec]) -> Option { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/aoc_2024/day_06.rs:72:25 [INFO] [stdout] | [INFO] [stdout] 72 | if grid[i as usize][j as usize] == "^" { [INFO] [stdout] | ^^^^^^^^^^ help: try: `{ i }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/aoc_2024/day_06.rs:72:37 [INFO] [stdout] | [INFO] [stdout] 72 | if grid[i as usize][j as usize] == "^" { [INFO] [stdout] | ^^^^^^^^^^ help: try: `{ j }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/aoc_2024/day_07.rs:13:24 [INFO] [stdout] | [INFO] [stdout] 13 | fn load_input(content: &String) -> 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 load_input(content: &String) -> Vec { [INFO] [stdout] 13 + fn load_input(content: &str) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::str::Lines<'_>` [INFO] [stdout] --> src/aoc_2024/day_07.rs:14:5 [INFO] [stdout] | [INFO] [stdout] 14 | / content [INFO] [stdout] 15 | | .lines() [INFO] [stdout] 16 | | .into_iter() [INFO] [stdout] | |____________________^ [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] help: consider removing `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 14 ~ content [INFO] [stdout] 15 + .lines() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `split_once` [INFO] [stdout] --> src/aoc_2024/day_07.rs:18:13 [INFO] [stdout] | [INFO] [stdout] 18 | let mut parts = l.splitn(2, ": "); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 19 | let result = parts.next().unwrap(); [INFO] [stdout] | ----------------------------------- first usage here [INFO] [stdout] 20 | let operands = parts.next().unwrap(); [INFO] [stdout] | ------------------------------------- second usage here [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_split_once [INFO] [stdout] = note: `#[warn(clippy::manual_split_once)]` on by default [INFO] [stdout] help: replace with `split_once` [INFO] [stdout] | [INFO] [stdout] 18 ~ let (result, operands) = l.split_once(": ").unwrap(); [INFO] [stdout] 19 ~ [INFO] [stdout] 20 ~ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::str::Lines<'_>` [INFO] [stdout] --> src/aoc_2024/day_08.rs:23:26 [INFO] [stdout] | [INFO] [stdout] 23 | for (i, line) in content.lines().into_iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `content.lines()` [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: useless conversion to the same type: `std::str::Chars<'_>` [INFO] [stdout] --> src/aoc_2024/day_08.rs:24:28 [INFO] [stdout] | [INFO] [stdout] 24 | for (j, ch) in line.chars().into_iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `line.chars()` [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: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/aoc_2024/day_08.rs:29:37 [INFO] [stdout] | [INFO] [stdout] 29 | positions.entry(ch).or_insert_with(Vec::new).push((i as i32, j as i32)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: importing legacy numeric constants [INFO] [stdout] --> src/aoc_2024/day_09.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::usize; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `usize::` will resolve to the respective associated constant [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/aoc_2024/day_09.rs:15:25 [INFO] [stdout] | [INFO] [stdout] 15 | fn make_layout(content: &String) -> 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] 15 - fn make_layout(content: &String) -> Vec { [INFO] [stdout] 15 + fn make_layout(content: &str) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/aoc_2024/day_09.rs:82:19 [INFO] [stdout] | [INFO] [stdout] 82 | while file_system[n].is_free || (!file_system[n].is_free && file_system[n].file_id != id) { [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] 82 - while file_system[n].is_free || (!file_system[n].is_free && file_system[n].file_id != id) { [INFO] [stdout] 82 + while !(!file_system[n].is_free && file_system[n].file_id == id) { [INFO] [stdout] | [INFO] [stdout] 82 - while file_system[n].is_free || (!file_system[n].is_free && file_system[n].file_id != id) { [INFO] [stdout] 82 + while file_system[n].is_free || file_system[n].file_id != id { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/aoc_2024/day_09.rs:80:25 [INFO] [stdout] | [INFO] [stdout] 80 | let mut n = right as usize; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `right` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/aoc_2024/day_09.rs:119:21 [INFO] [stdout] | [INFO] [stdout] 119 | right = (n - right_cache) as usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(n - right_cache)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> src/aoc_2024/day_10.rs:11:10 [INFO] [stdout] | [INFO] [stdout] 11 | .into_iter() [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] = note: `#[warn(clippy::into_iter_on_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> src/aoc_2024/day_10.rs:14:18 [INFO] [stdout] | [INFO] [stdout] 14 | .into_iter() [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `flat_map` with an identity function [INFO] [stdout] --> src/aoc_2024/day_10.rs:33:10 [INFO] [stdout] | [INFO] [stdout] 33 | .flat_map(|row| row) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `flatten()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#flat_map_identity [INFO] [stdout] = note: `#[warn(clippy::flat_map_identity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> src/aoc_2024/day_10.rs:23:10 [INFO] [stdout] | [INFO] [stdout] 23 | .into_iter() [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> src/aoc_2024/day_10.rs:27:18 [INFO] [stdout] | [INFO] [stdout] 27 | .into_iter() [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/aoc_2024/day_10.rs:70:21 [INFO] [stdout] | [INFO] [stdout] 70 | / if in_range(x, y, m, n) && grid[x as usize][y as usize] - grid[entry.0 as usize][entry.1 as usize] == 1 { [INFO] [stdout] 71 | | if !seen.contains(&(x, y, entry.2, entry.3)) { [INFO] [stdout] 72 | | new_trailheads.push_back((x, y, entry.2, entry.3)); [INFO] [stdout] 73 | | seen.insert((x, y, entry.2, entry.3)); [INFO] [stdout] 74 | | } [INFO] [stdout] 75 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 70 ~ if in_range(x, y, m, n) && grid[x as usize][y as usize] - grid[entry.0 as usize][entry.1 as usize] == 1 [INFO] [stdout] 71 ~ && !seen.contains(&(x, y, entry.2, entry.3)) { [INFO] [stdout] 72 | new_trailheads.push_back((x, y, entry.2, entry.3)); [INFO] [stdout] 73 | seen.insert((x, y, entry.2, entry.3)); [INFO] [stdout] 74 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::collections::hash_map::Values<'_, (i32, i32), i32>` [INFO] [stdout] --> src/aoc_2024/day_10.rs:104:26 [INFO] [stdout] | [INFO] [stdout] 104 | let part1: u64 = mp [INFO] [stdout] | __________________________^ [INFO] [stdout] 105 | | .values() [INFO] [stdout] 106 | | .into_iter() [INFO] [stdout] | |________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] help: consider removing `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 104 ~ let part1: u64 = mp [INFO] [stdout] 105 + .values() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::collections::hash_map::Values<'_, (i32, i32), i32>` [INFO] [stdout] --> src/aoc_2024/day_10.rs:110:26 [INFO] [stdout] | [INFO] [stdout] 110 | let part2: u64 = mp2 [INFO] [stdout] | __________________________^ [INFO] [stdout] 111 | | .values() [INFO] [stdout] 112 | | .into_iter() [INFO] [stdout] | |________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] help: consider removing `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 110 ~ let part2: u64 = mp2 [INFO] [stdout] 111 + .values() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/aoc_2024/day_11.rs:19:12 [INFO] [stdout] | [INFO] [stdout] 19 | if digits % 2 == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: replace with: `digits.is_multiple_of(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::str::Split<'_, &str>` [INFO] [stdout] --> src/aoc_2024/day_11.rs:39:22 [INFO] [stdout] | [INFO] [stdout] 39 | let inputs = puzzle [INFO] [stdout] | ______________________^ [INFO] [stdout] 40 | | .trim_end() [INFO] [stdout] 41 | | .split(" ") [INFO] [stdout] 42 | | .into_iter() [INFO] [stdout] | |________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] help: consider removing `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 39 ~ let inputs = puzzle [INFO] [stdout] 40 + .trim_end() [INFO] [stdout] 41 + .split(" ") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> src/aoc_2024/day_12.rs:27:16 [INFO] [stdout] | [INFO] [stdout] 27 | let diff = s1.difference(&s2).map(|c| *c).collect::, Complex)>>(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `s1.difference(&s2).copied()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] = note: `#[warn(clippy::map_clone)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Complex` which implements the `Copy` trait [INFO] [stdout] --> src/aoc_2024/day_12.rs:50:24 [INFO] [stdout] | [INFO] [stdout] 50 | set.insert(key.clone()); [INFO] [stdout] | ^^^^^^^^^^^ help: try dereferencing it: `*key` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Complex` which implements the `Copy` trait [INFO] [stdout] --> src/aoc_2024/day_12.rs:51:31 [INFO] [stdout] | [INFO] [stdout] 51 | union_find.insert(key.clone(), set); [INFO] [stdout] | ^^^^^^^^^^^ help: try dereferencing it: `*key` [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: you are using an explicit closure for copying elements [INFO] [stdout] --> src/aoc_2024/day_12.rs:60:45 [INFO] [stdout] | [INFO] [stdout] 60 | ... let union = sets_p.union(sets_n).map(|c| *c).collect::>>(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `sets_p.union(sets_n).copied()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/aoc_2024/day_13.rs:41:19 [INFO] [stdout] | [INFO] [stdout] 41 | fn parse(content: &String) -> (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] 41 - fn parse(content: &String) -> (Vec, Vec) { [INFO] [stdout] 41 + fn parse(content: &str) -> (Vec, Vec) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc_2024/day_14.rs:13:5 [INFO] [stdout] | [INFO] [stdout] 13 | return r % y; [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] 13 - return r % y; [INFO] [stdout] 13 + r % y [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/aoc_2024/day_14.rs:11:5 [INFO] [stdout] | [INFO] [stdout] 11 | r = r + y; [INFO] [stdout] | ^^^^^^^^^ help: replace it with: `r += y` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/aoc_2024/day_14.rs:39:21 [INFO] [stdout] | [INFO] [stdout] 39 | fn parse_line(line: &String, reg: &Regex) -> 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] 39 - fn parse_line(line: &String, reg: &Regex) -> Vec { [INFO] [stdout] 39 + fn parse_line(line: &str, reg: &Regex) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/aoc_2024/day_14.rs:46:19 [INFO] [stdout] | [INFO] [stdout] 46 | fn parse(content: &String) -> 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] 46 - fn parse(content: &String) -> Vec { [INFO] [stdout] 46 + fn parse(content: &str) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> src/aoc_2024/day_14.rs:71:10 [INFO] [stdout] | [INFO] [stdout] 71 | .into_iter() [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/aoc_2024/day_15.rs:10:19 [INFO] [stdout] | [INFO] [stdout] 10 | fn parse(content: &String) -> (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] 10 - fn parse(content: &String) -> (Vec>, Vec) { [INFO] [stdout] 10 + fn parse(content: &str) -> (Vec>, Vec) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/aoc_2024/day_15.rs:16:12 [INFO] [stdout] | [INFO] [stdout] 16 | if line.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `line.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> src/aoc_2024/day_15.rs:62:26 [INFO] [stdout] | [INFO] [stdout] 62 | for (i, row) in grid.into_iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> src/aoc_2024/day_15.rs:63:28 [INFO] [stdout] | [INFO] [stdout] 63 | for (j, ch) in row.into_iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/aoc_2024/day_15.rs:77:23 [INFO] [stdout] | [INFO] [stdout] 77 | fn try_box_push(grid: &Vec>, cx: i32, cy: i32, m: i32, n: i32, dir: &(i32, i32)) -> Option<(i32, i32)> { [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] 77 - fn try_box_push(grid: &Vec>, cx: i32, cy: i32, m: i32, n: i32, dir: &(i32, i32)) -> Option<(i32, i32)> { [INFO] [stdout] 77 + fn try_box_push(grid: &[Vec], cx: i32, cy: i32, m: i32, n: i32, dir: &(i32, i32)) -> Option<(i32, i32)> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/aoc_2024/day_15.rs:96:36 [INFO] [stdout] | [INFO] [stdout] 96 | fn try_box_push_horizontally(grid: &mut Vec>, cx: i32, cy: i32, m: i32, n: i32, dir: &(i32, i32)) -> Option<(i32, i32)> { [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] 96 - fn try_box_push_horizontally(grid: &mut Vec>, cx: i32, cy: i32, m: i32, n: i32, dir: &(i32, i32)) -> Option<(i32, i32)> { [INFO] [stdout] 96 + fn try_box_push_horizontally(grid: &mut [Vec], cx: i32, cy: i32, m: i32, n: i32, dir: &(i32, i32)) -> Option<(i32, i32)> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/aoc_2024/day_15.rs:129:34 [INFO] [stdout] | [INFO] [stdout] 129 | fn try_box_push_vertically(grid: &mut Vec>, cx: i32, cy: i32, m: i32, _n: i32, dir: &(i32, i32)) -> Option<(i32, i32)> { [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] 129 - fn try_box_push_vertically(grid: &mut Vec>, cx: i32, cy: i32, m: i32, _n: i32, dir: &(i32, i32)) -> Option<(i32, i32)> { [INFO] [stdout] 129 + fn try_box_push_vertically(grid: &mut [Vec], cx: i32, cy: i32, m: i32, _n: i32, dir: &(i32, i32)) -> Option<(i32, i32)> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/aoc_2024/day_15.rs:137:28 [INFO] [stdout] | [INFO] [stdout] 137 | let mut min_left = (*left) as i32; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `(*left)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/aoc_2024/day_15.rs:138:29 [INFO] [stdout] | [INFO] [stdout] 138 | let mut max_right = (*right) as i32; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `(*right)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `contains()` instead of `iter().any()` is more efficient [INFO] [stdout] --> src/aoc_2024/day_15.rs:152:12 [INFO] [stdout] | [INFO] [stdout] 152 | if slice.iter().any(|&x| x == '#') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `slice.contains(&'#')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_contains [INFO] [stdout] = note: `#[warn(clippy::manual_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::collections::hash_map::Keys<'_, i32, (i32, i32)>` [INFO] [stdout] --> src/aoc_2024/day_15.rs:171:24 [INFO] [stdout] | [INFO] [stdout] 171 | let mut keys = mp.keys().into_iter().collect::>(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `mp.keys()` [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: useless conversion to the same type: `std::collections::hash_map::Keys<'_, i32, (i32, i32)>` [INFO] [stdout] --> src/aoc_2024/day_15.rs:190:24 [INFO] [stdout] | [INFO] [stdout] 190 | let mut keys = mp.keys().into_iter().collect::>(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `mp.keys()` [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: unneeded `return` statement [INFO] [stdout] --> src/aoc_2024/day_15.rs:229:9 [INFO] [stdout] | [INFO] [stdout] 229 | return (nx, ny); [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] 229 - return (nx, ny); [INFO] [stdout] 229 + (nx, ny) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc_2024/day_15.rs:231:9 [INFO] [stdout] | [INFO] [stdout] 231 | return (cx, cy); [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] 231 - return (cx, cy); [INFO] [stdout] 231 + (cx, cy) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc_2024/day_15.rs:238:13 [INFO] [stdout] | [INFO] [stdout] 238 | return (nx, ny); [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] 238 - return (nx, ny); [INFO] [stdout] 238 + (nx, ny) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc_2024/day_15.rs:240:13 [INFO] [stdout] | [INFO] [stdout] 240 | return (cx, cy); [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] 240 - return (cx, cy); [INFO] [stdout] 240 + (cx, cy) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc_2024/day_15.rs:247:21 [INFO] [stdout] | [INFO] [stdout] 247 | return (nx, ny); [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] 247 ~ (nx, ny) [INFO] [stdout] 248 | }, [INFO] [stdout] 249 | None => return (cx, cy) [INFO] [stdout] 250 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc_2024/day_15.rs:249:25 [INFO] [stdout] | [INFO] [stdout] 249 | None => return (cx, cy) [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] 249 ~ None => (cx, cy) [INFO] [stdout] 250 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc_2024/day_15.rs:255:21 [INFO] [stdout] | [INFO] [stdout] 255 | return (nx, ny); [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] 255 ~ (nx, ny) [INFO] [stdout] 256 | }, [INFO] [stdout] 257 | None => return (cx, cy) [INFO] [stdout] 258 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc_2024/day_15.rs:257:25 [INFO] [stdout] | [INFO] [stdout] 257 | None => return (cx, cy) [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] 257 ~ None => (cx, cy) [INFO] [stdout] 258 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/aoc_2024/day_15.rs:233:46 [INFO] [stdout] | [INFO] [stdout] 233 | if let Some((bx, by)) = try_box_push(&grid, nx, ny, m, n, cdir) { [INFO] [stdout] | ^^^^^ help: change this to: `grid` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc_2024/day_15.rs:300:21 [INFO] [stdout] | [INFO] [stdout] 300 | return (100 * i + j) as u64; [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] 300 - return (100 * i + j) as u64; [INFO] [stdout] 300 + (100 * i + j) as u64 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc_2024/day_15.rs:302:21 [INFO] [stdout] | [INFO] [stdout] 302 | 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] 302 - return 0; [INFO] [stdout] 302 + 0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc_2024/day_15.rs:320:21 [INFO] [stdout] | [INFO] [stdout] 320 | return (100 * i + j) as u64; [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] 320 - return (100 * i + j) as u64; [INFO] [stdout] 320 + (100 * i + j) as u64 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc_2024/day_15.rs:322:21 [INFO] [stdout] | [INFO] [stdout] 322 | 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] 322 - return 0; [INFO] [stdout] 322 + 0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: importing legacy numeric constants [INFO] [stdout] --> src/aoc_2024/day_16.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::usize; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `usize::` will resolve to the respective associated constant [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/aoc_2024/day_16.rs:11:23 [INFO] [stdout] | [INFO] [stdout] 11 | fn make_grid(content: &String) -> 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] 11 - fn make_grid(content: &String) -> Vec> { [INFO] [stdout] 11 + fn make_grid(content: &str) -> Vec> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::str::Lines<'_>` [INFO] [stdout] --> src/aoc_2024/day_16.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | / content [INFO] [stdout] 13 | | .lines() [INFO] [stdout] 14 | | .into_iter() [INFO] [stdout] | |____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] help: consider removing `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 12 ~ content [INFO] [stdout] 13 + .lines() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> src/aoc_2024/day_16.rs:23:26 [INFO] [stdout] | [INFO] [stdout] 23 | for (i, row) in grid.into_iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> src/aoc_2024/day_16.rs:24:28 [INFO] [stdout] | [INFO] [stdout] 24 | for (j, ch) in row.into_iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `i32` is unnecessary [INFO] [stdout] --> src/aoc_2024/day_16.rs:59:20 [INFO] [stdout] | [INFO] [stdout] 59 | heap.push((0 as i32, start.0, start.1, (0, 1), vec![start])); [INFO] [stdout] | ^^^^^^^^ help: try: `0_i32` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/aoc_2024/day_16.rs:84:30 [INFO] [stdout] | [INFO] [stdout] 84 | if !in_range(x as i32, y as i32, m as i32, n as i32) { [INFO] [stdout] | ^^^^^^^^ help: try: `x` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/aoc_2024/day_16.rs:84:40 [INFO] [stdout] | [INFO] [stdout] 84 | if !in_range(x as i32, y as i32, m as i32, n as i32) { [INFO] [stdout] | ^^^^^^^^ help: try: `y` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/aoc_2024/day_17.rs:85:24 [INFO] [stdout] | [INFO] [stdout] 85 | fn parse_input(input : &String) -> (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] 85 - fn parse_input(input : &String) -> (Vec, Vec) { [INFO] [stdout] 85 + fn parse_input(input : &str) -> (Vec, Vec) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u64` is unnecessary [INFO] [stdout] --> src/aoc_2024/day_17.rs:169:33 [INFO] [stdout] | [INFO] [stdout] 169 | return (0 as u64, a as u64); [INFO] [stdout] | ^^^^^^^^ help: try: `0_u64` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u64` -> `u64`) [INFO] [stdout] --> src/aoc_2024/day_17.rs:169:43 [INFO] [stdout] | [INFO] [stdout] 169 | return (0 as u64, a as u64); [INFO] [stdout] | ^^^^^^^^ help: try: `a` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: importing legacy numeric constants [INFO] [stdout] --> src/aoc_2024/day_18.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::u64; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `u64::` will resolve to the respective associated constant [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/aoc_2024/day_18.rs:10:25 [INFO] [stdout] | [INFO] [stdout] 10 | fn parse_bytes(content: &String) -> Vec<(i32, i32)> { [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 parse_bytes(content: &String) -> Vec<(i32, i32)> { [INFO] [stdout] 10 + fn parse_bytes(content: &str) -> Vec<(i32, i32)> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::str::Lines<'_>` [INFO] [stdout] --> src/aoc_2024/day_18.rs:11:5 [INFO] [stdout] | [INFO] [stdout] 11 | / content [INFO] [stdout] 12 | | .lines() [INFO] [stdout] 13 | | .into_iter() [INFO] [stdout] | |____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] help: consider removing `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 11 ~ content [INFO] [stdout] 12 + .lines() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> src/aoc_2024/day_18.rs:27:25 [INFO] [stdout] | [INFO] [stdout] 27 | for (y, x) in bytes.into_iter().take(take) { [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/aoc_2024/day_18.rs:38:20 [INFO] [stdout] | [INFO] [stdout] 38 | fn min_steps(grid: &Vec>, start: (i32, i32), end: (i32, i32)) -> 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] help: change this to [INFO] [stdout] | [INFO] [stdout] 38 - fn min_steps(grid: &Vec>, start: (i32, i32), end: (i32, i32)) -> Option { [INFO] [stdout] 38 + fn min_steps(grid: &[Vec], start: (i32, i32), end: (i32, i32)) -> Option { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/aoc_2024/day_18.rs:46:11 [INFO] [stdout] | [INFO] [stdout] 46 | while todo.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!todo.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/aoc_2024/day_18.rs:73:5 [INFO] [stdout] | [INFO] [stdout] 73 | / match seen.get(&end) { [INFO] [stdout] 74 | | Some(x) => Some(*x), [INFO] [stdout] 75 | | None => None, [INFO] [stdout] 76 | | } [INFO] [stdout] | |_____^ help: try: `seen.get(&end).map(|x| *x)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/aoc_2024/day_19.rs:9:25 [INFO] [stdout] | [INFO] [stdout] 9 | fn parse_input(content: &String) -> (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] 9 - fn parse_input(content: &String) -> (Vec, Vec) { [INFO] [stdout] 9 + fn parse_input(content: &str) -> (Vec, Vec) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::str::Lines<'_>` [INFO] [stdout] --> src/aoc_2024/day_19.rs:10:20 [INFO] [stdout] | [INFO] [stdout] 10 | let mut iter = content.lines().into_iter(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `content.lines()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> src/aoc_2024/day_19.rs:43:10 [INFO] [stdout] | [INFO] [stdout] 43 | .into_iter() [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/aoc_2024/day_19.rs:48:8 [INFO] [stdout] | [INFO] [stdout] 48 | if applicable.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `applicable.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/aoc_2024/day_20.rs:12:23 [INFO] [stdout] | [INFO] [stdout] 12 | fn make_grid(content: &String) -> HashMap, char> { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 12 - fn make_grid(content: &String) -> HashMap, char> { [INFO] [stdout] 12 + fn make_grid(content: &str) -> HashMap, char> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::str::Lines<'_>` [INFO] [stdout] --> src/aoc_2024/day_20.rs:13:5 [INFO] [stdout] | [INFO] [stdout] 13 | / content [INFO] [stdout] 14 | | .lines() [INFO] [stdout] 15 | | .into_iter() [INFO] [stdout] | |____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] help: consider removing `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 13 ~ content [INFO] [stdout] 14 + .lines() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/aoc_2024/day_20.rs:58:11 [INFO] [stdout] | [INFO] [stdout] 58 | while todo.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!todo.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: importing legacy numeric constants [INFO] [stdout] --> src/aoc_2024/day_21.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use std::usize; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `usize::` will resolve to the respective associated constant [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/aoc_2024/day_21.rs:217:17 [INFO] [stdout] | [INFO] [stdout] 217 | &next, [INFO] [stdout] | ^^^^^ help: change this to: `next` [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 `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/aoc_2024/day_22.rs:12:25 [INFO] [stdout] | [INFO] [stdout] 12 | fn parse_input(content: &String) -> 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] 12 - fn parse_input(content: &String) -> Vec { [INFO] [stdout] 12 + fn parse_input(content: &str) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/aoc_2024/day_23.rs:23:31 [INFO] [stdout] | [INFO] [stdout] 23 | fn add_edge(&mut self, u: &String, v: &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] 23 ~ fn add_edge(&mut self, u: &str, v: &String) { [INFO] [stdout] 24 ~ self.adj_list.entry(u.to_owned()).or_insert_with(HashSet::new).insert(v.clone()); [INFO] [stdout] 25 ~ self.adj_list.entry(v.clone()).or_insert_with(HashSet::new).insert(u.to_owned()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/aoc_2024/day_23.rs:23:43 [INFO] [stdout] | [INFO] [stdout] 23 | fn add_edge(&mut self, u: &String, v: &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] 23 ~ fn add_edge(&mut self, u: &String, v: &str) { [INFO] [stdout] 24 ~ self.adj_list.entry(u.clone()).or_insert_with(HashSet::new).insert(v.to_owned()); [INFO] [stdout] 25 ~ self.adj_list.entry(v.to_owned()).or_insert_with(HashSet::new).insert(u.clone()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/aoc_2024/day_23.rs:24:40 [INFO] [stdout] | [INFO] [stdout] 24 | self.adj_list.entry(u.clone()).or_insert_with(HashSet::new).insert(v.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/aoc_2024/day_23.rs:25:40 [INFO] [stdout] | [INFO] [stdout] 25 | self.adj_list.entry(v.clone()).or_insert_with(HashSet::new).insert(u.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/aoc_2024/day_23.rs:51:25 [INFO] [stdout] | [INFO] [stdout] 51 | fn parse_input(content: &String) -> Graph { [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] 51 - fn parse_input(content: &String) -> Graph { [INFO] [stdout] 51 + fn parse_input(content: &str) -> Graph { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `AND` contains a capitalized acronym [INFO] [stdout] --> src/aoc_2024/day_24.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 15 | AND, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `And` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `XOR` contains a capitalized acronym [INFO] [stdout] --> src/aoc_2024/day_24.rs:17:5 [INFO] [stdout] | [INFO] [stdout] 17 | XOR, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Xor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/aoc_2024/day_24.rs:28:25 [INFO] [stdout] | [INFO] [stdout] 28 | fn parse_input(content: &String) -> (HashMap, 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] 28 - fn parse_input(content: &String) -> (HashMap, Vec) { [INFO] [stdout] 28 + fn parse_input(content: &str) -> (HashMap, Vec) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/aoc_2024/day_24.rs:74:45 [INFO] [stdout] | [INFO] [stdout] 74 | outbound.entry(rule.v1.to_string()).or_insert_with(Vec::new).push(rule.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/aoc_2024/day_24.rs:75:45 [INFO] [stdout] | [INFO] [stdout] 75 | outbound.entry(rule.v2.to_string()).or_insert_with(Vec::new).push(rule.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/aoc_2024/day_24.rs:85:11 [INFO] [stdout] | [INFO] [stdout] 85 | while todo.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!todo.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/aoc_2024/day_24.rs:101:52 [INFO] [stdout] | [INFO] [stdout] 101 | if let Some(val) = inbound.get(&out) { [INFO] [stdout] | ^^^^ help: change this to: `out` [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/aoc_2024/day_24.rs:103:44 [INFO] [stdout] | [INFO] [stdout] 103 | ... inbound.remove(&out); [INFO] [stdout] | ^^^^ help: change this to: `out` [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 creates an owned instance just for comparison [INFO] [stdout] --> src/aoc_2024/day_24.rs:156:50 [INFO] [stdout] | [INFO] [stdout] 156 | if rule.op == LogicOp::AND && rule.v1 != "x00".to_string() && rule.v2 != "x00".to_string() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `"x00"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] = note: `#[warn(clippy::cmp_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/aoc_2024/day_24.rs:156:82 [INFO] [stdout] | [INFO] [stdout] 156 | if rule.op == LogicOp::AND && rule.v1 != "x00".to_string() && rule.v2 != "x00".to_string() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `"x00"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/aoc_2024/day_06.rs:65:20 [INFO] [stdout] | [INFO] [stdout] 65 | let dirs = vec![(-1, 0), (0, 1), (1, 0), (0, -1)]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[(-1, 0), (0, 1), (1, 0), (0, -1)]` [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/aoc_2024/day_12.rs:16:18 [INFO] [stdout] | [INFO] [stdout] 16 | for d in vec![Complex::new(1, 0), Complex::new(-1, 0), Complex::new(0, -1), Complex::new(0, 1)] { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[Complex::new(1, 0), Complex::new(-1, 0), Complex::new(0, -1), Complex::new(0, 1)]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/aoc_2024/day_12.rs:55:22 [INFO] [stdout] | [INFO] [stdout] 55 | for n in vec![*p + Complex::new(1, 0), p + Complex::new(-1 ,0), p + Complex::new(0, 1), p + Complex::new(0, -1)] { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[*p + Complex::new(1, 0), p + Complex::new(-1 ,0), p + Complex::new(0, 1), p + Complex::new(0, -1)]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/aoc_2024/day_24.rs:150:50 [INFO] [stdout] | [INFO] [stdout] 150 | && does_not_start_with_any(&rule.v1, &vec!['x', 'y', 'z']) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: you can use a slice directly: `&['x', 'y', 'z']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/aoc_2024/day_24.rs:151:50 [INFO] [stdout] | [INFO] [stdout] 151 | && does_not_start_with_any(&rule.v2, &vec!['x', 'y', 'z']) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: you can use a slice directly: `&['x', 'y', 'z']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/aoc_2024/day_24.rs:152:51 [INFO] [stdout] | [INFO] [stdout] 152 | && does_not_start_with_any(&rule.res, &vec!['x', 'y', 'z']) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: you can use a slice directly: `&['x', 'y', 'z']` [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.10s [INFO] running `Command { std: "docker" "inspect" "19f2406669be923658e9d0ce41acf79457477bc34ead03731f0d7e26aad886dd", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "19f2406669be923658e9d0ce41acf79457477bc34ead03731f0d7e26aad886dd", kill_on_drop: false }` [INFO] [stdout] 19f2406669be923658e9d0ce41acf79457477bc34ead03731f0d7e26aad886dd