[INFO] cloning repository https://github.com/JasonCubed132/aoc2024 [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/JasonCubed132/aoc2024" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FJasonCubed132%2Faoc2024", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FJasonCubed132%2Faoc2024'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] d49d012a37150988bd7fa9c91946174edd712dd3 [INFO] linting JasonCubed132/aoc2024 against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FJasonCubed132%2Faoc2024" "/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/JasonCubed132/aoc2024 [INFO] finished tweaking git repo https://github.com/JasonCubed132/aoc2024 [INFO] tweaked toml for git repo https://github.com/JasonCubed132/aoc2024 written to /workspace/builds/worker-7-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/JasonCubed132/aoc2024 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/JasonCubed132/aoc2024 already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded cached_proc_macro v0.23.0 [INFO] [stderr] Downloaded clap v4.5.22 [INFO] [stderr] Downloaded generic-array v1.1.1 [INFO] [stderr] Downloaded cached v0.54.0 [INFO] [stderr] Downloaded clap_builder v4.5.22 [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] c9153a97523e5ab66f02d7b0bda4b1322ccbac52354fb4dd50e4cadc768caaf5 [INFO] running `Command { std: "docker" "start" "-a" "c9153a97523e5ab66f02d7b0bda4b1322ccbac52354fb4dd50e4cadc768caaf5", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "c9153a97523e5ab66f02d7b0bda4b1322ccbac52354fb4dd50e4cadc768caaf5", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "c9153a97523e5ab66f02d7b0bda4b1322ccbac52354fb4dd50e4cadc768caaf5", kill_on_drop: false }` [INFO] [stdout] c9153a97523e5ab66f02d7b0bda4b1322ccbac52354fb4dd50e4cadc768caaf5 [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] a6118169048ac13f84fe23aa09728a6759a2079f4629f59ba2817149983a2207 [INFO] running `Command { std: "docker" "start" "-a" "a6118169048ac13f84fe23aa09728a6759a2079f4629f59ba2817149983a2207", kill_on_drop: false }` [INFO] [stderr] Checking zerocopy v0.7.35 [INFO] [stderr] Compiling typenum v1.17.0 [INFO] [stderr] Compiling anyhow v1.0.93 [INFO] [stderr] Checking clap_lex v0.7.3 [INFO] [stderr] Checking aho-corasick v1.1.3 [INFO] [stderr] Compiling syn v2.0.90 [INFO] [stderr] Checking clap_builder v4.5.22 [INFO] [stderr] Checking ahash v0.8.11 [INFO] [stderr] Checking hashbrown v0.14.5 [INFO] [stderr] Checking regex-automata v0.4.9 [INFO] [stderr] Checking generic-array v1.1.1 [INFO] [stderr] Checking regex v1.11.1 [INFO] [stderr] Compiling darling_core v0.20.10 [INFO] [stderr] Compiling thiserror-impl v1.0.69 [INFO] [stderr] Compiling clap_derive v4.5.18 [INFO] [stderr] Checking thiserror v1.0.69 [INFO] [stderr] Compiling darling_macro v0.20.10 [INFO] [stderr] Checking clap v4.5.22 [INFO] [stderr] Compiling darling v0.20.10 [INFO] [stderr] Compiling cached_proc_macro v0.23.0 [INFO] [stderr] Checking cached v0.54.0 [INFO] [stderr] Checking aoc2024 v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unnecessary `>= y + 1` or `x - 1 >=` [INFO] [stdout] --> src/days/day02.rs:93:23 [INFO] [stdout] | [INFO] [stdout] 93 | } else if cnt - 1 >= asc && cnt - 2 <= asc { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change it to: `cnt > asc` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#int_plus_one [INFO] [stdout] = note: `#[warn(clippy::int_plus_one)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `>= y + 1` or `x - 1 >=` [INFO] [stdout] --> src/days/day02.rs:100:23 [INFO] [stdout] | [INFO] [stdout] 100 | } else if cnt - 1 >= dec && cnt - 2 <= dec { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change it to: `cnt > dec` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#int_plus_one [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `>= y + 1` or `x - 1 >=` [INFO] [stdout] --> src/days/day02.rs:93:23 [INFO] [stdout] | [INFO] [stdout] 93 | } else if cnt - 1 >= asc && cnt - 2 <= asc { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change it to: `cnt > asc` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#int_plus_one [INFO] [stdout] = note: `#[warn(clippy::int_plus_one)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `>= y + 1` or `x - 1 >=` [INFO] [stdout] --> src/days/day02.rs:100:23 [INFO] [stdout] | [INFO] [stdout] 100 | } else if cnt - 1 >= dec && cnt - 2 <= dec { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change it to: `cnt > dec` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#int_plus_one [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this is a decimal constant [INFO] [stdout] --> src/main.rs:64:9 [INFO] [stdout] | [INFO] [stdout] 64 | 01 => day01(day_input), [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_prefixed_literal [INFO] [stdout] = note: `#[warn(clippy::zero_prefixed_literal)]` on by default [INFO] [stdout] help: if you mean to use a decimal constant, remove the `0` to avoid confusion [INFO] [stdout] | [INFO] [stdout] 64 - 01 => day01(day_input), [INFO] [stdout] 64 + 1 => day01(day_input), [INFO] [stdout] | [INFO] [stdout] help: if you mean to use an octal constant, use `0o` [INFO] [stdout] | [INFO] [stdout] 64 | 0o1 => day01(day_input), [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this is a decimal constant [INFO] [stdout] --> src/main.rs:65:9 [INFO] [stdout] | [INFO] [stdout] 65 | 02 => day02(day_input), [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_prefixed_literal [INFO] [stdout] help: if you mean to use a decimal constant, remove the `0` to avoid confusion [INFO] [stdout] | [INFO] [stdout] 65 - 02 => day02(day_input), [INFO] [stdout] 65 + 2 => day02(day_input), [INFO] [stdout] | [INFO] [stdout] help: if you mean to use an octal constant, use `0o` [INFO] [stdout] | [INFO] [stdout] 65 | 0o2 => day02(day_input), [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this is a decimal constant [INFO] [stdout] --> src/main.rs:66:9 [INFO] [stdout] | [INFO] [stdout] 66 | 03 => day03(day_input), [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_prefixed_literal [INFO] [stdout] help: if you mean to use a decimal constant, remove the `0` to avoid confusion [INFO] [stdout] | [INFO] [stdout] 66 - 03 => day03(day_input), [INFO] [stdout] 66 + 3 => day03(day_input), [INFO] [stdout] | [INFO] [stdout] help: if you mean to use an octal constant, use `0o` [INFO] [stdout] | [INFO] [stdout] 66 | 0o3 => day03(day_input), [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this is a decimal constant [INFO] [stdout] --> src/main.rs:67:9 [INFO] [stdout] | [INFO] [stdout] 67 | 04 => day04(day_input), [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_prefixed_literal [INFO] [stdout] help: if you mean to use a decimal constant, remove the `0` to avoid confusion [INFO] [stdout] | [INFO] [stdout] 67 - 04 => day04(day_input), [INFO] [stdout] 67 + 4 => day04(day_input), [INFO] [stdout] | [INFO] [stdout] help: if you mean to use an octal constant, use `0o` [INFO] [stdout] | [INFO] [stdout] 67 | 0o4 => day04(day_input), [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this is a decimal constant [INFO] [stdout] --> src/main.rs:68:9 [INFO] [stdout] | [INFO] [stdout] 68 | 05 => day05(day_input), [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_prefixed_literal [INFO] [stdout] help: if you mean to use a decimal constant, remove the `0` to avoid confusion [INFO] [stdout] | [INFO] [stdout] 68 - 05 => day05(day_input), [INFO] [stdout] 68 + 5 => day05(day_input), [INFO] [stdout] | [INFO] [stdout] help: if you mean to use an octal constant, use `0o` [INFO] [stdout] | [INFO] [stdout] 68 | 0o5 => day05(day_input), [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this is a decimal constant [INFO] [stdout] --> src/main.rs:69:9 [INFO] [stdout] | [INFO] [stdout] 69 | 06 => day06(day_input), [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_prefixed_literal [INFO] [stdout] help: if you mean to use a decimal constant, remove the `0` to avoid confusion [INFO] [stdout] | [INFO] [stdout] 69 - 06 => day06(day_input), [INFO] [stdout] 69 + 6 => day06(day_input), [INFO] [stdout] | [INFO] [stdout] help: if you mean to use an octal constant, use `0o` [INFO] [stdout] | [INFO] [stdout] 69 | 0o6 => day06(day_input), [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this is a decimal constant [INFO] [stdout] --> src/main.rs:70:9 [INFO] [stdout] | [INFO] [stdout] 70 | 07 => day07(day_input), [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_prefixed_literal [INFO] [stdout] help: if you mean to use a decimal constant, remove the `0` to avoid confusion [INFO] [stdout] | [INFO] [stdout] 70 - 07 => day07(day_input), [INFO] [stdout] 70 + 7 => day07(day_input), [INFO] [stdout] | [INFO] [stdout] help: if you mean to use an octal constant, use `0o` [INFO] [stdout] | [INFO] [stdout] 70 | 0o7 => day07(day_input), [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this is a decimal constant [INFO] [stdout] --> src/main.rs:71:9 [INFO] [stdout] | [INFO] [stdout] 71 | 08 => day08(day_input), [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_prefixed_literal [INFO] [stdout] help: if you mean to use a decimal constant, remove the `0` to avoid confusion [INFO] [stdout] | [INFO] [stdout] 71 - 08 => day08(day_input), [INFO] [stdout] 71 + 8 => day08(day_input), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this is a decimal constant [INFO] [stdout] --> src/main.rs:64:9 [INFO] [stdout] | [INFO] [stdout] 64 | 01 => day01(day_input), [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_prefixed_literal [INFO] [stdout] = note: `#[warn(clippy::zero_prefixed_literal)]` on by default [INFO] [stdout] help: if you mean to use a decimal constant, remove the `0` to avoid confusion [INFO] [stdout] | [INFO] [stdout] 64 - 01 => day01(day_input), [INFO] [stdout] 64 + 1 => day01(day_input), [INFO] [stdout] | [INFO] [stdout] help: if you mean to use an octal constant, use `0o` [INFO] [stdout] | [INFO] [stdout] 64 | 0o1 => day01(day_input), [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this is a decimal constant [INFO] [stdout] --> src/main.rs:65:9 [INFO] [stdout] | [INFO] [stdout] 65 | 02 => day02(day_input), [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_prefixed_literal [INFO] [stdout] help: if you mean to use a decimal constant, remove the `0` to avoid confusion [INFO] [stdout] | [INFO] [stdout] 65 - 02 => day02(day_input), [INFO] [stdout] 65 + 2 => day02(day_input), [INFO] [stdout] | [INFO] [stdout] help: if you mean to use an octal constant, use `0o` [INFO] [stdout] | [INFO] [stdout] 65 | 0o2 => day02(day_input), [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this is a decimal constant [INFO] [stdout] --> src/main.rs:66:9 [INFO] [stdout] | [INFO] [stdout] 66 | 03 => day03(day_input), [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_prefixed_literal [INFO] [stdout] help: if you mean to use a decimal constant, remove the `0` to avoid confusion [INFO] [stdout] | [INFO] [stdout] 66 - 03 => day03(day_input), [INFO] [stdout] 66 + 3 => day03(day_input), [INFO] [stdout] | [INFO] [stdout] help: if you mean to use an octal constant, use `0o` [INFO] [stdout] | [INFO] [stdout] 66 | 0o3 => day03(day_input), [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this is a decimal constant [INFO] [stdout] --> src/main.rs:67:9 [INFO] [stdout] | [INFO] [stdout] 67 | 04 => day04(day_input), [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_prefixed_literal [INFO] [stdout] help: if you mean to use a decimal constant, remove the `0` to avoid confusion [INFO] [stdout] | [INFO] [stdout] 67 - 04 => day04(day_input), [INFO] [stdout] 67 + 4 => day04(day_input), [INFO] [stdout] | [INFO] [stdout] help: if you mean to use an octal constant, use `0o` [INFO] [stdout] | [INFO] [stdout] 67 | 0o4 => day04(day_input), [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this is a decimal constant [INFO] [stdout] --> src/main.rs:68:9 [INFO] [stdout] | [INFO] [stdout] 68 | 05 => day05(day_input), [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_prefixed_literal [INFO] [stdout] help: if you mean to use a decimal constant, remove the `0` to avoid confusion [INFO] [stdout] | [INFO] [stdout] 68 - 05 => day05(day_input), [INFO] [stdout] 68 + 5 => day05(day_input), [INFO] [stdout] | [INFO] [stdout] help: if you mean to use an octal constant, use `0o` [INFO] [stdout] | [INFO] [stdout] 68 | 0o5 => day05(day_input), [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this is a decimal constant [INFO] [stdout] --> src/main.rs:69:9 [INFO] [stdout] | [INFO] [stdout] 69 | 06 => day06(day_input), [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_prefixed_literal [INFO] [stdout] help: if you mean to use a decimal constant, remove the `0` to avoid confusion [INFO] [stdout] | [INFO] [stdout] 69 - 06 => day06(day_input), [INFO] [stdout] 69 + 6 => day06(day_input), [INFO] [stdout] | [INFO] [stdout] help: if you mean to use an octal constant, use `0o` [INFO] [stdout] | [INFO] [stdout] 69 | 0o6 => day06(day_input), [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this is a decimal constant [INFO] [stdout] --> src/main.rs:70:9 [INFO] [stdout] | [INFO] [stdout] 70 | 07 => day07(day_input), [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_prefixed_literal [INFO] [stdout] help: if you mean to use a decimal constant, remove the `0` to avoid confusion [INFO] [stdout] | [INFO] [stdout] 70 - 07 => day07(day_input), [INFO] [stdout] 70 + 7 => day07(day_input), [INFO] [stdout] | [INFO] [stdout] help: if you mean to use an octal constant, use `0o` [INFO] [stdout] | [INFO] [stdout] 70 | 0o7 => day07(day_input), [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this is a decimal constant [INFO] [stdout] --> src/main.rs:71:9 [INFO] [stdout] | [INFO] [stdout] 71 | 08 => day08(day_input), [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_prefixed_literal [INFO] [stdout] help: if you mean to use a decimal constant, remove the `0` to avoid confusion [INFO] [stdout] | [INFO] [stdout] 71 - 08 => day08(day_input), [INFO] [stdout] 71 + 8 => day08(day_input), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this is a decimal constant [INFO] [stdout] --> src/main.rs:72:9 [INFO] [stdout] | [INFO] [stdout] 72 | 09 => day09(day_input), [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_prefixed_literal [INFO] [stdout] help: if you mean to use a decimal constant, remove the `0` to avoid confusion [INFO] [stdout] | [INFO] [stdout] 72 - 09 => day09(day_input), [INFO] [stdout] 72 + 9 => day09(day_input), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this is a decimal constant [INFO] [stdout] --> src/main.rs:72:9 [INFO] [stdout] | [INFO] [stdout] 72 | 09 => day09(day_input), [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_prefixed_literal [INFO] [stdout] help: if you mean to use a decimal constant, remove the `0` to avoid confusion [INFO] [stdout] | [INFO] [stdout] 72 - 09 => day09(day_input), [INFO] [stdout] 72 + 9 => day09(day_input), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/days/day12.rs:225:18 [INFO] [stdout] | [INFO] [stdout] 225 | fn compute_day_b(input: &GardenGroups) -> Result { [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: enum `Direction` is never used [INFO] [stdout] --> src/days/day12.rs:43:6 [INFO] [stdout] | [INFO] [stdout] 43 | enum Direction { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/days/day12.rs:225:18 [INFO] [stdout] | [INFO] [stdout] 225 | fn compute_day_b(input: &GardenGroups) -> Result { [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: associated items `to_delta`, `from_delta`, and `turn_90` are never used [INFO] [stdout] --> src/days/day12.rs:51:8 [INFO] [stdout] | [INFO] [stdout] 50 | impl Direction { [INFO] [stdout] | -------------- associated items in this implementation [INFO] [stdout] 51 | fn to_delta(&self) -> Delta { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 60 | fn from_delta(delta: Delta) -> Result { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 81 | fn turn_90(&self) -> Self { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Axis` is never used [INFO] [stdout] --> src/days/day12.rs:92:6 [INFO] [stdout] | [INFO] [stdout] 92 | enum Axis { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `from_direction` is never used [INFO] [stdout] --> src/days/day12.rs:98:8 [INFO] [stdout] | [INFO] [stdout] 97 | impl Axis { [INFO] [stdout] | --------- associated function in this implementation [INFO] [stdout] 98 | fn from_direction(direction: &Direction) -> Self { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `DisplayResult` is never constructed [INFO] [stdout] --> src/days/generic_ops.rs:5:12 [INFO] [stdout] | [INFO] [stdout] 5 | pub struct DisplayResult<'a, T> { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/days/generic_ops.rs:10:12 [INFO] [stdout] | [INFO] [stdout] 9 | impl<'a, T> DisplayResult<'a, T> { [INFO] [stdout] | -------------------------------- associated function in this implementation [INFO] [stdout] 10 | pub fn new(inner: &'a Result) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/days/grid_ops.rs:13:12 [INFO] [stdout] | [INFO] [stdout] 12 | impl Cell { [INFO] [stdout] | ------------------------ associated function in this implementation [INFO] [stdout] 13 | pub fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `get_grid` is never used [INFO] [stdout] --> src/days/grid_ops.rs:100:12 [INFO] [stdout] | [INFO] [stdout] 99 | impl Grid { [INFO] [stdout] | --------------- method in this implementation [INFO] [stdout] 100 | pub fn get_grid(&self) -> Vec> { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `get_all_coords` is never used [INFO] [stdout] --> src/days/grid_ops.rs:256:12 [INFO] [stdout] | [INFO] [stdout] 255 | impl Grid { [INFO] [stdout] | --------------- method in this implementation [INFO] [stdout] 256 | pub fn get_all_coords(&self) -> 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/days/day02.rs:46:11 [INFO] [stdout] | [INFO] [stdout] 46 | input.into_iter().map(compute_report).collect() [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/days/day02.rs:61:24 [INFO] [stdout] | [INFO] [stdout] 61 | fn test_remove(report: &Vec, index: usize) -> 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] 61 ~ fn test_remove(report: &[i32], index: usize) -> bool { [INFO] [stdout] 62 ~ let mut test_report = report.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/days/day02.rs:69:43 [INFO] [stdout] | [INFO] [stdout] 69 | fn test_removals(report: &Vec, func: &dyn Fn(&(usize, &[i32])) -> bool) -> usize { [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: this operation has no effect [INFO] [stdout] --> src/days/day02.rs:75:45 [INFO] [stdout] | [INFO] [stdout] 75 | .filter(|index| test_remove(report, index + 0) || test_remove(report, index + 1)) [INFO] [stdout] | ^^^^^^^^^ help: consider reducing it to: `*index` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] = note: `#[warn(clippy::identity_op)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `INSTRUCTIONS` contains a capitalized acronym [INFO] [stdout] --> src/days/day03.rs:5:6 [INFO] [stdout] | [INFO] [stdout] 5 | enum INSTRUCTIONS { [INFO] [stdout] | ^^^^^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Instructions` [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 `MUL` contains a capitalized acronym [INFO] [stdout] --> src/days/day03.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | MUL(i32, i32), [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Mul` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `ENABLE` contains a capitalized acronym [INFO] [stdout] --> src/days/day03.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | ENABLE, [INFO] [stdout] | ^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Enable` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `DISABLE` contains a capitalized acronym [INFO] [stdout] --> src/days/day03.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | DISABLE, [INFO] [stdout] | ^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Disable` [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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/days/day03.rs:27:9 [INFO] [stdout] | [INFO] [stdout] 27 | / match result.name("mul") { [INFO] [stdout] 28 | | Some(_) => { [INFO] [stdout] 29 | | let left: i32 = result.name("mul_left").unwrap().as_str().parse()?; [INFO] [stdout] 30 | | let right: i32 = result.name("mul_right").unwrap().as_str().parse()?; [INFO] [stdout] ... | [INFO] [stdout] 33 | | None => {} [INFO] [stdout] 34 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 27 ~ if let Some(_) = result.name("mul") { [INFO] [stdout] 28 + let left: i32 = result.name("mul_left").unwrap().as_str().parse()?; [INFO] [stdout] 29 + let right: i32 = result.name("mul_right").unwrap().as_str().parse()?; [INFO] [stdout] 30 + instructions.push(INSTRUCTIONS::MUL(left, right)); [INFO] [stdout] 31 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/days/day03.rs:35:9 [INFO] [stdout] | [INFO] [stdout] 35 | / match result.name("do") { [INFO] [stdout] 36 | | Some(_) => { [INFO] [stdout] 37 | | instructions.push(INSTRUCTIONS::ENABLE); [INFO] [stdout] ... | [INFO] [stdout] 40 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 35 ~ if let Some(_) = result.name("do") { [INFO] [stdout] 36 + instructions.push(INSTRUCTIONS::ENABLE); [INFO] [stdout] 37 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/days/day03.rs:41:9 [INFO] [stdout] | [INFO] [stdout] 41 | / match result.name("dont") { [INFO] [stdout] 42 | | Some(_) => { [INFO] [stdout] 43 | | instructions.push(INSTRUCTIONS::DISABLE); [INFO] [stdout] ... | [INFO] [stdout] 46 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 41 ~ if let Some(_) = result.name("dont") { [INFO] [stdout] 42 + instructions.push(INSTRUCTIONS::DISABLE); [INFO] [stdout] 43 + } [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/days/day03.rs:53:14 [INFO] [stdout] | [INFO] [stdout] 53 | Ok(input.into_iter().fold(0, |acc, inst| match inst { [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/days/day03.rs:61:10 [INFO] [stdout] | [INFO] [stdout] 61 | .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/days/day04.rs:28:8 [INFO] [stdout] | [INFO] [stdout] 28 | if sequence.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `sequence.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: length comparison to zero [INFO] [stdout] --> src/days/day04.rs:41:8 [INFO] [stdout] | [INFO] [stdout] 41 | if new_sequence.len() > 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!new_sequence.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: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/days/day04.rs:55:6 [INFO] [stdout] | [INFO] [stdout] 55 | ) -> Result> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Direction` is never used [INFO] [stdout] --> src/days/day12.rs:43:6 [INFO] [stdout] | [INFO] [stdout] 43 | enum Direction { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `to_delta`, `from_delta`, and `turn_90` are never used [INFO] [stdout] --> src/days/day12.rs:51:8 [INFO] [stdout] | [INFO] [stdout] 50 | impl Direction { [INFO] [stdout] | -------------- associated items in this implementation [INFO] [stdout] 51 | fn to_delta(&self) -> Delta { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 60 | fn from_delta(delta: Delta) -> Result { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 81 | fn turn_90(&self) -> Self { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Axis` is never used [INFO] [stdout] --> src/days/day12.rs:92:6 [INFO] [stdout] | [INFO] [stdout] 92 | enum Axis { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `from_direction` is never used [INFO] [stdout] --> src/days/day12.rs:98:8 [INFO] [stdout] | [INFO] [stdout] 97 | impl Axis { [INFO] [stdout] | --------- associated function in this implementation [INFO] [stdout] 98 | fn from_direction(direction: &Direction) -> Self { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `DisplayResult` is never constructed [INFO] [stdout] --> src/days/generic_ops.rs:5:12 [INFO] [stdout] | [INFO] [stdout] 5 | pub struct DisplayResult<'a, T> { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/days/generic_ops.rs:10:12 [INFO] [stdout] | [INFO] [stdout] 9 | impl<'a, T> DisplayResult<'a, T> { [INFO] [stdout] | -------------------------------- associated function in this implementation [INFO] [stdout] 10 | pub fn new(inner: &'a Result) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/days/grid_ops.rs:13:12 [INFO] [stdout] | [INFO] [stdout] 12 | impl Cell { [INFO] [stdout] | ------------------------ associated function in this implementation [INFO] [stdout] 13 | pub fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `get_grid` is never used [INFO] [stdout] --> src/days/grid_ops.rs:100:12 [INFO] [stdout] | [INFO] [stdout] 99 | impl Grid { [INFO] [stdout] | --------------- method in this implementation [INFO] [stdout] 100 | pub fn get_grid(&self) -> Vec> { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `get_all_coords` is never used [INFO] [stdout] --> src/days/grid_ops.rs:256:12 [INFO] [stdout] | [INFO] [stdout] 255 | impl Grid { [INFO] [stdout] | --------------- method in this implementation [INFO] [stdout] 256 | pub fn get_all_coords(&self) -> Vec> { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `input` [INFO] [stdout] --> src/days/day04.rs:101:14 [INFO] [stdout] | [INFO] [stdout] 101 | for i in 0..input.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] 101 - for i in 0..input.len() { [INFO] [stdout] 101 + for in &input { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: it looks like the same item is being pushed into this `Vec` [INFO] [stdout] --> src/days/day04.rs:104:13 [INFO] [stdout] | [INFO] [stdout] 104 | display_row.push('-'); [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using `vec!['-';SIZE]` [INFO] [stdout] = help: or `display_row.extend(std::iter::repeat_n('-', SIZE))` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#same_item_push [INFO] [stdout] = note: `#[warn(clippy::same_item_push)]` 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/days/day02.rs:46:11 [INFO] [stdout] | [INFO] [stdout] 46 | input.into_iter().map(compute_report).collect() [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/days/day02.rs:61:24 [INFO] [stdout] | [INFO] [stdout] 61 | fn test_remove(report: &Vec, index: usize) -> 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] 61 ~ fn test_remove(report: &[i32], index: usize) -> bool { [INFO] [stdout] 62 ~ let mut test_report = report.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/days/day02.rs:69:43 [INFO] [stdout] | [INFO] [stdout] 69 | fn test_removals(report: &Vec, func: &dyn Fn(&(usize, &[i32])) -> bool) -> usize { [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: this operation has no effect [INFO] [stdout] --> src/days/day02.rs:75:45 [INFO] [stdout] | [INFO] [stdout] 75 | .filter(|index| test_remove(report, index + 0) || test_remove(report, index + 1)) [INFO] [stdout] | ^^^^^^^^^ help: consider reducing it to: `*index` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] = note: `#[warn(clippy::identity_op)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `INSTRUCTIONS` contains a capitalized acronym [INFO] [stdout] --> src/days/day03.rs:5:6 [INFO] [stdout] | [INFO] [stdout] 5 | enum INSTRUCTIONS { [INFO] [stdout] | ^^^^^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Instructions` [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 `MUL` contains a capitalized acronym [INFO] [stdout] --> src/days/day03.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | MUL(i32, i32), [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Mul` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `ENABLE` contains a capitalized acronym [INFO] [stdout] --> src/days/day03.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | ENABLE, [INFO] [stdout] | ^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Enable` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `DISABLE` contains a capitalized acronym [INFO] [stdout] --> src/days/day03.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | DISABLE, [INFO] [stdout] | ^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Disable` [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: non-canonical implementation of `partial_cmp` on an `Ord` type [INFO] [stdout] --> src/days/day05.rs:26:1 [INFO] [stdout] | [INFO] [stdout] 26 | / impl PartialOrd for Num { [INFO] [stdout] 27 | | fn partial_cmp(&self, other: &Self) -> Option { [INFO] [stdout] 28 | | for rule in &self.constraints { [INFO] [stdout] 29 | | if self.inner == rule.left && other.inner == rule.right { [INFO] [stdout] ... | [INFO] [stdout] 38 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_canonical_partial_ord_impl [INFO] [stdout] = note: `#[warn(clippy::non_canonical_partial_ord_impl)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 27 - fn partial_cmp(&self, other: &Self) -> Option { [INFO] [stdout] 28 - for rule in &self.constraints { [INFO] [stdout] 29 - if self.inner == rule.left && other.inner == rule.right { [INFO] [stdout] 30 - return Some(Ordering::Less); [INFO] [stdout] 31 - } [INFO] [stdout] 32 - if self.inner == rule.right && other.inner == rule.left { [INFO] [stdout] 33 - return Some(Ordering::Greater); [INFO] [stdout] 34 - } [INFO] [stdout] 35 - } [INFO] [stdout] 36 - None [INFO] [stdout] 37 - } [INFO] [stdout] 27 + fn partial_cmp(&self, other: &Self) -> Option { Some(self.cmp(other)) } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/days/day03.rs:27:9 [INFO] [stdout] | [INFO] [stdout] 27 | / match result.name("mul") { [INFO] [stdout] 28 | | Some(_) => { [INFO] [stdout] 29 | | let left: i32 = result.name("mul_left").unwrap().as_str().parse()?; [INFO] [stdout] 30 | | let right: i32 = result.name("mul_right").unwrap().as_str().parse()?; [INFO] [stdout] ... | [INFO] [stdout] 33 | | None => {} [INFO] [stdout] 34 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 27 ~ if let Some(_) = result.name("mul") { [INFO] [stdout] 28 + let left: i32 = result.name("mul_left").unwrap().as_str().parse()?; [INFO] [stdout] 29 + let right: i32 = result.name("mul_right").unwrap().as_str().parse()?; [INFO] [stdout] 30 + instructions.push(INSTRUCTIONS::MUL(left, right)); [INFO] [stdout] 31 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/days/day03.rs:35:9 [INFO] [stdout] | [INFO] [stdout] 35 | / match result.name("do") { [INFO] [stdout] 36 | | Some(_) => { [INFO] [stdout] 37 | | instructions.push(INSTRUCTIONS::ENABLE); [INFO] [stdout] ... | [INFO] [stdout] 40 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 35 ~ if let Some(_) = result.name("do") { [INFO] [stdout] 36 + instructions.push(INSTRUCTIONS::ENABLE); [INFO] [stdout] 37 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/days/day05.rs:54:32 [INFO] [stdout] | [INFO] [stdout] 54 | fn parse_day(input: String) -> Result<(Vec<(u32, u32)>, Vec>)> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/days/day03.rs:41:9 [INFO] [stdout] | [INFO] [stdout] 41 | / match result.name("dont") { [INFO] [stdout] 42 | | Some(_) => { [INFO] [stdout] 43 | | instructions.push(INSTRUCTIONS::DISABLE); [INFO] [stdout] ... | [INFO] [stdout] 46 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 41 ~ if let Some(_) = result.name("dont") { [INFO] [stdout] 42 + instructions.push(INSTRUCTIONS::DISABLE); [INFO] [stdout] 43 + } [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/days/day03.rs:53:14 [INFO] [stdout] | [INFO] [stdout] 53 | Ok(input.into_iter().fold(0, |acc, inst| match inst { [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/days/day03.rs:61:10 [INFO] [stdout] | [INFO] [stdout] 61 | .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/days/day05.rs:91:10 [INFO] [stdout] | [INFO] [stdout] 91 | .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/days/day05.rs:98:10 [INFO] [stdout] | [INFO] [stdout] 98 | .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/days/day05.rs:100:17 [INFO] [stdout] | [INFO] [stdout] 100 | vec.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/days/day04.rs:28:8 [INFO] [stdout] | [INFO] [stdout] 28 | if sequence.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `sequence.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/days/day05.rs:115:10 [INFO] [stdout] | [INFO] [stdout] 115 | .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/days/day05.rs:122:10 [INFO] [stdout] | [INFO] [stdout] 122 | .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/days/day04.rs:41:8 [INFO] [stdout] | [INFO] [stdout] 41 | if new_sequence.len() > 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!new_sequence.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 `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> src/days/day05.rs:124:17 [INFO] [stdout] | [INFO] [stdout] 124 | vec.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: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/days/day04.rs:55:6 [INFO] [stdout] | [INFO] [stdout] 55 | ) -> Result> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `EMPTY` contains a capitalized acronym [INFO] [stdout] --> src/days/day06.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | EMPTY, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Empty` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `OBSTACLE` contains a capitalized acronym [INFO] [stdout] --> src/days/day06.rs:22:5 [INFO] [stdout] | [INFO] [stdout] 22 | OBSTACLE, [INFO] [stdout] | ^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Obstacle` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `GUARD` contains a capitalized acronym [INFO] [stdout] --> src/days/day06.rs:23:5 [INFO] [stdout] | [INFO] [stdout] 23 | GUARD, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Guard` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `RIGHT` contains a capitalized acronym [INFO] [stdout] --> src/days/day06.rs:29:5 [INFO] [stdout] | [INFO] [stdout] 29 | RIGHT, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Right` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `DOWN` contains a capitalized acronym [INFO] [stdout] --> src/days/day06.rs:30:5 [INFO] [stdout] | [INFO] [stdout] 30 | DOWN, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Down` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `LEFT` contains a capitalized acronym [INFO] [stdout] --> src/days/day06.rs:31:5 [INFO] [stdout] | [INFO] [stdout] 31 | LEFT, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Left` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enclosing `Ok` and `?` operator are unneeded [INFO] [stdout] --> src/days/day06.rs:80:5 [INFO] [stdout] | [INFO] [stdout] 80 | Ok(Grid::from_vec(res, 0, 0)?) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark [INFO] [stdout] = note: `#[warn(clippy::needless_question_mark)]` on by default [INFO] [stdout] help: remove the enclosing `Ok` and `?` operator [INFO] [stdout] | [INFO] [stdout] 80 - Ok(Grid::from_vec(res, 0, 0)?) [INFO] [stdout] 80 + Grid::from_vec(res, 0, 0) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `input` [INFO] [stdout] --> src/days/day04.rs:101:14 [INFO] [stdout] | [INFO] [stdout] 101 | for i in 0..input.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] 101 - for i in 0..input.len() { [INFO] [stdout] 101 + for in &input { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: it looks like the same item is being pushed into this `Vec` [INFO] [stdout] --> src/days/day04.rs:104:13 [INFO] [stdout] | [INFO] [stdout] 104 | display_row.push('-'); [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using `vec!['-';SIZE]` [INFO] [stdout] = help: or `display_row.extend(std::iter::repeat_n('-', SIZE))` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#same_item_push [INFO] [stdout] = note: `#[warn(clippy::same_item_push)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-canonical implementation of `partial_cmp` on an `Ord` type [INFO] [stdout] --> src/days/day05.rs:26:1 [INFO] [stdout] | [INFO] [stdout] 26 | / impl PartialOrd for Num { [INFO] [stdout] 27 | | fn partial_cmp(&self, other: &Self) -> Option { [INFO] [stdout] 28 | | for rule in &self.constraints { [INFO] [stdout] 29 | | if self.inner == rule.left && other.inner == rule.right { [INFO] [stdout] ... | [INFO] [stdout] 38 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_canonical_partial_ord_impl [INFO] [stdout] = note: `#[warn(clippy::non_canonical_partial_ord_impl)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 27 - fn partial_cmp(&self, other: &Self) -> Option { [INFO] [stdout] 28 - for rule in &self.constraints { [INFO] [stdout] 29 - if self.inner == rule.left && other.inner == rule.right { [INFO] [stdout] 30 - return Some(Ordering::Less); [INFO] [stdout] 31 - } [INFO] [stdout] 32 - if self.inner == rule.right && other.inner == rule.left { [INFO] [stdout] 33 - return Some(Ordering::Greater); [INFO] [stdout] 34 - } [INFO] [stdout] 35 - } [INFO] [stdout] 36 - None [INFO] [stdout] 37 - } [INFO] [stdout] 27 + fn partial_cmp(&self, other: &Self) -> Option { Some(self.cmp(other)) } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/days/day05.rs:54:32 [INFO] [stdout] | [INFO] [stdout] 54 | fn parse_day(input: String) -> Result<(Vec<(u32, u32)>, Vec>)> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> src/days/day05.rs:91:10 [INFO] [stdout] | [INFO] [stdout] 91 | .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/days/day05.rs:98:10 [INFO] [stdout] | [INFO] [stdout] 98 | .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: using `clone` on type `CoordWithBounds` which implements the `Copy` trait [INFO] [stdout] --> src/days/day06.rs:95:27 [INFO] [stdout] | [INFO] [stdout] 95 | visited_coords.insert(coord.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try removing the `clone` call: `coord` [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: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> src/days/day05.rs:100:17 [INFO] [stdout] | [INFO] [stdout] 100 | vec.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: using `map` over `inspect` [INFO] [stdout] --> src/days/day06.rs:106:14 [INFO] [stdout] | [INFO] [stdout] 106 | .map(|item| { [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_inspect [INFO] [stdout] = note: `#[warn(clippy::manual_inspect)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 106 ~ .inspect(|item| { [INFO] [stdout] 107 ~ visited_coords.insert(item.clone()); [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/days/day05.rs:115:10 [INFO] [stdout] | [INFO] [stdout] 115 | .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/days/day05.rs:122:10 [INFO] [stdout] | [INFO] [stdout] 122 | .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: using `clone` on type `CoordWithBounds` which implements the `Copy` trait [INFO] [stdout] --> src/days/day06.rs:107:39 [INFO] [stdout] | [INFO] [stdout] 107 | visited_coords.insert(item.clone()); [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `item` [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 `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> src/days/day05.rs:124:17 [INFO] [stdout] | [INFO] [stdout] 124 | vec.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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/days/day06.rs:117:9 [INFO] [stdout] | [INFO] [stdout] 117 | / match path.into_iter().last() { [INFO] [stdout] 118 | | Some(new) => { [INFO] [stdout] 119 | | coord = new; [INFO] [stdout] ... | [INFO] [stdout] 122 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 117 ~ if let Some(new) = path.into_iter().last() { [INFO] [stdout] 118 + coord = new; [INFO] [stdout] 119 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `EMPTY` contains a capitalized acronym [INFO] [stdout] --> src/days/day06.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | EMPTY, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Empty` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `OBSTACLE` contains a capitalized acronym [INFO] [stdout] --> src/days/day06.rs:22:5 [INFO] [stdout] | [INFO] [stdout] 22 | OBSTACLE, [INFO] [stdout] | ^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Obstacle` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `GUARD` contains a capitalized acronym [INFO] [stdout] --> src/days/day06.rs:23:5 [INFO] [stdout] | [INFO] [stdout] 23 | GUARD, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Guard` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `RIGHT` contains a capitalized acronym [INFO] [stdout] --> src/days/day06.rs:29:5 [INFO] [stdout] | [INFO] [stdout] 29 | RIGHT, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Right` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `DOWN` contains a capitalized acronym [INFO] [stdout] --> src/days/day06.rs:30:5 [INFO] [stdout] | [INFO] [stdout] 30 | DOWN, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Down` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `LEFT` contains a capitalized acronym [INFO] [stdout] --> src/days/day06.rs:31:5 [INFO] [stdout] | [INFO] [stdout] 31 | LEFT, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Left` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enclosing `Ok` and `?` operator are unneeded [INFO] [stdout] --> src/days/day06.rs:80:5 [INFO] [stdout] | [INFO] [stdout] 80 | Ok(Grid::from_vec(res, 0, 0)?) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark [INFO] [stdout] = note: `#[warn(clippy::needless_question_mark)]` on by default [INFO] [stdout] help: remove the enclosing `Ok` and `?` operator [INFO] [stdout] | [INFO] [stdout] 80 - Ok(Grid::from_vec(res, 0, 0)?) [INFO] [stdout] 80 + Grid::from_vec(res, 0, 0) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/days/day07.rs:121:23 [INFO] [stdout] | [INFO] [stdout] 121 | input.lines().map(|line| Equation::from_str(line)).collect() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Equation::from_str` [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: enclosing `Ok` and `?` operator are unneeded [INFO] [stdout] --> src/days/day08.rs:17:5 [INFO] [stdout] | [INFO] [stdout] 17 | / Ok(Grid::from_vec( [INFO] [stdout] 18 | | input [INFO] [stdout] 19 | | .lines() [INFO] [stdout] 20 | | .map(|line| { [INFO] [stdout] ... | [INFO] [stdout] 27 | | 0, [INFO] [stdout] 28 | | )?) [INFO] [stdout] | |_______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark [INFO] [stdout] help: remove the enclosing `Ok` and `?` operator [INFO] [stdout] | [INFO] [stdout] 17 ~ Grid::from_vec( [INFO] [stdout] 18 | input [INFO] [stdout] ... [INFO] [stdout] 27 | 0, [INFO] [stdout] 28 ~ ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/days/day08.rs:22:26 [INFO] [stdout] | [INFO] [stdout] 22 | .map(|c| Cell::from(c)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Cell::from` [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: using `clone` on type `CoordWithBounds` which implements the `Copy` trait [INFO] [stdout] --> src/days/day06.rs:95:27 [INFO] [stdout] | [INFO] [stdout] 95 | visited_coords.insert(coord.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try removing the `clone` call: `coord` [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 `map` over `inspect` [INFO] [stdout] --> src/days/day06.rs:106:14 [INFO] [stdout] | [INFO] [stdout] 106 | .map(|item| { [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_inspect [INFO] [stdout] = note: `#[warn(clippy::manual_inspect)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 106 ~ .inspect(|item| { [INFO] [stdout] 107 ~ visited_coords.insert(item.clone()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `CoordWithBounds` which implements the `Copy` trait [INFO] [stdout] --> src/days/day06.rs:107:39 [INFO] [stdout] | [INFO] [stdout] 107 | visited_coords.insert(item.clone()); [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `item` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Result.and_then(|x| Ok(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> src/days/day08.rs:48:25 [INFO] [stdout] | [INFO] [stdout] 48 | let _ = coord_a.and_then(|inner| { [INFO] [stdout] | _________________________^ [INFO] [stdout] 49 | | anti_nodes.insert(inner); [INFO] [stdout] 50 | | Ok(()) [INFO] [stdout] 51 | | }); [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] = note: `#[warn(clippy::bind_instead_of_map)]` on by default [INFO] [stdout] help: use `map` instead [INFO] [stdout] | [INFO] [stdout] 48 ~ let _ = coord_a.map(|inner| { [INFO] [stdout] 49 | anti_nodes.insert(inner); [INFO] [stdout] 50 ~ () [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Result.and_then(|x| Ok(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> src/days/day08.rs:52:25 [INFO] [stdout] | [INFO] [stdout] 52 | let _ = coord_b.and_then(|inner| { [INFO] [stdout] | _________________________^ [INFO] [stdout] 53 | | anti_nodes.insert(inner); [INFO] [stdout] 54 | | Ok(()) [INFO] [stdout] 55 | | }); [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] help: use `map` instead [INFO] [stdout] | [INFO] [stdout] 52 ~ let _ = coord_b.map(|inner| { [INFO] [stdout] 53 | anti_nodes.insert(inner); [INFO] [stdout] 54 ~ () [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/days/day08.rs:85:23 [INFO] [stdout] | [INFO] [stdout] 85 | while !coord_a_result.is_err() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `coord_a_result.is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/days/day08.rs:93:23 [INFO] [stdout] | [INFO] [stdout] 93 | while !coord_b_result.is_err() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `coord_b_result.is_ok()` [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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/days/day06.rs:117:9 [INFO] [stdout] | [INFO] [stdout] 117 | / match path.into_iter().last() { [INFO] [stdout] 118 | | Some(new) => { [INFO] [stdout] 119 | | coord = new; [INFO] [stdout] ... | [INFO] [stdout] 122 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 117 ~ if let Some(new) = path.into_iter().last() { [INFO] [stdout] 118 + coord = new; [INFO] [stdout] 119 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> src/days/day09.rs:13:9 [INFO] [stdout] | [INFO] [stdout] 13 | / match self { [INFO] [stdout] 14 | | &DiskEntry::File(idx, size) => { [INFO] [stdout] 15 | | for _ in 0..size { [INFO] [stdout] 16 | | write!(f, "{}", idx)?; [INFO] [stdout] ... | [INFO] [stdout] 24 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] = note: `#[warn(clippy::match_ref_pats)]` on by default [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 13 ~ match *self { [INFO] [stdout] 14 ~ DiskEntry::File(idx, size) => { [INFO] [stdout] 15 | for _ in 0..size { [INFO] [stdout] ... [INFO] [stdout] 18 | } [INFO] [stdout] 19 ~ DiskEntry::FreeSpace(size) => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/days/day07.rs:121:23 [INFO] [stdout] | [INFO] [stdout] 121 | input.lines().map(|line| Equation::from_str(line)).collect() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Equation::from_str` [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 to the same type is unnecessary (`u32` -> `u32`) [INFO] [stdout] --> src/days/day09.rs:44:28 [INFO] [stdout] | [INFO] [stdout] 44 | let size = val.to_digit(10).unwrap() as u32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `val.to_digit(10).unwrap()` [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: enclosing `Ok` and `?` operator are unneeded [INFO] [stdout] --> src/days/day08.rs:17:5 [INFO] [stdout] | [INFO] [stdout] 17 | / Ok(Grid::from_vec( [INFO] [stdout] 18 | | input [INFO] [stdout] 19 | | .lines() [INFO] [stdout] 20 | | .map(|line| { [INFO] [stdout] ... | [INFO] [stdout] 27 | | 0, [INFO] [stdout] 28 | | )?) [INFO] [stdout] | |_______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark [INFO] [stdout] help: remove the enclosing `Ok` and `?` operator [INFO] [stdout] | [INFO] [stdout] 17 ~ Grid::from_vec( [INFO] [stdout] 18 | input [INFO] [stdout] ... [INFO] [stdout] 27 | 0, [INFO] [stdout] 28 ~ ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/days/day08.rs:22:26 [INFO] [stdout] | [INFO] [stdout] 22 | .map(|c| Cell::from(c)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Cell::from` [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: using `Result.and_then(|x| Ok(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> src/days/day08.rs:48:25 [INFO] [stdout] | [INFO] [stdout] 48 | let _ = coord_a.and_then(|inner| { [INFO] [stdout] | _________________________^ [INFO] [stdout] 49 | | anti_nodes.insert(inner); [INFO] [stdout] 50 | | Ok(()) [INFO] [stdout] 51 | | }); [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] = note: `#[warn(clippy::bind_instead_of_map)]` on by default [INFO] [stdout] help: use `map` instead [INFO] [stdout] | [INFO] [stdout] 48 ~ let _ = coord_a.map(|inner| { [INFO] [stdout] 49 | anti_nodes.insert(inner); [INFO] [stdout] 50 ~ () [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Result.and_then(|x| Ok(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> src/days/day08.rs:52:25 [INFO] [stdout] | [INFO] [stdout] 52 | let _ = coord_b.and_then(|inner| { [INFO] [stdout] | _________________________^ [INFO] [stdout] 53 | | anti_nodes.insert(inner); [INFO] [stdout] 54 | | Ok(()) [INFO] [stdout] 55 | | }); [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] help: use `map` instead [INFO] [stdout] | [INFO] [stdout] 52 ~ let _ = coord_b.map(|inner| { [INFO] [stdout] 53 | anti_nodes.insert(inner); [INFO] [stdout] 54 ~ () [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/days/day08.rs:85:23 [INFO] [stdout] | [INFO] [stdout] 85 | while !coord_a_result.is_err() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `coord_a_result.is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/days/day08.rs:93:23 [INFO] [stdout] | [INFO] [stdout] 93 | while !coord_b_result.is_err() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `coord_b_result.is_ok()` [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: calls to `push` immediately after creation [INFO] [stdout] --> src/days/day10.rs:40:9 [INFO] [stdout] | [INFO] [stdout] 40 | / let mut result = Vec::new(); [INFO] [stdout] 41 | | result.push(coord); [INFO] [stdout] | |___________________________^ help: consider using the `vec![]` macro: `let result = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] = note: `#[warn(clippy::vec_init_then_push)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> src/days/day09.rs:13:9 [INFO] [stdout] | [INFO] [stdout] 13 | / match self { [INFO] [stdout] 14 | | &DiskEntry::File(idx, size) => { [INFO] [stdout] 15 | | for _ in 0..size { [INFO] [stdout] 16 | | write!(f, "{}", idx)?; [INFO] [stdout] ... | [INFO] [stdout] 24 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] = note: `#[warn(clippy::match_ref_pats)]` on by default [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 13 ~ match *self { [INFO] [stdout] 14 ~ DiskEntry::File(idx, size) => { [INFO] [stdout] 15 | for _ in 0..size { [INFO] [stdout] ... [INFO] [stdout] 18 | } [INFO] [stdout] 19 ~ DiskEntry::FreeSpace(size) => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> src/days/day10.rs:88:32 [INFO] [stdout] | [INFO] [stdout] 88 | HashSet::from_iter(node_nine_coords.into_iter()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()` [INFO] [stdout] --> /rustc/3645249d79dfb136b5d8de3ce153d19d6698d92d/library/core/src/iter/traits/collect.rs:152:20 [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 the `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 88 - HashSet::from_iter(node_nine_coords.into_iter()); [INFO] [stdout] 88 + HashSet::from_iter(node_nine_coords); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u32` -> `u32`) [INFO] [stdout] --> src/days/day09.rs:44:28 [INFO] [stdout] | [INFO] [stdout] 44 | let size = val.to_digit(10).unwrap() as u32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `val.to_digit(10).unwrap()` [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: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/days/day11.rs:33:19 [INFO] [stdout] | [INFO] [stdout] 33 | } else if self.num.to_string().len() % 2 == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `self.num.to_string().len().is_multiple_of(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/days/day11.rs:59:18 [INFO] [stdout] | [INFO] [stdout] 59 | .map(|num| Stone::from_str(num)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Stone::from_str` [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: using `clone` on type `Stone` which implements the `Copy` trait [INFO] [stdout] --> src/days/day11.rs:90:36 [INFO] [stdout] | [INFO] [stdout] 90 | let mut cloned_stone = stone.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*stone` [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 seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/days/day11.rs:92:13 [INFO] [stdout] | [INFO] [stdout] 92 | / match cloned_stone.advance_state()? { [INFO] [stdout] 93 | | Some(new_stone) => { [INFO] [stdout] 94 | | new_counts [INFO] [stdout] 95 | | .entry(new_stone) [INFO] [stdout] ... | [INFO] [stdout] 99 | | None => {} [INFO] [stdout] 100 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 92 ~ if let Some(new_stone) = cloned_stone.advance_state()? { [INFO] [stdout] 93 + new_counts [INFO] [stdout] 94 + .entry(new_stone) [INFO] [stdout] 95 + .and_modify(|current: &mut u64| *current += *count) [INFO] [stdout] 96 + .or_insert(*count); [INFO] [stdout] 97 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's values [INFO] [stdout] --> src/days/day11.rs:115:27 [INFO] [stdout] | [INFO] [stdout] 115 | for (_, count) in &self.counts { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] = note: `#[warn(clippy::for_kv_map)]` on by default [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 115 - for (_, count) in &self.counts { [INFO] [stdout] 115 + for count in self.counts.values() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u64` -> `u64`) [INFO] [stdout] --> src/days/day11.rs:119:9 [INFO] [stdout] | [INFO] [stdout] 119 | total as u64 [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `total` [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: calls to `push` immediately after creation [INFO] [stdout] --> src/days/day10.rs:40:9 [INFO] [stdout] | [INFO] [stdout] 40 | / let mut result = Vec::new(); [INFO] [stdout] 41 | | result.push(coord); [INFO] [stdout] | |___________________________^ help: consider using the `vec![]` macro: `let result = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] = note: `#[warn(clippy::vec_init_then_push)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> src/days/day10.rs:88:32 [INFO] [stdout] | [INFO] [stdout] 88 | HashSet::from_iter(node_nine_coords.into_iter()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()` [INFO] [stdout] --> /rustc/3645249d79dfb136b5d8de3ce153d19d6698d92d/library/core/src/iter/traits/collect.rs:152:20 [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 the `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 88 - HashSet::from_iter(node_nine_coords.into_iter()); [INFO] [stdout] 88 + HashSet::from_iter(node_nine_coords); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/days/day12.rs:31:26 [INFO] [stdout] | [INFO] [stdout] 31 | .map(|char| Cell::from(char)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Cell::from` [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: methods with the following characteristics: (`to_*` and `self` type is `Copy`) usually take `self` by value [INFO] [stdout] --> src/days/day12.rs:51:17 [INFO] [stdout] | [INFO] [stdout] 51 | fn to_delta(&self) -> Delta { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] = note: `#[warn(clippy::wrong_self_convention)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/days/day11.rs:33:19 [INFO] [stdout] | [INFO] [stdout] 33 | } else if self.num.to_string().len() % 2 == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `self.num.to_string().len().is_multiple_of(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/days/day11.rs:59:18 [INFO] [stdout] | [INFO] [stdout] 59 | .map(|num| Stone::from_str(num)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Stone::from_str` [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: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/days/day12.rs:125:13 [INFO] [stdout] | [INFO] [stdout] 125 | origin_y as i32, [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `origin_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: length comparison to zero [INFO] [stdout] --> src/days/day12.rs:135:15 [INFO] [stdout] | [INFO] [stdout] 135 | while new_region_coords_to_search.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!new_region_coords_to_search.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: using `clone` on type `Stone` which implements the `Copy` trait [INFO] [stdout] --> src/days/day11.rs:90:36 [INFO] [stdout] | [INFO] [stdout] 90 | let mut cloned_stone = stone.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*stone` [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: length comparison to zero [INFO] [stdout] --> src/days/day12.rs:155:19 [INFO] [stdout] | [INFO] [stdout] 155 | while coords_in_region_to_search.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!coords_in_region_to_search.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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/days/day11.rs:92:13 [INFO] [stdout] | [INFO] [stdout] 92 | / match cloned_stone.advance_state()? { [INFO] [stdout] 93 | | Some(new_stone) => { [INFO] [stdout] 94 | | new_counts [INFO] [stdout] 95 | | .entry(new_stone) [INFO] [stdout] ... | [INFO] [stdout] 99 | | None => {} [INFO] [stdout] 100 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 92 ~ if let Some(new_stone) = cloned_stone.advance_state()? { [INFO] [stdout] 93 + new_counts [INFO] [stdout] 94 + .entry(new_stone) [INFO] [stdout] 95 + .and_modify(|current: &mut u64| *current += *count) [INFO] [stdout] 96 + .or_insert(*count); [INFO] [stdout] 97 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's values [INFO] [stdout] --> src/days/day11.rs:115:27 [INFO] [stdout] | [INFO] [stdout] 115 | for (_, count) in &self.counts { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] = note: `#[warn(clippy::for_kv_map)]` on by default [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 115 - for (_, count) in &self.counts { [INFO] [stdout] 115 + for count in self.counts.values() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u64` -> `u64`) [INFO] [stdout] --> src/days/day11.rs:119:9 [INFO] [stdout] | [INFO] [stdout] 119 | total as u64 [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `total` [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: redundant closure [INFO] [stdout] --> src/days/day12.rs:31:26 [INFO] [stdout] | [INFO] [stdout] 31 | .map(|char| Cell::from(char)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Cell::from` [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: methods with the following characteristics: (`to_*` and `self` type is `Copy`) usually take `self` by value [INFO] [stdout] --> src/days/day12.rs:51:17 [INFO] [stdout] | [INFO] [stdout] 51 | fn to_delta(&self) -> Delta { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] = note: `#[warn(clippy::wrong_self_convention)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/days/day12.rs:125:13 [INFO] [stdout] | [INFO] [stdout] 125 | origin_y as i32, [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `origin_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: length comparison to zero [INFO] [stdout] --> src/days/day12.rs:135:15 [INFO] [stdout] | [INFO] [stdout] 135 | while new_region_coords_to_search.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!new_region_coords_to_search.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: length comparison to zero [INFO] [stdout] --> src/days/day12.rs:155:19 [INFO] [stdout] | [INFO] [stdout] 155 | while coords_in_region_to_search.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!coords_in_region_to_search.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: redundant closure [INFO] [stdout] --> src/days/day14.rs:163:14 [INFO] [stdout] | [INFO] [stdout] 163 | .map(|line| Robot::from_str(line)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Robot::from_str` [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: this operation has no effect [INFO] [stdout] --> src/days/day14.rs:179:26 [INFO] [stdout] | [INFO] [stdout] 179 | let centre_line_x = ((0 + (input.get_size_x() - 1)) / 2) as i32 + input.get_origin_x(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `((input.get_size_x() - 1))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/days/day14.rs:180:26 [INFO] [stdout] | [INFO] [stdout] 180 | let centre_line_y = ((0 + (input.get_size_y() - 1)) / 2) as i32 + input.get_origin_y(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `((input.get_size_y() - 1))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Result.and_then(|x| Ok(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> src/days/generic_ops.rs:17:19 [INFO] [stdout] | [INFO] [stdout] 17 | let str = self [INFO] [stdout] | ___________________^ [INFO] [stdout] 18 | | .inner [INFO] [stdout] 19 | | .as_ref() [INFO] [stdout] 20 | | .and_then(|int| Ok(int.to_string())) [INFO] [stdout] | |________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 17 ~ let str = self [INFO] [stdout] 18 + .inner [INFO] [stdout] 19 + .as_ref().map(|int| int.to_string()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/days/grid_ops.rs:155:47 [INFO] [stdout] | [INFO] [stdout] 155 | let offset_pos = self.get_array_coord(&pos); [INFO] [stdout] | ^^^^ help: change this to: `pos` [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: using `clone` on type `CoordWithBounds` which implements the `Copy` trait [INFO] [stdout] --> src/days/grid_ops.rs:182:27 [INFO] [stdout] | [INFO] [stdout] 182 | let mut current = start.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*start` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `CoordWithBounds` which implements the `Copy` trait [INFO] [stdout] --> src/days/grid_ops.rs:186:50 [INFO] [stdout] | [INFO] [stdout] 186 | Ok(contents) => projection.push((current.clone(), contents.clone())), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `current` [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: accessing first element with `all.get(0)` [INFO] [stdout] --> src/days/grid_ops.rs:210:12 [INFO] [stdout] | [INFO] [stdout] 210 | Ok(all.get(0).copied()) [INFO] [stdout] | ^^^^^^^^^^ help: try: `all.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/days/day14.rs:163:14 [INFO] [stdout] | [INFO] [stdout] 163 | .map(|line| Robot::from_str(line)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Robot::from_str` [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: this operation has no effect [INFO] [stdout] --> src/days/day14.rs:179:26 [INFO] [stdout] | [INFO] [stdout] 179 | let centre_line_x = ((0 + (input.get_size_x() - 1)) / 2) as i32 + input.get_origin_x(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `((input.get_size_x() - 1))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/days/day14.rs:180:26 [INFO] [stdout] | [INFO] [stdout] 180 | let centre_line_y = ((0 + (input.get_size_y() - 1)) / 2) as i32 + input.get_origin_y(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `((input.get_size_y() - 1))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Result.and_then(|x| Ok(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> src/days/generic_ops.rs:17:19 [INFO] [stdout] | [INFO] [stdout] 17 | let str = self [INFO] [stdout] | ___________________^ [INFO] [stdout] 18 | | .inner [INFO] [stdout] 19 | | .as_ref() [INFO] [stdout] 20 | | .and_then(|int| Ok(int.to_string())) [INFO] [stdout] | |________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 17 ~ let str = self [INFO] [stdout] 18 + .inner [INFO] [stdout] 19 + .as_ref().map(|int| int.to_string()) [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/days/list_ops.rs:4:11 [INFO] [stdout] | [INFO] [stdout] 4 | input.into_iter().fold(HashMap::new(), |mut acc, item| { [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/days/list_ops.rs:5:19 [INFO] [stdout] | [INFO] [stdout] 5 | acc.entry(&item).and_modify(|val| *val += 1).or_insert(1); [INFO] [stdout] | ^^^^^ help: change this to: `item` [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/days/grid_ops.rs:155:47 [INFO] [stdout] | [INFO] [stdout] 155 | let offset_pos = self.get_array_coord(&pos); [INFO] [stdout] | ^^^^ help: change this to: `pos` [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: name `MAIN` contains a capitalized acronym [INFO] [stdout] --> src/main.rs:27:5 [INFO] [stdout] | [INFO] [stdout] 27 | MAIN, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Main` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `EXAMPLE` contains a capitalized acronym [INFO] [stdout] --> src/main.rs:28:5 [INFO] [stdout] | [INFO] [stdout] 28 | EXAMPLE, [INFO] [stdout] | ^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Example` [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: using `clone` on type `CoordWithBounds` which implements the `Copy` trait [INFO] [stdout] --> src/days/grid_ops.rs:182:27 [INFO] [stdout] | [INFO] [stdout] 182 | let mut current = start.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*start` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `CoordWithBounds` which implements the `Copy` trait [INFO] [stdout] --> src/days/grid_ops.rs:186:50 [INFO] [stdout] | [INFO] [stdout] 186 | Ok(contents) => projection.push((current.clone(), contents.clone())), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `current` [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: accessing first element with `all.get(0)` [INFO] [stdout] --> src/days/grid_ops.rs:210:12 [INFO] [stdout] | [INFO] [stdout] 210 | Ok(all.get(0).copied()) [INFO] [stdout] | ^^^^^^^^^^ help: try: `all.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` 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/days/list_ops.rs:4:11 [INFO] [stdout] | [INFO] [stdout] 4 | input.into_iter().fold(HashMap::new(), |mut acc, item| { [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/days/list_ops.rs:5:19 [INFO] [stdout] | [INFO] [stdout] 5 | acc.entry(&item).and_modify(|val| *val += 1).or_insert(1); [INFO] [stdout] | ^^^^^ help: change this to: `item` [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: name `MAIN` contains a capitalized acronym [INFO] [stdout] --> src/main.rs:27:5 [INFO] [stdout] | [INFO] [stdout] 27 | MAIN, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Main` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `EXAMPLE` contains a capitalized acronym [INFO] [stdout] --> src/main.rs:28:5 [INFO] [stdout] | [INFO] [stdout] 28 | EXAMPLE, [INFO] [stdout] | ^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Example` [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] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 9.94s [INFO] running `Command { std: "docker" "inspect" "a6118169048ac13f84fe23aa09728a6759a2079f4629f59ba2817149983a2207", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "a6118169048ac13f84fe23aa09728a6759a2079f4629f59ba2817149983a2207", kill_on_drop: false }` [INFO] [stdout] a6118169048ac13f84fe23aa09728a6759a2079f4629f59ba2817149983a2207