[INFO] cloning repository https://github.com/valentingoelz/AdventOfCode2024 [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/valentingoelz/AdventOfCode2024" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fvalentingoelz%2FAdventOfCode2024", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fvalentingoelz%2FAdventOfCode2024'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 253ea5b49961e35edced2dae7d83f9332e34e9f3 [INFO] linting valentingoelz/AdventOfCode2024 against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fvalentingoelz%2FAdventOfCode2024" "/workspace/builds/worker-7-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-7-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/valentingoelz/AdventOfCode2024 [INFO] finished tweaking git repo https://github.com/valentingoelz/AdventOfCode2024 [INFO] tweaked toml for git repo https://github.com/valentingoelz/AdventOfCode2024 written to /workspace/builds/worker-7-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/valentingoelz/AdventOfCode2024 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/valentingoelz/AdventOfCode2024 already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-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] 0350b5b1407681e41ee34c8eeed40462afa26f3ea62af7e62a5bbae6d874fe63 [INFO] running `Command { std: "docker" "start" "-a" "0350b5b1407681e41ee34c8eeed40462afa26f3ea62af7e62a5bbae6d874fe63", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "0350b5b1407681e41ee34c8eeed40462afa26f3ea62af7e62a5bbae6d874fe63", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "0350b5b1407681e41ee34c8eeed40462afa26f3ea62af7e62a5bbae6d874fe63", kill_on_drop: false }` [INFO] [stdout] 0350b5b1407681e41ee34c8eeed40462afa26f3ea62af7e62a5bbae6d874fe63 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-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] 84b1a498edb0bc32491b5441da11da2bccb0628ac06b7e353070a20dd3fba7e5 [INFO] running `Command { std: "docker" "start" "-a" "84b1a498edb0bc32491b5441da11da2bccb0628ac06b7e353070a20dd3fba7e5", kill_on_drop: false }` [INFO] [stderr] Compiling num-traits v0.2.19 [INFO] [stderr] Compiling matrixmultiply v0.3.9 [INFO] [stderr] Checking clap_lex v0.7.4 [INFO] [stderr] Compiling syn v2.0.90 [INFO] [stderr] Checking clap_builder v4.5.23 [INFO] [stderr] Checking num-integer v0.1.46 [INFO] [stderr] Checking num-complex v0.4.6 [INFO] [stderr] Checking num-bigint v0.4.6 [INFO] [stderr] Checking num-iter v0.1.45 [INFO] [stderr] Checking ndarray v0.16.1 [INFO] [stderr] Checking num-rational v0.4.2 [INFO] [stderr] Checking num v0.4.3 [INFO] [stderr] Compiling clap_derive v4.5.18 [INFO] [stderr] Checking clap v4.5.23 [INFO] [stderr] Checking aoc-2024 v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: the loop variable `i` is only used to index `left` [INFO] [stdout] --> src/y2024/day01.rs:35:14 [INFO] [stdout] | [INFO] [stdout] 35 | for i in 0..left.len() { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 35 - for i in 0..left.len() { [INFO] [stdout] 35 + for in &left { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/y2024/day02.rs:61:5 [INFO] [stdout] | [INFO] [stdout] 61 | return false; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 61 - return false; [INFO] [stdout] 61 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/y2024/day02.rs:35:24 [INFO] [stdout] | [INFO] [stdout] 35 | fn check_line(numbers: &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] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 35 - fn check_line(numbers: &Vec) -> bool { [INFO] [stdout] 35 + fn check_line(numbers: &[i32]) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `x` [INFO] [stdout] --> src/y2024/day04.rs:17:14 [INFO] [stdout] | [INFO] [stdout] 17 | for i in 0..vertical_length { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 17 - for i in 0..vertical_length { [INFO] [stdout] 17 + for in x.iter().take(vertical_length) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is only used to index `x` [INFO] [stdout] --> src/y2024/day04.rs:19:18 [INFO] [stdout] | [INFO] [stdout] 19 | for j in 0..horizontal_length { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 19 - for j in 0..horizontal_length { [INFO] [stdout] 19 + for in x.iter().take(horizontal_length) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `x` [INFO] [stdout] --> src/y2024/day04.rs:34:14 [INFO] [stdout] | [INFO] [stdout] 34 | for i in 0..horizontal_length { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 34 - for i in 0..horizontal_length { [INFO] [stdout] 34 + for in x.iter().take(horizontal_length) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is only used to index `x` [INFO] [stdout] --> src/y2024/day04.rs:36:18 [INFO] [stdout] | [INFO] [stdout] 36 | for j in 0..vertical_length { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 36 - for j in 0..vertical_length { [INFO] [stdout] 36 + for in x.iter().take(vertical_length) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `j` is used as a loop counter [INFO] [stdout] --> src/y2024/day04.rs:82:9 [INFO] [stdout] | [INFO] [stdout] 82 | for _ in 0..=horizontal_length { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (j, _) in (start_point_y..).zip((0..=horizontal_length))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] = note: `#[warn(clippy::explicit_counter_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `x` [INFO] [stdout] --> src/y2024/day04.rs:108:14 [INFO] [stdout] | [INFO] [stdout] 108 | for i in 1..vertical_length - 1 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 108 - for i in 1..vertical_length - 1 { [INFO] [stdout] 108 + for (i, ) in x.iter().enumerate().take(vertical_length - 1).skip(1) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is used to index `x` [INFO] [stdout] --> src/y2024/day04.rs:109:18 [INFO] [stdout] | [INFO] [stdout] 109 | for j in 1..horizontal_length - 1 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 109 - for j in 1..horizontal_length - 1 { [INFO] [stdout] 109 + for (j, ) in x.iter().enumerate().take(horizontal_length - 1).skip(1) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/y2024/day04.rs:126:9 [INFO] [stdout] | [INFO] [stdout] 126 | / if (top_left == 'M' || top_left == 'S') && (bottom_right == 'M' || bottom_right == 'S') { [INFO] [stdout] 127 | | if top_left != bottom_right { [INFO] [stdout] 128 | | if (top_right == 'M' || top_right == 'S') [INFO] [stdout] 129 | | && (bottom_left == 'M' || bottom_left == 'S') [INFO] [stdout] ... | [INFO] [stdout] 136 | | } [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] 126 ~ if (top_left == 'M' || top_left == 'S') && (bottom_right == 'M' || bottom_right == 'S') [INFO] [stdout] 127 ~ && top_left != bottom_right { [INFO] [stdout] 128 | if (top_right == 'M' || top_right == 'S') [INFO] [stdout] ... [INFO] [stdout] 134 | } [INFO] [stdout] 135 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/y2024/day04.rs:127:13 [INFO] [stdout] | [INFO] [stdout] 127 | / if top_left != bottom_right { [INFO] [stdout] 128 | | if (top_right == 'M' || top_right == 'S') [INFO] [stdout] 129 | | && (bottom_left == 'M' || bottom_left == 'S') [INFO] [stdout] ... | [INFO] [stdout] 135 | | } [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] 127 ~ if top_left != bottom_right [INFO] [stdout] 128 ~ && (top_right == 'M' || top_right == 'S') [INFO] [stdout] 129 | && (bottom_left == 'M' || bottom_left == 'S') [INFO] [stdout] ... [INFO] [stdout] 133 | } [INFO] [stdout] 134 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/y2024/day04.rs:128:17 [INFO] [stdout] | [INFO] [stdout] 128 | / if (top_right == 'M' || top_right == 'S') [INFO] [stdout] 129 | | && (bottom_left == 'M' || bottom_left == 'S') [INFO] [stdout] 130 | | { [INFO] [stdout] 131 | | if top_right != bottom_left { [INFO] [stdout] ... | [INFO] [stdout] 134 | | } [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] 129 ~ && (bottom_left == 'M' || bottom_left == 'S') [INFO] [stdout] 130 ~ && top_right != bottom_left { [INFO] [stdout] 131 | x_mas_counter += 1; [INFO] [stdout] 132 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/y2024/day05.rs:38:20 [INFO] [stdout] | [INFO] [stdout] 38 | if !(x_idx < y_idx) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `(x_idx >= y_idx)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/y2024/day05.rs:12:13 [INFO] [stdout] | [INFO] [stdout] 12 | return (x.parse::().unwrap(), y.parse::().unwrap()); [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] 12 - return (x.parse::().unwrap(), y.parse::().unwrap()); [INFO] [stdout] 12 + (x.parse::().unwrap(), y.parse::().unwrap()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/y2024/day05.rs:65:13 [INFO] [stdout] | [INFO] [stdout] 65 | return a.cmp(b); [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] 65 - return a.cmp(b); [INFO] [stdout] 65 + a.cmp(b) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/y2024/day06.rs:32:33 [INFO] [stdout] | [INFO] [stdout] 32 | fn find_current_position(input: &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] 32 - fn find_current_position(input: &Vec>) -> (i32, i32) { [INFO] [stdout] 32 + fn find_current_position(input: &[Vec]) -> (i32, i32) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/y2024/day06.rs:46:5 [INFO] [stdout] | [INFO] [stdout] 45 | let result = x >= 0 && x < x_bound && y >= 0 && y < y_bound; [INFO] [stdout] | ------------------------------------------------------------ unnecessary `let` binding [INFO] [stdout] 46 | result [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 45 ~ [INFO] [stdout] 46 ~ x >= 0 && x < x_bound && y >= 0 && y < y_bound [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `(i32, i32)` which implements the `Copy` trait [INFO] [stdout] --> src/y2024/day06.rs:136:40 [INFO] [stdout] | [INFO] [stdout] 136 | let mut current_position = starting_position.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `starting_position` [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 `Direction` which implements the `Copy` trait [INFO] [stdout] --> src/y2024/day06.rs:137:33 [INFO] [stdout] | [INFO] [stdout] 137 | let mut direction = starting_direction.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `starting_direction` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/y2024/day07.rs:30:47 [INFO] [stdout] | [INFO] [stdout] 30 | let operators = get_list_of_operators(&values); [INFO] [stdout] | ^^^^^^^ help: change this to: `values` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/y2024/day07.rs:51:34 [INFO] [stdout] | [INFO] [stdout] 51 | fn get_list_of_operators(values: &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] 51 - fn get_list_of_operators(values: &Vec) -> Vec> { [INFO] [stdout] 51 + fn get_list_of_operators(values: &[i64]) -> Vec> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/y2024/day07.rs:74:53 [INFO] [stdout] | [INFO] [stdout] 74 | let operators = get_list_of_three_operators(&values); [INFO] [stdout] | ^^^^^^^ help: change this to: `values` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/y2024/day07.rs:99:40 [INFO] [stdout] | [INFO] [stdout] 99 | fn get_list_of_three_operators(values: &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] 99 - fn get_list_of_three_operators(values: &Vec) -> Vec> { [INFO] [stdout] 99 + fn get_list_of_three_operators(values: &[i64]) -> Vec> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `left` [INFO] [stdout] --> src/y2024/day01.rs:35:14 [INFO] [stdout] | [INFO] [stdout] 35 | for i in 0..left.len() { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 35 - for i in 0..left.len() { [INFO] [stdout] 35 + for in &left { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/y2024/day02.rs:61:5 [INFO] [stdout] | [INFO] [stdout] 61 | return false; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 61 - return false; [INFO] [stdout] 61 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/y2024/day09.rs:10:16 [INFO] [stdout] | [INFO] [stdout] 10 | if character.is_digit(10) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `character.is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] = note: `#[warn(clippy::is_digit_ascii_radix)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `numbers` [INFO] [stdout] --> src/y2024/day09.rs:18:14 [INFO] [stdout] | [INFO] [stdout] 18 | for i in 0..numbers.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] 18 - for i in 0..numbers.len() { [INFO] [stdout] 18 + for (i, ) in numbers.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/y2024/day02.rs:35:24 [INFO] [stdout] | [INFO] [stdout] 35 | fn check_line(numbers: &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] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 35 - fn check_line(numbers: &Vec) -> bool { [INFO] [stdout] 35 + fn check_line(numbers: &[i32]) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `x` [INFO] [stdout] --> src/y2024/day04.rs:17:14 [INFO] [stdout] | [INFO] [stdout] 17 | for i in 0..vertical_length { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 17 - for i in 0..vertical_length { [INFO] [stdout] 17 + for in x.iter().take(vertical_length) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/y2024/day10.rs:55:13 [INFO] [stdout] | [INFO] [stdout] 55 | / if self.valid(new_x, new_y) { [INFO] [stdout] 56 | | if self.grid[new_x as usize][new_y as usize] == current_value + 1 { [INFO] [stdout] 57 | | adjacent.push((new_x as usize, new_y as usize)); [INFO] [stdout] 58 | | } [INFO] [stdout] 59 | | } [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] 55 ~ if self.valid(new_x, new_y) [INFO] [stdout] 56 ~ && self.grid[new_x as usize][new_y as usize] == current_value + 1 { [INFO] [stdout] 57 | adjacent.push((new_x as usize, new_y as usize)); [INFO] [stdout] 58 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is only used to index `x` [INFO] [stdout] --> src/y2024/day04.rs:19:18 [INFO] [stdout] | [INFO] [stdout] 19 | for j in 0..horizontal_length { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 19 - for j in 0..horizontal_length { [INFO] [stdout] 19 + for in x.iter().take(horizontal_length) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `x` [INFO] [stdout] --> src/y2024/day04.rs:34:14 [INFO] [stdout] | [INFO] [stdout] 34 | for i in 0..horizontal_length { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 34 - for i in 0..horizontal_length { [INFO] [stdout] 34 + for in x.iter().take(horizontal_length) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is only used to index `x` [INFO] [stdout] --> src/y2024/day04.rs:36:18 [INFO] [stdout] | [INFO] [stdout] 36 | for j in 0..vertical_length { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 36 - for j in 0..vertical_length { [INFO] [stdout] 36 + for in x.iter().take(vertical_length) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/y2024/day11.rs:18:26 [INFO] [stdout] | [INFO] [stdout] 18 | fn solve_better(numbers: &Vec, blinks: usize) -> usize { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 18 - fn solve_better(numbers: &Vec, blinks: usize) -> usize { [INFO] [stdout] 18 + fn solve_better(numbers: &[i64], blinks: usize) -> usize { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `usize` is unnecessary [INFO] [stdout] --> src/y2024/day11.rs:19:78 [INFO] [stdout] | [INFO] [stdout] 19 | let mut stones: HashMap = numbers.iter().map(|s| (*s as u64, 1 as usize)).collect(); [INFO] [stdout] | ^^^^^^^^^^ help: try: `1_usize` [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: the variable `j` is used as a loop counter [INFO] [stdout] --> src/y2024/day04.rs:82:9 [INFO] [stdout] | [INFO] [stdout] 82 | for _ in 0..=horizontal_length { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (j, _) in (start_point_y..).zip((0..=horizontal_length))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] = note: `#[warn(clippy::explicit_counter_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `x` [INFO] [stdout] --> src/y2024/day04.rs:108:14 [INFO] [stdout] | [INFO] [stdout] 108 | for i in 1..vertical_length - 1 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 108 - for i in 1..vertical_length - 1 { [INFO] [stdout] 108 + for (i, ) in x.iter().enumerate().take(vertical_length - 1).skip(1) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is used to index `x` [INFO] [stdout] --> src/y2024/day04.rs:109:18 [INFO] [stdout] | [INFO] [stdout] 109 | for j in 1..horizontal_length - 1 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 109 - for j in 1..horizontal_length - 1 { [INFO] [stdout] 109 + for (j, ) in x.iter().enumerate().take(horizontal_length - 1).skip(1) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/y2024/day04.rs:126:9 [INFO] [stdout] | [INFO] [stdout] 126 | / if (top_left == 'M' || top_left == 'S') && (bottom_right == 'M' || bottom_right == 'S') { [INFO] [stdout] 127 | | if top_left != bottom_right { [INFO] [stdout] 128 | | if (top_right == 'M' || top_right == 'S') [INFO] [stdout] 129 | | && (bottom_left == 'M' || bottom_left == 'S') [INFO] [stdout] ... | [INFO] [stdout] 136 | | } [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] 126 ~ if (top_left == 'M' || top_left == 'S') && (bottom_right == 'M' || bottom_right == 'S') [INFO] [stdout] 127 ~ && top_left != bottom_right { [INFO] [stdout] 128 | if (top_right == 'M' || top_right == 'S') [INFO] [stdout] ... [INFO] [stdout] 134 | } [INFO] [stdout] 135 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/y2024/day04.rs:127:13 [INFO] [stdout] | [INFO] [stdout] 127 | / if top_left != bottom_right { [INFO] [stdout] 128 | | if (top_right == 'M' || top_right == 'S') [INFO] [stdout] 129 | | && (bottom_left == 'M' || bottom_left == 'S') [INFO] [stdout] ... | [INFO] [stdout] 135 | | } [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] 127 ~ if top_left != bottom_right [INFO] [stdout] 128 ~ && (top_right == 'M' || top_right == 'S') [INFO] [stdout] 129 | && (bottom_left == 'M' || bottom_left == 'S') [INFO] [stdout] ... [INFO] [stdout] 133 | } [INFO] [stdout] 134 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/y2024/day04.rs:128:17 [INFO] [stdout] | [INFO] [stdout] 128 | / if (top_right == 'M' || top_right == 'S') [INFO] [stdout] 129 | | && (bottom_left == 'M' || bottom_left == 'S') [INFO] [stdout] 130 | | { [INFO] [stdout] 131 | | if top_right != bottom_left { [INFO] [stdout] ... | [INFO] [stdout] 134 | | } [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] 129 ~ && (bottom_left == 'M' || bottom_left == 'S') [INFO] [stdout] 130 ~ && top_right != bottom_left { [INFO] [stdout] 131 | x_mas_counter += 1; [INFO] [stdout] 132 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/y2024/day05.rs:38:20 [INFO] [stdout] | [INFO] [stdout] 38 | if !(x_idx < y_idx) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `(x_idx >= y_idx)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/y2024/day05.rs:12:13 [INFO] [stdout] | [INFO] [stdout] 12 | return (x.parse::().unwrap(), y.parse::().unwrap()); [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] 12 - return (x.parse::().unwrap(), y.parse::().unwrap()); [INFO] [stdout] 12 + (x.parse::().unwrap(), y.parse::().unwrap()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/y2024/day05.rs:65:13 [INFO] [stdout] | [INFO] [stdout] 65 | return a.cmp(b); [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] 65 - return a.cmp(b); [INFO] [stdout] 65 + a.cmp(b) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/y2024/day06.rs:32:33 [INFO] [stdout] | [INFO] [stdout] 32 | fn find_current_position(input: &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] 32 - fn find_current_position(input: &Vec>) -> (i32, i32) { [INFO] [stdout] 32 + fn find_current_position(input: &[Vec]) -> (i32, i32) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/y2024/day06.rs:46:5 [INFO] [stdout] | [INFO] [stdout] 45 | let result = x >= 0 && x < x_bound && y >= 0 && y < y_bound; [INFO] [stdout] | ------------------------------------------------------------ unnecessary `let` binding [INFO] [stdout] 46 | result [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 45 ~ [INFO] [stdout] 46 ~ x >= 0 && x < x_bound && y >= 0 && y < y_bound [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `(i32, i32)` which implements the `Copy` trait [INFO] [stdout] --> src/y2024/day06.rs:136:40 [INFO] [stdout] | [INFO] [stdout] 136 | let mut current_position = starting_position.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `starting_position` [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 `Direction` which implements the `Copy` trait [INFO] [stdout] --> src/y2024/day06.rs:137:33 [INFO] [stdout] | [INFO] [stdout] 137 | let mut direction = starting_direction.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `starting_direction` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/y2024/day07.rs:30:47 [INFO] [stdout] | [INFO] [stdout] 30 | let operators = get_list_of_operators(&values); [INFO] [stdout] | ^^^^^^^ help: change this to: `values` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/y2024/day07.rs:51:34 [INFO] [stdout] | [INFO] [stdout] 51 | fn get_list_of_operators(values: &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] 51 - fn get_list_of_operators(values: &Vec) -> Vec> { [INFO] [stdout] 51 + fn get_list_of_operators(values: &[i64]) -> Vec> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/y2024/day07.rs:74:53 [INFO] [stdout] | [INFO] [stdout] 74 | let operators = get_list_of_three_operators(&values); [INFO] [stdout] | ^^^^^^^ help: change this to: `values` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/y2024/day07.rs:99:40 [INFO] [stdout] | [INFO] [stdout] 99 | fn get_list_of_three_operators(values: &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] 99 - fn get_list_of_three_operators(values: &Vec) -> Vec> { [INFO] [stdout] 99 + fn get_list_of_three_operators(values: &[i64]) -> Vec> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/y2024/day09.rs:10:16 [INFO] [stdout] | [INFO] [stdout] 10 | if character.is_digit(10) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `character.is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] = note: `#[warn(clippy::is_digit_ascii_radix)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `numbers` [INFO] [stdout] --> src/y2024/day09.rs:18:14 [INFO] [stdout] | [INFO] [stdout] 18 | for i in 0..numbers.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] 18 - for i in 0..numbers.len() { [INFO] [stdout] 18 + for (i, ) in numbers.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/y2024/day10.rs:55:13 [INFO] [stdout] | [INFO] [stdout] 55 | / if self.valid(new_x, new_y) { [INFO] [stdout] 56 | | if self.grid[new_x as usize][new_y as usize] == current_value + 1 { [INFO] [stdout] 57 | | adjacent.push((new_x as usize, new_y as usize)); [INFO] [stdout] 58 | | } [INFO] [stdout] 59 | | } [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] 55 ~ if self.valid(new_x, new_y) [INFO] [stdout] 56 ~ && self.grid[new_x as usize][new_y as usize] == current_value + 1 { [INFO] [stdout] 57 | adjacent.push((new_x as usize, new_y as usize)); [INFO] [stdout] 58 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/y2024/day11.rs:18:26 [INFO] [stdout] | [INFO] [stdout] 18 | fn solve_better(numbers: &Vec, blinks: usize) -> usize { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 18 - fn solve_better(numbers: &Vec, blinks: usize) -> usize { [INFO] [stdout] 18 + fn solve_better(numbers: &[i64], blinks: usize) -> usize { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `usize` is unnecessary [INFO] [stdout] --> src/y2024/day11.rs:19:78 [INFO] [stdout] | [INFO] [stdout] 19 | let mut stones: HashMap = numbers.iter().map(|s| (*s as u64, 1 as usize)).collect(); [INFO] [stdout] | ^^^^^^^^^^ help: try: `1_usize` [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] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 10.60s [INFO] running `Command { std: "docker" "inspect" "84b1a498edb0bc32491b5441da11da2bccb0628ac06b7e353070a20dd3fba7e5", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "84b1a498edb0bc32491b5441da11da2bccb0628ac06b7e353070a20dd3fba7e5", kill_on_drop: false }` [INFO] [stdout] 84b1a498edb0bc32491b5441da11da2bccb0628ac06b7e353070a20dd3fba7e5