[INFO] cloning repository https://github.com/Erlendlbr/adventofcode23 [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/Erlendlbr/adventofcode23" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FErlendlbr%2Fadventofcode23", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FErlendlbr%2Fadventofcode23'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] dee39da49440674059a6386b4b774228aa000cfd [INFO] linting Erlendlbr/adventofcode23 against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FErlendlbr%2Fadventofcode23" "/workspace/builds/worker-2-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-2-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/Erlendlbr/adventofcode23 [INFO] finished tweaking git repo https://github.com/Erlendlbr/adventofcode23 [INFO] tweaked toml for git repo https://github.com/Erlendlbr/adventofcode23 written to /workspace/builds/worker-2-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/Erlendlbr/adventofcode23 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/Erlendlbr/adventofcode23 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 num v0.4.1 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 4423b4f2b4d2870ae7e17b9af7c13f135cae1ba78209042cac16b6f1903c6cd9 [INFO] running `Command { std: "docker" "start" "-a" "4423b4f2b4d2870ae7e17b9af7c13f135cae1ba78209042cac16b6f1903c6cd9", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "4423b4f2b4d2870ae7e17b9af7c13f135cae1ba78209042cac16b6f1903c6cd9", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "4423b4f2b4d2870ae7e17b9af7c13f135cae1ba78209042cac16b6f1903c6cd9", kill_on_drop: false }` [INFO] [stdout] 4423b4f2b4d2870ae7e17b9af7c13f135cae1ba78209042cac16b6f1903c6cd9 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] ef96668a836881dfb5d0dbcb7f1a0fd62f0ed1f29ecca6db4da077fdc82ff924 [INFO] running `Command { std: "docker" "start" "-a" "ef96668a836881dfb5d0dbcb7f1a0fd62f0ed1f29ecca6db4da077fdc82ff924", kill_on_drop: false }` [INFO] [stderr] Compiling num-traits v0.2.17 [INFO] [stderr] Compiling num-bigint v0.4.4 [INFO] [stderr] Compiling num-iter v0.1.43 [INFO] [stderr] Compiling num-rational v0.4.1 [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 adv23 v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unnecessary `>= y + 1` or `x - 1 >=` [INFO] [stdout] --> src/day_12/spring.rs:140:20 [INFO] [stdout] | [INFO] [stdout] 140 | if rem >= tool.len() + 1 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: change it to: `rem > tool.len()` [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 parentheses around `if` condition [INFO] [stdout] --> src/day_13/mirror.rs:43:20 [INFO] [stdout] | [INFO] [stdout] 43 | if (vec[idx + off] != vec[idx - off - 1]) { [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] 43 - if (vec[idx + off] != vec[idx - off - 1]) { [INFO] [stdout] 43 + if vec[idx + off] != vec[idx - off - 1] { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/day_13/mirror.rs:119:20 [INFO] [stdout] | [INFO] [stdout] 119 | if (cmp_a != cmp_b) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 119 - if (cmp_a != cmp_b) { [INFO] [stdout] 119 + if cmp_a != cmp_b { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `BTreeMap` [INFO] [stdout] --> src/day_17/search.rs:1:24 [INFO] [stdout] | [INFO] [stdout] 1 | use std::collections::{BTreeMap, VecDeque}; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `>= y + 1` or `x - 1 >=` [INFO] [stdout] --> src/day_12/spring.rs:140:20 [INFO] [stdout] | [INFO] [stdout] 140 | if rem >= tool.len() + 1 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: change it to: `rem > tool.len()` [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 parentheses around `if` condition [INFO] [stdout] --> src/day_13/mirror.rs:43:20 [INFO] [stdout] | [INFO] [stdout] 43 | if (vec[idx + off] != vec[idx - off - 1]) { [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] 43 - if (vec[idx + off] != vec[idx - off - 1]) { [INFO] [stdout] 43 + if vec[idx + off] != vec[idx - off - 1] { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/day_13/mirror.rs:119:20 [INFO] [stdout] | [INFO] [stdout] 119 | if (cmp_a != cmp_b) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 119 - if (cmp_a != cmp_b) { [INFO] [stdout] 119 + if cmp_a != cmp_b { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `BTreeMap` [INFO] [stdout] --> src/day_17/search.rs:1:24 [INFO] [stdout] | [INFO] [stdout] 1 | use std::collections::{BTreeMap, VecDeque}; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/day_12/spring.rs:124:13 [INFO] [stdout] | [INFO] [stdout] 124 | let mut initial = setUP.as_slice(); [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/day_12/spring.rs:124:13 [INFO] [stdout] | [INFO] [stdout] 124 | let mut initial = setUP.as_slice(); [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: unused variable: `msng` [INFO] [stdout] --> src/day_12/spring.rs:281:13 [INFO] [stdout] | [INFO] [stdout] 281 | let msng = rec - dmg; [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_msng` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `pos` [INFO] [stdout] --> src/day_12/spring.rs:282:13 [INFO] [stdout] | [INFO] [stdout] 282 | let pos: Vec = self [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_pos` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `unk` [INFO] [stdout] --> src/day_12/spring.rs:324:13 [INFO] [stdout] | [INFO] [stdout] 324 | let unk = self [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_unk` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `msng` [INFO] [stdout] --> src/day_12/spring.rs:335:13 [INFO] [stdout] | [INFO] [stdout] 335 | let msng = rec - dmg; [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_msng` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `recs` [INFO] [stdout] --> src/day_12/spring.rs:362:13 [INFO] [stdout] | [INFO] [stdout] 362 | let recs: Vec = vec![]; [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_recs` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `msng` [INFO] [stdout] --> src/day_12/spring.rs:281:13 [INFO] [stdout] | [INFO] [stdout] 281 | let msng = rec - dmg; [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_msng` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `pos` [INFO] [stdout] --> src/day_12/spring.rs:282:13 [INFO] [stdout] | [INFO] [stdout] 282 | let pos: Vec = self [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_pos` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `unk` [INFO] [stdout] --> src/day_12/spring.rs:324:13 [INFO] [stdout] | [INFO] [stdout] 324 | let unk = self [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_unk` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `msng` [INFO] [stdout] --> src/day_12/spring.rs:335:13 [INFO] [stdout] | [INFO] [stdout] 335 | let msng = rec - dmg; [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_msng` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `recs` [INFO] [stdout] --> src/day_12/spring.rs:362:13 [INFO] [stdout] | [INFO] [stdout] 362 | let recs: Vec = vec![]; [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_recs` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `line` [INFO] [stdout] --> src/day_13/mirror.rs:18:15 [INFO] [stdout] | [INFO] [stdout] 18 | for (idx, line) in vec.iter().enumerate() { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_line` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `line` [INFO] [stdout] --> src/day_13/mirror.rs:18:15 [INFO] [stdout] | [INFO] [stdout] 18 | for (idx, line) in vec.iter().enumerate() { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_line` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/day_17/search.rs:36:9 [INFO] [stdout] | [INFO] [stdout] 36 | let mut current = start; [INFO] [stdout] | ----^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/day_17/search.rs:37:9 [INFO] [stdout] | [INFO] [stdout] 37 | let mut score = 0; [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `goal` [INFO] [stdout] --> src/day_17/search.rs:35:35 [INFO] [stdout] | [INFO] [stdout] 35 | fn star_rest(start:(usize,usize), goal: (usize,usize), matrix: [[char; INPUT_SIZE];INPUT_SIZE]) -> usize { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_goal` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `matrix` [INFO] [stdout] --> src/day_17/search.rs:35:56 [INFO] [stdout] | [INFO] [stdout] 35 | fn star_rest(start:(usize,usize), goal: (usize,usize), matrix: [[char; INPUT_SIZE];INPUT_SIZE]) -> usize { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_matrix` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `current` [INFO] [stdout] --> src/day_17/search.rs:36:9 [INFO] [stdout] | [INFO] [stdout] 36 | let mut current = start; [INFO] [stdout] | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_current` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `score` [INFO] [stdout] --> src/day_17/search.rs:37:9 [INFO] [stdout] | [INFO] [stdout] 37 | let mut score = 0; [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_score` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/day_17/search.rs:36:9 [INFO] [stdout] | [INFO] [stdout] 36 | let mut current = start; [INFO] [stdout] | ----^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/day_17/search.rs:37:9 [INFO] [stdout] | [INFO] [stdout] 37 | let mut score = 0; [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `goal` [INFO] [stdout] --> src/day_17/search.rs:35:35 [INFO] [stdout] | [INFO] [stdout] 35 | fn star_rest(start:(usize,usize), goal: (usize,usize), matrix: [[char; INPUT_SIZE];INPUT_SIZE]) -> usize { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_goal` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `matrix` [INFO] [stdout] --> src/day_17/search.rs:35:56 [INFO] [stdout] | [INFO] [stdout] 35 | fn star_rest(start:(usize,usize), goal: (usize,usize), matrix: [[char; INPUT_SIZE];INPUT_SIZE]) -> usize { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_matrix` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `current` [INFO] [stdout] --> src/day_17/search.rs:36:9 [INFO] [stdout] | [INFO] [stdout] 36 | let mut current = start; [INFO] [stdout] | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_current` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `score` [INFO] [stdout] --> src/day_17/search.rs:37:9 [INFO] [stdout] | [INFO] [stdout] 37 | let mut score = 0; [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_score` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple methods are never used [INFO] [stdout] --> src/day_12/spring.rs:30:8 [INFO] [stdout] | [INFO] [stdout] 14 | impl SpringRecord { [INFO] [stdout] | ----------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 30 | fn check_cond(&self, cond: &Vec) -> bool { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 46 | fn valid(&self) -> bool { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 81 | fn generate_posibale(&self) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 209 | fn amount_posibale_expanded(&self) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 244 | fn generate_posibale_rec(&self) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 274 | fn rec_valid(&self) -> usize { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 323 | fn simple_gues(&self) -> usize { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 339 | fn amount_posibale(&self) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple methods are never used [INFO] [stdout] --> src/day_12/spring.rs:30:8 [INFO] [stdout] | [INFO] [stdout] 14 | impl SpringRecord { [INFO] [stdout] | ----------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 30 | fn check_cond(&self, cond: &Vec) -> bool { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 46 | fn valid(&self) -> bool { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 81 | fn generate_posibale(&self) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 209 | fn amount_posibale_expanded(&self) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 244 | fn generate_posibale_rec(&self) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 274 | fn rec_valid(&self) -> usize { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 323 | fn simple_gues(&self) -> usize { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 339 | fn amount_posibale(&self) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variants `North`, `South`, and `West` are never constructed [INFO] [stdout] --> src/day_17/search.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 8 | enum CardinalDirection { [INFO] [stdout] | ----------------- variants in this enum [INFO] [stdout] 9 | North, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 10 | South, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 11 | East, [INFO] [stdout] 12 | West, [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `CardinalDirection` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variants `North`, `South`, and `West` are never constructed [INFO] [stdout] --> src/day_17/search.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 8 | enum CardinalDirection { [INFO] [stdout] | ----------------- variants in this enum [INFO] [stdout] 9 | North, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 10 | South, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 11 | East, [INFO] [stdout] 12 | West, [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `CardinalDirection` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is used to index `matrix` [INFO] [stdout] --> src/day_11/galaxy.rs:22:14 [INFO] [stdout] | [INFO] [stdout] 22 | for j in 0..INPUT_SIZE { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 22 - for j in 0..INPUT_SIZE { [INFO] [stdout] 22 + for (j, ) in matrix.iter().enumerate().take(INPUT_SIZE) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `matrix` [INFO] [stdout] --> src/day_11/galaxy.rs:24:18 [INFO] [stdout] | [INFO] [stdout] 24 | for i in 0..INPUT_SIZE { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 24 - for i in 0..INPUT_SIZE { [INFO] [stdout] 24 + for in matrix.iter().take(INPUT_SIZE) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is used to index `matrix` [INFO] [stdout] --> src/day_11/galaxy.rs:22:14 [INFO] [stdout] | [INFO] [stdout] 22 | for j in 0..INPUT_SIZE { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 22 - for j in 0..INPUT_SIZE { [INFO] [stdout] 22 + for (j, ) in matrix.iter().enumerate().take(INPUT_SIZE) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `matrix` [INFO] [stdout] --> src/day_11/galaxy.rs:24:18 [INFO] [stdout] | [INFO] [stdout] 24 | for i in 0..INPUT_SIZE { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 24 - for i in 0..INPUT_SIZE { [INFO] [stdout] 24 + for in matrix.iter().take(INPUT_SIZE) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day_11/galaxy.rs:78:18 [INFO] [stdout] | [INFO] [stdout] 78 | line_ofsets: &Vec, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 78 - line_ofsets: &Vec, [INFO] [stdout] 78 + line_ofsets: &[usize], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day_11/galaxy.rs:79:17 [INFO] [stdout] | [INFO] [stdout] 79 | row_ofsets: &Vec, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 79 - row_ofsets: &Vec, [INFO] [stdout] 79 + row_ofsets: &[usize], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day_11/galaxy.rs:78:18 [INFO] [stdout] | [INFO] [stdout] 78 | line_ofsets: &Vec, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 78 - line_ofsets: &Vec, [INFO] [stdout] 78 + line_ofsets: &[usize], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day_11/galaxy.rs:79:17 [INFO] [stdout] | [INFO] [stdout] 79 | row_ofsets: &Vec, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 79 - row_ofsets: &Vec, [INFO] [stdout] 79 + row_ofsets: &[usize], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day_12/spring.rs:15:43 [INFO] [stdout] | [INFO] [stdout] 15 | fn check_valid_placments(&self, cond: &Vec) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 15 - fn check_valid_placments(&self, cond: &Vec) -> bool { [INFO] [stdout] 15 + fn check_valid_placments(&self, cond: &[SpringCondition]) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day_12/spring.rs:30:32 [INFO] [stdout] | [INFO] [stdout] 30 | fn check_cond(&self, cond: &Vec) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 30 - fn check_cond(&self, cond: &Vec) -> bool { [INFO] [stdout] 30 + fn check_cond(&self, cond: &[SpringCondition]) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day_12/spring.rs:15:43 [INFO] [stdout] | [INFO] [stdout] 15 | fn check_valid_placments(&self, cond: &Vec) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 15 - fn check_valid_placments(&self, cond: &Vec) -> bool { [INFO] [stdout] 15 + fn check_valid_placments(&self, cond: &[SpringCondition]) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day_12/spring.rs:30:32 [INFO] [stdout] | [INFO] [stdout] 30 | fn check_cond(&self, cond: &Vec) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 30 - fn check_cond(&self, cond: &Vec) -> bool { [INFO] [stdout] 30 + fn check_cond(&self, cond: &[SpringCondition]) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/day_12/spring.rs:95:32 [INFO] [stdout] | [INFO] [stdout] 95 | let mut good = (&conditions).clone(); [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `conditions` [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: this expression can be written more simply using `.retain()` [INFO] [stdout] --> src/day_12/spring.rs:108:13 [INFO] [stdout] | [INFO] [stdout] 108 | / conditions = conditions [INFO] [stdout] 109 | | .into_iter() [INFO] [stdout] 110 | | .filter(|vec| { [INFO] [stdout] 111 | | vec.iter() [INFO] [stdout] ... | [INFO] [stdout] 115 | | }) [INFO] [stdout] 116 | | .collect(); [INFO] [stdout] | |__________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_retain [INFO] [stdout] = note: `#[warn(clippy::manual_retain)]` on by default [INFO] [stdout] help: consider calling `.retain()` instead [INFO] [stdout] | [INFO] [stdout] 108 ~ conditions.retain(|vec| { [INFO] [stdout] 109 + vec.iter() [INFO] [stdout] 110 + .filter(|item| *item == &SpringCondition::Damaged) [INFO] [stdout] 111 + .count() [INFO] [stdout] 112 + <= cmp_val [INFO] [stdout] 113 ~ }); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `place` after checking its variant with `is_ok` [INFO] [stdout] --> src/day_12/spring.rs:147:37 [INFO] [stdout] | [INFO] [stdout] 145 | if place.is_ok() { [INFO] [stdout] | ---------------- help: try: `if let Ok() = place` [INFO] [stdout] 146 | // println!("found {:?}", place.unwrap()); [INFO] [stdout] 147 | let split_loc = place.unwrap() + (*amount_ins as usize) + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/day_12/spring.rs:95:32 [INFO] [stdout] | [INFO] [stdout] 95 | let mut good = (&conditions).clone(); [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `conditions` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/day_12/spring.rs:206:9 [INFO] [stdout] | [INFO] [stdout] 206 | return conditions.len(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 206 - return conditions.len(); [INFO] [stdout] 206 + conditions.len() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression can be written more simply using `.retain()` [INFO] [stdout] --> src/day_12/spring.rs:108:13 [INFO] [stdout] | [INFO] [stdout] 108 | / conditions = conditions [INFO] [stdout] 109 | | .into_iter() [INFO] [stdout] 110 | | .filter(|vec| { [INFO] [stdout] 111 | | vec.iter() [INFO] [stdout] ... | [INFO] [stdout] 115 | | }) [INFO] [stdout] 116 | | .collect(); [INFO] [stdout] | |__________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_retain [INFO] [stdout] = note: `#[warn(clippy::manual_retain)]` on by default [INFO] [stdout] help: consider calling `.retain()` instead [INFO] [stdout] | [INFO] [stdout] 108 ~ conditions.retain(|vec| { [INFO] [stdout] 109 + vec.iter() [INFO] [stdout] 110 + .filter(|item| *item == &SpringCondition::Damaged) [INFO] [stdout] 111 + .count() [INFO] [stdout] 112 + <= cmp_val [INFO] [stdout] 113 ~ }); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `place` after checking its variant with `is_ok` [INFO] [stdout] --> src/day_12/spring.rs:147:37 [INFO] [stdout] | [INFO] [stdout] 145 | if place.is_ok() { [INFO] [stdout] | ---------------- help: try: `if let Ok() = place` [INFO] [stdout] 146 | // println!("found {:?}", place.unwrap()); [INFO] [stdout] 147 | let split_loc = place.unwrap() + (*amount_ins as usize) + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/day_12/spring.rs:206:9 [INFO] [stdout] | [INFO] [stdout] 206 | return conditions.len(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 206 - return conditions.len(); [INFO] [stdout] 206 + conditions.len() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression can be written more simply using `.retain()` [INFO] [stdout] --> src/day_12/spring.rs:194:13 [INFO] [stdout] | [INFO] [stdout] 194 | / conditions = conditions [INFO] [stdout] 195 | | .into_iter() [INFO] [stdout] 196 | | .filter(|con| self.check_valid_placments(&con)) [INFO] [stdout] 197 | | .collect(); [INFO] [stdout] | |__________________________^ help: consider calling `.retain()` instead: `conditions.retain(|con| self.check_valid_placments(&con))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_retain [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day_12/spring.rs:196:58 [INFO] [stdout] | [INFO] [stdout] 196 | .filter(|con| self.check_valid_placments(&con)) [INFO] [stdout] | ^^^^ help: change this to: `con` [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 can be written more simply using `.retain()` [INFO] [stdout] --> src/day_12/spring.rs:202:9 [INFO] [stdout] | [INFO] [stdout] 202 | / conditions = conditions [INFO] [stdout] 203 | | .into_iter() [INFO] [stdout] 204 | | .filter(|con| self.check_valid_placments(&con)) [INFO] [stdout] 205 | | .collect(); [INFO] [stdout] | |______________________^ help: consider calling `.retain()` instead: `conditions.retain(|con| self.check_valid_placments(&con))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_retain [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day_12/spring.rs:204:54 [INFO] [stdout] | [INFO] [stdout] 204 | .filter(|con| self.check_valid_placments(&con)) [INFO] [stdout] | ^^^^ help: change this to: `con` [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 can be written more simply using `.retain()` [INFO] [stdout] --> src/day_12/spring.rs:194:13 [INFO] [stdout] | [INFO] [stdout] 194 | / conditions = conditions [INFO] [stdout] 195 | | .into_iter() [INFO] [stdout] 196 | | .filter(|con| self.check_valid_placments(&con)) [INFO] [stdout] 197 | | .collect(); [INFO] [stdout] | |__________________________^ help: consider calling `.retain()` instead: `conditions.retain(|con| self.check_valid_placments(&con))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_retain [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day_12/spring.rs:196:58 [INFO] [stdout] | [INFO] [stdout] 196 | .filter(|con| self.check_valid_placments(&con)) [INFO] [stdout] | ^^^^ help: change this to: `con` [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 can be written more simply using `.retain()` [INFO] [stdout] --> src/day_12/spring.rs:202:9 [INFO] [stdout] | [INFO] [stdout] 202 | / conditions = conditions [INFO] [stdout] 203 | | .into_iter() [INFO] [stdout] 204 | | .filter(|con| self.check_valid_placments(&con)) [INFO] [stdout] 205 | | .collect(); [INFO] [stdout] | |______________________^ help: consider calling `.retain()` instead: `conditions.retain(|con| self.check_valid_placments(&con))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_retain [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day_12/spring.rs:204:54 [INFO] [stdout] | [INFO] [stdout] 204 | .filter(|con| self.check_valid_placments(&con)) [INFO] [stdout] | ^^^^ help: change this to: `con` [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 borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/day_12/spring.rs:251:32 [INFO] [stdout] | [INFO] [stdout] 251 | let mut good = (&conditions).clone(); [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `conditions` [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 loop could be written as a `while let` loop [INFO] [stdout] --> src/day_12/spring.rs:291:9 [INFO] [stdout] | [INFO] [stdout] 291 | / loop { [INFO] [stdout] 292 | | match self [INFO] [stdout] 293 | | .condition [INFO] [stdout] 294 | | .iter() [INFO] [stdout] ... | [INFO] [stdout] 318 | | }; [INFO] [stdout] 319 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] = note: `#[warn(clippy::while_let_loop)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 291 ~ while let Some(a) = self [INFO] [stdout] 292 + .condition [INFO] [stdout] 293 + .iter() [INFO] [stdout] 294 + .position(|con| con == &SpringCondition::Unknown) { .. } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/day_12/spring.rs:251:32 [INFO] [stdout] | [INFO] [stdout] 251 | let mut good = (&conditions).clone(); [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `conditions` [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 boolean expression can be simplified [INFO] [stdout] --> src/day_12/spring.rs:368:20 [INFO] [stdout] | [INFO] [stdout] 368 | if !(slice.first().unwrap() == &SpringCondition::Damaged) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(slice.first().unwrap() != &SpringCondition::Damaged)` [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/day_12/spring.rs:369:24 [INFO] [stdout] | [INFO] [stdout] 369 | && !(slice.last().unwrap() == &SpringCondition::Damaged) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(slice.last().unwrap() != &SpringCondition::Damaged)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> src/day_12/spring.rs:291:9 [INFO] [stdout] | [INFO] [stdout] 291 | / loop { [INFO] [stdout] 292 | | match self [INFO] [stdout] 293 | | .condition [INFO] [stdout] 294 | | .iter() [INFO] [stdout] ... | [INFO] [stdout] 318 | | }; [INFO] [stdout] 319 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] = note: `#[warn(clippy::while_let_loop)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 291 ~ while let Some(a) = self [INFO] [stdout] 292 + .condition [INFO] [stdout] 293 + .iter() [INFO] [stdout] 294 + .position(|con| con == &SpringCondition::Unknown) { .. } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `slice` [INFO] [stdout] --> src/day_12/spring.rs:371:30 [INFO] [stdout] | [INFO] [stdout] 371 | for i in 1..=*item as usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 371 - for i in 1..=*item as usize { [INFO] [stdout] 371 + for in slice.iter().take(*item as usize + 1).skip(1) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/day_12/spring.rs:368:20 [INFO] [stdout] | [INFO] [stdout] 368 | if !(slice.first().unwrap() == &SpringCondition::Damaged) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(slice.first().unwrap() != &SpringCondition::Damaged)` [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/day_12/spring.rs:369:24 [INFO] [stdout] | [INFO] [stdout] 369 | && !(slice.last().unwrap() == &SpringCondition::Damaged) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(slice.last().unwrap() != &SpringCondition::Damaged)` [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: the loop variable `i` is only used to index `slice` [INFO] [stdout] --> src/day_12/spring.rs:371:30 [INFO] [stdout] | [INFO] [stdout] 371 | for i in 1..=*item as usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 371 - for i in 1..=*item as usize { [INFO] [stdout] 371 + for in slice.iter().take(*item as usize + 1).skip(1) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::str::Chars<'_>` [INFO] [stdout] --> src/day_13/mirror.rs:24:26 [INFO] [stdout] | [INFO] [stdout] 24 | let amount = vec[idx] [INFO] [stdout] | __________________________^ [INFO] [stdout] 25 | | .chars() [INFO] [stdout] 26 | | .into_iter() [INFO] [stdout] | |____________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] help: consider removing `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 24 ~ let amount = vec[idx] [INFO] [stdout] 25 + .chars() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> src/day_13/mirror.rs:27:22 [INFO] [stdout] | [INFO] [stdout] 27 | .zip(vec[idx - 1].chars().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/iterator.rs:629:11 [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] help: consider removing the `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 27 - .zip(vec[idx - 1].chars().into_iter()) [INFO] [stdout] 27 + .zip(vec[idx - 1].chars()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::str::Chars<'_>` [INFO] [stdout] --> src/day_13/mirror.rs:48:34 [INFO] [stdout] | [INFO] [stdout] 48 | let amount = vec[idx + off] [INFO] [stdout] | __________________________________^ [INFO] [stdout] 49 | | .chars() [INFO] [stdout] 50 | | .into_iter() [INFO] [stdout] | |____________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] help: consider removing `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 48 ~ let amount = vec[idx + off] [INFO] [stdout] 49 + .chars() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> src/day_13/mirror.rs:51:30 [INFO] [stdout] | [INFO] [stdout] 51 | .zip(vec[idx - off - 1].chars().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/iterator.rs:629:11 [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] help: consider removing the `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 51 - .zip(vec[idx - off - 1].chars().into_iter()) [INFO] [stdout] 51 + .zip(vec[idx - off - 1].chars()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::str::Chars<'_>` [INFO] [stdout] --> src/day_13/mirror.rs:24:26 [INFO] [stdout] | [INFO] [stdout] 24 | let amount = vec[idx] [INFO] [stdout] | __________________________^ [INFO] [stdout] 25 | | .chars() [INFO] [stdout] 26 | | .into_iter() [INFO] [stdout] | |____________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] help: consider removing `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 24 ~ let amount = vec[idx] [INFO] [stdout] 25 + .chars() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> src/day_13/mirror.rs:27:22 [INFO] [stdout] | [INFO] [stdout] 27 | .zip(vec[idx - 1].chars().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/iterator.rs:629:11 [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] help: consider removing the `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 27 - .zip(vec[idx - 1].chars().into_iter()) [INFO] [stdout] 27 + .zip(vec[idx - 1].chars()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::str::Chars<'_>` [INFO] [stdout] --> src/day_13/mirror.rs:48:34 [INFO] [stdout] | [INFO] [stdout] 48 | let amount = vec[idx + off] [INFO] [stdout] | __________________________________^ [INFO] [stdout] 49 | | .chars() [INFO] [stdout] 50 | | .into_iter() [INFO] [stdout] | |____________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] help: consider removing `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 48 ~ let amount = vec[idx + off] [INFO] [stdout] 49 + .chars() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> src/day_13/mirror.rs:51:30 [INFO] [stdout] | [INFO] [stdout] 51 | .zip(vec[idx - off - 1].chars().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/iterator.rs:629:11 [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] help: consider removing the `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 51 - .zip(vec[idx - off - 1].chars().into_iter()) [INFO] [stdout] 51 + .zip(vec[idx - off - 1].chars()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is only used to index `matrix` [INFO] [stdout] --> src/day_14/reflect.rs:51:14 [INFO] [stdout] | [INFO] [stdout] 51 | for j in 0..INPUT_SIZE { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 51 - for j in 0..INPUT_SIZE { [INFO] [stdout] 51 + for in matrix.iter_mut().take(INPUT_SIZE) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is only used to index `matrix` [INFO] [stdout] --> src/day_14/reflect.rs:79:14 [INFO] [stdout] | [INFO] [stdout] 79 | for j in 0..INPUT_SIZE { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 79 - for j in 0..INPUT_SIZE { [INFO] [stdout] 79 + for in matrix.iter_mut().take(INPUT_SIZE) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `matrix` [INFO] [stdout] --> src/day_14/reflect.rs:107:14 [INFO] [stdout] | [INFO] [stdout] 107 | for i in 0..INPUT_SIZE { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 107 - for i in 0..INPUT_SIZE { [INFO] [stdout] 107 + for in matrix.iter_mut().take(INPUT_SIZE) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `matrix` [INFO] [stdout] --> src/day_14/reflect.rs:136:14 [INFO] [stdout] | [INFO] [stdout] 136 | for i in 0..INPUT_SIZE { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 136 - for i in 0..INPUT_SIZE { [INFO] [stdout] 136 + for in matrix.iter_mut().take(INPUT_SIZE) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is only used to index `matrix` [INFO] [stdout] --> src/day_14/reflect.rs:51:14 [INFO] [stdout] | [INFO] [stdout] 51 | for j in 0..INPUT_SIZE { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 51 - for j in 0..INPUT_SIZE { [INFO] [stdout] 51 + for in matrix.iter_mut().take(INPUT_SIZE) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is only used to index `matrix` [INFO] [stdout] --> src/day_14/reflect.rs:79:14 [INFO] [stdout] | [INFO] [stdout] 79 | for j in 0..INPUT_SIZE { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 79 - for j in 0..INPUT_SIZE { [INFO] [stdout] 79 + for in matrix.iter_mut().take(INPUT_SIZE) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `loc` after checking its variant with `is_some` [INFO] [stdout] --> src/day_15/hash.rs:61:56 [INFO] [stdout] | [INFO] [stdout] 58 | if loc.is_some() { [INFO] [stdout] | ---------------- help: try: `if let Some() = loc` [INFO] [stdout] ... [INFO] [stdout] 61 | boxes[item.box_id as usize].remove(loc.unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `loc` after checking its variant with `is_some` [INFO] [stdout] --> src/day_15/hash.rs:64:49 [INFO] [stdout] | [INFO] [stdout] 58 | if loc.is_some() { [INFO] [stdout] | ---------------- help: try: `if let Some() = loc` [INFO] [stdout] ... [INFO] [stdout] 64 | boxes[item.box_id as usize][loc.unwrap()] = (item.tag, x); [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `val` after checking its variant with `is_some` [INFO] [stdout] --> src/day_15/hash.rs:70:61 [INFO] [stdout] | [INFO] [stdout] 69 | if val.is_some() { [INFO] [stdout] | ---------------- help: try: `if let Some() = val` [INFO] [stdout] 70 | boxes[item.box_id as usize].push((item.tag, val.unwrap())); [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/day_15/hash.rs:32:38 [INFO] [stdout] | [INFO] [stdout] 32 | .map(|line| generate_HASHMAP(*line)) [INFO] [stdout] | ^^^^^ help: try: `line` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] = note: `#[warn(clippy::explicit_auto_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `matrix` [INFO] [stdout] --> src/day_14/reflect.rs:107:14 [INFO] [stdout] | [INFO] [stdout] 107 | for i in 0..INPUT_SIZE { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 107 - for i in 0..INPUT_SIZE { [INFO] [stdout] 107 + for in matrix.iter_mut().take(INPUT_SIZE) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/day_15/hash.rs:55:37 [INFO] [stdout] | [INFO] [stdout] 55 | .filter(|(_, (tag, _))| tag.to_owned() == item.tag) [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `*tag` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] = note: `#[warn(clippy::cmp_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `matrix` [INFO] [stdout] --> src/day_14/reflect.rs:136:14 [INFO] [stdout] | [INFO] [stdout] 136 | for i in 0..INPUT_SIZE { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 136 - for i in 0..INPUT_SIZE { [INFO] [stdout] 136 + for in matrix.iter_mut().take(INPUT_SIZE) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `loc` after checking its variant with `is_some` [INFO] [stdout] --> src/day_15/hash.rs:61:56 [INFO] [stdout] | [INFO] [stdout] 58 | if loc.is_some() { [INFO] [stdout] | ---------------- help: try: `if let Some() = loc` [INFO] [stdout] ... [INFO] [stdout] 61 | boxes[item.box_id as usize].remove(loc.unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `loc` after checking its variant with `is_some` [INFO] [stdout] --> src/day_15/hash.rs:64:49 [INFO] [stdout] | [INFO] [stdout] 58 | if loc.is_some() { [INFO] [stdout] | ---------------- help: try: `if let Some() = loc` [INFO] [stdout] ... [INFO] [stdout] 64 | boxes[item.box_id as usize][loc.unwrap()] = (item.tag, x); [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `val` after checking its variant with `is_some` [INFO] [stdout] --> src/day_15/hash.rs:70:61 [INFO] [stdout] | [INFO] [stdout] 69 | if val.is_some() { [INFO] [stdout] | ---------------- help: try: `if let Some() = val` [INFO] [stdout] 70 | boxes[item.box_id as usize].push((item.tag, val.unwrap())); [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/day_15/hash.rs:32:38 [INFO] [stdout] | [INFO] [stdout] 32 | .map(|line| generate_HASHMAP(*line)) [INFO] [stdout] | ^^^^^ help: try: `line` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] = note: `#[warn(clippy::explicit_auto_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to pop elements from a `Vec` in a loop [INFO] [stdout] --> src/day_16/lava.rs:36:9 [INFO] [stdout] | [INFO] [stdout] 36 | let start = list_of_starts.pop().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_while_let_some [INFO] [stdout] = note: `#[warn(clippy::manual_while_let_some)]` on by default [INFO] [stdout] help: consider using a `while..let` loop [INFO] [stdout] | [INFO] [stdout] 35 ~ while let Some(start) = list_of_starts.pop() { [INFO] [stdout] 36 ~ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/day_15/hash.rs:55:37 [INFO] [stdout] | [INFO] [stdout] 55 | .filter(|(_, (tag, _))| tag.to_owned() == item.tag) [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `*tag` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] = note: `#[warn(clippy::cmp_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/day_16/lava.rs:50:13 [INFO] [stdout] | [INFO] [stdout] 50 | / match items { [INFO] [stdout] 51 | | Some(tup) => { [INFO] [stdout] 52 | | match tup.0 { [INFO] [stdout] 53 | | Some((loc, direction)) => { [INFO] [stdout] ... | [INFO] [stdout] 73 | | _ => {} [INFO] [stdout] 74 | | } [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] 50 ~ if let Some(tup) = items { [INFO] [stdout] 51 + match tup.0 { [INFO] [stdout] 52 + Some((loc, direction)) => { [INFO] [stdout] 53 + let pos_pos = send_beam(loc, &direction, &matrix, &mut energized); [INFO] [stdout] 54 + if !seen_start.contains(&pos_pos) { [INFO] [stdout] 55 + seen_start.insert(pos_pos.clone()); [INFO] [stdout] 56 + locations.push(pos_pos); [INFO] [stdout] 57 + } [INFO] [stdout] 58 + } [INFO] [stdout] 59 + _ => {} [INFO] [stdout] 60 + } [INFO] [stdout] 61 + match tup.1 { [INFO] [stdout] 62 + Some((loc, direction)) => { [INFO] [stdout] 63 + let pos_pos = send_beam(loc, &direction, &matrix, &mut energized); [INFO] [stdout] 64 + if !seen_start.contains(&pos_pos) { [INFO] [stdout] 65 + seen_start.insert(pos_pos.clone()); [INFO] [stdout] 66 + locations.push(pos_pos); [INFO] [stdout] 67 + } [INFO] [stdout] 68 + } [INFO] [stdout] 69 + _ => {} [INFO] [stdout] 70 + } [INFO] [stdout] 71 + } [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/day_16/lava.rs:52:21 [INFO] [stdout] | [INFO] [stdout] 52 | / match tup.0 { [INFO] [stdout] 53 | | Some((loc, direction)) => { [INFO] [stdout] 54 | | let pos_pos = send_beam(loc, &direction, &matrix, &mut energized); [INFO] [stdout] 55 | | if !seen_start.contains(&pos_pos) { [INFO] [stdout] ... | [INFO] [stdout] 60 | | _ => {} [INFO] [stdout] 61 | | } [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] 52 ~ if let Some((loc, direction)) = tup.0 { [INFO] [stdout] 53 + let pos_pos = send_beam(loc, &direction, &matrix, &mut energized); [INFO] [stdout] 54 + if !seen_start.contains(&pos_pos) { [INFO] [stdout] 55 + seen_start.insert(pos_pos.clone()); [INFO] [stdout] 56 + locations.push(pos_pos); [INFO] [stdout] 57 + } [INFO] [stdout] 58 + } [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/day_16/lava.rs:62:21 [INFO] [stdout] | [INFO] [stdout] 62 | / match tup.1 { [INFO] [stdout] 63 | | Some((loc, direction)) => { [INFO] [stdout] 64 | | let pos_pos = send_beam(loc, &direction, &matrix, &mut energized); [INFO] [stdout] 65 | | if !seen_start.contains(&pos_pos) { [INFO] [stdout] ... | [INFO] [stdout] 70 | | _ => {} [INFO] [stdout] 71 | | } [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] 62 ~ if let Some((loc, direction)) = tup.1 { [INFO] [stdout] 63 + let pos_pos = send_beam(loc, &direction, &matrix, &mut energized); [INFO] [stdout] 64 + if !seen_start.contains(&pos_pos) { [INFO] [stdout] 65 + seen_start.insert(pos_pos.clone()); [INFO] [stdout] 66 + locations.push(pos_pos); [INFO] [stdout] 67 + } [INFO] [stdout] 68 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/day_16/lava.rs:105:6 [INFO] [stdout] | [INFO] [stdout] 105 | ) -> Option<( [INFO] [stdout] | ______^ [INFO] [stdout] 106 | | Option<((usize, usize), CardinalDirection)>, [INFO] [stdout] 107 | | Option<((usize, usize), CardinalDirection)>, [INFO] [stdout] 108 | | )> { [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: called `unwrap` on `new_loc` after checking its variant with `is_some` [INFO] [stdout] --> src/day_16/lava.rs:163:23 [INFO] [stdout] | [INFO] [stdout] 162 | if new_loc.is_some() { [INFO] [stdout] | -------------------- help: try: `if let Some() = new_loc` [INFO] [stdout] 163 | energized[new_loc.unwrap().0][new_loc.unwrap().1] = '#'; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `new_loc` after checking its variant with `is_some` [INFO] [stdout] --> src/day_16/lava.rs:163:43 [INFO] [stdout] | [INFO] [stdout] 162 | if new_loc.is_some() { [INFO] [stdout] | -------------------- help: try: `if let Some() = new_loc` [INFO] [stdout] 163 | energized[new_loc.unwrap().0][new_loc.unwrap().1] = '#'; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `new_loc` after checking its variant with `is_some` [INFO] [stdout] --> src/day_16/lava.rs:164:24 [INFO] [stdout] | [INFO] [stdout] 162 | if new_loc.is_some() { [INFO] [stdout] | -------------------- help: try: `if let Some() = new_loc` [INFO] [stdout] 163 | energized[new_loc.unwrap().0][new_loc.unwrap().1] = '#'; [INFO] [stdout] 164 | next_loc = new_loc.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `new_loc` after checking its variant with `is_some` [INFO] [stdout] --> src/day_16/lava.rs:165:26 [INFO] [stdout] | [INFO] [stdout] 162 | if new_loc.is_some() { [INFO] [stdout] | -------------------- help: try: `if let Some() = new_loc` [INFO] [stdout] ... [INFO] [stdout] 165 | match matrix[new_loc.unwrap().0][new_loc.unwrap().1] { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `new_loc` after checking its variant with `is_some` [INFO] [stdout] --> src/day_16/lava.rs:165:46 [INFO] [stdout] | [INFO] [stdout] 162 | if new_loc.is_some() { [INFO] [stdout] | -------------------- help: try: `if let Some() = new_loc` [INFO] [stdout] ... [INFO] [stdout] 165 | match matrix[new_loc.unwrap().0][new_loc.unwrap().1] { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `new_loc` after checking its variant with `is_some` [INFO] [stdout] --> src/day_16/lava.rs:169:35 [INFO] [stdout] | [INFO] [stdout] 162 | if new_loc.is_some() { [INFO] [stdout] | -------------------- help: try: `if let Some() = new_loc` [INFO] [stdout] ... [INFO] [stdout] 169 | energized[new_loc.unwrap().0][new_loc.unwrap().1] = '#'; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `new_loc` after checking its variant with `is_some` [INFO] [stdout] --> src/day_16/lava.rs:169:55 [INFO] [stdout] | [INFO] [stdout] 162 | if new_loc.is_some() { [INFO] [stdout] | -------------------- help: try: `if let Some() = new_loc` [INFO] [stdout] ... [INFO] [stdout] 169 | energized[new_loc.unwrap().0][new_loc.unwrap().1] = '#'; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to pop elements from a `Vec` in a loop [INFO] [stdout] --> src/day_16/lava.rs:36:9 [INFO] [stdout] | [INFO] [stdout] 36 | let start = list_of_starts.pop().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_while_let_some [INFO] [stdout] = note: `#[warn(clippy::manual_while_let_some)]` on by default [INFO] [stdout] help: consider using a `while..let` loop [INFO] [stdout] | [INFO] [stdout] 35 ~ while let Some(start) = list_of_starts.pop() { [INFO] [stdout] 36 ~ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `new_loc` after checking its variant with `is_some` [INFO] [stdout] --> src/day_16/lava.rs:186:35 [INFO] [stdout] | [INFO] [stdout] 162 | if new_loc.is_some() { [INFO] [stdout] | -------------------- help: try: `if let Some() = new_loc` [INFO] [stdout] ... [INFO] [stdout] 186 | energized[new_loc.unwrap().0][new_loc.unwrap().1] = '#'; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `new_loc` after checking its variant with `is_some` [INFO] [stdout] --> src/day_16/lava.rs:186:55 [INFO] [stdout] | [INFO] [stdout] 162 | if new_loc.is_some() { [INFO] [stdout] | -------------------- help: try: `if let Some() = new_loc` [INFO] [stdout] ... [INFO] [stdout] 186 | energized[new_loc.unwrap().0][new_loc.unwrap().1] = '#'; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [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/day_16/lava.rs:50:13 [INFO] [stdout] | [INFO] [stdout] 50 | / match items { [INFO] [stdout] 51 | | Some(tup) => { [INFO] [stdout] 52 | | match tup.0 { [INFO] [stdout] 53 | | Some((loc, direction)) => { [INFO] [stdout] ... | [INFO] [stdout] 73 | | _ => {} [INFO] [stdout] 74 | | } [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] 50 ~ if let Some(tup) = items { [INFO] [stdout] 51 + match tup.0 { [INFO] [stdout] 52 + Some((loc, direction)) => { [INFO] [stdout] 53 + let pos_pos = send_beam(loc, &direction, &matrix, &mut energized); [INFO] [stdout] 54 + if !seen_start.contains(&pos_pos) { [INFO] [stdout] 55 + seen_start.insert(pos_pos.clone()); [INFO] [stdout] 56 + locations.push(pos_pos); [INFO] [stdout] 57 + } [INFO] [stdout] 58 + } [INFO] [stdout] 59 + _ => {} [INFO] [stdout] 60 + } [INFO] [stdout] 61 + match tup.1 { [INFO] [stdout] 62 + Some((loc, direction)) => { [INFO] [stdout] 63 + let pos_pos = send_beam(loc, &direction, &matrix, &mut energized); [INFO] [stdout] 64 + if !seen_start.contains(&pos_pos) { [INFO] [stdout] 65 + seen_start.insert(pos_pos.clone()); [INFO] [stdout] 66 + locations.push(pos_pos); [INFO] [stdout] 67 + } [INFO] [stdout] 68 + } [INFO] [stdout] 69 + _ => {} [INFO] [stdout] 70 + } [INFO] [stdout] 71 + } [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/day_16/lava.rs:52:21 [INFO] [stdout] | [INFO] [stdout] 52 | / match tup.0 { [INFO] [stdout] 53 | | Some((loc, direction)) => { [INFO] [stdout] 54 | | let pos_pos = send_beam(loc, &direction, &matrix, &mut energized); [INFO] [stdout] 55 | | if !seen_start.contains(&pos_pos) { [INFO] [stdout] ... | [INFO] [stdout] 60 | | _ => {} [INFO] [stdout] 61 | | } [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] 52 ~ if let Some((loc, direction)) = tup.0 { [INFO] [stdout] 53 + let pos_pos = send_beam(loc, &direction, &matrix, &mut energized); [INFO] [stdout] 54 + if !seen_start.contains(&pos_pos) { [INFO] [stdout] 55 + seen_start.insert(pos_pos.clone()); [INFO] [stdout] 56 + locations.push(pos_pos); [INFO] [stdout] 57 + } [INFO] [stdout] 58 + } [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/day_16/lava.rs:62:21 [INFO] [stdout] | [INFO] [stdout] 62 | / match tup.1 { [INFO] [stdout] 63 | | Some((loc, direction)) => { [INFO] [stdout] 64 | | let pos_pos = send_beam(loc, &direction, &matrix, &mut energized); [INFO] [stdout] 65 | | if !seen_start.contains(&pos_pos) { [INFO] [stdout] ... | [INFO] [stdout] 70 | | _ => {} [INFO] [stdout] 71 | | } [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] 62 ~ if let Some((loc, direction)) = tup.1 { [INFO] [stdout] 63 + let pos_pos = send_beam(loc, &direction, &matrix, &mut energized); [INFO] [stdout] 64 + if !seen_start.contains(&pos_pos) { [INFO] [stdout] 65 + seen_start.insert(pos_pos.clone()); [INFO] [stdout] 66 + locations.push(pos_pos); [INFO] [stdout] 67 + } [INFO] [stdout] 68 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/day_16/lava.rs:105:6 [INFO] [stdout] | [INFO] [stdout] 105 | ) -> Option<( [INFO] [stdout] | ______^ [INFO] [stdout] 106 | | Option<((usize, usize), CardinalDirection)>, [INFO] [stdout] 107 | | Option<((usize, usize), CardinalDirection)>, [INFO] [stdout] 108 | | )> { [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: called `unwrap` on `new_loc` after checking its variant with `is_some` [INFO] [stdout] --> src/day_16/lava.rs:163:23 [INFO] [stdout] | [INFO] [stdout] 162 | if new_loc.is_some() { [INFO] [stdout] | -------------------- help: try: `if let Some() = new_loc` [INFO] [stdout] 163 | energized[new_loc.unwrap().0][new_loc.unwrap().1] = '#'; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `new_loc` after checking its variant with `is_some` [INFO] [stdout] --> src/day_16/lava.rs:163:43 [INFO] [stdout] | [INFO] [stdout] 162 | if new_loc.is_some() { [INFO] [stdout] | -------------------- help: try: `if let Some() = new_loc` [INFO] [stdout] 163 | energized[new_loc.unwrap().0][new_loc.unwrap().1] = '#'; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `new_loc` after checking its variant with `is_some` [INFO] [stdout] --> src/day_16/lava.rs:164:24 [INFO] [stdout] | [INFO] [stdout] 162 | if new_loc.is_some() { [INFO] [stdout] | -------------------- help: try: `if let Some() = new_loc` [INFO] [stdout] 163 | energized[new_loc.unwrap().0][new_loc.unwrap().1] = '#'; [INFO] [stdout] 164 | next_loc = new_loc.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `new_loc` after checking its variant with `is_some` [INFO] [stdout] --> src/day_16/lava.rs:165:26 [INFO] [stdout] | [INFO] [stdout] 162 | if new_loc.is_some() { [INFO] [stdout] | -------------------- help: try: `if let Some() = new_loc` [INFO] [stdout] ... [INFO] [stdout] 165 | match matrix[new_loc.unwrap().0][new_loc.unwrap().1] { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `new_loc` after checking its variant with `is_some` [INFO] [stdout] --> src/day_16/lava.rs:165:46 [INFO] [stdout] | [INFO] [stdout] 162 | if new_loc.is_some() { [INFO] [stdout] | -------------------- help: try: `if let Some() = new_loc` [INFO] [stdout] ... [INFO] [stdout] 165 | match matrix[new_loc.unwrap().0][new_loc.unwrap().1] { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `new_loc` after checking its variant with `is_some` [INFO] [stdout] --> src/day_16/lava.rs:169:35 [INFO] [stdout] | [INFO] [stdout] 162 | if new_loc.is_some() { [INFO] [stdout] | -------------------- help: try: `if let Some() = new_loc` [INFO] [stdout] ... [INFO] [stdout] 169 | energized[new_loc.unwrap().0][new_loc.unwrap().1] = '#'; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `new_loc` after checking its variant with `is_some` [INFO] [stdout] --> src/day_16/lava.rs:169:55 [INFO] [stdout] | [INFO] [stdout] 162 | if new_loc.is_some() { [INFO] [stdout] | -------------------- help: try: `if let Some() = new_loc` [INFO] [stdout] ... [INFO] [stdout] 169 | energized[new_loc.unwrap().0][new_loc.unwrap().1] = '#'; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `new_loc` after checking its variant with `is_some` [INFO] [stdout] --> src/day_16/lava.rs:186:35 [INFO] [stdout] | [INFO] [stdout] 162 | if new_loc.is_some() { [INFO] [stdout] | -------------------- help: try: `if let Some() = new_loc` [INFO] [stdout] ... [INFO] [stdout] 186 | energized[new_loc.unwrap().0][new_loc.unwrap().1] = '#'; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `new_loc` after checking its variant with `is_some` [INFO] [stdout] --> src/day_16/lava.rs:186:55 [INFO] [stdout] | [INFO] [stdout] 162 | if new_loc.is_some() { [INFO] [stdout] | -------------------- help: try: `if let Some() = new_loc` [INFO] [stdout] ... [INFO] [stdout] 186 | energized[new_loc.unwrap().0][new_loc.unwrap().1] = '#'; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/day_2/val_games.rs:94:21 [INFO] [stdout] | [INFO] [stdout] 94 | / if cub.red < nr { [INFO] [stdout] 95 | | cub.red = nr [INFO] [stdout] 96 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 93 ~ "red" [INFO] [stdout] 94 ~ if cub.red < nr => { [INFO] [stdout] 95 | cub.red = nr [INFO] [stdout] 96 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/day_2/val_games.rs:99:21 [INFO] [stdout] | [INFO] [stdout] 99 | / if cub.green < nr { [INFO] [stdout] 100 | | cub.green = nr [INFO] [stdout] 101 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 98 ~ "green" [INFO] [stdout] 99 ~ if cub.green < nr => { [INFO] [stdout] 100 | cub.green = nr [INFO] [stdout] 101 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/day_2/val_games.rs:104:21 [INFO] [stdout] | [INFO] [stdout] 104 | / if cub.blue < nr { [INFO] [stdout] 105 | | cub.blue = nr [INFO] [stdout] 106 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 103 ~ "blue" [INFO] [stdout] 104 ~ if cub.blue < nr => { [INFO] [stdout] 105 | cub.blue = nr [INFO] [stdout] 106 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: importing legacy numeric constants [INFO] [stdout] --> src/day_3/engine.rs:1:15 [INFO] [stdout] | [INFO] [stdout] 1 | use std::{fs, usize}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `usize::` will resolve to the respective associated constant [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/day_2/val_games.rs:94:21 [INFO] [stdout] | [INFO] [stdout] 94 | / if cub.red < nr { [INFO] [stdout] 95 | | cub.red = nr [INFO] [stdout] 96 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 93 ~ "red" [INFO] [stdout] 94 ~ if cub.red < nr => { [INFO] [stdout] 95 | cub.red = nr [INFO] [stdout] 96 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/day_2/val_games.rs:99:21 [INFO] [stdout] | [INFO] [stdout] 99 | / if cub.green < nr { [INFO] [stdout] 100 | | cub.green = nr [INFO] [stdout] 101 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 98 ~ "green" [INFO] [stdout] 99 ~ if cub.green < nr => { [INFO] [stdout] 100 | cub.green = nr [INFO] [stdout] 101 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/day_2/val_games.rs:104:21 [INFO] [stdout] | [INFO] [stdout] 104 | / if cub.blue < nr { [INFO] [stdout] 105 | | cub.blue = nr [INFO] [stdout] 106 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 103 ~ "blue" [INFO] [stdout] 104 ~ if cub.blue < nr => { [INFO] [stdout] 105 | cub.blue = nr [INFO] [stdout] 106 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: importing legacy numeric constants [INFO] [stdout] --> src/day_3/engine.rs:1:15 [INFO] [stdout] | [INFO] [stdout] 1 | use std::{fs, usize}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `usize::` will resolve to the respective associated constant [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `may_need` after checking its variant with `is_some` [INFO] [stdout] --> src/day_7/poker.rs:100:29 [INFO] [stdout] | [INFO] [stdout] 96 | if may_need.is_some() { [INFO] [stdout] | --------------------- help: try: `if let Some() = may_need` [INFO] [stdout] ... [INFO] [stdout] 100 | som[0].1 += may_need.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `may_need` after checking its variant with `is_some` [INFO] [stdout] --> src/day_7/poker.rs:100:29 [INFO] [stdout] | [INFO] [stdout] 96 | if may_need.is_some() { [INFO] [stdout] | --------------------- help: try: `if let Some() = may_need` [INFO] [stdout] ... [INFO] [stdout] 100 | som[0].1 += may_need.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `setUP` should have a snake case name [INFO] [stdout] --> src/day_12/spring.rs:122:17 [INFO] [stdout] | [INFO] [stdout] 122 | let mut setUP = self.condition.clone(); [INFO] [stdout] | ^^^^^ help: convert the identifier to snake case: `set_up` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` (part of `#[warn(nonstandard_style)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `generate_HASHMAP` should have a snake case name [INFO] [stdout] --> src/day_15/hash.rs:98:4 [INFO] [stdout] | [INFO] [stdout] 98 | fn generate_HASHMAP(seq: &str) -> AdvHashMap { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `generate_hashmap` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `setUP` should have a snake case name [INFO] [stdout] --> src/day_12/spring.rs:122:17 [INFO] [stdout] | [INFO] [stdout] 122 | let mut setUP = self.condition.clone(); [INFO] [stdout] | ^^^^^ help: convert the identifier to snake case: `set_up` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` (part of `#[warn(nonstandard_style)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `generate_HASHMAP` should have a snake case name [INFO] [stdout] --> src/day_15/hash.rs:98:4 [INFO] [stdout] | [INFO] [stdout] 98 | fn generate_HASHMAP(seq: &str) -> AdvHashMap { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `generate_hashmap` [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 3.69s [INFO] running `Command { std: "docker" "inspect" "ef96668a836881dfb5d0dbcb7f1a0fd62f0ed1f29ecca6db4da077fdc82ff924", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "ef96668a836881dfb5d0dbcb7f1a0fd62f0ed1f29ecca6db4da077fdc82ff924", kill_on_drop: false }` [INFO] [stdout] ef96668a836881dfb5d0dbcb7f1a0fd62f0ed1f29ecca6db4da077fdc82ff924