[INFO] cloning repository https://github.com/benni043/advent_of_code2023 [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/benni043/advent_of_code2023" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fbenni043%2Fadvent_of_code2023", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fbenni043%2Fadvent_of_code2023'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] d19351df7254439397d9464a6f6f50c96d286da9 [INFO] linting benni043/advent_of_code2023 against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fbenni043%2Fadvent_of_code2023" "/workspace/builds/worker-3-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-3-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/benni043/advent_of_code2023 [INFO] finished tweaking git repo https://github.com/benni043/advent_of_code2023 [INFO] tweaked toml for git repo https://github.com/benni043/advent_of_code2023 written to /workspace/builds/worker-3-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/benni043/advent_of_code2023 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/benni043/advent_of_code2023 already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-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] 85591e49c9e7dc7df948e60ffa820156d3ab7ec530dbc6334c02e3b034929d97 [INFO] running `Command { std: "docker" "start" "-a" "85591e49c9e7dc7df948e60ffa820156d3ab7ec530dbc6334c02e3b034929d97", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "85591e49c9e7dc7df948e60ffa820156d3ab7ec530dbc6334c02e3b034929d97", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "85591e49c9e7dc7df948e60ffa820156d3ab7ec530dbc6334c02e3b034929d97", kill_on_drop: false }` [INFO] [stdout] 85591e49c9e7dc7df948e60ffa820156d3ab7ec530dbc6334c02e3b034929d97 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-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] ffdc5a9ecc94135b48c4b8ab1dfaecd1cb107db9d47951968a00ce08bb2bc27a [INFO] running `Command { std: "docker" "start" "-a" "ffdc5a9ecc94135b48c4b8ab1dfaecd1cb107db9d47951968a00ce08bb2bc27a", kill_on_drop: false }` [INFO] [stderr] Compiling num-traits v0.2.17 [INFO] [stderr] Compiling num-bigint v0.4.4 [INFO] [stderr] Compiling num-rational v0.4.1 [INFO] [stderr] Compiling num-iter v0.1.43 [INFO] [stderr] Checking num-integer v0.1.45 [INFO] [stderr] Checking num-complex v0.4.4 [INFO] [stderr] Checking num v0.4.1 [INFO] [stderr] Checking advent_of_code2023 v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `crate::aoc1::aoc1` [INFO] [stdout] --> src/main.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use crate::aoc1::aoc1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::aoc2::aoc2` [INFO] [stdout] --> src/main.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use crate::aoc2::aoc2; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::aoc3::aoc3` [INFO] [stdout] --> src/main.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use crate::aoc3::aoc3; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::aoc4::aoc4` [INFO] [stdout] --> src/main.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use crate::aoc4::aoc4; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::aoc6::aoc6` [INFO] [stdout] --> src/main.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use crate::aoc6::aoc6; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::aoc7::aoc7` [INFO] [stdout] --> src/main.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | use crate::aoc7::aoc7; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::aoc8::aoc8` [INFO] [stdout] --> src/main.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | use crate::aoc8::aoc8; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::aoc9::aoc9` [INFO] [stdout] --> src/main.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | use crate::aoc9::aoc9; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/aoc3/mod.rs:45:37 [INFO] [stdout] | [INFO] [stdout] 45 | ... x: x, [INFO] [stdout] | ^^^^ help: replace it with: `x` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/aoc3/mod.rs:49:37 [INFO] [stdout] | [INFO] [stdout] 49 | ... x: x, [INFO] [stdout] | ^^^^ help: replace it with: `x` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/aoc3/mod.rs:96:37 [INFO] [stdout] | [INFO] [stdout] 96 | ... x: x, [INFO] [stdout] | ^^^^ help: replace it with: `x` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/aoc3/mod.rs:100:37 [INFO] [stdout] | [INFO] [stdout] 100 | ... x: x, [INFO] [stdout] | ^^^^ help: replace it with: `x` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::process::id` [INFO] [stdout] --> src/aoc9/mod.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::process::id; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `HashSet` and `VecDeque` [INFO] [stdout] --> src/aoc11/mod.rs:1:24 [INFO] [stdout] | [INFO] [stdout] 1 | use std::collections::{HashSet, VecDeque}; [INFO] [stdout] | ^^^^^^^ ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses [INFO] [stdout] --> src/aoc11/mod.rs:51:36 [INFO] [stdout] | [INFO] [stdout] 51 | cords.push((Cord { x: index2, y: index, x_shifts: 0, y_shifts: 0 })); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove them: `Cord { x: index2, y: index, x_shifts: 0, y_shifts: 0 }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_parens [INFO] [stdout] = note: `#[warn(clippy::double_parens)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around method argument [INFO] [stdout] --> src/aoc11/mod.rs:51:36 [INFO] [stdout] | [INFO] [stdout] 51 | cords.push((Cord { x: index2, y: index, x_shifts: 0, y_shifts: 0 })); [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 51 - cords.push((Cord { x: index2, y: index, x_shifts: 0, y_shifts: 0 })); [INFO] [stdout] 51 + cords.push(Cord { x: index2, y: index, x_shifts: 0, y_shifts: 0 } ); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::aoc1::aoc1` [INFO] [stdout] --> src/main.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use crate::aoc1::aoc1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::aoc2::aoc2` [INFO] [stdout] --> src/main.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use crate::aoc2::aoc2; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::aoc3::aoc3` [INFO] [stdout] --> src/main.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use crate::aoc3::aoc3; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::aoc4::aoc4` [INFO] [stdout] --> src/main.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use crate::aoc4::aoc4; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::aoc6::aoc6` [INFO] [stdout] --> src/main.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use crate::aoc6::aoc6; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::aoc7::aoc7` [INFO] [stdout] --> src/main.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | use crate::aoc7::aoc7; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::aoc8::aoc8` [INFO] [stdout] --> src/main.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | use crate::aoc8::aoc8; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::aoc9::aoc9` [INFO] [stdout] --> src/main.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | use crate::aoc9::aoc9; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/aoc3/mod.rs:45:37 [INFO] [stdout] | [INFO] [stdout] 45 | ... x: x, [INFO] [stdout] | ^^^^ help: replace it with: `x` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/aoc3/mod.rs:49:37 [INFO] [stdout] | [INFO] [stdout] 49 | ... x: x, [INFO] [stdout] | ^^^^ help: replace it with: `x` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/aoc3/mod.rs:96:37 [INFO] [stdout] | [INFO] [stdout] 96 | ... x: x, [INFO] [stdout] | ^^^^ help: replace it with: `x` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/aoc3/mod.rs:100:37 [INFO] [stdout] | [INFO] [stdout] 100 | ... x: x, [INFO] [stdout] | ^^^^ help: replace it with: `x` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::process::id` [INFO] [stdout] --> src/aoc9/mod.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::process::id; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `HashSet` and `VecDeque` [INFO] [stdout] --> src/aoc11/mod.rs:1:24 [INFO] [stdout] | [INFO] [stdout] 1 | use std::collections::{HashSet, VecDeque}; [INFO] [stdout] | ^^^^^^^ ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses [INFO] [stdout] --> src/aoc11/mod.rs:51:36 [INFO] [stdout] | [INFO] [stdout] 51 | cords.push((Cord { x: index2, y: index, x_shifts: 0, y_shifts: 0 })); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove them: `Cord { x: index2, y: index, x_shifts: 0, y_shifts: 0 }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_parens [INFO] [stdout] = note: `#[warn(clippy::double_parens)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around method argument [INFO] [stdout] --> src/aoc11/mod.rs:51:36 [INFO] [stdout] | [INFO] [stdout] 51 | cords.push((Cord { x: index2, y: index, x_shifts: 0, y_shifts: 0 })); [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 51 - cords.push((Cord { x: index2, y: index, x_shifts: 0, y_shifts: 0 })); [INFO] [stdout] 51 + cords.push(Cord { x: index2, y: index, x_shifts: 0, y_shifts: 0 } ); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `current_game` is never read [INFO] [stdout] --> src/aoc2/mod.rs:70:17 [INFO] [stdout] | [INFO] [stdout] 70 | current_game.red = 0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `current_game` is never read [INFO] [stdout] --> src/aoc2/mod.rs:71:17 [INFO] [stdout] | [INFO] [stdout] 71 | current_game.blue = 0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `current_game` is never read [INFO] [stdout] --> src/aoc2/mod.rs:72:17 [INFO] [stdout] | [INFO] [stdout] 72 | current_game.green = 0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `x` [INFO] [stdout] --> src/aoc4/mod.rs:52:9 [INFO] [stdout] | [INFO] [stdout] 52 | for x in 0..count-1 { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_x` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `distance` is never read [INFO] [stdout] --> src/aoc6/mod.rs:39:36 [INFO] [stdout] | [INFO] [stdout] 39 | let mut distance = 1; [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `err` [INFO] [stdout] --> src/aoc9/mod.rs:52:13 [INFO] [stdout] | [INFO] [stdout] 52 | Err(err) => None, [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_err` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/aoc11/mod.rs:60:25 [INFO] [stdout] | [INFO] [stdout] 60 | let mut cord1: Cord = cords[i].clone(); [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/aoc11/mod.rs:61:25 [INFO] [stdout] | [INFO] [stdout] 61 | let mut cord2: Cord = cords[j].clone(); [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `elem` [INFO] [stdout] --> src/aoc11/mod.rs:22:33 [INFO] [stdout] | [INFO] [stdout] 22 | 'outer: for (index, elem) in grid.iter().enumerate() { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_elem` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `part1` is never read [INFO] [stdout] --> src/aoc11/mod.rs:69:33 [INFO] [stdout] | [INFO] [stdout] 69 | let mut part1 = 0; [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `part2` is never read [INFO] [stdout] --> src/aoc11/mod.rs:88:33 [INFO] [stdout] | [INFO] [stdout] 88 | let mut part2 = 0; [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `aoc1` is never used [INFO] [stdout] --> src/aoc1/mod.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn aoc1() -> Option { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_numeric_value` is never used [INFO] [stdout] --> src/aoc1/mod.rs:69:4 [INFO] [stdout] | [INFO] [stdout] 69 | fn get_numeric_value(input: &str) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `aoc2` is never used [INFO] [stdout] --> src/aoc2/mod.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn aoc2() -> Option { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Game` is never constructed [INFO] [stdout] --> src/aoc2/mod.rs:84:8 [INFO] [stdout] | [INFO] [stdout] 84 | struct Game { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `aoc3` is never used [INFO] [stdout] --> src/aoc3/mod.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 4 | pub fn aoc3() -> Option { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `PossibleSymbolCord` is never constructed [INFO] [stdout] --> src/aoc3/mod.rs:164:8 [INFO] [stdout] | [INFO] [stdout] 164 | struct PossibleSymbolCord { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Number` is never constructed [INFO] [stdout] --> src/aoc3/mod.rs:170:8 [INFO] [stdout] | [INFO] [stdout] 170 | struct Number { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Symbol` is never constructed [INFO] [stdout] --> src/aoc3/mod.rs:179:8 [INFO] [stdout] | [INFO] [stdout] 179 | struct Symbol { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `aoc4` is never used [INFO] [stdout] --> src/aoc4/mod.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn aoc4() -> Option { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `multiply` is never used [INFO] [stdout] --> src/aoc4/mod.rs:49:4 [INFO] [stdout] | [INFO] [stdout] 49 | fn multiply(count: i32) -> i32 { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `aoc6` is never used [INFO] [stdout] --> src/aoc6/mod.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn aoc6() -> Option { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `aoc7` is never used [INFO] [stdout] --> src/aoc7/mod.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 4 | pub fn aoc7() -> Option { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `HandType` is never used [INFO] [stdout] --> src/aoc7/mod.rs:92:6 [INFO] [stdout] | [INFO] [stdout] 92 | enum HandType { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `CardType` is never used [INFO] [stdout] --> src/aoc7/mod.rs:103:6 [INFO] [stdout] | [INFO] [stdout] 103 | enum CardType { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Card` is never constructed [INFO] [stdout] --> src/aoc7/mod.rs:120:8 [INFO] [stdout] | [INFO] [stdout] 120 | struct Card { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Hand` is never constructed [INFO] [stdout] --> src/aoc7/mod.rs:125:8 [INFO] [stdout] | [INFO] [stdout] 125 | struct Hand { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `find_most_common_card_type` and `get_hand_type` are never used [INFO] [stdout] --> src/aoc7/mod.rs:131:8 [INFO] [stdout] | [INFO] [stdout] 130 | impl Hand { [INFO] [stdout] | --------- associated items in this implementation [INFO] [stdout] 131 | fn find_most_common_card_type(cards: &Vec) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 150 | fn get_hand_type(&self) -> HandType { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `aoc8` is never used [INFO] [stdout] --> src/aoc8/mod.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 4 | pub fn aoc8() -> Option { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `gcd` is never used [INFO] [stdout] --> src/aoc8/mod.rs:77:4 [INFO] [stdout] | [INFO] [stdout] 77 | fn gcd(mut a: i64, mut b: i64) -> i64 { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `lcm` is never used [INFO] [stdout] --> src/aoc8/mod.rs:86:4 [INFO] [stdout] | [INFO] [stdout] 86 | fn lcm(a: i64, b: i64) -> i64 { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `lcm_multiple` is never used [INFO] [stdout] --> src/aoc8/mod.rs:90:4 [INFO] [stdout] | [INFO] [stdout] 90 | fn lcm_multiple(mut numbers: Vec) -> i64 { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Position` is never constructed [INFO] [stdout] --> src/aoc8/mod.rs:104:8 [INFO] [stdout] | [INFO] [stdout] 104 | struct Position { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `aoc9` is never used [INFO] [stdout] --> src/aoc9/mod.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 4 | pub fn aoc9() -> Option { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `is_finished` is never used [INFO] [stdout] --> src/aoc9/mod.rs:56:4 [INFO] [stdout] | [INFO] [stdout] 56 | fn is_finished(list: &Vec) -> bool { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/aoc3/mod.rs:21:24 [INFO] [stdout] | [INFO] [stdout] 21 | if char.1 == &'.' || (char.1 != &'.' && !char.1.is_digit(10)) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 21 - if char.1 == &'.' || (char.1 != &'.' && !char.1.is_digit(10)) { [INFO] [stdout] 21 + if !(char.1 != &'.' && char.1.is_digit(10)) { [INFO] [stdout] | [INFO] [stdout] 21 - if char.1 == &'.' || (char.1 != &'.' && !char.1.is_digit(10)) { [INFO] [stdout] 21 + if char.1 == &'.' || !char.1.is_digit(10) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/aoc3/mod.rs:17:24 [INFO] [stdout] | [INFO] [stdout] 17 | if char.1.is_digit(10) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `char.1.is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] = note: `#[warn(clippy::is_digit_ascii_radix)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/aoc3/mod.rs:21:21 [INFO] [stdout] | [INFO] [stdout] 21 | / if char.1 == &'.' || (char.1 != &'.' && !char.1.is_digit(10)) { [INFO] [stdout] 22 | | if !build_number.is_empty() { [INFO] [stdout] 23 | | let mut number = Number { [INFO] [stdout] 24 | | x_from: (char.0 - build_number.len()) as i32, [INFO] [stdout] ... | [INFO] [stdout] 70 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 21 ~ if (char.1 == &'.' || (char.1 != &'.' && !char.1.is_digit(10))) { [INFO] [stdout] 22 ~ && !build_number.is_empty() { [INFO] [stdout] 23 | let mut number = Number { [INFO] [stdout] ... [INFO] [stdout] 68 | build_number = "".to_string(); [INFO] [stdout] 69 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/aoc3/mod.rs:21:62 [INFO] [stdout] | [INFO] [stdout] 21 | if char.1 == &'.' || (char.1 != &'.' && !char.1.is_digit(10)) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `char.1.is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/aoc3/mod.rs:72:21 [INFO] [stdout] | [INFO] [stdout] 72 | / if char.0 == line_arr.len() - 1 { [INFO] [stdout] 73 | | if !build_number.is_empty() { [INFO] [stdout] 74 | | let mut number = Number { [INFO] [stdout] 75 | | x_from: (char.0 - build_number.len() - 1) as i32, [INFO] [stdout] ... | [INFO] [stdout] 121 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 72 ~ if char.0 == line_arr.len() - 1 [INFO] [stdout] 73 ~ && !build_number.is_empty() { [INFO] [stdout] 74 | let mut number = Number { [INFO] [stdout] ... [INFO] [stdout] 119 | build_number = "".to_string(); [INFO] [stdout] 120 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/aoc3/mod.rs:123:43 [INFO] [stdout] | [INFO] [stdout] 123 | if char.1 != &'.' && !char.1.is_digit(10) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `char.1.is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `skip(..).next()` on an iterator [INFO] [stdout] --> src/aoc4/mod.rs:11:41 [INFO] [stdout] | [INFO] [stdout] 11 | let nums = card_and_nums.skip(1).next().unwrap().trim(); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: use `nth` instead: `.nth(1)` [INFO] [stdout] | [INFO] [stdout] help: for this change `card_and_nums` has to be mutable [INFO] [stdout] --> src/aoc4/mod.rs:10:21 [INFO] [stdout] | [INFO] [stdout] 10 | let card_and_nums = line.split(":"); [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_skip_next [INFO] [stdout] = note: `#[warn(clippy::iter_skip_next)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/aoc4/mod.rs:53:9 [INFO] [stdout] | [INFO] [stdout] 53 | sum = sum * 2; [INFO] [stdout] | ^^^^^^^^^^^^^ help: replace it with: `sum *= 2` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `skip(..).next()` on an iterator [INFO] [stdout] --> src/aoc6/mod.rs:12:51 [INFO] [stdout] | [INFO] [stdout] 12 | let values: &str = line.split(":").skip(1).next().unwrap().trim(); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: use `nth` instead: `.nth(1)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_skip_next [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/aoc7/mod.rs:139:54 [INFO] [stdout] | [INFO] [stdout] 139 | sorted_vals.sort_by(|&(_, a), &(_, b)| b.cmp(&a)); [INFO] [stdout] | ^^ help: change this to: `a` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `iter().cloned().collect()` on a slice to create a `Vec`. Calling `to_vec()` is both faster and more readable [INFO] [stdout] --> src/aoc7/mod.rs:153:46 [INFO] [stdout] | [INFO] [stdout] 153 | let mut cards: Vec = self.cards.iter().cloned().collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `.to_vec()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_cloned_collect [INFO] [stdout] = note: `#[warn(clippy::iter_cloned_collect)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `splitted1.get(0)` [INFO] [stdout] --> src/aoc8/mod.rs:24:35 [INFO] [stdout] | [INFO] [stdout] 24 | let current = splitted1.get(0).unwrap().trim().to_string(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `splitted1.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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/aoc9/mod.rs:20:36 [INFO] [stdout] | [INFO] [stdout] 20 | while !is_finished(&hist_vals_of_line.get(index).unwrap()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `hist_vals_of_line.get(index).unwrap()` [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: accessing first element with `hist_vals_of_line [INFO] [stdout] .get(x - 1) [INFO] [stdout] .unwrap().get(0)` [INFO] [stdout] --> src/aoc9/mod.rs:38:33 [INFO] [stdout] | [INFO] [stdout] 38 | let num2 = *hist_vals_of_line [INFO] [stdout] | _________________________________^ [INFO] [stdout] 39 | | .get(x - 1) [INFO] [stdout] 40 | | .unwrap() [INFO] [stdout] 41 | | .get(0) [INFO] [stdout] | |_______________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 38 ~ let num2 = *hist_vals_of_line [INFO] [stdout] 39 + .get(x - 1) [INFO] [stdout] 40 + .unwrap().first() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/aoc9/mod.rs:65:5 [INFO] [stdout] | [INFO] [stdout] 65 | / if cnt == list.len() { [INFO] [stdout] 66 | | true [INFO] [stdout] 67 | | } else { [INFO] [stdout] 68 | | false [INFO] [stdout] 69 | | } [INFO] [stdout] | |_____^ help: you can reduce it to: `cnt == list.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] = note: `#[warn(clippy::needless_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `current_game` is never read [INFO] [stdout] --> src/aoc2/mod.rs:70:17 [INFO] [stdout] | [INFO] [stdout] 70 | current_game.red = 0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `current_game` is never read [INFO] [stdout] --> src/aoc2/mod.rs:71:17 [INFO] [stdout] | [INFO] [stdout] 71 | current_game.blue = 0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `current_game` is never read [INFO] [stdout] --> src/aoc2/mod.rs:72:17 [INFO] [stdout] | [INFO] [stdout] 72 | current_game.green = 0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `x` [INFO] [stdout] --> src/aoc4/mod.rs:52:9 [INFO] [stdout] | [INFO] [stdout] 52 | for x in 0..count-1 { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_x` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `distance` is never read [INFO] [stdout] --> src/aoc6/mod.rs:39:36 [INFO] [stdout] | [INFO] [stdout] 39 | let mut distance = 1; [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `err` [INFO] [stdout] --> src/aoc9/mod.rs:52:13 [INFO] [stdout] | [INFO] [stdout] 52 | Err(err) => None, [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_err` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/aoc11/mod.rs:60:25 [INFO] [stdout] | [INFO] [stdout] 60 | let mut cord1: Cord = cords[i].clone(); [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/aoc11/mod.rs:61:25 [INFO] [stdout] | [INFO] [stdout] 61 | let mut cord2: Cord = cords[j].clone(); [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `elem` [INFO] [stdout] --> src/aoc11/mod.rs:22:33 [INFO] [stdout] | [INFO] [stdout] 22 | 'outer: for (index, elem) in grid.iter().enumerate() { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_elem` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `part1` is never read [INFO] [stdout] --> src/aoc11/mod.rs:69:33 [INFO] [stdout] | [INFO] [stdout] 69 | let mut part1 = 0; [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `part2` is never read [INFO] [stdout] --> src/aoc11/mod.rs:88:33 [INFO] [stdout] | [INFO] [stdout] 88 | let mut part2 = 0; [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `aoc1` is never used [INFO] [stdout] --> src/aoc1/mod.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn aoc1() -> Option { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_numeric_value` is never used [INFO] [stdout] --> src/aoc1/mod.rs:69:4 [INFO] [stdout] | [INFO] [stdout] 69 | fn get_numeric_value(input: &str) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `aoc2` is never used [INFO] [stdout] --> src/aoc2/mod.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn aoc2() -> Option { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Game` is never constructed [INFO] [stdout] --> src/aoc2/mod.rs:84:8 [INFO] [stdout] | [INFO] [stdout] 84 | struct Game { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `aoc3` is never used [INFO] [stdout] --> src/aoc3/mod.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 4 | pub fn aoc3() -> Option { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `PossibleSymbolCord` is never constructed [INFO] [stdout] --> src/aoc3/mod.rs:164:8 [INFO] [stdout] | [INFO] [stdout] 164 | struct PossibleSymbolCord { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Number` is never constructed [INFO] [stdout] --> src/aoc3/mod.rs:170:8 [INFO] [stdout] | [INFO] [stdout] 170 | struct Number { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Symbol` is never constructed [INFO] [stdout] --> src/aoc3/mod.rs:179:8 [INFO] [stdout] | [INFO] [stdout] 179 | struct Symbol { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `aoc4` is never used [INFO] [stdout] --> src/aoc4/mod.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn aoc4() -> Option { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `multiply` is never used [INFO] [stdout] --> src/aoc4/mod.rs:49:4 [INFO] [stdout] | [INFO] [stdout] 49 | fn multiply(count: i32) -> i32 { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `aoc6` is never used [INFO] [stdout] --> src/aoc6/mod.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn aoc6() -> Option { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `aoc7` is never used [INFO] [stdout] --> src/aoc7/mod.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 4 | pub fn aoc7() -> Option { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `HandType` is never used [INFO] [stdout] --> src/aoc7/mod.rs:92:6 [INFO] [stdout] | [INFO] [stdout] 92 | enum HandType { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `CardType` is never used [INFO] [stdout] --> src/aoc7/mod.rs:103:6 [INFO] [stdout] | [INFO] [stdout] 103 | enum CardType { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Card` is never constructed [INFO] [stdout] --> src/aoc7/mod.rs:120:8 [INFO] [stdout] | [INFO] [stdout] 120 | struct Card { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Hand` is never constructed [INFO] [stdout] --> src/aoc7/mod.rs:125:8 [INFO] [stdout] | [INFO] [stdout] 125 | struct Hand { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `find_most_common_card_type` and `get_hand_type` are never used [INFO] [stdout] --> src/aoc7/mod.rs:131:8 [INFO] [stdout] | [INFO] [stdout] 130 | impl Hand { [INFO] [stdout] | --------- associated items in this implementation [INFO] [stdout] 131 | fn find_most_common_card_type(cards: &Vec) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 150 | fn get_hand_type(&self) -> HandType { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `aoc8` is never used [INFO] [stdout] --> src/aoc8/mod.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 4 | pub fn aoc8() -> Option { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `gcd` is never used [INFO] [stdout] --> src/aoc8/mod.rs:77:4 [INFO] [stdout] | [INFO] [stdout] 77 | fn gcd(mut a: i64, mut b: i64) -> i64 { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `lcm` is never used [INFO] [stdout] --> src/aoc8/mod.rs:86:4 [INFO] [stdout] | [INFO] [stdout] 86 | fn lcm(a: i64, b: i64) -> i64 { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `lcm_multiple` is never used [INFO] [stdout] --> src/aoc8/mod.rs:90:4 [INFO] [stdout] | [INFO] [stdout] 90 | fn lcm_multiple(mut numbers: Vec) -> i64 { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Position` is never constructed [INFO] [stdout] --> src/aoc8/mod.rs:104:8 [INFO] [stdout] | [INFO] [stdout] 104 | struct Position { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `aoc9` is never used [INFO] [stdout] --> src/aoc9/mod.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 4 | pub fn aoc9() -> Option { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `is_finished` is never used [INFO] [stdout] --> src/aoc9/mod.rs:56:4 [INFO] [stdout] | [INFO] [stdout] 56 | fn is_finished(list: &Vec) -> bool { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/aoc3/mod.rs:21:24 [INFO] [stdout] | [INFO] [stdout] 21 | if char.1 == &'.' || (char.1 != &'.' && !char.1.is_digit(10)) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 21 - if char.1 == &'.' || (char.1 != &'.' && !char.1.is_digit(10)) { [INFO] [stdout] 21 + if !(char.1 != &'.' && char.1.is_digit(10)) { [INFO] [stdout] | [INFO] [stdout] 21 - if char.1 == &'.' || (char.1 != &'.' && !char.1.is_digit(10)) { [INFO] [stdout] 21 + if char.1 == &'.' || !char.1.is_digit(10) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/aoc3/mod.rs:17:24 [INFO] [stdout] | [INFO] [stdout] 17 | if char.1.is_digit(10) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `char.1.is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] = note: `#[warn(clippy::is_digit_ascii_radix)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/aoc3/mod.rs:21:21 [INFO] [stdout] | [INFO] [stdout] 21 | / if char.1 == &'.' || (char.1 != &'.' && !char.1.is_digit(10)) { [INFO] [stdout] 22 | | if !build_number.is_empty() { [INFO] [stdout] 23 | | let mut number = Number { [INFO] [stdout] 24 | | x_from: (char.0 - build_number.len()) as i32, [INFO] [stdout] ... | [INFO] [stdout] 70 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 21 ~ if (char.1 == &'.' || (char.1 != &'.' && !char.1.is_digit(10))) { [INFO] [stdout] 22 ~ && !build_number.is_empty() { [INFO] [stdout] 23 | let mut number = Number { [INFO] [stdout] ... [INFO] [stdout] 68 | build_number = "".to_string(); [INFO] [stdout] 69 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/aoc3/mod.rs:21:62 [INFO] [stdout] | [INFO] [stdout] 21 | if char.1 == &'.' || (char.1 != &'.' && !char.1.is_digit(10)) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `char.1.is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/aoc3/mod.rs:72:21 [INFO] [stdout] | [INFO] [stdout] 72 | / if char.0 == line_arr.len() - 1 { [INFO] [stdout] 73 | | if !build_number.is_empty() { [INFO] [stdout] 74 | | let mut number = Number { [INFO] [stdout] 75 | | x_from: (char.0 - build_number.len() - 1) as i32, [INFO] [stdout] ... | [INFO] [stdout] 121 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 72 ~ if char.0 == line_arr.len() - 1 [INFO] [stdout] 73 ~ && !build_number.is_empty() { [INFO] [stdout] 74 | let mut number = Number { [INFO] [stdout] ... [INFO] [stdout] 119 | build_number = "".to_string(); [INFO] [stdout] 120 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/aoc3/mod.rs:123:43 [INFO] [stdout] | [INFO] [stdout] 123 | if char.1 != &'.' && !char.1.is_digit(10) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `char.1.is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `skip(..).next()` on an iterator [INFO] [stdout] --> src/aoc4/mod.rs:11:41 [INFO] [stdout] | [INFO] [stdout] 11 | let nums = card_and_nums.skip(1).next().unwrap().trim(); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: use `nth` instead: `.nth(1)` [INFO] [stdout] | [INFO] [stdout] help: for this change `card_and_nums` has to be mutable [INFO] [stdout] --> src/aoc4/mod.rs:10:21 [INFO] [stdout] | [INFO] [stdout] 10 | let card_and_nums = line.split(":"); [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_skip_next [INFO] [stdout] = note: `#[warn(clippy::iter_skip_next)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/aoc4/mod.rs:53:9 [INFO] [stdout] | [INFO] [stdout] 53 | sum = sum * 2; [INFO] [stdout] | ^^^^^^^^^^^^^ help: replace it with: `sum *= 2` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `skip(..).next()` on an iterator [INFO] [stdout] --> src/aoc6/mod.rs:12:51 [INFO] [stdout] | [INFO] [stdout] 12 | let values: &str = line.split(":").skip(1).next().unwrap().trim(); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: use `nth` instead: `.nth(1)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_skip_next [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/aoc7/mod.rs:139:54 [INFO] [stdout] | [INFO] [stdout] 139 | sorted_vals.sort_by(|&(_, a), &(_, b)| b.cmp(&a)); [INFO] [stdout] | ^^ help: change this to: `a` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `iter().cloned().collect()` on a slice to create a `Vec`. Calling `to_vec()` is both faster and more readable [INFO] [stdout] --> src/aoc7/mod.rs:153:46 [INFO] [stdout] | [INFO] [stdout] 153 | let mut cards: Vec = self.cards.iter().cloned().collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `.to_vec()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_cloned_collect [INFO] [stdout] = note: `#[warn(clippy::iter_cloned_collect)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `splitted1.get(0)` [INFO] [stdout] --> src/aoc8/mod.rs:24:35 [INFO] [stdout] | [INFO] [stdout] 24 | let current = splitted1.get(0).unwrap().trim().to_string(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `splitted1.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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/aoc9/mod.rs:20:36 [INFO] [stdout] | [INFO] [stdout] 20 | while !is_finished(&hist_vals_of_line.get(index).unwrap()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `hist_vals_of_line.get(index).unwrap()` [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: accessing first element with `hist_vals_of_line [INFO] [stdout] .get(x - 1) [INFO] [stdout] .unwrap().get(0)` [INFO] [stdout] --> src/aoc9/mod.rs:38:33 [INFO] [stdout] | [INFO] [stdout] 38 | let num2 = *hist_vals_of_line [INFO] [stdout] | _________________________________^ [INFO] [stdout] 39 | | .get(x - 1) [INFO] [stdout] 40 | | .unwrap() [INFO] [stdout] 41 | | .get(0) [INFO] [stdout] | |_______________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 38 ~ let num2 = *hist_vals_of_line [INFO] [stdout] 39 + .get(x - 1) [INFO] [stdout] 40 + .unwrap().first() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/aoc9/mod.rs:65:5 [INFO] [stdout] | [INFO] [stdout] 65 | / if cnt == list.len() { [INFO] [stdout] 66 | | true [INFO] [stdout] 67 | | } else { [INFO] [stdout] 68 | | false [INFO] [stdout] 69 | | } [INFO] [stdout] | |_____^ help: you can reduce it to: `cnt == list.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] = note: `#[warn(clippy::needless_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 4.92s [INFO] running `Command { std: "docker" "inspect" "ffdc5a9ecc94135b48c4b8ab1dfaecd1cb107db9d47951968a00ce08bb2bc27a", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "ffdc5a9ecc94135b48c4b8ab1dfaecd1cb107db9d47951968a00ce08bb2bc27a", kill_on_drop: false }` [INFO] [stdout] ffdc5a9ecc94135b48c4b8ab1dfaecd1cb107db9d47951968a00ce08bb2bc27a