[INFO] cloning repository https://github.com/yanbonnel/aoc-2021 [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/yanbonnel/aoc-2021" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fyanbonnel%2Faoc-2021", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fyanbonnel%2Faoc-2021'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] d501bff53f4ecbbd5958b051cb6b1007f871938a [INFO] linting yanbonnel/aoc-2021 against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fyanbonnel%2Faoc-2021" "/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/yanbonnel/aoc-2021 [INFO] finished tweaking git repo https://github.com/yanbonnel/aoc-2021 [INFO] tweaked toml for git repo https://github.com/yanbonnel/aoc-2021 written to /workspace/builds/worker-2-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/yanbonnel/aoc-2021 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/yanbonnel/aoc-2021 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] 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] 301277a0b5e088d379bff453152ea9694679b0c572632404461971635527acb4 [INFO] running `Command { std: "docker" "start" "-a" "301277a0b5e088d379bff453152ea9694679b0c572632404461971635527acb4", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "301277a0b5e088d379bff453152ea9694679b0c572632404461971635527acb4", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "301277a0b5e088d379bff453152ea9694679b0c572632404461971635527acb4", kill_on_drop: false }` [INFO] [stdout] 301277a0b5e088d379bff453152ea9694679b0c572632404461971635527acb4 [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] 8cc058b9fdb6617f62a3ea4b3f90682f5dece37f5b0e3b089ab4958e3bb9f940 [INFO] running `Command { std: "docker" "start" "-a" "8cc058b9fdb6617f62a3ea4b3f90682f5dece37f5b0e3b089ab4958e3bb9f940", kill_on_drop: false }` [INFO] [stderr] Checking adventofcode v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `HashSet` [INFO] [stdout] --> src/day6.rs:1:24 [INFO] [stdout] | [INFO] [stdout] 1 | use std::collections::{HashSet, HashMap}; [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::day3::pow2` [INFO] [stdout] --> src/day8.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use crate::day3::pow2; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::HashMap` [INFO] [stdout] --> src/day11.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::collections::HashMap; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `HashSet` [INFO] [stdout] --> src/day14.rs:1:24 [INFO] [stdout] | [INFO] [stdout] 1 | use std::collections::{HashSet, HashMap}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around assigned value [INFO] [stdout] --> src/day14.rs:77:24 [INFO] [stdout] | [INFO] [stdout] 77 | let step1_result = (*most_common - *less_common); [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] 77 - let step1_result = (*most_common - *less_common); [INFO] [stdout] 77 + let step1_result = *most_common - *less_common ; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `HashSet` [INFO] [stdout] --> src/day15.rs:1:24 [INFO] [stdout] | [INFO] [stdout] 1 | use std::collections::{HashSet, HashMap}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::cmp::max` [INFO] [stdout] --> src/day19.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::cmp::max; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::cmp::max` [INFO] [stdout] --> src/day20.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::cmp::max; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `HashMap` and `HashSet` [INFO] [stdout] --> src/day20.rs:2:24 [INFO] [stdout] | [INFO] [stdout] 2 | use std::collections::{HashMap, HashSet}; [INFO] [stdout] | ^^^^^^^ ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::cmp::max` [INFO] [stdout] --> src/day21.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::cmp::max; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `HashSet` [INFO] [stdout] --> src/day21.rs:2:33 [INFO] [stdout] | [INFO] [stdout] 2 | use std::collections::{HashMap, HashSet}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around closure body [INFO] [stdout] --> src/day21.rs:149:54 [INFO] [stdout] | [INFO] [stdout] 149 | let players_win = boards.into_iter().map(|board| ( [INFO] [stdout] | _______________________________________________________^ [INFO] [stdout] 150 | | (board.players.iter().find(|player| player.score >= 21).unwrap().id, board.count) [INFO] [stdout] | | ________^_________________________________________________________________________________^ [INFO] [stdout] | ||________| [INFO] [stdout] | | [INFO] [stdout] 151 | | )).fold(HashMap::new(), |mut acc: HashMap, (id, count)| { [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 149 - let players_win = boards.into_iter().map(|board| ( [INFO] [stdout] 150 - (board.players.iter().find(|player| player.score >= 21).unwrap().id, board.count) [INFO] [stdout] 151 - )).fold(HashMap::new(), |mut acc: HashMap, (id, count)| { [INFO] [stdout] 149 + let players_win = boards.into_iter().map(|board| (board.players.iter().find(|player| player.score >= 21).unwrap().id, board.count) ).fold(HashMap::new(), |mut acc: HashMap, (id, count)| { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses [INFO] [stdout] --> src/day21.rs:149:54 [INFO] [stdout] | [INFO] [stdout] 149 | let players_win = boards.into_iter().map(|board| ( [INFO] [stdout] | ______________________________________________________^ [INFO] [stdout] 150 | | (board.players.iter().find(|player| player.score >= 21).unwrap().id, board.count) [INFO] [stdout] 151 | | )).fold(HashMap::new(), |mut acc: HashMap, (id, count)| { [INFO] [stdout] | |_____^ help: remove them: `(board.players.iter().find(|player| player.score >= 21).unwrap().id, board.count)` [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: unused import: `HashMap` [INFO] [stdout] --> src/day22.rs:2:24 [INFO] [stdout] | [INFO] [stdout] 2 | use std::collections::{HashMap, HashSet}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `HashSet` [INFO] [stdout] --> src/day6.rs:1:24 [INFO] [stdout] | [INFO] [stdout] 1 | use std::collections::{HashSet, HashMap}; [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::day3::pow2` [INFO] [stdout] --> src/day8.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use crate::day3::pow2; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::HashMap` [INFO] [stdout] --> src/day11.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::collections::HashMap; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `HashSet` [INFO] [stdout] --> src/day14.rs:1:24 [INFO] [stdout] | [INFO] [stdout] 1 | use std::collections::{HashSet, HashMap}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around assigned value [INFO] [stdout] --> src/day14.rs:77:24 [INFO] [stdout] | [INFO] [stdout] 77 | let step1_result = (*most_common - *less_common); [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] 77 - let step1_result = (*most_common - *less_common); [INFO] [stdout] 77 + let step1_result = *most_common - *less_common ; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `HashSet` [INFO] [stdout] --> src/day15.rs:1:24 [INFO] [stdout] | [INFO] [stdout] 1 | use std::collections::{HashSet, HashMap}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::cmp::max` [INFO] [stdout] --> src/day19.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::cmp::max; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::cmp::max` [INFO] [stdout] --> src/day20.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::cmp::max; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `HashMap` and `HashSet` [INFO] [stdout] --> src/day20.rs:2:24 [INFO] [stdout] | [INFO] [stdout] 2 | use std::collections::{HashMap, HashSet}; [INFO] [stdout] | ^^^^^^^ ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::cmp::max` [INFO] [stdout] --> src/day21.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::cmp::max; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `HashSet` [INFO] [stdout] --> src/day21.rs:2:33 [INFO] [stdout] | [INFO] [stdout] 2 | use std::collections::{HashMap, HashSet}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around closure body [INFO] [stdout] --> src/day21.rs:149:54 [INFO] [stdout] | [INFO] [stdout] 149 | let players_win = boards.into_iter().map(|board| ( [INFO] [stdout] | _______________________________________________________^ [INFO] [stdout] 150 | | (board.players.iter().find(|player| player.score >= 21).unwrap().id, board.count) [INFO] [stdout] | | ________^_________________________________________________________________________________^ [INFO] [stdout] | ||________| [INFO] [stdout] | | [INFO] [stdout] 151 | | )).fold(HashMap::new(), |mut acc: HashMap, (id, count)| { [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 149 - let players_win = boards.into_iter().map(|board| ( [INFO] [stdout] 150 - (board.players.iter().find(|player| player.score >= 21).unwrap().id, board.count) [INFO] [stdout] 151 - )).fold(HashMap::new(), |mut acc: HashMap, (id, count)| { [INFO] [stdout] 149 + let players_win = boards.into_iter().map(|board| (board.players.iter().find(|player| player.score >= 21).unwrap().id, board.count) ).fold(HashMap::new(), |mut acc: HashMap, (id, count)| { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses [INFO] [stdout] --> src/day21.rs:149:54 [INFO] [stdout] | [INFO] [stdout] 149 | let players_win = boards.into_iter().map(|board| ( [INFO] [stdout] | ______________________________________________________^ [INFO] [stdout] 150 | | (board.players.iter().find(|player| player.score >= 21).unwrap().id, board.count) [INFO] [stdout] 151 | | )).fold(HashMap::new(), |mut acc: HashMap, (id, count)| { [INFO] [stdout] | |_____^ help: remove them: `(board.players.iter().find(|player| player.score >= 21).unwrap().id, board.count)` [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: unused import: `HashMap` [INFO] [stdout] --> src/day22.rs:2:24 [INFO] [stdout] | [INFO] [stdout] 2 | use std::collections::{HashMap, HashSet}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `item` [INFO] [stdout] --> src/day3.rs:7:28 [INFO] [stdout] | [INFO] [stdout] 7 | (0..pow).fold(1, |acc, item| [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_item` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `item` [INFO] [stdout] --> src/day3.rs:7:28 [INFO] [stdout] | [INFO] [stdout] 7 | (0..pow).fold(1, |acc, item| [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_item` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `inputs` [INFO] [stdout] --> src/day8.rs:70:13 [INFO] [stdout] | [INFO] [stdout] 70 | let inputs = input_output[0].trim(); [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_inputs` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `item` [INFO] [stdout] --> src/day8.rs:153:28 [INFO] [stdout] | [INFO] [stdout] 153 | (0..pow).fold(1, |acc, item| [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_item` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `inputs` [INFO] [stdout] --> src/day8.rs:70:13 [INFO] [stdout] | [INFO] [stdout] 70 | let inputs = input_output[0].trim(); [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_inputs` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `item` [INFO] [stdout] --> src/day8.rs:153:28 [INFO] [stdout] | [INFO] [stdout] 153 | (0..pow).fold(1, |acc, item| [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_item` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `score` [INFO] [stdout] --> src/day10.rs:78:26 [INFO] [stdout] | [INFO] [stdout] 78 | .filter(|(wrong, score)| !*wrong) [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_score` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `score` [INFO] [stdout] --> src/day10.rs:69:26 [INFO] [stdout] | [INFO] [stdout] 69 | .filter(|(wrong, score)| *wrong) [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_score` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `x` [INFO] [stdout] --> src/day11.rs:35:42 [INFO] [stdout] | [INFO] [stdout] 35 | line.iter().enumerate().filter(|(x, octopus)| octopus.must_flash).map(move |(x, _)| (x as i8, y as i8)) [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `score` [INFO] [stdout] --> src/day10.rs:78:26 [INFO] [stdout] | [INFO] [stdout] 78 | .filter(|(wrong, score)| !*wrong) [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_score` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `score` [INFO] [stdout] --> src/day10.rs:69:26 [INFO] [stdout] | [INFO] [stdout] 69 | .filter(|(wrong, score)| *wrong) [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_score` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `x` [INFO] [stdout] --> src/day11.rs:35:42 [INFO] [stdout] | [INFO] [stdout] 35 | line.iter().enumerate().filter(|(x, octopus)| octopus.must_flash).map(move |(x, _)| (x as i8, y as i8)) [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `x` [INFO] [stdout] --> src/day13.rs:60:33 [INFO] [stdout] | [INFO] [stdout] 60 | step2_fold.iter().map(|(x, y)| *y).max().unwrap() [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `y` [INFO] [stdout] --> src/day13.rs:59:36 [INFO] [stdout] | [INFO] [stdout] 59 | step2_fold.iter().map(|(x, y)| *x).max().unwrap(), [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `idx` [INFO] [stdout] --> src/day14.rs:23:88 [INFO] [stdout] | [INFO] [stdout] 23 | let mut pattern: HashMap<(char, char), u128> = pairs.into_iter().enumerate().map(|(idx, (c1, c2))| { [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_idx` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/day14.rs:63:9 [INFO] [stdout] | [INFO] [stdout] 63 | let mut result = pattern.iter().map(|((c1, c2), count)| { [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: `c1` [INFO] [stdout] --> src/day14.rs:63:44 [INFO] [stdout] | [INFO] [stdout] 63 | let mut result = pattern.iter().map(|((c1, c2), count)| { [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_c1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `x` [INFO] [stdout] --> src/day13.rs:60:33 [INFO] [stdout] | [INFO] [stdout] 60 | step2_fold.iter().map(|(x, y)| *y).max().unwrap() [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `y` [INFO] [stdout] --> src/day13.rs:59:36 [INFO] [stdout] | [INFO] [stdout] 59 | step2_fold.iter().map(|(x, y)| *x).max().unwrap(), [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `idx` [INFO] [stdout] --> src/day14.rs:23:88 [INFO] [stdout] | [INFO] [stdout] 23 | let mut pattern: HashMap<(char, char), u128> = pairs.into_iter().enumerate().map(|(idx, (c1, c2))| { [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_idx` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/day14.rs:63:9 [INFO] [stdout] | [INFO] [stdout] 63 | let mut result = pattern.iter().map(|((c1, c2), count)| { [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: `c1` [INFO] [stdout] --> src/day14.rs:63:44 [INFO] [stdout] | [INFO] [stdout] 63 | let mut result = pattern.iter().map(|((c1, c2), count)| { [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_c1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `has_splited` is never read [INFO] [stdout] --> src/day18.rs:210:13 [INFO] [stdout] | [INFO] [stdout] 210 | has_splited = false; [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 `has_splited` is never read [INFO] [stdout] --> src/day18.rs:210:13 [INFO] [stdout] | [INFO] [stdout] 210 | has_splited = false; [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: unused variable: `item` [INFO] [stdout] --> src/day19.rs:189:38 [INFO] [stdout] | [INFO] [stdout] 189 | distances.into_iter().find(|(item, counter)| *counter >= 12) [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_item` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `item` [INFO] [stdout] --> src/day19.rs:189:38 [INFO] [stdout] | [INFO] [stdout] 189 | distances.into_iter().find(|(item, counter)| *counter >= 12) [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_item` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `explored_scanner_id` [INFO] [stdout] --> src/day19.rs:213:14 [INFO] [stdout] | [INFO] [stdout] 213 | let (explored_scanner_id, scanner_id, rotate, dist) = (0..explored_scanners.len()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_explored_scanner_id` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `explored_scanner_id` [INFO] [stdout] --> src/day19.rs:213:14 [INFO] [stdout] | [INFO] [stdout] 213 | let (explored_scanner_id, scanner_id, rotate, dist) = (0..explored_scanners.len()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_explored_scanner_id` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/day21.rs:87:16 [INFO] [stdout] | [INFO] [stdout] 87 | pub fn execute(input: &str) { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/day21.rs:87:16 [INFO] [stdout] | [INFO] [stdout] 87 | pub fn execute(input: &str) { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `execute` is never used [INFO] [stdout] --> src/day1.rs:2:8 [INFO] [stdout] | [INFO] [stdout] 2 | pub fn execute() { [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 `nb_increase` is never used [INFO] [stdout] --> src/day1.rs:17:4 [INFO] [stdout] | [INFO] [stdout] 17 | fn nb_increase(values: &Vec) -> (i32, i32) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Action` is never used [INFO] [stdout] --> src/day2.rs:2:6 [INFO] [stdout] | [INFO] [stdout] 2 | enum Action { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse` is never used [INFO] [stdout] --> src/day2.rs:8:4 [INFO] [stdout] | [INFO] [stdout] 8 | fn parse(line: &str) -> Action { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `execute` is never used [INFO] [stdout] --> src/day2.rs:20:8 [INFO] [stdout] | [INFO] [stdout] 20 | pub fn execute(input: &str) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Counter` is never constructed [INFO] [stdout] --> src/day3.rs:2:8 [INFO] [stdout] | [INFO] [stdout] 2 | struct Counter { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `pow2` is never used [INFO] [stdout] --> src/day3.rs:6:8 [INFO] [stdout] | [INFO] [stdout] 6 | pub fn pow2(pow: usize) -> u32 { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `bits_to_dec` is never used [INFO] [stdout] --> src/day3.rs:12:8 [INFO] [stdout] | [INFO] [stdout] 12 | pub fn bits_to_dec(line: String) -> u32 { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `execute` is never used [INFO] [stdout] --> src/day3.rs:22:8 [INFO] [stdout] | [INFO] [stdout] 22 | pub fn execute(input: &str) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `count_cars` is never used [INFO] [stdout] --> src/day3.rs:73:4 [INFO] [stdout] | [INFO] [stdout] 73 | fn count_cars(values: &Vec, length: usize) -> Vec { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Number` is never constructed [INFO] [stdout] --> src/day4.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 4 | struct Number { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Board` is never constructed [INFO] [stdout] --> src/day4.rs:10:8 [INFO] [stdout] | [INFO] [stdout] 10 | struct Board { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `add_number`, `is_win`, and `score` are never used [INFO] [stdout] --> src/day4.rs:15:8 [INFO] [stdout] | [INFO] [stdout] 14 | impl Board { [INFO] [stdout] | ---------- associated items in this implementation [INFO] [stdout] 15 | fn new(lines: Vec) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 25 | fn add_number(&mut self, number: i32) { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 35 | fn is_win(&self) -> bool { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 41 | fn score(&self) -> i32 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `execute` is never used [INFO] [stdout] --> src/day4.rs:46:8 [INFO] [stdout] | [INFO] [stdout] 46 | pub fn execute(input: &str) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `play_step1` is never used [INFO] [stdout] --> src/day4.rs:73:4 [INFO] [stdout] | [INFO] [stdout] 73 | fn play_step1(numbers: &Vec, boards: &Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `play_step2` is never used [INFO] [stdout] --> src/day4.rs:85:4 [INFO] [stdout] | [INFO] [stdout] 85 | fn play_step2(numbers: &Vec, boards: &Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Wind` is never constructed [INFO] [stdout] --> src/day5.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 3 | struct Wind { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `is_only_hori_or_vert`, and `covert_points` are never used [INFO] [stdout] --> src/day5.rs:9:8 [INFO] [stdout] | [INFO] [stdout] 8 | impl Wind { [INFO] [stdout] | --------- associated items in this implementation [INFO] [stdout] 9 | fn new(line: String) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 23 | fn is_only_hori_or_vert(&self) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 29 | fn covert_points(&self) -> Vec<(i32, i32)> { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `execute` is never used [INFO] [stdout] --> src/day5.rs:59:8 [INFO] [stdout] | [INFO] [stdout] 59 | pub fn execute(input: &str) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Fish` is never constructed [INFO] [stdout] --> src/day6.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 4 | struct Fish { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `next` is never used [INFO] [stdout] --> src/day6.rs:10:8 [INFO] [stdout] | [INFO] [stdout] 9 | impl Fish { [INFO] [stdout] | --------- method in this implementation [INFO] [stdout] 10 | fn next(&self) -> Vec { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `reduce_fishes` is never used [INFO] [stdout] --> src/day6.rs:29:4 [INFO] [stdout] | [INFO] [stdout] 29 | fn reduce_fishes(fishes: Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `count_fishes` is never used [INFO] [stdout] --> src/day6.rs:45:4 [INFO] [stdout] | [INFO] [stdout] 45 | fn count_fishes(fishes: &Vec) -> u64 { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `execute` is never used [INFO] [stdout] --> src/day6.rs:51:8 [INFO] [stdout] | [INFO] [stdout] 51 | pub fn execute(input: &str) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Crab` is never constructed [INFO] [stdout] --> src/day7.rs:2:8 [INFO] [stdout] | [INFO] [stdout] 2 | struct Crab { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `fuel_needed` and `fuel_needed_2` are never used [INFO] [stdout] --> src/day7.rs:7:8 [INFO] [stdout] | [INFO] [stdout] 6 | impl Crab { [INFO] [stdout] | --------- methods in this implementation [INFO] [stdout] 7 | fn fuel_needed(&self, target: i32) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 10 | fn fuel_needed_2(&self, target: i32) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `execute` is never used [INFO] [stdout] --> src/day7.rs:18:8 [INFO] [stdout] | [INFO] [stdout] 18 | pub fn execute(input: &str) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `initial_mapping` is never used [INFO] [stdout] --> src/day8.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 4 | pub fn initial_mapping() -> HashMap> { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `expend` is never used [INFO] [stdout] --> src/day8.rs:10:8 [INFO] [stdout] | [INFO] [stdout] 10 | pub fn expend(cars: Vec>) -> Vec> { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `all_possible_mapping` is never used [INFO] [stdout] --> src/day8.rs:27:8 [INFO] [stdout] | [INFO] [stdout] 27 | pub fn all_possible_mapping() -> Vec> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `works` is never used [INFO] [stdout] --> src/day8.rs:37:4 [INFO] [stdout] | [INFO] [stdout] 37 | fn works(input: &str, mapping: &HashMap) -> bool { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `execute` is never used [INFO] [stdout] --> src/day8.rs:62:8 [INFO] [stdout] | [INFO] [stdout] 62 | pub fn execute(input: &str) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `pow10` is never used [INFO] [stdout] --> src/day8.rs:152:8 [INFO] [stdout] | [INFO] [stdout] 152 | pub fn pow10(pow: usize) -> i32 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `expend` is never used [INFO] [stdout] --> src/day9.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn expend(pts: HashSet<(usize, usize)>, nines: &HashSet<(usize, usize)>, max_x: usize, max_y: usize) -> HashSet<(usize, usize)> { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `execute` is never used [INFO] [stdout] --> src/day9.rs:23:8 [INFO] [stdout] | [INFO] [stdout] 23 | pub fn execute(input: &str) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `is_open` is never used [INFO] [stdout] --> src/day10.rs:2:4 [INFO] [stdout] | [INFO] [stdout] 2 | fn is_open(car: char) -> bool { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `corresponding_close` is never used [INFO] [stdout] --> src/day10.rs:9:4 [INFO] [stdout] | [INFO] [stdout] 9 | fn corresponding_close(car: char) -> char { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `score` is never used [INFO] [stdout] --> src/day10.rs:19:4 [INFO] [stdout] | [INFO] [stdout] 19 | fn score(wrong_car: char) -> u128 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `score_2` is never used [INFO] [stdout] --> src/day10.rs:29:4 [INFO] [stdout] | [INFO] [stdout] 29 | fn score_2(car: char) -> u128 { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `analyse` is never used [INFO] [stdout] --> src/day10.rs:39:8 [INFO] [stdout] | [INFO] [stdout] 39 | pub fn analyse(line: String) -> (bool, u128) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `execute` is never used [INFO] [stdout] --> src/day10.rs:64:8 [INFO] [stdout] | [INFO] [stdout] 64 | pub fn execute(input: &str) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Octopus` is never constructed [INFO] [stdout] --> src/day11.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 4 | struct Octopus { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `inc` and `count_flash` are never used [INFO] [stdout] --> src/day11.rs:11:8 [INFO] [stdout] | [INFO] [stdout] 10 | impl Octopus { [INFO] [stdout] | ------------ methods in this implementation [INFO] [stdout] 11 | fn inc(&mut self) { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 20 | fn count_flash(&mut self) -> u8 { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `flashes` is never used [INFO] [stdout] --> src/day11.rs:31:4 [INFO] [stdout] | [INFO] [stdout] 31 | fn flashes(octupuses: &mut Vec>) -> bool { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `print` is never used [INFO] [stdout] --> src/day11.rs:66:4 [INFO] [stdout] | [INFO] [stdout] 66 | fn print(octopuses: &Vec>) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `expend` is never used [INFO] [stdout] --> src/day11.rs:73:4 [INFO] [stdout] | [INFO] [stdout] 73 | fn expend(octupuses: &mut Vec>) -> bool { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `execute` is never used [INFO] [stdout] --> src/day11.rs:91:8 [INFO] [stdout] | [INFO] [stdout] 91 | pub fn execute(input: &str) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Cave` is never constructed [INFO] [stdout] --> src/day12.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 4 | struct Cave { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Path` is never constructed [INFO] [stdout] --> src/day12.rs:8:8 [INFO] [stdout] | [INFO] [stdout] 8 | struct Path { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `display` and `next` are never used [INFO] [stdout] --> src/day12.rs:15:8 [INFO] [stdout] | [INFO] [stdout] 14 | impl Path { [INFO] [stdout] | --------- methods in this implementation [INFO] [stdout] 15 | fn display(&self) -> String { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 19 | fn next(self, links: &HashMap>, step2: bool) -> Vec { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `execute` is never used [INFO] [stdout] --> src/day12.rs:46:8 [INFO] [stdout] | [INFO] [stdout] 46 | pub fn execute(input: &str) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `fold` is never used [INFO] [stdout] --> src/day13.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 4 | pub fn fold(fold_instruction: String, points: HashSet<(u32, u32)>) -> HashSet<(u32, u32)> { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `execute` is never used [INFO] [stdout] --> src/day13.rs:30:8 [INFO] [stdout] | [INFO] [stdout] 30 | pub fn execute(input: &str) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `execute` is never used [INFO] [stdout] --> src/day14.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 4 | pub fn execute(input: &str) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `iterate` is never used [INFO] [stdout] --> src/day14.rs:47:4 [INFO] [stdout] | [INFO] [stdout] 47 | fn iterate(pattern: &HashMap<(char, char), u128>, rules: &HashMap<(char, char), char>) -> HashMap<(char, char), u128> { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `calculate_result` is never used [INFO] [stdout] --> src/day14.rs:60:4 [INFO] [stdout] | [INFO] [stdout] 60 | fn calculate_result(pattern: &HashMap<(char, char), u128>, first_car: char) -> u128 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Path` is never constructed [INFO] [stdout] --> src/day15.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 3 | struct Path { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `next` is never used [INFO] [stdout] --> src/day15.rs:9:8 [INFO] [stdout] | [INFO] [stdout] 8 | impl Path { [INFO] [stdout] | --------- method in this implementation [INFO] [stdout] 9 | fn next(self, risks: &Vec>) -> Vec { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `new_risk` is never used [INFO] [stdout] --> src/day15.rs:55:4 [INFO] [stdout] | [INFO] [stdout] 55 | fn new_risk(new_risk: u32) -> u32 { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `execute` is never used [INFO] [stdout] --> src/day15.rs:64:8 [INFO] [stdout] | [INFO] [stdout] 64 | pub fn execute(input: &str) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `car_to_binary` is never used [INFO] [stdout] --> src/day16.rs:2:8 [INFO] [stdout] | [INFO] [stdout] 2 | pub fn car_to_binary(car: char) -> String { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `to_binary` is never used [INFO] [stdout] --> src/day16.rs:24:8 [INFO] [stdout] | [INFO] [stdout] 24 | pub fn to_binary(line: String) -> String{ [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `PacketData` is never used [INFO] [stdout] --> src/day16.rs:31:6 [INFO] [stdout] | [INFO] [stdout] 31 | enum PacketData { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Packet` is never constructed [INFO] [stdout] --> src/day16.rs:37:8 [INFO] [stdout] | [INFO] [stdout] 37 | struct Packet { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `pow2` is never used [INFO] [stdout] --> src/day16.rs:43:4 [INFO] [stdout] | [INFO] [stdout] 43 | fn pow2(pow: usize) -> u128 { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `version` and `value` are never used [INFO] [stdout] --> src/day16.rs:52:8 [INFO] [stdout] | [INFO] [stdout] 51 | impl Packet { [INFO] [stdout] | ----------- methods in this implementation [INFO] [stdout] 52 | fn version(&self) -> u128 { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 59 | fn value(&self) -> u128 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `binary_to_dec` is never used [INFO] [stdout] --> src/day16.rs:103:4 [INFO] [stdout] | [INFO] [stdout] 103 | fn binary_to_dec(data: &String) -> u128 { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `execute` is never used [INFO] [stdout] --> src/day16.rs:113:8 [INFO] [stdout] | [INFO] [stdout] 113 | pub fn execute(input: &str) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `decode` is never used [INFO] [stdout] --> src/day16.rs:147:4 [INFO] [stdout] | [INFO] [stdout] 147 | fn decode(binary: &String, mut index: usize) -> (Packet, usize) { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `decode_literal` is never used [INFO] [stdout] --> src/day16.rs:193:4 [INFO] [stdout] | [INFO] [stdout] 193 | fn decode_literal(binary: &String, mut index: usize) -> (Vec, usize) { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Path` is never constructed [INFO] [stdout] --> src/day17.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 4 | struct Path { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `next`, `is_fail`, and `is_in_target` are never used [INFO] [stdout] --> src/day17.rs:11:8 [INFO] [stdout] | [INFO] [stdout] 10 | impl Path { [INFO] [stdout] | --------- methods in this implementation [INFO] [stdout] 11 | fn next(self, target_x: (i32, i32), target_y: (i32, i32)) -> Path { [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 35 | fn is_fail(&self, (min_x, max_x): (i32, i32), (min_y, _): (i32, i32)) -> bool { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 44 | fn is_in_target(&self, (min_x, max_x): (i32, i32), (min_y, max_y): (i32, i32)) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `execute` is never used [INFO] [stdout] --> src/day17.rs:51:8 [INFO] [stdout] | [INFO] [stdout] 51 | pub fn execute(input: &str) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Member` is never used [INFO] [stdout] --> src/day18.rs:4:6 [INFO] [stdout] | [INFO] [stdout] 4 | enum Member { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `split`, `more_depth`, and `magnitude` are never used [INFO] [stdout] --> src/day18.rs:10:8 [INFO] [stdout] | [INFO] [stdout] 9 | impl Member { [INFO] [stdout] | ----------- methods in this implementation [INFO] [stdout] 10 | fn split(self, depth: usize) -> (Member, bool) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 33 | fn more_depth(&self) -> Member { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 40 | fn magnitude(&self) -> u128 { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Pair` is never constructed [INFO] [stdout] --> src/day18.rs:49:8 [INFO] [stdout] | [INFO] [stdout] 49 | struct Pair { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple methods are never used [INFO] [stdout] --> src/day18.rs:56:8 [INFO] [stdout] | [INFO] [stdout] 55 | impl Pair { [INFO] [stdout] | --------- methods in this implementation [INFO] [stdout] 56 | fn add_first_left(&self, d: u8) -> Member { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 72 | fn add_first_right(&self, d: u8) -> Member { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 88 | fn split(self) -> (Pair, bool) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 103 | fn explode(&mut self) -> (Option, Option, bool) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 182 | fn have_pairs_to_explode(&self) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 194 | fn print(&self) -> String { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 206 | fn reduce(self) -> Pair { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 221 | fn magnitude(&self) -> u128 { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 225 | fn more_depth(&self) -> Pair { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 233 | fn add(&self, other: &Pair) -> Pair { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Parsing` is never constructed [INFO] [stdout] --> src/day18.rs:243:8 [INFO] [stdout] | [INFO] [stdout] 243 | struct Parsing { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `execute` is never used [INFO] [stdout] --> src/day18.rs:249:8 [INFO] [stdout] | [INFO] [stdout] 249 | pub fn execute(input: &str) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Beacon` is never constructed [INFO] [stdout] --> src/day19.rs:5:8 [INFO] [stdout] | [INFO] [stdout] 5 | struct Beacon { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `dist`, `translate`, and `rotate` are never used [INFO] [stdout] --> src/day19.rs:12:8 [INFO] [stdout] | [INFO] [stdout] 11 | impl Beacon { [INFO] [stdout] | ----------- associated items in this implementation [INFO] [stdout] 12 | fn new(input: &str) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 28 | fn dist(&self, other: &Self) -> (i32, i32, i32) { [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 32 | fn translate(&self, dist: (i32, i32, i32)) -> Self { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 40 | fn rotate(&self, id: i32) -> Self { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Scanner` is never constructed [INFO] [stdout] --> src/day19.rs:168:8 [INFO] [stdout] | [INFO] [stdout] 168 | struct Scanner { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `has_common_beacon`, and `adjust` are never used [INFO] [stdout] --> src/day19.rs:173:8 [INFO] [stdout] | [INFO] [stdout] 172 | impl Scanner { [INFO] [stdout] | ------------ associated items in this implementation [INFO] [stdout] 173 | fn new(input: &str) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 179 | fn has_common_beacon(&self, other: &Scanner, rotate: i32) -> Option<(i32, i32, i32)> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 193 | fn adjust(&self, rotate: i32, dist: (i32, i32, i32)) -> Self { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `execute` is never used [INFO] [stdout] --> src/day19.rs:203:8 [INFO] [stdout] | [INFO] [stdout] 203 | pub fn execute(input: &str) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Map` is never constructed [INFO] [stdout] --> src/day20.rs:6:8 [INFO] [stdout] | [INFO] [stdout] 6 | struct Map { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `pow2` is never used [INFO] [stdout] --> src/day20.rs:11:4 [INFO] [stdout] | [INFO] [stdout] 11 | fn pow2(pow: usize) -> usize { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `binary_to_dec` is never used [INFO] [stdout] --> src/day20.rs:20:4 [INFO] [stdout] | [INFO] [stdout] 20 | fn binary_to_dec(data: &String) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `exisiting_car`, `next_car`, `next`, `prepare_for_next`, `print`, and `count` are never used [INFO] [stdout] --> src/day20.rs:33:8 [INFO] [stdout] | [INFO] [stdout] 32 | impl Map { [INFO] [stdout] | -------- methods in this implementation [INFO] [stdout] 33 | fn exisiting_car(&self, x: i32, y: i32) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 43 | fn next_car(&self, x: usize, y: usize, enhancement: &String) -> char { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 58 | fn next(&self, enhancement: &String) -> Self { [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 70 | fn prepare_for_next(&self) -> Self { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 82 | fn print(&self) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 88 | fn count(&self) -> usize { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `execute` is never used [INFO] [stdout] --> src/day20.rs:97:8 [INFO] [stdout] | [INFO] [stdout] 97 | pub fn execute(input: &str) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Die` is never constructed [INFO] [stdout] --> src/day21.rs:5:8 [INFO] [stdout] | [INFO] [stdout] 5 | struct Die { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `next_run` is never used [INFO] [stdout] --> src/day21.rs:20:8 [INFO] [stdout] | [INFO] [stdout] 9 | impl Die { [INFO] [stdout] | -------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 20 | fn next_run(&mut self) -> u16 { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Player` is never constructed [INFO] [stdout] --> src/day21.rs:26:8 [INFO] [stdout] | [INFO] [stdout] 26 | struct Player { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Board` is never constructed [INFO] [stdout] --> src/day21.rs:33:8 [INFO] [stdout] | [INFO] [stdout] 33 | struct Board { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `is_finish` and `next` are never used [INFO] [stdout] --> src/day21.rs:39:8 [INFO] [stdout] | [INFO] [stdout] 38 | impl Board { [INFO] [stdout] | ---------- methods in this implementation [INFO] [stdout] 39 | fn is_finish(&self) -> bool { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 43 | fn next(self) -> Vec { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `execute` is never used [INFO] [stdout] --> src/day1.rs:2:8 [INFO] [stdout] | [INFO] [stdout] 2 | pub fn execute() { [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 `all_dies` is never used [INFO] [stdout] --> src/day21.rs:59:4 [INFO] [stdout] | [INFO] [stdout] 59 | fn all_dies() -> Vec<(u16, u128)> { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `win` and `play` are never used [INFO] [stdout] --> src/day21.rs:72:8 [INFO] [stdout] | [INFO] [stdout] 71 | impl Player { [INFO] [stdout] | ----------- methods in this implementation [INFO] [stdout] 72 | fn win(&self) -> bool { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 76 | fn play(&self, die: u16) -> Player { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `execute` is never used [INFO] [stdout] --> src/day21.rs:87:8 [INFO] [stdout] | [INFO] [stdout] 87 | pub fn execute(input: &str) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `all_pos` is never used [INFO] [stdout] --> src/day22.rs:132:8 [INFO] [stdout] | [INFO] [stdout] 105 | impl Step { [INFO] [stdout] | --------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 132 | fn all_pos(&self) -> HashSet<(i32, i32, i32)> { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `nb_increase` is never used [INFO] [stdout] --> src/day1.rs:17:4 [INFO] [stdout] | [INFO] [stdout] 17 | fn nb_increase(values: &Vec) -> (i32, i32) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Action` is never used [INFO] [stdout] --> src/day2.rs:2:6 [INFO] [stdout] | [INFO] [stdout] 2 | enum Action { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse` is never used [INFO] [stdout] --> src/day2.rs:8:4 [INFO] [stdout] | [INFO] [stdout] 8 | fn parse(line: &str) -> Action { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `execute` is never used [INFO] [stdout] --> src/day2.rs:20:8 [INFO] [stdout] | [INFO] [stdout] 20 | pub fn execute(input: &str) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Counter` is never constructed [INFO] [stdout] --> src/day3.rs:2:8 [INFO] [stdout] | [INFO] [stdout] 2 | struct Counter { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `pow2` is never used [INFO] [stdout] --> src/day3.rs:6:8 [INFO] [stdout] | [INFO] [stdout] 6 | pub fn pow2(pow: usize) -> u32 { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `bits_to_dec` is never used [INFO] [stdout] --> src/day3.rs:12:8 [INFO] [stdout] | [INFO] [stdout] 12 | pub fn bits_to_dec(line: String) -> u32 { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `execute` is never used [INFO] [stdout] --> src/day3.rs:22:8 [INFO] [stdout] | [INFO] [stdout] 22 | pub fn execute(input: &str) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `count_cars` is never used [INFO] [stdout] --> src/day3.rs:73:4 [INFO] [stdout] | [INFO] [stdout] 73 | fn count_cars(values: &Vec, length: usize) -> Vec { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Number` is never constructed [INFO] [stdout] --> src/day4.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 4 | struct Number { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Board` is never constructed [INFO] [stdout] --> src/day4.rs:10:8 [INFO] [stdout] | [INFO] [stdout] 10 | struct Board { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `add_number`, `is_win`, and `score` are never used [INFO] [stdout] --> src/day4.rs:15:8 [INFO] [stdout] | [INFO] [stdout] 14 | impl Board { [INFO] [stdout] | ---------- associated items in this implementation [INFO] [stdout] 15 | fn new(lines: Vec) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 25 | fn add_number(&mut self, number: i32) { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 35 | fn is_win(&self) -> bool { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 41 | fn score(&self) -> i32 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `execute` is never used [INFO] [stdout] --> src/day4.rs:46:8 [INFO] [stdout] | [INFO] [stdout] 46 | pub fn execute(input: &str) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `play_step1` is never used [INFO] [stdout] --> src/day4.rs:73:4 [INFO] [stdout] | [INFO] [stdout] 73 | fn play_step1(numbers: &Vec, boards: &Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `play_step2` is never used [INFO] [stdout] --> src/day4.rs:85:4 [INFO] [stdout] | [INFO] [stdout] 85 | fn play_step2(numbers: &Vec, boards: &Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Wind` is never constructed [INFO] [stdout] --> src/day5.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 3 | struct Wind { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `is_only_hori_or_vert`, and `covert_points` are never used [INFO] [stdout] --> src/day5.rs:9:8 [INFO] [stdout] | [INFO] [stdout] 8 | impl Wind { [INFO] [stdout] | --------- associated items in this implementation [INFO] [stdout] 9 | fn new(line: String) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 23 | fn is_only_hori_or_vert(&self) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 29 | fn covert_points(&self) -> Vec<(i32, i32)> { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `execute` is never used [INFO] [stdout] --> src/day5.rs:59:8 [INFO] [stdout] | [INFO] [stdout] 59 | pub fn execute(input: &str) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Fish` is never constructed [INFO] [stdout] --> src/day6.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 4 | struct Fish { [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/day1.rs:17:24 [INFO] [stdout] | [INFO] [stdout] 17 | fn nb_increase(values: &Vec) -> (i32, i32) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 17 - fn nb_increase(values: &Vec) -> (i32, i32) { [INFO] [stdout] 17 + fn nb_increase(values: &[i32]) -> (i32, i32) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric method [INFO] [stdout] --> src/day1.rs:18:28 [INFO] [stdout] | [INFO] [stdout] 18 | values.iter().fold((0, i32::max_value()), |(count, pred), val| [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [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] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 18 - values.iter().fold((0, i32::max_value()), |(count, pred), val| [INFO] [stdout] 18 + values.iter().fold((0, i32::MAX), |(count, pred), val| [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `next` is never used [INFO] [stdout] --> src/day6.rs:10:8 [INFO] [stdout] | [INFO] [stdout] 9 | impl Fish { [INFO] [stdout] | --------- method in this implementation [INFO] [stdout] 10 | fn next(&self) -> Vec { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `reduce_fishes` is never used [INFO] [stdout] --> src/day6.rs:29:4 [INFO] [stdout] | [INFO] [stdout] 29 | fn reduce_fishes(fishes: Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `count_fishes` is never used [INFO] [stdout] --> src/day6.rs:45:4 [INFO] [stdout] | [INFO] [stdout] 45 | fn count_fishes(fishes: &Vec) -> u64 { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `execute` is never used [INFO] [stdout] --> src/day6.rs:51:8 [INFO] [stdout] | [INFO] [stdout] 51 | pub fn execute(input: &str) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Crab` is never constructed [INFO] [stdout] --> src/day7.rs:2:8 [INFO] [stdout] | [INFO] [stdout] 2 | struct Crab { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `fuel_needed` and `fuel_needed_2` are never used [INFO] [stdout] --> src/day7.rs:7:8 [INFO] [stdout] | [INFO] [stdout] 6 | impl Crab { [INFO] [stdout] | --------- methods in this implementation [INFO] [stdout] 7 | fn fuel_needed(&self, target: i32) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 10 | fn fuel_needed_2(&self, target: i32) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `execute` is never used [INFO] [stdout] --> src/day7.rs:18:8 [INFO] [stdout] | [INFO] [stdout] 18 | pub fn execute(input: &str) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `initial_mapping` is never used [INFO] [stdout] --> src/day8.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 4 | pub fn initial_mapping() -> HashMap> { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `expend` is never used [INFO] [stdout] --> src/day8.rs:10:8 [INFO] [stdout] | [INFO] [stdout] 10 | pub fn expend(cars: Vec>) -> Vec> { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `all_possible_mapping` is never used [INFO] [stdout] --> src/day8.rs:27:8 [INFO] [stdout] | [INFO] [stdout] 27 | pub fn all_possible_mapping() -> Vec> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `works` is never used [INFO] [stdout] --> src/day8.rs:37:4 [INFO] [stdout] | [INFO] [stdout] 37 | fn works(input: &str, mapping: &HashMap) -> bool { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `execute` is never used [INFO] [stdout] --> src/day8.rs:62:8 [INFO] [stdout] | [INFO] [stdout] 62 | pub fn execute(input: &str) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `pow10` is never used [INFO] [stdout] --> src/day8.rs:152:8 [INFO] [stdout] | [INFO] [stdout] 152 | pub fn pow10(pow: usize) -> i32 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `expend` is never used [INFO] [stdout] --> src/day9.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn expend(pts: HashSet<(usize, usize)>, nines: &HashSet<(usize, usize)>, max_x: usize, max_y: usize) -> HashSet<(usize, usize)> { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `execute` is never used [INFO] [stdout] --> src/day9.rs:23:8 [INFO] [stdout] | [INFO] [stdout] 23 | pub fn execute(input: &str) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `is_open` is never used [INFO] [stdout] --> src/day10.rs:2:4 [INFO] [stdout] | [INFO] [stdout] 2 | fn is_open(car: char) -> bool { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `corresponding_close` is never used [INFO] [stdout] --> src/day10.rs:9:4 [INFO] [stdout] | [INFO] [stdout] 9 | fn corresponding_close(car: char) -> char { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `score` is never used [INFO] [stdout] --> src/day10.rs:19:4 [INFO] [stdout] | [INFO] [stdout] 19 | fn score(wrong_car: char) -> u128 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `score_2` is never used [INFO] [stdout] --> src/day10.rs:29:4 [INFO] [stdout] | [INFO] [stdout] 29 | fn score_2(car: char) -> u128 { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `analyse` is never used [INFO] [stdout] --> src/day10.rs:39:8 [INFO] [stdout] | [INFO] [stdout] 39 | pub fn analyse(line: String) -> (bool, u128) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/day2.rs:37:9 [INFO] [stdout] | [INFO] [stdout] 32 | / let result = match action { [INFO] [stdout] 33 | | Action::Forward(nb) => (x + nb, depth + aim*nb, aim), [INFO] [stdout] 34 | | Action::Up(nb) => (x, depth, aim - nb), [INFO] [stdout] 35 | | Action::Down(nb) => (x, depth, aim + nb), [INFO] [stdout] 36 | | }; [INFO] [stdout] | |__________- unnecessary `let` binding [INFO] [stdout] 37 | result [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 32 ~ [INFO] [stdout] 33 ~ match action { [INFO] [stdout] 34 + Action::Forward(nb) => (x + nb, depth + aim*nb, aim), [INFO] [stdout] 35 + Action::Up(nb) => (x, depth, aim - nb), [INFO] [stdout] 36 + Action::Down(nb) => (x, depth, aim + nb), [INFO] [stdout] 37 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `execute` is never used [INFO] [stdout] --> src/day10.rs:64:8 [INFO] [stdout] | [INFO] [stdout] 64 | pub fn execute(input: &str) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Octopus` is never constructed [INFO] [stdout] --> src/day11.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 4 | struct Octopus { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `inc` and `count_flash` are never used [INFO] [stdout] --> src/day11.rs:11:8 [INFO] [stdout] | [INFO] [stdout] 10 | impl Octopus { [INFO] [stdout] | ------------ methods in this implementation [INFO] [stdout] 11 | fn inc(&mut self) { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 20 | fn count_flash(&mut self) -> u8 { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `flashes` is never used [INFO] [stdout] --> src/day11.rs:31:4 [INFO] [stdout] | [INFO] [stdout] 31 | fn flashes(octupuses: &mut Vec>) -> bool { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `print` is never used [INFO] [stdout] --> src/day11.rs:66:4 [INFO] [stdout] | [INFO] [stdout] 66 | fn print(octopuses: &Vec>) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `expend` is never used [INFO] [stdout] --> src/day11.rs:73:4 [INFO] [stdout] | [INFO] [stdout] 73 | fn expend(octupuses: &mut Vec>) -> bool { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `execute` is never used [INFO] [stdout] --> src/day11.rs:91:8 [INFO] [stdout] | [INFO] [stdout] 91 | pub fn execute(input: &str) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Cave` is never constructed [INFO] [stdout] --> src/day12.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 4 | struct Cave { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Path` is never constructed [INFO] [stdout] --> src/day12.rs:8:8 [INFO] [stdout] | [INFO] [stdout] 8 | struct Path { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `display` and `next` are never used [INFO] [stdout] --> src/day12.rs:15:8 [INFO] [stdout] | [INFO] [stdout] 14 | impl Path { [INFO] [stdout] | --------- methods in this implementation [INFO] [stdout] 15 | fn display(&self) -> String { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 19 | fn next(self, links: &HashMap>, step2: bool) -> Vec { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `execute` is never used [INFO] [stdout] --> src/day12.rs:46:8 [INFO] [stdout] | [INFO] [stdout] 46 | pub fn execute(input: &str) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `fold` is never used [INFO] [stdout] --> src/day13.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 4 | pub fn fold(fold_instruction: String, points: HashSet<(u32, u32)>) -> HashSet<(u32, u32)> { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `execute` is never used [INFO] [stdout] --> src/day13.rs:30:8 [INFO] [stdout] | [INFO] [stdout] 30 | pub fn execute(input: &str) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `execute` is never used [INFO] [stdout] --> src/day14.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 4 | pub fn execute(input: &str) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `iterate` is never used [INFO] [stdout] --> src/day14.rs:47:4 [INFO] [stdout] | [INFO] [stdout] 47 | fn iterate(pattern: &HashMap<(char, char), u128>, rules: &HashMap<(char, char), char>) -> HashMap<(char, char), u128> { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `calculate_result` is never used [INFO] [stdout] --> src/day14.rs:60:4 [INFO] [stdout] | [INFO] [stdout] 60 | fn calculate_result(pattern: &HashMap<(char, char), u128>, first_car: char) -> u128 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Path` is never constructed [INFO] [stdout] --> src/day15.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 3 | struct Path { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `next` is never used [INFO] [stdout] --> src/day15.rs:9:8 [INFO] [stdout] | [INFO] [stdout] 8 | impl Path { [INFO] [stdout] | --------- method in this implementation [INFO] [stdout] 9 | fn next(self, risks: &Vec>) -> Vec { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `new_risk` is never used [INFO] [stdout] --> src/day15.rs:55:4 [INFO] [stdout] | [INFO] [stdout] 55 | fn new_risk(new_risk: u32) -> u32 { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `execute` is never used [INFO] [stdout] --> src/day15.rs:64:8 [INFO] [stdout] | [INFO] [stdout] 64 | pub fn execute(input: &str) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `car_to_binary` is never used [INFO] [stdout] --> src/day16.rs:2:8 [INFO] [stdout] | [INFO] [stdout] 2 | pub fn car_to_binary(car: char) -> String { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `to_binary` is never used [INFO] [stdout] --> src/day16.rs:24:8 [INFO] [stdout] | [INFO] [stdout] 24 | pub fn to_binary(line: String) -> String{ [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `PacketData` is never used [INFO] [stdout] --> src/day16.rs:31:6 [INFO] [stdout] | [INFO] [stdout] 31 | enum PacketData { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Packet` is never constructed [INFO] [stdout] --> src/day16.rs:37:8 [INFO] [stdout] | [INFO] [stdout] 37 | struct Packet { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `pow2` is never used [INFO] [stdout] --> src/day16.rs:43:4 [INFO] [stdout] | [INFO] [stdout] 43 | fn pow2(pow: usize) -> u128 { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `version` and `value` are never used [INFO] [stdout] --> src/day16.rs:52:8 [INFO] [stdout] | [INFO] [stdout] 51 | impl Packet { [INFO] [stdout] | ----------- methods in this implementation [INFO] [stdout] 52 | fn version(&self) -> u128 { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 59 | fn value(&self) -> u128 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `binary_to_dec` is never used [INFO] [stdout] --> src/day16.rs:103:4 [INFO] [stdout] | [INFO] [stdout] 103 | fn binary_to_dec(data: &String) -> u128 { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `execute` is never used [INFO] [stdout] --> src/day16.rs:113:8 [INFO] [stdout] | [INFO] [stdout] 113 | pub fn execute(input: &str) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `decode` is never used [INFO] [stdout] --> src/day16.rs:147:4 [INFO] [stdout] | [INFO] [stdout] 147 | fn decode(binary: &String, mut index: usize) -> (Packet, usize) { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `decode_literal` is never used [INFO] [stdout] --> src/day16.rs:193:4 [INFO] [stdout] | [INFO] [stdout] 193 | fn decode_literal(binary: &String, mut index: usize) -> (Vec, usize) { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Path` is never constructed [INFO] [stdout] --> src/day17.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 4 | struct Path { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `next`, `is_fail`, and `is_in_target` are never used [INFO] [stdout] --> src/day17.rs:11:8 [INFO] [stdout] | [INFO] [stdout] 10 | impl Path { [INFO] [stdout] | --------- methods in this implementation [INFO] [stdout] 11 | fn next(self, target_x: (i32, i32), target_y: (i32, i32)) -> Path { [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 35 | fn is_fail(&self, (min_x, max_x): (i32, i32), (min_y, _): (i32, i32)) -> bool { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 44 | fn is_in_target(&self, (min_x, max_x): (i32, i32), (min_y, max_y): (i32, i32)) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `execute` is never used [INFO] [stdout] --> src/day17.rs:51:8 [INFO] [stdout] | [INFO] [stdout] 51 | pub fn execute(input: &str) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Member` is never used [INFO] [stdout] --> src/day18.rs:4:6 [INFO] [stdout] | [INFO] [stdout] 4 | enum Member { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `split`, `more_depth`, and `magnitude` are never used [INFO] [stdout] --> src/day18.rs:10:8 [INFO] [stdout] | [INFO] [stdout] 9 | impl Member { [INFO] [stdout] | ----------- methods in this implementation [INFO] [stdout] 10 | fn split(self, depth: usize) -> (Member, bool) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 33 | fn more_depth(&self) -> Member { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 40 | fn magnitude(&self) -> u128 { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Pair` is never constructed [INFO] [stdout] --> src/day18.rs:49:8 [INFO] [stdout] | [INFO] [stdout] 49 | struct Pair { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple methods are never used [INFO] [stdout] --> src/day18.rs:56:8 [INFO] [stdout] | [INFO] [stdout] 55 | impl Pair { [INFO] [stdout] | --------- methods in this implementation [INFO] [stdout] 56 | fn add_first_left(&self, d: u8) -> Member { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 72 | fn add_first_right(&self, d: u8) -> Member { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 88 | fn split(self) -> (Pair, bool) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 103 | fn explode(&mut self) -> (Option, Option, bool) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 182 | fn have_pairs_to_explode(&self) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 194 | fn print(&self) -> String { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 206 | fn reduce(self) -> Pair { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 221 | fn magnitude(&self) -> u128 { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 225 | fn more_depth(&self) -> Pair { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 233 | fn add(&self, other: &Pair) -> Pair { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Parsing` is never constructed [INFO] [stdout] --> src/day18.rs:243:8 [INFO] [stdout] | [INFO] [stdout] 243 | struct Parsing { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `execute` is never used [INFO] [stdout] --> src/day18.rs:249:8 [INFO] [stdout] | [INFO] [stdout] 249 | pub fn execute(input: &str) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Beacon` is never constructed [INFO] [stdout] --> src/day19.rs:5:8 [INFO] [stdout] | [INFO] [stdout] 5 | struct Beacon { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `dist`, `translate`, and `rotate` are never used [INFO] [stdout] --> src/day19.rs:12:8 [INFO] [stdout] | [INFO] [stdout] 11 | impl Beacon { [INFO] [stdout] | ----------- associated items in this implementation [INFO] [stdout] 12 | fn new(input: &str) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 28 | fn dist(&self, other: &Self) -> (i32, i32, i32) { [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 32 | fn translate(&self, dist: (i32, i32, i32)) -> Self { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 40 | fn rotate(&self, id: i32) -> Self { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Scanner` is never constructed [INFO] [stdout] --> src/day19.rs:168:8 [INFO] [stdout] | [INFO] [stdout] 168 | struct Scanner { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `has_common_beacon`, and `adjust` are never used [INFO] [stdout] --> src/day19.rs:173:8 [INFO] [stdout] | [INFO] [stdout] 172 | impl Scanner { [INFO] [stdout] | ------------ associated items in this implementation [INFO] [stdout] 173 | fn new(input: &str) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 179 | fn has_common_beacon(&self, other: &Scanner, rotate: i32) -> Option<(i32, i32, i32)> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 193 | fn adjust(&self, rotate: i32, dist: (i32, i32, i32)) -> Self { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `execute` is never used [INFO] [stdout] --> src/day19.rs:203:8 [INFO] [stdout] | [INFO] [stdout] 203 | pub fn execute(input: &str) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Map` is never constructed [INFO] [stdout] --> src/day20.rs:6:8 [INFO] [stdout] | [INFO] [stdout] 6 | struct Map { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `pow2` is never used [INFO] [stdout] --> src/day20.rs:11:4 [INFO] [stdout] | [INFO] [stdout] 11 | fn pow2(pow: usize) -> usize { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `binary_to_dec` is never used [INFO] [stdout] --> src/day20.rs:20:4 [INFO] [stdout] | [INFO] [stdout] 20 | fn binary_to_dec(data: &String) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `exisiting_car`, `next_car`, `next`, `prepare_for_next`, `print`, and `count` are never used [INFO] [stdout] --> src/day20.rs:33:8 [INFO] [stdout] | [INFO] [stdout] 32 | impl Map { [INFO] [stdout] | -------- methods in this implementation [INFO] [stdout] 33 | fn exisiting_car(&self, x: i32, y: i32) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 43 | fn next_car(&self, x: usize, y: usize, enhancement: &String) -> char { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 58 | fn next(&self, enhancement: &String) -> Self { [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 70 | fn prepare_for_next(&self) -> Self { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 82 | fn print(&self) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 88 | fn count(&self) -> usize { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `execute` is never used [INFO] [stdout] --> src/day20.rs:97:8 [INFO] [stdout] | [INFO] [stdout] 97 | pub fn execute(input: &str) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Die` is never constructed [INFO] [stdout] --> src/day21.rs:5:8 [INFO] [stdout] | [INFO] [stdout] 5 | struct Die { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `next_run` is never used [INFO] [stdout] --> src/day21.rs:20:8 [INFO] [stdout] | [INFO] [stdout] 9 | impl Die { [INFO] [stdout] | -------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 20 | fn next_run(&mut self) -> u16 { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Player` is never constructed [INFO] [stdout] --> src/day21.rs:26:8 [INFO] [stdout] | [INFO] [stdout] 26 | struct Player { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Board` is never constructed [INFO] [stdout] --> src/day21.rs:33:8 [INFO] [stdout] | [INFO] [stdout] 33 | struct Board { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `is_finish` and `next` are never used [INFO] [stdout] --> src/day21.rs:39:8 [INFO] [stdout] | [INFO] [stdout] 38 | impl Board { [INFO] [stdout] | ---------- methods in this implementation [INFO] [stdout] 39 | fn is_finish(&self) -> bool { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 43 | fn next(self) -> Vec { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `all_dies` is never used [INFO] [stdout] --> src/day21.rs:59:4 [INFO] [stdout] | [INFO] [stdout] 59 | fn all_dies() -> Vec<(u16, u128)> { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `win` and `play` are never used [INFO] [stdout] --> src/day21.rs:72:8 [INFO] [stdout] | [INFO] [stdout] 71 | impl Player { [INFO] [stdout] | ----------- methods in this implementation [INFO] [stdout] 72 | fn win(&self) -> bool { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 76 | fn play(&self, die: u16) -> Player { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `execute` is never used [INFO] [stdout] --> src/day21.rs:87:8 [INFO] [stdout] | [INFO] [stdout] 87 | pub fn execute(input: &str) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `all_pos` is never used [INFO] [stdout] --> src/day22.rs:132:8 [INFO] [stdout] | [INFO] [stdout] 105 | impl Step { [INFO] [stdout] | --------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 132 | fn all_pos(&self) -> HashSet<(i32, i32, i32)> { [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/day3.rs:73:23 [INFO] [stdout] | [INFO] [stdout] 73 | fn count_cars(values: &Vec, length: usize) -> 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] 73 - fn count_cars(values: &Vec, length: usize) -> Vec { [INFO] [stdout] 73 + fn count_cars(values: &[String], length: usize) -> Vec { [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/day1.rs:17:24 [INFO] [stdout] | [INFO] [stdout] 17 | fn nb_increase(values: &Vec) -> (i32, i32) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 17 - fn nb_increase(values: &Vec) -> (i32, i32) { [INFO] [stdout] 17 + fn nb_increase(values: &[i32]) -> (i32, i32) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric method [INFO] [stdout] --> src/day1.rs:18:28 [INFO] [stdout] | [INFO] [stdout] 18 | values.iter().fold((0, i32::max_value()), |(count, pred), val| [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [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] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 18 - values.iter().fold((0, i32::max_value()), |(count, pred), val| [INFO] [stdout] 18 + values.iter().fold((0, i32::MAX), |(count, pred), val| [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/day2.rs:37:9 [INFO] [stdout] | [INFO] [stdout] 32 | / let result = match action { [INFO] [stdout] 33 | | Action::Forward(nb) => (x + nb, depth + aim*nb, aim), [INFO] [stdout] 34 | | Action::Up(nb) => (x, depth, aim - nb), [INFO] [stdout] 35 | | Action::Down(nb) => (x, depth, aim + nb), [INFO] [stdout] 36 | | }; [INFO] [stdout] | |__________- unnecessary `let` binding [INFO] [stdout] 37 | result [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 32 ~ [INFO] [stdout] 33 ~ match action { [INFO] [stdout] 34 + Action::Forward(nb) => (x + nb, depth + aim*nb, aim), [INFO] [stdout] 35 + Action::Up(nb) => (x, depth, aim - nb), [INFO] [stdout] 36 + Action::Down(nb) => (x, depth, aim + nb), [INFO] [stdout] 37 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/day4.rs:82:5 [INFO] [stdout] | [INFO] [stdout] 82 | return 0 [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] 82 - return 0 [INFO] [stdout] 82 + 0 [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/day4.rs:73:24 [INFO] [stdout] | [INFO] [stdout] 73 | fn play_step1(numbers: &Vec, boards: &Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 73 ~ fn play_step1(numbers: &[i32], boards: &Vec) -> i32 { [INFO] [stdout] 74 | let mut boards = boards.clone(); [INFO] [stdout] 75 ~ let numbers = numbers.to_owned(); [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/day4.rs:73:43 [INFO] [stdout] | [INFO] [stdout] 73 | fn play_step1(numbers: &Vec, boards: &Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 73 ~ fn play_step1(numbers: &Vec, boards: &[Board]) -> i32 { [INFO] [stdout] 74 ~ let mut boards = boards.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `filter(..).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(..)` instead [INFO] [stdout] --> src/day4.rs:78:34 [INFO] [stdout] | [INFO] [stdout] 78 | if let Some(win_board) = boards.iter().filter(|board| board.is_win()).next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `boards.iter().find(|board| board.is_win())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_next [INFO] [stdout] = note: `#[warn(clippy::filter_next)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/day4.rs:95:5 [INFO] [stdout] | [INFO] [stdout] 95 | return 0 [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 95 - return 0 [INFO] [stdout] 95 + 0 [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/day4.rs:85:24 [INFO] [stdout] | [INFO] [stdout] 85 | fn play_step2(numbers: &Vec, boards: &Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 85 ~ fn play_step2(numbers: &[i32], boards: &Vec) -> i32 { [INFO] [stdout] 86 | let mut boards = boards.clone(); [INFO] [stdout] 87 ~ let numbers = numbers.to_owned(); [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/day4.rs:85:43 [INFO] [stdout] | [INFO] [stdout] 85 | fn play_step2(numbers: &Vec, boards: &Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 85 ~ fn play_step2(numbers: &Vec, boards: &[Board]) -> i32 { [INFO] [stdout] 86 ~ let mut boards = boards.to_owned(); [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/day3.rs:73:23 [INFO] [stdout] | [INFO] [stdout] 73 | fn count_cars(values: &Vec, length: usize) -> 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] 73 - fn count_cars(values: &Vec, length: usize) -> Vec { [INFO] [stdout] 73 + fn count_cars(values: &[String], length: usize) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression can be written more simply using `.retain()` [INFO] [stdout] --> src/day4.rs:93:9 [INFO] [stdout] | [INFO] [stdout] 93 | boards = boards.into_iter().filter(|board| !board.is_win()).collect() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `boards.retain(|board| !board.is_win())` [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] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/day5.rs:50:13 [INFO] [stdout] | [INFO] [stdout] 50 | current_x = current_x + inc_x; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `current_x += inc_x` [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: manual implementation of an assign operation [INFO] [stdout] --> src/day5.rs:51:13 [INFO] [stdout] | [INFO] [stdout] 51 | current_y = current_y + inc_y; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `current_y += inc_y` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/day5.rs:61:14 [INFO] [stdout] | [INFO] [stdout] 61 | .map(|line| Wind::new(line)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Wind::new` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/day4.rs:82:5 [INFO] [stdout] | [INFO] [stdout] 82 | return 0 [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] 82 - return 0 [INFO] [stdout] 82 + 0 [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/day4.rs:73:24 [INFO] [stdout] | [INFO] [stdout] 73 | fn play_step1(numbers: &Vec, boards: &Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 73 ~ fn play_step1(numbers: &[i32], boards: &Vec) -> i32 { [INFO] [stdout] 74 | let mut boards = boards.clone(); [INFO] [stdout] 75 ~ let numbers = numbers.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> src/day5.rs:67:35 [INFO] [stdout] | [INFO] [stdout] 67 | let current_counter = acc.get(&item).map(|i| *i).unwrap_or(0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `acc.get(&item).copied()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] = note: `#[warn(clippy::map_clone)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day4.rs:73:43 [INFO] [stdout] | [INFO] [stdout] 73 | fn play_step1(numbers: &Vec, boards: &Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 73 ~ fn play_step1(numbers: &Vec, boards: &[Board]) -> i32 { [INFO] [stdout] 74 ~ let mut boards = boards.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> src/day5.rs:72:25 [INFO] [stdout] | [INFO] [stdout] 72 | let step_1_result = map.values().map(|i| *i).filter(|i| *i >= 2).count(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `map.values().copied()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `filter(..).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(..)` instead [INFO] [stdout] --> src/day4.rs:78:34 [INFO] [stdout] | [INFO] [stdout] 78 | if let Some(win_board) = boards.iter().filter(|board| board.is_win()).next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `boards.iter().find(|board| board.is_win())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_next [INFO] [stdout] = note: `#[warn(clippy::filter_next)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/day4.rs:95:5 [INFO] [stdout] | [INFO] [stdout] 95 | return 0 [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 95 - return 0 [INFO] [stdout] 95 + 0 [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/day4.rs:85:24 [INFO] [stdout] | [INFO] [stdout] 85 | fn play_step2(numbers: &Vec, boards: &Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 85 ~ fn play_step2(numbers: &[i32], boards: &Vec) -> i32 { [INFO] [stdout] 86 | let mut boards = boards.clone(); [INFO] [stdout] 87 ~ let numbers = numbers.to_owned(); [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/day4.rs:85:43 [INFO] [stdout] | [INFO] [stdout] 85 | fn play_step2(numbers: &Vec, boards: &Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 85 ~ fn play_step2(numbers: &Vec, boards: &[Board]) -> i32 { [INFO] [stdout] 86 ~ let mut boards = boards.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression can be written more simply using `.retain()` [INFO] [stdout] --> src/day4.rs:93:9 [INFO] [stdout] | [INFO] [stdout] 93 | boards = boards.into_iter().filter(|board| !board.is_win()).collect() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `boards.retain(|board| !board.is_win())` [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] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> src/day5.rs:79:35 [INFO] [stdout] | [INFO] [stdout] 79 | let current_counter = acc.get(&item).map(|i| *i).unwrap_or(0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `acc.get(&item).copied()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> src/day5.rs:84:25 [INFO] [stdout] | [INFO] [stdout] 84 | let step_2_result = map.values().map(|i| *i).filter(|i| *i >= 2).count(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `map.values().copied()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: iterating on a map's values [INFO] [stdout] --> src/day6.rs:30:5 [INFO] [stdout] | [INFO] [stdout] 30 | / fishes.into_iter().fold(HashMap::::new(), |mut acc, fish| { [INFO] [stdout] 31 | | let actual_fish = acc.get(&fish.life).map(|fish| fish.clone()).unwrap_or(Fish { [INFO] [stdout] 32 | | life: fish.life, [INFO] [stdout] 33 | | count: 0 [INFO] [stdout] ... | [INFO] [stdout] 40 | | } ).into_iter() [INFO] [stdout] 41 | | .map(|(_, fish)| fish) [INFO] [stdout] | |______________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_kv_map [INFO] [stdout] = note: `#[warn(clippy::iter_kv_map)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 30 ~ fishes.into_iter().fold(HashMap::::new(), |mut acc, fish| { [INFO] [stdout] 31 + let actual_fish = acc.get(&fish.life).map(|fish| fish.clone()).unwrap_or(Fish { [INFO] [stdout] 32 + life: fish.life, [INFO] [stdout] 33 + count: 0 [INFO] [stdout] 34 + }); [INFO] [stdout] 35 + acc.insert(fish.life, Fish { [INFO] [stdout] 36 + life: fish.life, [INFO] [stdout] 37 + count: actual_fish.count + fish.count [INFO] [stdout] 38 + }); [INFO] [stdout] 39 + acc [INFO] [stdout] 40 + } ).into_values() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/day5.rs:50:13 [INFO] [stdout] | [INFO] [stdout] 50 | current_x = current_x + inc_x; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `current_x += inc_x` [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: you are using an explicit closure for cloning elements [INFO] [stdout] --> src/day6.rs:31:27 [INFO] [stdout] | [INFO] [stdout] 31 | let actual_fish = acc.get(&fish.life).map(|fish| fish.clone()).unwrap_or(Fish { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `cloned` method: `acc.get(&fish.life).cloned()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/day5.rs:51:13 [INFO] [stdout] | [INFO] [stdout] 51 | current_y = current_y + inc_y; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `current_y += inc_y` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day6.rs:45:25 [INFO] [stdout] | [INFO] [stdout] 45 | fn count_fishes(fishes: &Vec) -> u64 { [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] 45 - fn count_fishes(fishes: &Vec) -> u64 { [INFO] [stdout] 45 + fn count_fishes(fishes: &[Fish]) -> u64 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/day5.rs:61:14 [INFO] [stdout] | [INFO] [stdout] 61 | .map(|line| Wind::new(line)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Wind::new` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> src/day5.rs:67:35 [INFO] [stdout] | [INFO] [stdout] 67 | let current_counter = acc.get(&item).map(|i| *i).unwrap_or(0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `acc.get(&item).copied()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] = note: `#[warn(clippy::map_clone)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> src/day5.rs:72:25 [INFO] [stdout] | [INFO] [stdout] 72 | let step_1_result = map.values().map(|i| *i).filter(|i| *i >= 2).count(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `map.values().copied()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> src/day5.rs:79:35 [INFO] [stdout] | [INFO] [stdout] 79 | let current_counter = acc.get(&item).map(|i| *i).unwrap_or(0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `acc.get(&item).copied()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> src/day5.rs:84:25 [INFO] [stdout] | [INFO] [stdout] 84 | let step_2_result = map.values().map(|i| *i).filter(|i| *i >= 2).count(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `map.values().copied()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/day8.rs:21:9 [INFO] [stdout] | [INFO] [stdout] 15 | / let result = ('a'..='g').filter(move |car| !already_known_cars.contains(car)).map(move |car| { [INFO] [stdout] 16 | | let mut next_cars = cars.clone(); [INFO] [stdout] 17 | | next_cars.insert(next_car, car); [INFO] [stdout] 18 | | next_cars [INFO] [stdout] 19 | | }).collect::>(); [INFO] [stdout] | |_______________________________- unnecessary `let` binding [INFO] [stdout] 20 | [INFO] [stdout] 21 | result [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 15 ~ [INFO] [stdout] 16 | [INFO] [stdout] 17 ~ ('a'..='g').filter(move |car| !already_known_cars.contains(car)).map(move |car| { [INFO] [stdout] 18 + let mut next_cars = cars.clone(); [INFO] [stdout] 19 + next_cars.insert(next_car, car); [INFO] [stdout] 20 + next_cars [INFO] [stdout] 21 + }).collect::>() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: iterating on a map's values [INFO] [stdout] --> src/day6.rs:30:5 [INFO] [stdout] | [INFO] [stdout] 30 | / fishes.into_iter().fold(HashMap::::new(), |mut acc, fish| { [INFO] [stdout] 31 | | let actual_fish = acc.get(&fish.life).map(|fish| fish.clone()).unwrap_or(Fish { [INFO] [stdout] 32 | | life: fish.life, [INFO] [stdout] 33 | | count: 0 [INFO] [stdout] ... | [INFO] [stdout] 40 | | } ).into_iter() [INFO] [stdout] 41 | | .map(|(_, fish)| fish) [INFO] [stdout] | |______________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_kv_map [INFO] [stdout] = note: `#[warn(clippy::iter_kv_map)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 30 ~ fishes.into_iter().fold(HashMap::::new(), |mut acc, fish| { [INFO] [stdout] 31 + let actual_fish = acc.get(&fish.life).map(|fish| fish.clone()).unwrap_or(Fish { [INFO] [stdout] 32 + life: fish.life, [INFO] [stdout] 33 + count: 0 [INFO] [stdout] 34 + }); [INFO] [stdout] 35 + acc.insert(fish.life, Fish { [INFO] [stdout] 36 + life: fish.life, [INFO] [stdout] 37 + count: actual_fish.count + fish.count [INFO] [stdout] 38 + }); [INFO] [stdout] 39 + acc [INFO] [stdout] 40 + } ).into_values() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for cloning elements [INFO] [stdout] --> src/day6.rs:31:27 [INFO] [stdout] | [INFO] [stdout] 31 | let actual_fish = acc.get(&fish.life).map(|fish| fish.clone()).unwrap_or(Fish { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `cloned` method: `acc.get(&fish.life).cloned()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/day8.rs:75:9 [INFO] [stdout] | [INFO] [stdout] 72 | / let count = outputs.into_iter().filter(|digit| digit.len() == 2 || digit.len() == 4 || digit.len() == 3 || digit.len() == 7) [INFO] [stdout] 73 | | .count() as u64; [INFO] [stdout] | |____________________________- unnecessary `let` binding [INFO] [stdout] 74 | [INFO] [stdout] 75 | count [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 72 ~ [INFO] [stdout] 73 | [INFO] [stdout] 74 ~ outputs.into_iter().filter(|digit| digit.len() == 2 || digit.len() == 4 || digit.len() == 3 || digit.len() == 7) [INFO] [stdout] 75 + .count() as u64 [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/day6.rs:45:25 [INFO] [stdout] | [INFO] [stdout] 45 | fn count_fishes(fishes: &Vec) -> u64 { [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] 45 - fn count_fishes(fishes: &Vec) -> u64 { [INFO] [stdout] 45 + fn count_fishes(fishes: &[Fish]) -> u64 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `filter_map` with an identity function [INFO] [stdout] --> src/day9.rs:12:23 [INFO] [stdout] | [INFO] [stdout] 12 | ].into_iter().filter_map(|d| d) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `flatten()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_map_identity [INFO] [stdout] = note: `#[warn(clippy::filter_map_identity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/day8.rs:21:9 [INFO] [stdout] | [INFO] [stdout] 15 | / let result = ('a'..='g').filter(move |car| !already_known_cars.contains(car)).map(move |car| { [INFO] [stdout] 16 | | let mut next_cars = cars.clone(); [INFO] [stdout] 17 | | next_cars.insert(next_car, car); [INFO] [stdout] 18 | | next_cars [INFO] [stdout] 19 | | }).collect::>(); [INFO] [stdout] | |_______________________________- unnecessary `let` binding [INFO] [stdout] 20 | [INFO] [stdout] 21 | result [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 15 ~ [INFO] [stdout] 16 | [INFO] [stdout] 17 ~ ('a'..='g').filter(move |car| !already_known_cars.contains(car)).map(move |car| { [INFO] [stdout] 18 + let mut next_cars = cars.clone(); [INFO] [stdout] 19 + next_cars.insert(next_car, car); [INFO] [stdout] 20 + next_cars [INFO] [stdout] 21 + }).collect::>() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/day8.rs:75:9 [INFO] [stdout] | [INFO] [stdout] 72 | / let count = outputs.into_iter().filter(|digit| digit.len() == 2 || digit.len() == 4 || digit.len() == 3 || digit.len() == 7) [INFO] [stdout] 73 | | .count() as u64; [INFO] [stdout] | |____________________________- unnecessary `let` binding [INFO] [stdout] 74 | [INFO] [stdout] 75 | count [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 72 ~ [INFO] [stdout] 73 | [INFO] [stdout] 74 ~ outputs.into_iter().filter(|digit| digit.len() == 2 || digit.len() == 4 || digit.len() == 3 || digit.len() == 7) [INFO] [stdout] 75 + .count() as u64 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `filter_map` with an identity function [INFO] [stdout] --> src/day9.rs:12:23 [INFO] [stdout] | [INFO] [stdout] 12 | ].into_iter().filter_map(|d| d) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `flatten()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_map_identity [INFO] [stdout] = note: `#[warn(clippy::filter_map_identity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option<&u32>` which implements the `Copy` trait [INFO] [stdout] --> src/day9.rs:38:26 [INFO] [stdout] | [INFO] [stdout] 38 | let my_pt = *current_row.get(x).clone().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `current_row.get(x)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> src/day9.rs:39:40 [INFO] [stdout] | [INFO] [stdout] 39 | let other_points: Vec<_> = vec![ [INFO] [stdout] | ________________________________________^ [INFO] [stdout] 40 | | row_up.and_then(|row| row.get(x).clone()), // UP [INFO] [stdout] 41 | | if x == 0 { None } else {current_row.get(x - 1)}, // LEFT [INFO] [stdout] 42 | | current_row.get(x + 1), // RIGHT [INFO] [stdout] 43 | | row_down.and_then(|row| row.get(x)), // DOWN [INFO] [stdout] 44 | | ].into_iter().filter_map(|d| d) [INFO] [stdout] 45 | | .map(|d| *d) [INFO] [stdout] | |____________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] help: consider calling the dedicated `copied` method [INFO] [stdout] | [INFO] [stdout] 39 ~ let other_points: Vec<_> = vec![ [INFO] [stdout] 40 + row_up.and_then(|row| row.get(x).clone()), // UP [INFO] [stdout] 41 + if x == 0 { None } else {current_row.get(x - 1)}, // LEFT [INFO] [stdout] 42 + current_row.get(x + 1), // RIGHT [INFO] [stdout] 43 + row_down.and_then(|row| row.get(x)), // DOWN [INFO] [stdout] 44 + ].into_iter().filter_map(|d| d).copied() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `filter_map` with an identity function [INFO] [stdout] --> src/day9.rs:44:27 [INFO] [stdout] | [INFO] [stdout] 44 | ].into_iter().filter_map(|d| d) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `flatten()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_map_identity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option<&u32>` which implements the `Copy` trait [INFO] [stdout] --> src/day9.rs:40:39 [INFO] [stdout] | [INFO] [stdout] 40 | row_up.and_then(|row| row.get(x).clone()), // UP [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `row.get(x)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/day10.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | / match car { [INFO] [stdout] 4 | | '(' | '{' | '[' | '<' => true, [INFO] [stdout] 5 | | _ => false [INFO] [stdout] 6 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 3 - match car { [INFO] [stdout] 4 - '(' | '{' | '[' | '<' => true, [INFO] [stdout] 5 - _ => false [INFO] [stdout] 6 - } [INFO] [stdout] 3 + matches!(car, '(' | '{' | '[' | '<') [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/day10.rs:56:44 [INFO] [stdout] | [INFO] [stdout] 56 | let score: u128 = open.into_iter().map(|car| corresponding_close(car)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `corresponding_close` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/day10.rs:68:61 [INFO] [stdout] | [INFO] [stdout] 68 | let step1_result: u128 = values.clone().into_iter().map(|line| analyse(line)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `analyse` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/day10.rs:77:56 [INFO] [stdout] | [INFO] [stdout] 77 | let mut values: Vec = values.into_iter().map(|line| analyse(line)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `analyse` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/day11.rs:13:13 [INFO] [stdout] | [INFO] [stdout] 13 | self.life = self.life + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.life += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/day11.rs:22:13 [INFO] [stdout] | [INFO] [stdout] 22 | self.count_flash = self.count_flash + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.count_flash += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/day11.rs:31:23 [INFO] [stdout] | [INFO] [stdout] 31 | fn flashes(octupuses: &mut 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] 31 - fn flashes(octupuses: &mut Vec>) -> bool { [INFO] [stdout] 31 + fn flashes(octupuses: &mut [Vec]) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option<&u32>` which implements the `Copy` trait [INFO] [stdout] --> src/day9.rs:38:26 [INFO] [stdout] | [INFO] [stdout] 38 | let my_pt = *current_row.get(x).clone().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `current_row.get(x)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> src/day9.rs:39:40 [INFO] [stdout] | [INFO] [stdout] 39 | let other_points: Vec<_> = vec![ [INFO] [stdout] | ________________________________________^ [INFO] [stdout] 40 | | row_up.and_then(|row| row.get(x).clone()), // UP [INFO] [stdout] 41 | | if x == 0 { None } else {current_row.get(x - 1)}, // LEFT [INFO] [stdout] 42 | | current_row.get(x + 1), // RIGHT [INFO] [stdout] 43 | | row_down.and_then(|row| row.get(x)), // DOWN [INFO] [stdout] 44 | | ].into_iter().filter_map(|d| d) [INFO] [stdout] 45 | | .map(|d| *d) [INFO] [stdout] | |____________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] help: consider calling the dedicated `copied` method [INFO] [stdout] | [INFO] [stdout] 39 ~ let other_points: Vec<_> = vec![ [INFO] [stdout] 40 + row_up.and_then(|row| row.get(x).clone()), // UP [INFO] [stdout] 41 + if x == 0 { None } else {current_row.get(x - 1)}, // LEFT [INFO] [stdout] 42 + current_row.get(x + 1), // RIGHT [INFO] [stdout] 43 + row_down.and_then(|row| row.get(x)), // DOWN [INFO] [stdout] 44 + ].into_iter().filter_map(|d| d).copied() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `filter_map` with an identity function [INFO] [stdout] --> src/day9.rs:44:27 [INFO] [stdout] | [INFO] [stdout] 44 | ].into_iter().filter_map(|d| d) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `flatten()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_map_identity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option<&u32>` which implements the `Copy` trait [INFO] [stdout] --> src/day9.rs:40:39 [INFO] [stdout] | [INFO] [stdout] 40 | row_up.and_then(|row| row.get(x).clone()), // UP [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `row.get(x)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/day11.rs:34:17 [INFO] [stdout] | [INFO] [stdout] 34 | let y = y + 0; [INFO] [stdout] | ^^^^^ help: consider reducing it to: `y` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] = note: `#[warn(clippy::identity_op)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day11.rs:66:21 [INFO] [stdout] | [INFO] [stdout] 66 | fn print(octopuses: &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] 66 - fn print(octopuses: &Vec>) { [INFO] [stdout] 66 + fn print(octopuses: &[Vec]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/day10.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | / match car { [INFO] [stdout] 4 | | '(' | '{' | '[' | '<' => true, [INFO] [stdout] 5 | | _ => false [INFO] [stdout] 6 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 3 - match car { [INFO] [stdout] 4 - '(' | '{' | '[' | '<' => true, [INFO] [stdout] 5 - _ => false [INFO] [stdout] 6 - } [INFO] [stdout] 3 + matches!(car, '(' | '{' | '[' | '<') [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/day11.rs:109:9 [INFO] [stdout] | [INFO] [stdout] 109 | counter = counter + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `counter += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/day10.rs:56:44 [INFO] [stdout] | [INFO] [stdout] 56 | let score: u128 = open.into_iter().map(|car| corresponding_close(car)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `corresponding_close` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/day10.rs:68:61 [INFO] [stdout] | [INFO] [stdout] 68 | let step1_result: u128 = values.clone().into_iter().map(|line| analyse(line)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `analyse` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/day10.rs:77:56 [INFO] [stdout] | [INFO] [stdout] 77 | let mut values: Vec = values.into_iter().map(|line| analyse(line)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `analyse` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/day12.rs:27:16 [INFO] [stdout] | [INFO] [stdout] 27 | if already_small && (!step2 || ( [INFO] [stdout] | ________________^ [INFO] [stdout] 28 | | step2 && self.already_visit_2_smal [INFO] [stdout] 29 | | )) { [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] 27 - if already_small && (!step2 || ( [INFO] [stdout] 28 - step2 && self.already_visit_2_smal [INFO] [stdout] 29 - )) { [INFO] [stdout] 27 + if !(!already_small || step2 && !self.already_visit_2_smal) { [INFO] [stdout] | [INFO] [stdout] 27 - if already_small && (!step2 || ( [INFO] [stdout] 28 - step2 && self.already_visit_2_smal [INFO] [stdout] 29 - )) { [INFO] [stdout] 27 + if (self.already_visit_2_smal || !step2) && already_small { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/day12.rs:27:33 [INFO] [stdout] | [INFO] [stdout] 27 | if already_small && (!step2 || ( [INFO] [stdout] | _________________________________^ [INFO] [stdout] 28 | | step2 && self.already_visit_2_smal [INFO] [stdout] 29 | | )) { [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] help: try [INFO] [stdout] | [INFO] [stdout] 27 - if already_small && (!step2 || ( [INFO] [stdout] 28 - step2 && self.already_visit_2_smal [INFO] [stdout] 29 - )) { [INFO] [stdout] 27 + if already_small && !(step2 && !self.already_visit_2_smal) { [INFO] [stdout] | [INFO] [stdout] 27 - if already_small && (!step2 || ( [INFO] [stdout] 28 - step2 && self.already_visit_2_smal [INFO] [stdout] 29 - )) { [INFO] [stdout] 27 + if already_small && !step2 || self.already_visit_2_smal { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/day12.rs:26:56 [INFO] [stdout] | [INFO] [stdout] 26 | let already_small = next.to_lowercase() == next.to_string() && self.path.contains(next); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `*next` [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: manual implementation of an assign operation [INFO] [stdout] --> src/day11.rs:13:13 [INFO] [stdout] | [INFO] [stdout] 13 | self.life = self.life + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.life += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/day12.rs:37:31 [INFO] [stdout] | [INFO] [stdout] 37 | is_final: next.to_string() == "end".to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `*next` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/day12.rs:37:51 [INFO] [stdout] | [INFO] [stdout] 37 | is_final: next.to_string() == "end".to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `"end"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/day11.rs:22:13 [INFO] [stdout] | [INFO] [stdout] 22 | self.count_flash = self.count_flash + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.count_flash += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/day12.rs:48:22 [INFO] [stdout] | [INFO] [stdout] 48 | .map(|line| (line.split("-").nth(0).unwrap().to_string(), line.split("-").nth(1).unwrap().to_string())) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `line.split("-").next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] = note: `#[warn(clippy::iter_nth_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/day11.rs:31:23 [INFO] [stdout] | [INFO] [stdout] 31 | fn flashes(octupuses: &mut 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] 31 - fn flashes(octupuses: &mut Vec>) -> bool { [INFO] [stdout] 31 + fn flashes(octupuses: &mut [Vec]) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/day11.rs:34:17 [INFO] [stdout] | [INFO] [stdout] 34 | let y = y + 0; [INFO] [stdout] | ^^^^^ help: consider reducing it to: `y` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] = note: `#[warn(clippy::identity_op)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/day13.rs:6:21 [INFO] [stdout] | [INFO] [stdout] 6 | let is_x_fold = fold_instruction.split("=").nth(0).unwrap().ends_with("x"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `fold_instruction.split("=").next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day11.rs:66:21 [INFO] [stdout] | [INFO] [stdout] 66 | fn print(octopuses: &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] 66 - fn print(octopuses: &Vec>) { [INFO] [stdout] 66 + fn print(octopuses: &[Vec]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/day13.rs:45:21 [INFO] [stdout] | [INFO] [stdout] 45 | value.split(",").nth(0).unwrap().parse().unwrap(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `value.split(",").next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/day11.rs:109:9 [INFO] [stdout] | [INFO] [stdout] 109 | counter = counter + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `counter += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/day14.rs:14:19 [INFO] [stdout] | [INFO] [stdout] 14 | let key = line.split(" -> ").nth(0).unwrap().to_string(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `line.split(" -> ").next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/day14.rs:15:20 [INFO] [stdout] | [INFO] [stdout] 15 | let key = (key.chars().nth(0).unwrap(), key.chars().nth(1).unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `key.chars().next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/day12.rs:27:16 [INFO] [stdout] | [INFO] [stdout] 27 | if already_small && (!step2 || ( [INFO] [stdout] | ________________^ [INFO] [stdout] 28 | | step2 && self.already_visit_2_smal [INFO] [stdout] 29 | | )) { [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] 27 - if already_small && (!step2 || ( [INFO] [stdout] 28 - step2 && self.already_visit_2_smal [INFO] [stdout] 29 - )) { [INFO] [stdout] 27 + if !(!already_small || step2 && !self.already_visit_2_smal) { [INFO] [stdout] | [INFO] [stdout] 27 - if already_small && (!step2 || ( [INFO] [stdout] 28 - step2 && self.already_visit_2_smal [INFO] [stdout] 29 - )) { [INFO] [stdout] 27 + if (self.already_visit_2_smal || !step2) && already_small { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/day12.rs:27:33 [INFO] [stdout] | [INFO] [stdout] 27 | if already_small && (!step2 || ( [INFO] [stdout] | _________________________________^ [INFO] [stdout] 28 | | step2 && self.already_visit_2_smal [INFO] [stdout] 29 | | )) { [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] help: try [INFO] [stdout] | [INFO] [stdout] 27 - if already_small && (!step2 || ( [INFO] [stdout] 28 - step2 && self.already_visit_2_smal [INFO] [stdout] 29 - )) { [INFO] [stdout] 27 + if already_small && !(step2 && !self.already_visit_2_smal) { [INFO] [stdout] | [INFO] [stdout] 27 - if already_small && (!step2 || ( [INFO] [stdout] 28 - step2 && self.already_visit_2_smal [INFO] [stdout] 29 - )) { [INFO] [stdout] 27 + if already_small && !step2 || self.already_visit_2_smal { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/day14.rs:16:21 [INFO] [stdout] | [INFO] [stdout] 16 | let value = line.split(" -> ").nth(1).unwrap().chars().nth(0).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `line.split(" -> ").nth(1).unwrap().chars().next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/day12.rs:26:56 [INFO] [stdout] | [INFO] [stdout] 26 | let already_small = next.to_lowercase() == next.to_string() && self.path.contains(next); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `*next` [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: casting integer literal to `u128` is unnecessary [INFO] [stdout] --> src/day14.rs:24:20 [INFO] [stdout] | [INFO] [stdout] 24 | ((c1, c2), 1 as u128) [INFO] [stdout] | ^^^^^^^^^ help: try: `1_u128` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/day12.rs:37:31 [INFO] [stdout] | [INFO] [stdout] 37 | is_final: next.to_string() == "end".to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `*next` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/day12.rs:37:51 [INFO] [stdout] | [INFO] [stdout] 37 | is_final: next.to_string() == "end".to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `"end"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/day12.rs:48:22 [INFO] [stdout] | [INFO] [stdout] 48 | .map(|line| (line.split("-").nth(0).unwrap().to_string(), line.split("-").nth(1).unwrap().to_string())) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `line.split("-").next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] = note: `#[warn(clippy::iter_nth_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/day14.rs:78:5 [INFO] [stdout] | [INFO] [stdout] 77 | let step1_result = (*most_common - *less_common); [INFO] [stdout] | ------------------------------------------------- unnecessary `let` binding [INFO] [stdout] 78 | step1_result [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 77 ~ [INFO] [stdout] 78 ~ (*most_common - *less_common) [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/day15.rs:9:26 [INFO] [stdout] | [INFO] [stdout] 9 | fn next(self, risks: &Vec>) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 9 - fn next(self, risks: &Vec>) -> Vec { [INFO] [stdout] 9 + fn next(self, risks: &[Vec]) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/day13.rs:6:21 [INFO] [stdout] | [INFO] [stdout] 6 | let is_x_fold = fold_instruction.split("=").nth(0).unwrap().ends_with("x"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `fold_instruction.split("=").next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/day15.rs:58:9 [INFO] [stdout] | [INFO] [stdout] 58 | new_risk = new_risk - 9 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `new_risk -= 9` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/day13.rs:45:21 [INFO] [stdout] | [INFO] [stdout] 45 | value.split(",").nth(0).unwrap().parse().unwrap(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `value.split(",").next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/day14.rs:14:19 [INFO] [stdout] | [INFO] [stdout] 14 | let key = line.split(" -> ").nth(0).unwrap().to_string(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `line.split(" -> ").next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/day14.rs:15:20 [INFO] [stdout] | [INFO] [stdout] 15 | let key = (key.chars().nth(0).unwrap(), key.chars().nth(1).unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `key.chars().next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/day14.rs:16:21 [INFO] [stdout] | [INFO] [stdout] 16 | let value = line.split(" -> ").nth(1).unwrap().chars().nth(0).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `line.split(" -> ").nth(1).unwrap().chars().next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u128` is unnecessary [INFO] [stdout] --> src/day14.rs:24:20 [INFO] [stdout] | [INFO] [stdout] 24 | ((c1, c2), 1 as u128) [INFO] [stdout] | ^^^^^^^^^ help: try: `1_u128` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/day16.rs:25:22 [INFO] [stdout] | [INFO] [stdout] 25 | line.chars().map(|car| [INFO] [stdout] | ______________________^ [INFO] [stdout] 26 | | car_to_binary(car) [INFO] [stdout] | |__________________________^ help: replace the closure with the function itself: `car_to_binary` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/day14.rs:78:5 [INFO] [stdout] | [INFO] [stdout] 77 | let step1_result = (*most_common - *less_common); [INFO] [stdout] | ------------------------------------------------- unnecessary `let` binding [INFO] [stdout] 78 | step1_result [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 77 ~ [INFO] [stdout] 78 ~ (*most_common - *less_common) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/day16.rs:46:9 [INFO] [stdout] | [INFO] [stdout] 46 | result = result * 2; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace it with: `result *= 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] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day15.rs:9:26 [INFO] [stdout] | [INFO] [stdout] 9 | fn next(self, risks: &Vec>) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 9 - fn next(self, risks: &Vec>) -> Vec { [INFO] [stdout] 9 + fn next(self, risks: &[Vec]) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.fold` can be written more succinctly using another method [INFO] [stdout] --> src/day16.rs:65:78 [INFO] [stdout] | [INFO] [stdout] 65 | "001" => sub_packets.iter().map(|packet| packet.value()).fold(1, |acc,val| acc * val ), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `product()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fold [INFO] [stdout] = note: `#[warn(clippy::unnecessary_fold)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.iter().nth()` on a `Vec` [INFO] [stdout] --> src/day16.rs:70:38 [INFO] [stdout] | [INFO] [stdout] 70 | let second = sub_packets.iter().nth(1).unwrap().value(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth [INFO] [stdout] = note: `#[warn(clippy::iter_nth)]` on by default [INFO] [stdout] help: `get` is equivalent but more concise [INFO] [stdout] | [INFO] [stdout] 70 - let second = sub_packets.iter().nth(1).unwrap().value(); [INFO] [stdout] 70 + let second = sub_packets.get(1).unwrap().value(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/day15.rs:58:9 [INFO] [stdout] | [INFO] [stdout] 58 | new_risk = new_risk - 9 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `new_risk -= 9` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.iter().nth()` on a `Vec` [INFO] [stdout] --> src/day16.rs:79:38 [INFO] [stdout] | [INFO] [stdout] 79 | let second = sub_packets.iter().nth(1).unwrap().value(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth [INFO] [stdout] help: `get` is equivalent but more concise [INFO] [stdout] | [INFO] [stdout] 79 - let second = sub_packets.iter().nth(1).unwrap().value(); [INFO] [stdout] 79 + let second = sub_packets.get(1).unwrap().value(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.iter().nth()` on a `Vec` [INFO] [stdout] --> src/day16.rs:88:38 [INFO] [stdout] | [INFO] [stdout] 88 | let second = sub_packets.iter().nth(1).unwrap().value(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth [INFO] [stdout] help: `get` is equivalent but more concise [INFO] [stdout] | [INFO] [stdout] 88 - let second = sub_packets.iter().nth(1).unwrap().value(); [INFO] [stdout] 88 + let second = sub_packets.get(1).unwrap().value(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/day16.rs:103:24 [INFO] [stdout] | [INFO] [stdout] 103 | fn binary_to_dec(data: &String) -> u128 { [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] 103 - fn binary_to_dec(data: &String) -> u128 { [INFO] [stdout] 103 + fn binary_to_dec(data: &str) -> u128 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `filter(..).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(..)` instead [INFO] [stdout] --> src/day16.rs:114:15 [INFO] [stdout] | [INFO] [stdout] 114 | let hex = input.split("\n").map(|v| v.to_string()) [INFO] [stdout] | _______________^ [INFO] [stdout] 115 | | .filter(|line| !line.is_empty()) [INFO] [stdout] 116 | | .next().unwrap(); [INFO] [stdout] | |_______________^ help: try: `input.split("\n").map(|v| v.to_string()).find(|line| !line.is_empty())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_next [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/day16.rs:151:5 [INFO] [stdout] | [INFO] [stdout] 151 | index = index + 6; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace it with: `index += 6` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/day16.rs:153:34 [INFO] [stdout] | [INFO] [stdout] 153 | let packet = if packet_id == "100".to_string() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `"100"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day16.rs:155:55 [INFO] [stdout] | [INFO] [stdout] 155 | let (packet_bits, new_index) = decode_literal(&binary, index); [INFO] [stdout] | ^^^^^^^ help: change this to: `binary` [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: manual implementation of an assign operation [INFO] [stdout] --> src/day16.rs:166:9 [INFO] [stdout] | [INFO] [stdout] 166 | index = index + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace it with: `index += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/day16.rs:172:9 [INFO] [stdout] | [INFO] [stdout] 172 | index = index + size_size_field; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `index += size_size_field` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day16.rs:179:50 [INFO] [stdout] | [INFO] [stdout] 179 | let (sub_packet, new_index) = decode(&binary, index); [INFO] [stdout] | ^^^^^^^ help: change this to: `binary` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/day16.rs:193:27 [INFO] [stdout] | [INFO] [stdout] 193 | fn decode_literal(binary: &String, mut index: usize) -> (Vec, usize) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 193 - fn decode_literal(binary: &String, mut index: usize) -> (Vec, usize) { [INFO] [stdout] 193 + fn decode_literal(binary: &str, mut index: usize) -> (Vec, usize) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/day16.rs:25:22 [INFO] [stdout] | [INFO] [stdout] 25 | line.chars().map(|car| [INFO] [stdout] | ______________________^ [INFO] [stdout] 26 | | car_to_binary(car) [INFO] [stdout] | |__________________________^ help: replace the closure with the function itself: `car_to_binary` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/day16.rs:197:9 [INFO] [stdout] | [INFO] [stdout] 197 | index = index + 5; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace it with: `index += 5` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/day16.rs:46:9 [INFO] [stdout] | [INFO] [stdout] 46 | result = result * 2; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace it with: `result *= 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] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/day16.rs:200:5 [INFO] [stdout] | [INFO] [stdout] 200 | index = index + 5; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace it with: `index += 5` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.fold` can be written more succinctly using another method [INFO] [stdout] --> src/day16.rs:65:78 [INFO] [stdout] | [INFO] [stdout] 65 | "001" => sub_packets.iter().map(|packet| packet.value()).fold(1, |acc,val| acc * val ), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `product()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fold [INFO] [stdout] = note: `#[warn(clippy::unnecessary_fold)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.iter().nth()` on a `Vec` [INFO] [stdout] --> src/day16.rs:70:38 [INFO] [stdout] | [INFO] [stdout] 70 | let second = sub_packets.iter().nth(1).unwrap().value(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth [INFO] [stdout] = note: `#[warn(clippy::iter_nth)]` on by default [INFO] [stdout] help: `get` is equivalent but more concise [INFO] [stdout] | [INFO] [stdout] 70 - let second = sub_packets.iter().nth(1).unwrap().value(); [INFO] [stdout] 70 + let second = sub_packets.get(1).unwrap().value(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.iter().nth()` on a `Vec` [INFO] [stdout] --> src/day16.rs:79:38 [INFO] [stdout] | [INFO] [stdout] 79 | let second = sub_packets.iter().nth(1).unwrap().value(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth [INFO] [stdout] help: `get` is equivalent but more concise [INFO] [stdout] | [INFO] [stdout] 79 - let second = sub_packets.iter().nth(1).unwrap().value(); [INFO] [stdout] 79 + let second = sub_packets.get(1).unwrap().value(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.iter().nth()` on a `Vec` [INFO] [stdout] --> src/day16.rs:88:38 [INFO] [stdout] | [INFO] [stdout] 88 | let second = sub_packets.iter().nth(1).unwrap().value(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth [INFO] [stdout] help: `get` is equivalent but more concise [INFO] [stdout] | [INFO] [stdout] 88 - let second = sub_packets.iter().nth(1).unwrap().value(); [INFO] [stdout] 88 + let second = sub_packets.get(1).unwrap().value(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `filter(..).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(..)` instead [INFO] [stdout] --> src/day17.rs:52:16 [INFO] [stdout] | [INFO] [stdout] 52 | let line = input.split("\n").map(|v| v.to_string()) [INFO] [stdout] | ________________^ [INFO] [stdout] 53 | | .filter(|line| !line.is_empty()) [INFO] [stdout] 54 | | .next().unwrap(); [INFO] [stdout] | |_______________^ help: try: `input.split("\n").map(|v| v.to_string()).find(|line| !line.is_empty())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_next [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/day16.rs:103:24 [INFO] [stdout] | [INFO] [stdout] 103 | fn binary_to_dec(data: &String) -> u128 { [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] 103 - fn binary_to_dec(data: &String) -> u128 { [INFO] [stdout] 103 + fn binary_to_dec(data: &str) -> u128 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `filter(..).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(..)` instead [INFO] [stdout] --> src/day16.rs:114:15 [INFO] [stdout] | [INFO] [stdout] 114 | let hex = input.split("\n").map(|v| v.to_string()) [INFO] [stdout] | _______________^ [INFO] [stdout] 115 | | .filter(|line| !line.is_empty()) [INFO] [stdout] 116 | | .next().unwrap(); [INFO] [stdout] | |_______________^ help: try: `input.split("\n").map(|v| v.to_string()).find(|line| !line.is_empty())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_next [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/day16.rs:151:5 [INFO] [stdout] | [INFO] [stdout] 151 | index = index + 6; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace it with: `index += 6` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/day16.rs:153:34 [INFO] [stdout] | [INFO] [stdout] 153 | let packet = if packet_id == "100".to_string() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `"100"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day16.rs:155:55 [INFO] [stdout] | [INFO] [stdout] 155 | let (packet_bits, new_index) = decode_literal(&binary, index); [INFO] [stdout] | ^^^^^^^ help: change this to: `binary` [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: manual implementation of an assign operation [INFO] [stdout] --> src/day16.rs:166:9 [INFO] [stdout] | [INFO] [stdout] 166 | index = index + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace it with: `index += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/day16.rs:172:9 [INFO] [stdout] | [INFO] [stdout] 172 | index = index + size_size_field; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `index += size_size_field` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day16.rs:179:50 [INFO] [stdout] | [INFO] [stdout] 179 | let (sub_packet, new_index) = decode(&binary, index); [INFO] [stdout] | ^^^^^^^ help: change this to: `binary` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/day16.rs:193:27 [INFO] [stdout] | [INFO] [stdout] 193 | fn decode_literal(binary: &String, mut index: usize) -> (Vec, usize) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 193 - fn decode_literal(binary: &String, mut index: usize) -> (Vec, usize) { [INFO] [stdout] 193 + fn decode_literal(binary: &str, mut index: usize) -> (Vec, usize) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/day16.rs:197:9 [INFO] [stdout] | [INFO] [stdout] 197 | index = index + 5; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace it with: `index += 5` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/day16.rs:200:5 [INFO] [stdout] | [INFO] [stdout] 200 | index = index + 5; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace it with: `index += 5` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `filter(..).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(..)` instead [INFO] [stdout] --> src/day17.rs:52:16 [INFO] [stdout] | [INFO] [stdout] 52 | let line = input.split("\n").map(|v| v.to_string()) [INFO] [stdout] | ________________^ [INFO] [stdout] 53 | | .filter(|line| !line.is_empty()) [INFO] [stdout] 54 | | .next().unwrap(); [INFO] [stdout] | |_______________^ help: try: `input.split("\n").map(|v| v.to_string()).find(|line| !line.is_empty())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_next [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `before_parsing.left` after checking its variant with `is_some` [INFO] [stdout] --> src/day18.rs:297:43 [INFO] [stdout] | [INFO] [stdout] 294 | ... if before_parsing.left.is_some() { [INFO] [stdout] | -------------------------------- help: try: `if let Some() = before_parsing.left` [INFO] [stdout] ... [INFO] [stdout] 297 | ... left: before_parsing.left.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] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/day18.rs:263:34 [INFO] [stdout] | [INFO] [stdout] 263 | } else if car == ']' { [INFO] [stdout] | __________________________________^ [INFO] [stdout] 264 | | // do nothing [INFO] [stdout] 265 | | } else if car == ',' { [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/day18.rs:265:34 [INFO] [stdout] | [INFO] [stdout] 265 | } else if car == ',' { [INFO] [stdout] | __________________________________^ [INFO] [stdout] 266 | | // do nothing [INFO] [stdout] 267 | | } else { [INFO] [stdout] | |_____________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/day19.rs:175:52 [INFO] [stdout] | [INFO] [stdout] 175 | beacons: input.split("\n").skip(1).map(|input| Beacon::new(input)).collect() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Beacon::new` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/day19.rs:205:14 [INFO] [stdout] | [INFO] [stdout] 205 | .map(|input| Scanner::new(input)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Scanner::new` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `before_parsing.left` after checking its variant with `is_some` [INFO] [stdout] --> src/day18.rs:297:43 [INFO] [stdout] | [INFO] [stdout] 294 | ... if before_parsing.left.is_some() { [INFO] [stdout] | -------------------------------- help: try: `if let Some() = before_parsing.left` [INFO] [stdout] ... [INFO] [stdout] 297 | ... left: before_parsing.left.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] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/day18.rs:263:34 [INFO] [stdout] | [INFO] [stdout] 263 | } else if car == ']' { [INFO] [stdout] | __________________________________^ [INFO] [stdout] 264 | | // do nothing [INFO] [stdout] 265 | | } else if car == ',' { [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/day18.rs:265:34 [INFO] [stdout] | [INFO] [stdout] 265 | } else if car == ',' { [INFO] [stdout] | __________________________________^ [INFO] [stdout] 266 | | // do nothing [INFO] [stdout] 267 | | } else { [INFO] [stdout] | |_____________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/day20.rs:14:9 [INFO] [stdout] | [INFO] [stdout] 14 | result = result * 2; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace it with: `result *= 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] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/day20.rs:20:24 [INFO] [stdout] | [INFO] [stdout] 20 | fn binary_to_dec(data: &String) -> usize { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 20 - fn binary_to_dec(data: &String) -> usize { [INFO] [stdout] 20 + fn binary_to_dec(data: &str) -> usize { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/day20.rs:29:5 [INFO] [stdout] | [INFO] [stdout] 25 | / let result = binary.into_iter().enumerate().map(|(index, data)| [INFO] [stdout] 26 | | data * pow2(index) [INFO] [stdout] 27 | | ).sum(); [INFO] [stdout] | |____________- unnecessary `let` binding [INFO] [stdout] 28 | [INFO] [stdout] 29 | result [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 25 ~ [INFO] [stdout] 26 | [INFO] [stdout] 27 ~ binary.into_iter().enumerate().map(|(index, data)| [INFO] [stdout] 28 + data * pow2(index) [INFO] [stdout] 29 + ).sum() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `self.map.get(0)` [INFO] [stdout] --> src/day20.rs:34:26 [INFO] [stdout] | [INFO] [stdout] 34 | if x >= 0 && x < self.map.get(0).unwrap().len() as i32 [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `self.map.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: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/day20.rs:43:57 [INFO] [stdout] | [INFO] [stdout] 43 | fn next_car(&self, x: usize, y: usize, enhancement: &String) -> char { [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] 43 - fn next_car(&self, x: usize, y: usize, enhancement: &String) -> char { [INFO] [stdout] 43 + fn next_car(&self, x: usize, y: usize, enhancement: &str) -> char { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `self.map.get(0)` [INFO] [stdout] --> src/day20.rs:60:21 [INFO] [stdout] | [INFO] [stdout] 60 | let len_x = self.map.get(0).unwrap().len(); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `self.map.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `self.map.get(0)` [INFO] [stdout] --> src/day20.rs:72:26 [INFO] [stdout] | [INFO] [stdout] 72 | let len_x: i32 = self.map.get(0).unwrap().len() as i32; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `self.map.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/day19.rs:175:52 [INFO] [stdout] | [INFO] [stdout] 175 | beacons: input.split("\n").skip(1).map(|input| Beacon::new(input)).collect() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Beacon::new` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/day21.rs:12:9 [INFO] [stdout] | [INFO] [stdout] 12 | self.current = self.current + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.current += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/day19.rs:205:14 [INFO] [stdout] | [INFO] [stdout] 205 | .map(|input| Scanner::new(input)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Scanner::new` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `self.players.get(0)` [INFO] [stdout] --> src/day21.rs:47:31 [INFO] [stdout] | [INFO] [stdout] 47 | let next_player = self.players.get(0).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `self.players.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `players.get(0)` [INFO] [stdout] --> src/day21.rs:113:17 [INFO] [stdout] | [INFO] [stdout] 113 | let loser = players.get(0).unwrap().clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `players.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/day20.rs:14:9 [INFO] [stdout] | [INFO] [stdout] 14 | result = result * 2; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace it with: `result *= 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] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/day20.rs:20:24 [INFO] [stdout] | [INFO] [stdout] 20 | fn binary_to_dec(data: &String) -> usize { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 20 - fn binary_to_dec(data: &String) -> usize { [INFO] [stdout] 20 + fn binary_to_dec(data: &str) -> usize { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/day20.rs:29:5 [INFO] [stdout] | [INFO] [stdout] 25 | / let result = binary.into_iter().enumerate().map(|(index, data)| [INFO] [stdout] 26 | | data * pow2(index) [INFO] [stdout] 27 | | ).sum(); [INFO] [stdout] | |____________- unnecessary `let` binding [INFO] [stdout] 28 | [INFO] [stdout] 29 | result [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 25 ~ [INFO] [stdout] 26 | [INFO] [stdout] 27 ~ binary.into_iter().enumerate().map(|(index, data)| [INFO] [stdout] 28 + data * pow2(index) [INFO] [stdout] 29 + ).sum() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `self.map.get(0)` [INFO] [stdout] --> src/day20.rs:34:26 [INFO] [stdout] | [INFO] [stdout] 34 | if x >= 0 && x < self.map.get(0).unwrap().len() as i32 [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `self.map.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: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/day20.rs:43:57 [INFO] [stdout] | [INFO] [stdout] 43 | fn next_car(&self, x: usize, y: usize, enhancement: &String) -> char { [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] 43 - fn next_car(&self, x: usize, y: usize, enhancement: &String) -> char { [INFO] [stdout] 43 + fn next_car(&self, x: usize, y: usize, enhancement: &str) -> char { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `self.map.get(0)` [INFO] [stdout] --> src/day20.rs:60:21 [INFO] [stdout] | [INFO] [stdout] 60 | let len_x = self.map.get(0).unwrap().len(); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `self.map.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `self.map.get(0)` [INFO] [stdout] --> src/day20.rs:72:26 [INFO] [stdout] | [INFO] [stdout] 72 | let len_x: i32 = self.map.get(0).unwrap().len() as i32; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `self.map.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/day21.rs:12:9 [INFO] [stdout] | [INFO] [stdout] 12 | self.current = self.current + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.current += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/day22.rs:151:5 [INFO] [stdout] | [INFO] [stdout] 151 | pos >= -50 && pos <= 50 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(-50..=50).contains(&pos)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/day22.rs:157:14 [INFO] [stdout] | [INFO] [stdout] 157 | .map(|line| Step::new(line)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Step::new` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `self.players.get(0)` [INFO] [stdout] --> src/day21.rs:47:31 [INFO] [stdout] | [INFO] [stdout] 47 | let next_player = self.players.get(0).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `self.players.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `.clone()` on a double reference, which returns `&str` instead of cloning the inner type [INFO] [stdout] --> src/day8.rs:52:76 [INFO] [stdout] | [INFO] [stdout] 52 | let possible_values: HashSet<&str> = digits.iter().map(|(_, cars)| cars.clone()).collect(); [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(suspicious_double_ref_op)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `players.get(0)` [INFO] [stdout] --> src/day21.rs:113:17 [INFO] [stdout] | [INFO] [stdout] 113 | let loser = players.get(0).unwrap().clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `players.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/day22.rs:151:5 [INFO] [stdout] | [INFO] [stdout] 151 | pos >= -50 && pos <= 50 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(-50..=50).contains(&pos)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/day22.rs:157:14 [INFO] [stdout] | [INFO] [stdout] 157 | .map(|line| Step::new(line)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Step::new` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `.clone()` on a double reference, which returns `&str` instead of cloning the inner type [INFO] [stdout] --> src/day8.rs:52:76 [INFO] [stdout] | [INFO] [stdout] 52 | let possible_values: HashSet<&str> = digits.iter().map(|(_, cars)| cars.clone()).collect(); [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(suspicious_double_ref_op)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 1.25s [INFO] running `Command { std: "docker" "inspect" "8cc058b9fdb6617f62a3ea4b3f90682f5dece37f5b0e3b089ab4958e3bb9f940", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "8cc058b9fdb6617f62a3ea4b3f90682f5dece37f5b0e3b089ab4958e3bb9f940", kill_on_drop: false }` [INFO] [stdout] 8cc058b9fdb6617f62a3ea4b3f90682f5dece37f5b0e3b089ab4958e3bb9f940