[INFO] cloning repository https://github.com/Hazlnuss/AoC2024Rust [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/Hazlnuss/AoC2024Rust" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FHazlnuss%2FAoC2024Rust", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FHazlnuss%2FAoC2024Rust'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 9db972fd0ce98ff7b5e388d5f6b3dc8c41525fce [INFO] linting Hazlnuss/AoC2024Rust against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FHazlnuss%2FAoC2024Rust" "/workspace/builds/worker-0-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-0-tc1/source'... [INFO] [stderr] done. [INFO] removed /workspace/builds/worker-0-tc1/source/.cargo/config.toml [INFO] started tweaking git repo https://github.com/Hazlnuss/AoC2024Rust [INFO] finished tweaking git repo https://github.com/Hazlnuss/AoC2024Rust [INFO] tweaked toml for git repo https://github.com/Hazlnuss/AoC2024Rust written to /workspace/builds/worker-0-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/Hazlnuss/AoC2024Rust 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/Hazlnuss/AoC2024Rust already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded iana-time-zone v0.1.58 [INFO] [stderr] Downloaded tinyjson v2.5.1 [INFO] [stderr] Downloaded dhat v0.3.3 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 51f39aa98f9e84925118abf642f383ca2ee57ce080574029b673094ae77f886a [INFO] running `Command { std: "docker" "start" "-a" "51f39aa98f9e84925118abf642f383ca2ee57ce080574029b673094ae77f886a", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "51f39aa98f9e84925118abf642f383ca2ee57ce080574029b673094ae77f886a", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "51f39aa98f9e84925118abf642f383ca2ee57ce080574029b673094ae77f886a", kill_on_drop: false }` [INFO] [stdout] 51f39aa98f9e84925118abf642f383ca2ee57ce080574029b673094ae77f886a [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 64f9f7b4c48d3b3ac7482ce6a0db61cf735300e89d8380fcdcb092b33e92cbb2 [INFO] running `Command { std: "docker" "start" "-a" "64f9f7b4c48d3b3ac7482ce6a0db61cf735300e89d8380fcdcb092b33e92cbb2", kill_on_drop: false }` [INFO] [stderr] Checking memchr v2.6.4 [INFO] [stderr] Checking pico-args v0.5.0 [INFO] [stderr] Checking tinyjson v2.5.1 [INFO] [stderr] Checking aho-corasick v1.1.3 [INFO] [stderr] Checking regex-automata v0.4.9 [INFO] [stderr] Checking regex v1.11.1 [INFO] [stderr] Checking advent_of_code v0.11.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: called `Iterator::last` on a `DoubleEndedIterator`; this will needlessly iterate the entire iterator [INFO] [stdout] --> src/template/run_multi.rs:173:26 [INFO] [stdout] | [INFO] [stdout] 173 | let str_timing = line [INFO] [stdout] | __________________________^ [INFO] [stdout] 174 | | .split(" samples)") [INFO] [stdout] 175 | | .next()? [INFO] [stdout] 176 | | .split('(') [INFO] [stdout] 177 | | .last()? [INFO] [stdout] | |___________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_ended_iterator_last [INFO] [stdout] = note: `#[warn(clippy::double_ended_iterator_last)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 177 - .last()? [INFO] [stdout] 177 + .next_back()? [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_unstable_by_key` [INFO] [stdout] --> src/template/timings.rs:54:9 [INFO] [stdout] | [INFO] [stdout] 54 | data.sort_unstable_by(|a, b| a.day.cmp(&b.day)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] = note: `#[warn(clippy::unnecessary_sort_by)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 54 - data.sort_unstable_by(|a, b| a.day.cmp(&b.day)); [INFO] [stdout] 54 + data.sort_unstable_by_key(|a| a.day); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `Iterator::last` on a `DoubleEndedIterator`; this will needlessly iterate the entire iterator [INFO] [stdout] --> src/template/run_multi.rs:173:26 [INFO] [stdout] | [INFO] [stdout] 173 | let str_timing = line [INFO] [stdout] | __________________________^ [INFO] [stdout] 174 | | .split(" samples)") [INFO] [stdout] 175 | | .next()? [INFO] [stdout] 176 | | .split('(') [INFO] [stdout] 177 | | .last()? [INFO] [stdout] | |___________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_ended_iterator_last [INFO] [stdout] = note: `#[warn(clippy::double_ended_iterator_last)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 177 - .last()? [INFO] [stdout] 177 + .next_back()? [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_unstable_by_key` [INFO] [stdout] --> src/template/timings.rs:54:9 [INFO] [stdout] | [INFO] [stdout] 54 | data.sort_unstable_by(|a, b| a.day.cmp(&b.day)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] = note: `#[warn(clippy::unnecessary_sort_by)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 54 - data.sort_unstable_by(|a, b| a.day.cmp(&b.day)); [INFO] [stdout] 54 + data.sort_unstable_by_key(|a| a.day); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/bin/06.rs:3:17 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn part_one(input: &str) -> Option { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/bin/06.rs:7:17 [INFO] [stdout] | [INFO] [stdout] 7 | pub fn part_two(input: &str) -> Option { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/bin/06.rs:3:17 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn part_one(input: &str) -> Option { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/bin/06.rs:7:17 [INFO] [stdout] | [INFO] [stdout] 7 | pub fn part_two(input: &str) -> Option { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/bin/05.rs:17:24 [INFO] [stdout] | [INFO] [stdout] 17 | if !(numbers.iter().position(|n| *n == pair.0) [INFO] [stdout] | ________________________^ [INFO] [stdout] 18 | | < numbers.iter().position(|n| *n == pair.1)) [INFO] [stdout] | |____________________________________________________________________^ help: try: `(numbers.iter().position(|n| *n == pair.0) >= numbers.iter().position(|n| *n == pair.1))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/bin/05.rs:16:17 [INFO] [stdout] | [INFO] [stdout] 16 | / if numbers.contains(&pair.0) && numbers.contains(&pair.1) { [INFO] [stdout] 17 | | if !(numbers.iter().position(|n| *n == pair.0) [INFO] [stdout] 18 | | < numbers.iter().position(|n| *n == pair.1)) [INFO] [stdout] ... | [INFO] [stdout] 23 | | } [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] 16 ~ if numbers.contains(&pair.0) && numbers.contains(&pair.1) [INFO] [stdout] 17 ~ && !(numbers.iter().position(|n| *n == pair.0) [INFO] [stdout] 18 | < numbers.iter().position(|n| *n == pair.1)) [INFO] [stdout] ... [INFO] [stdout] 21 | break; [INFO] [stdout] 22 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/bin/05.rs:51:28 [INFO] [stdout] | [INFO] [stdout] 51 | if !(numbers.iter().position(|n| *n == pair.0) [INFO] [stdout] | ____________________________^ [INFO] [stdout] 52 | | < numbers.iter().position(|n| *n == pair.1)) [INFO] [stdout] | |________________________________________________________________________^ help: try: `(numbers.iter().position(|n| *n == pair.0) >= numbers.iter().position(|n| *n == pair.1))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/bin/05.rs:50:21 [INFO] [stdout] | [INFO] [stdout] 50 | / if numbers.contains(&pair.0) && numbers.contains(&pair.1) { [INFO] [stdout] 51 | | if !(numbers.iter().position(|n| *n == pair.0) [INFO] [stdout] 52 | | < numbers.iter().position(|n| *n == pair.1)) [INFO] [stdout] ... | [INFO] [stdout] 60 | | } [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] 50 ~ if numbers.contains(&pair.0) && numbers.contains(&pair.1) [INFO] [stdout] 51 ~ && !(numbers.iter().position(|n| *n == pair.0) [INFO] [stdout] 52 | < numbers.iter().position(|n| *n == pair.1)) [INFO] [stdout] ... [INFO] [stdout] 58 | incorrect = true; [INFO] [stdout] 59 ~ } [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/bin/02.rs:3:25 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn check_line(line: &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] 3 - pub fn check_line(line: &Vec) -> bool { [INFO] [stdout] 3 + pub fn check_line(line: &[u32]) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/bin/02.rs:35:9 [INFO] [stdout] | [INFO] [stdout] 35 | let failed: bool; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ created here [INFO] [stdout] 36 | failed = check_line(&line); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ initialised here [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] = note: `#[warn(clippy::needless_late_init)]` on by default [INFO] [stdout] help: move the declaration `failed` here [INFO] [stdout] | [INFO] [stdout] 35 ~ [INFO] [stdout] 36 ~ let failed: bool = check_line(&line); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/bin/04.rs:18:17 [INFO] [stdout] | [INFO] [stdout] 18 | / if i + 3 < height { [INFO] [stdout] 19 | | if input_lines[i + 1].as_bytes()[j] == b'M' [INFO] [stdout] 20 | | && input_lines[i + 2].as_bytes()[j] == b'A' [INFO] [stdout] 21 | | && input_lines[i + 3].as_bytes()[j] == b'S' [INFO] [stdout] ... | [INFO] [stdout] 25 | | } [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] 18 ~ if i + 3 < height [INFO] [stdout] 19 ~ && input_lines[i + 1].as_bytes()[j] == b'M' [INFO] [stdout] 20 | && input_lines[i + 2].as_bytes()[j] == b'A' [INFO] [stdout] ... [INFO] [stdout] 23 | counter += 1; [INFO] [stdout] 24 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/bin/04.rs:27:17 [INFO] [stdout] | [INFO] [stdout] 27 | / if i + 3 < height && j + 3 < width { [INFO] [stdout] 28 | | if input_lines[i + 1].as_bytes()[j + 1] == b'M' [INFO] [stdout] 29 | | && input_lines[i + 2].as_bytes()[j + 2] == b'A' [INFO] [stdout] 30 | | && input_lines[i + 3].as_bytes()[j + 3] == b'S' [INFO] [stdout] ... | [INFO] [stdout] 34 | | } [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] 27 ~ if i + 3 < height && j + 3 < width [INFO] [stdout] 28 ~ && input_lines[i + 1].as_bytes()[j + 1] == b'M' [INFO] [stdout] 29 | && input_lines[i + 2].as_bytes()[j + 2] == b'A' [INFO] [stdout] ... [INFO] [stdout] 32 | counter += 1; [INFO] [stdout] 33 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/bin/04.rs:36:17 [INFO] [stdout] | [INFO] [stdout] 36 | / if i + 3 < height && j as i32 - 3 >= 0 { [INFO] [stdout] 37 | | if input_lines[i + 1].as_bytes()[j - 1] == b'M' [INFO] [stdout] 38 | | && input_lines[i + 2].as_bytes()[j - 2] == b'A' [INFO] [stdout] 39 | | && input_lines[i + 3].as_bytes()[j - 3] == b'S' [INFO] [stdout] ... | [INFO] [stdout] 43 | | } [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] 36 ~ if i + 3 < height && j as i32 - 3 >= 0 [INFO] [stdout] 37 ~ && input_lines[i + 1].as_bytes()[j - 1] == b'M' [INFO] [stdout] 38 | && input_lines[i + 2].as_bytes()[j - 2] == b'A' [INFO] [stdout] ... [INFO] [stdout] 41 | counter += 1; [INFO] [stdout] 42 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/bin/04.rs:45:17 [INFO] [stdout] | [INFO] [stdout] 45 | / if i as i32 - 3 >= 0 && j + 3 < width { [INFO] [stdout] 46 | | if input_lines[i - 1].as_bytes()[j + 1] == b'M' [INFO] [stdout] 47 | | && input_lines[i - 2].as_bytes()[j + 2] == b'A' [INFO] [stdout] 48 | | && input_lines[i - 3].as_bytes()[j + 3] == b'S' [INFO] [stdout] ... | [INFO] [stdout] 52 | | } [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] 45 ~ if i as i32 - 3 >= 0 && j + 3 < width [INFO] [stdout] 46 ~ && input_lines[i - 1].as_bytes()[j + 1] == b'M' [INFO] [stdout] 47 | && input_lines[i - 2].as_bytes()[j + 2] == b'A' [INFO] [stdout] ... [INFO] [stdout] 50 | counter += 1; [INFO] [stdout] 51 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/bin/04.rs:54:17 [INFO] [stdout] | [INFO] [stdout] 54 | / if i as i32 - 3 >= 0 && j as i32 - 3 >= 0 { [INFO] [stdout] 55 | | if input_lines[i - 1].as_bytes()[j - 1] == b'M' [INFO] [stdout] 56 | | && input_lines[i - 2].as_bytes()[j - 2] == b'A' [INFO] [stdout] 57 | | && input_lines[i - 3].as_bytes()[j - 3] == b'S' [INFO] [stdout] ... | [INFO] [stdout] 61 | | } [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] 54 ~ if i as i32 - 3 >= 0 && j as i32 - 3 >= 0 [INFO] [stdout] 55 ~ && input_lines[i - 1].as_bytes()[j - 1] == b'M' [INFO] [stdout] 56 | && input_lines[i - 2].as_bytes()[j - 2] == b'A' [INFO] [stdout] ... [INFO] [stdout] 59 | counter += 1; [INFO] [stdout] 60 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/bin/04.rs:64:13 [INFO] [stdout] | [INFO] [stdout] 64 | / if input_lines[i].as_bytes()[j] == b'S' { [INFO] [stdout] 65 | | if i + 3 < height { [INFO] [stdout] 66 | | if input_lines[i + 1].as_bytes()[j] == b'A' [INFO] [stdout] 67 | | && input_lines[i + 2].as_bytes()[j] == b'M' [INFO] [stdout] ... | [INFO] [stdout] 73 | | } [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] 64 ~ if input_lines[i].as_bytes()[j] == b'S' [INFO] [stdout] 65 ~ && i + 3 < height { [INFO] [stdout] 66 | if input_lines[i + 1].as_bytes()[j] == b'A' [INFO] [stdout] ... [INFO] [stdout] 71 | } [INFO] [stdout] 72 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/bin/04.rs:65:17 [INFO] [stdout] | [INFO] [stdout] 65 | / if i + 3 < height { [INFO] [stdout] 66 | | if input_lines[i + 1].as_bytes()[j] == b'A' [INFO] [stdout] 67 | | && input_lines[i + 2].as_bytes()[j] == b'M' [INFO] [stdout] 68 | | && input_lines[i + 3].as_bytes()[j] == b'X' [INFO] [stdout] ... | [INFO] [stdout] 72 | | } [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] 65 ~ if i + 3 < height [INFO] [stdout] 66 ~ && input_lines[i + 1].as_bytes()[j] == b'A' [INFO] [stdout] 67 | && input_lines[i + 2].as_bytes()[j] == b'M' [INFO] [stdout] ... [INFO] [stdout] 70 | counter += 1; [INFO] [stdout] 71 ~ } [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/bin/02.rs:3:25 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn check_line(line: &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] 3 - pub fn check_line(line: &Vec) -> bool { [INFO] [stdout] 3 + pub fn check_line(line: &[u32]) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/bin/02.rs:35:9 [INFO] [stdout] | [INFO] [stdout] 35 | let failed: bool; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ created here [INFO] [stdout] 36 | failed = check_line(&line); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ initialised here [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] = note: `#[warn(clippy::needless_late_init)]` on by default [INFO] [stdout] help: move the declaration `failed` here [INFO] [stdout] | [INFO] [stdout] 35 ~ [INFO] [stdout] 36 ~ let failed: bool = check_line(&line); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/bin/05.rs:17:24 [INFO] [stdout] | [INFO] [stdout] 17 | if !(numbers.iter().position(|n| *n == pair.0) [INFO] [stdout] | ________________________^ [INFO] [stdout] 18 | | < numbers.iter().position(|n| *n == pair.1)) [INFO] [stdout] | |____________________________________________________________________^ help: try: `(numbers.iter().position(|n| *n == pair.0) >= numbers.iter().position(|n| *n == pair.1))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/bin/05.rs:16:17 [INFO] [stdout] | [INFO] [stdout] 16 | / if numbers.contains(&pair.0) && numbers.contains(&pair.1) { [INFO] [stdout] 17 | | if !(numbers.iter().position(|n| *n == pair.0) [INFO] [stdout] 18 | | < numbers.iter().position(|n| *n == pair.1)) [INFO] [stdout] ... | [INFO] [stdout] 23 | | } [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] 16 ~ if numbers.contains(&pair.0) && numbers.contains(&pair.1) [INFO] [stdout] 17 ~ && !(numbers.iter().position(|n| *n == pair.0) [INFO] [stdout] 18 | < numbers.iter().position(|n| *n == pair.1)) [INFO] [stdout] ... [INFO] [stdout] 21 | break; [INFO] [stdout] 22 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/bin/05.rs:51:28 [INFO] [stdout] | [INFO] [stdout] 51 | if !(numbers.iter().position(|n| *n == pair.0) [INFO] [stdout] | ____________________________^ [INFO] [stdout] 52 | | < numbers.iter().position(|n| *n == pair.1)) [INFO] [stdout] | |________________________________________________________________________^ help: try: `(numbers.iter().position(|n| *n == pair.0) >= numbers.iter().position(|n| *n == pair.1))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/bin/05.rs:50:21 [INFO] [stdout] | [INFO] [stdout] 50 | / if numbers.contains(&pair.0) && numbers.contains(&pair.1) { [INFO] [stdout] 51 | | if !(numbers.iter().position(|n| *n == pair.0) [INFO] [stdout] 52 | | < numbers.iter().position(|n| *n == pair.1)) [INFO] [stdout] ... | [INFO] [stdout] 60 | | } [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] 50 ~ if numbers.contains(&pair.0) && numbers.contains(&pair.1) [INFO] [stdout] 51 ~ && !(numbers.iter().position(|n| *n == pair.0) [INFO] [stdout] 52 | < numbers.iter().position(|n| *n == pair.1)) [INFO] [stdout] ... [INFO] [stdout] 58 | incorrect = true; [INFO] [stdout] 59 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/bin/04.rs:18:17 [INFO] [stdout] | [INFO] [stdout] 18 | / if i + 3 < height { [INFO] [stdout] 19 | | if input_lines[i + 1].as_bytes()[j] == b'M' [INFO] [stdout] 20 | | && input_lines[i + 2].as_bytes()[j] == b'A' [INFO] [stdout] 21 | | && input_lines[i + 3].as_bytes()[j] == b'S' [INFO] [stdout] ... | [INFO] [stdout] 25 | | } [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] 18 ~ if i + 3 < height [INFO] [stdout] 19 ~ && input_lines[i + 1].as_bytes()[j] == b'M' [INFO] [stdout] 20 | && input_lines[i + 2].as_bytes()[j] == b'A' [INFO] [stdout] ... [INFO] [stdout] 23 | counter += 1; [INFO] [stdout] 24 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/bin/04.rs:27:17 [INFO] [stdout] | [INFO] [stdout] 27 | / if i + 3 < height && j + 3 < width { [INFO] [stdout] 28 | | if input_lines[i + 1].as_bytes()[j + 1] == b'M' [INFO] [stdout] 29 | | && input_lines[i + 2].as_bytes()[j + 2] == b'A' [INFO] [stdout] 30 | | && input_lines[i + 3].as_bytes()[j + 3] == b'S' [INFO] [stdout] ... | [INFO] [stdout] 34 | | } [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] 27 ~ if i + 3 < height && j + 3 < width [INFO] [stdout] 28 ~ && input_lines[i + 1].as_bytes()[j + 1] == b'M' [INFO] [stdout] 29 | && input_lines[i + 2].as_bytes()[j + 2] == b'A' [INFO] [stdout] ... [INFO] [stdout] 32 | counter += 1; [INFO] [stdout] 33 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/bin/04.rs:36:17 [INFO] [stdout] | [INFO] [stdout] 36 | / if i + 3 < height && j as i32 - 3 >= 0 { [INFO] [stdout] 37 | | if input_lines[i + 1].as_bytes()[j - 1] == b'M' [INFO] [stdout] 38 | | && input_lines[i + 2].as_bytes()[j - 2] == b'A' [INFO] [stdout] 39 | | && input_lines[i + 3].as_bytes()[j - 3] == b'S' [INFO] [stdout] ... | [INFO] [stdout] 43 | | } [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] 36 ~ if i + 3 < height && j as i32 - 3 >= 0 [INFO] [stdout] 37 ~ && input_lines[i + 1].as_bytes()[j - 1] == b'M' [INFO] [stdout] 38 | && input_lines[i + 2].as_bytes()[j - 2] == b'A' [INFO] [stdout] ... [INFO] [stdout] 41 | counter += 1; [INFO] [stdout] 42 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/bin/04.rs:45:17 [INFO] [stdout] | [INFO] [stdout] 45 | / if i as i32 - 3 >= 0 && j + 3 < width { [INFO] [stdout] 46 | | if input_lines[i - 1].as_bytes()[j + 1] == b'M' [INFO] [stdout] 47 | | && input_lines[i - 2].as_bytes()[j + 2] == b'A' [INFO] [stdout] 48 | | && input_lines[i - 3].as_bytes()[j + 3] == b'S' [INFO] [stdout] ... | [INFO] [stdout] 52 | | } [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] 45 ~ if i as i32 - 3 >= 0 && j + 3 < width [INFO] [stdout] 46 ~ && input_lines[i - 1].as_bytes()[j + 1] == b'M' [INFO] [stdout] 47 | && input_lines[i - 2].as_bytes()[j + 2] == b'A' [INFO] [stdout] ... [INFO] [stdout] 50 | counter += 1; [INFO] [stdout] 51 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/bin/04.rs:54:17 [INFO] [stdout] | [INFO] [stdout] 54 | / if i as i32 - 3 >= 0 && j as i32 - 3 >= 0 { [INFO] [stdout] 55 | | if input_lines[i - 1].as_bytes()[j - 1] == b'M' [INFO] [stdout] 56 | | && input_lines[i - 2].as_bytes()[j - 2] == b'A' [INFO] [stdout] 57 | | && input_lines[i - 3].as_bytes()[j - 3] == b'S' [INFO] [stdout] ... | [INFO] [stdout] 61 | | } [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] 54 ~ if i as i32 - 3 >= 0 && j as i32 - 3 >= 0 [INFO] [stdout] 55 ~ && input_lines[i - 1].as_bytes()[j - 1] == b'M' [INFO] [stdout] 56 | && input_lines[i - 2].as_bytes()[j - 2] == b'A' [INFO] [stdout] ... [INFO] [stdout] 59 | counter += 1; [INFO] [stdout] 60 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/bin/04.rs:64:13 [INFO] [stdout] | [INFO] [stdout] 64 | / if input_lines[i].as_bytes()[j] == b'S' { [INFO] [stdout] 65 | | if i + 3 < height { [INFO] [stdout] 66 | | if input_lines[i + 1].as_bytes()[j] == b'A' [INFO] [stdout] 67 | | && input_lines[i + 2].as_bytes()[j] == b'M' [INFO] [stdout] ... | [INFO] [stdout] 73 | | } [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] 64 ~ if input_lines[i].as_bytes()[j] == b'S' [INFO] [stdout] 65 ~ && i + 3 < height { [INFO] [stdout] 66 | if input_lines[i + 1].as_bytes()[j] == b'A' [INFO] [stdout] ... [INFO] [stdout] 71 | } [INFO] [stdout] 72 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/bin/04.rs:65:17 [INFO] [stdout] | [INFO] [stdout] 65 | / if i + 3 < height { [INFO] [stdout] 66 | | if input_lines[i + 1].as_bytes()[j] == b'A' [INFO] [stdout] 67 | | && input_lines[i + 2].as_bytes()[j] == b'M' [INFO] [stdout] 68 | | && input_lines[i + 3].as_bytes()[j] == b'X' [INFO] [stdout] ... | [INFO] [stdout] 72 | | } [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] 65 ~ if i + 3 < height [INFO] [stdout] 66 ~ && input_lines[i + 1].as_bytes()[j] == b'A' [INFO] [stdout] 67 | && input_lines[i + 2].as_bytes()[j] == b'M' [INFO] [stdout] ... [INFO] [stdout] 70 | counter += 1; [INFO] [stdout] 71 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 5.45s [INFO] running `Command { std: "docker" "inspect" "64f9f7b4c48d3b3ac7482ce6a0db61cf735300e89d8380fcdcb092b33e92cbb2", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "64f9f7b4c48d3b3ac7482ce6a0db61cf735300e89d8380fcdcb092b33e92cbb2", kill_on_drop: false }` [INFO] [stdout] 64f9f7b4c48d3b3ac7482ce6a0db61cf735300e89d8380fcdcb092b33e92cbb2