[INFO] cloning repository https://github.com/A1cey/AdventOfCode2024 [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/A1cey/AdventOfCode2024" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FA1cey%2FAdventOfCode2024", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FA1cey%2FAdventOfCode2024'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 51c0a8147bd67b2b4793a1feb914e89e09ce714a [INFO] linting A1cey/AdventOfCode2024 against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FA1cey%2FAdventOfCode2024" "/workspace/builds/worker-6-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-6-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/A1cey/AdventOfCode2024 [INFO] finished tweaking git repo https://github.com/A1cey/AdventOfCode2024 [INFO] tweaked toml for git repo https://github.com/A1cey/AdventOfCode2024 written to /workspace/builds/worker-6-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/A1cey/AdventOfCode2024 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/A1cey/AdventOfCode2024 already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-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] 54c596400bbb26921300d6bc406ea5550949fccdcefb900b1514b1dcdb35cfe9 [INFO] running `Command { std: "docker" "start" "-a" "54c596400bbb26921300d6bc406ea5550949fccdcefb900b1514b1dcdb35cfe9", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "54c596400bbb26921300d6bc406ea5550949fccdcefb900b1514b1dcdb35cfe9", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "54c596400bbb26921300d6bc406ea5550949fccdcefb900b1514b1dcdb35cfe9", kill_on_drop: false }` [INFO] [stdout] 54c596400bbb26921300d6bc406ea5550949fccdcefb900b1514b1dcdb35cfe9 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-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] 27d2c92d20fa146794317025a1e9aeba7db068ecac15a8724f9501644b13213f [INFO] running `Command { std: "docker" "start" "-a" "27d2c92d20fa146794317025a1e9aeba7db068ecac15a8724f9501644b13213f", kill_on_drop: false }` [INFO] [stderr] Checking colored v2.2.0 [INFO] [stderr] Checking AdventOfCode2024 v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unnecessary `>= y + 1` or `x - 1 >=` [INFO] [stdout] --> src/day12.rs:120:27 [INFO] [stdout] | [INFO] [stdout] 120 | let down = if tile.row + 1 <= max_row { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: change it to: `tile.row < max_row` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#int_plus_one [INFO] [stdout] = note: `#[warn(clippy::int_plus_one)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `>= y + 1` or `x - 1 >=` [INFO] [stdout] --> src/day12.rs:126:28 [INFO] [stdout] | [INFO] [stdout] 126 | let right = if tile.col + 1 <= max_col { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: change it to: `tile.col < max_col` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#int_plus_one [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `default` [INFO] [stdout] --> src/day15.rs:1:34 [INFO] [stdout] | [INFO] [stdout] 1 | use std::{collections::VecDeque, default, fs}; [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: `core::hash` [INFO] [stdout] --> src/day16.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use core::hash; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `>= y + 1` or `x - 1 >=` [INFO] [stdout] --> src/day12.rs:120:27 [INFO] [stdout] | [INFO] [stdout] 120 | let down = if tile.row + 1 <= max_row { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: change it to: `tile.row < max_row` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#int_plus_one [INFO] [stdout] = note: `#[warn(clippy::int_plus_one)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `>= y + 1` or `x - 1 >=` [INFO] [stdout] --> src/day12.rs:126:28 [INFO] [stdout] | [INFO] [stdout] 126 | let right = if tile.col + 1 <= max_col { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: change it to: `tile.col < max_col` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#int_plus_one [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `colored::Colorize` [INFO] [stdout] --> src/day18.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use colored::Colorize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `default` [INFO] [stdout] --> src/day15.rs:1:34 [INFO] [stdout] | [INFO] [stdout] 1 | use std::{collections::VecDeque, default, fs}; [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 imports: `File`, `io::Write`, `ops::Div`, and `path::Path` [INFO] [stdout] --> src/day23.rs:3:16 [INFO] [stdout] | [INFO] [stdout] 3 | fs::{self, File}, [INFO] [stdout] | ^^^^ [INFO] [stdout] 4 | io::Write, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] 5 | ops::Div, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] 6 | path::Path, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `core::hash` [INFO] [stdout] --> src/day16.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use core::hash; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `colored::Colorize` [INFO] [stdout] --> src/day18.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use colored::Colorize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `File`, `io::Write`, `ops::Div`, and `path::Path` [INFO] [stdout] --> src/day23.rs:3:16 [INFO] [stdout] | [INFO] [stdout] 3 | fs::{self, File}, [INFO] [stdout] | ^^^^ [INFO] [stdout] 4 | io::Write, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] 5 | ops::Div, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] 6 | path::Path, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/day12.rs:26:9 [INFO] [stdout] | [INFO] [stdout] 26 | let mut field = fs::read_to_string("src/input/input12.txt") [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: `other` [INFO] [stdout] --> src/day15_2.rs:37:13 [INFO] [stdout] | [INFO] [stdout] 37 | other => unreachable!(), [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_other` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/day15_2.rs:184:5 [INFO] [stdout] | [INFO] [stdout] 184 | mut coords: [(usize, usize); N], [INFO] [stdout] | ----^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `map` [INFO] [stdout] --> src/day15_2.rs:186:5 [INFO] [stdout] | [INFO] [stdout] 186 | map: &WideMap, [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_map` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/day15_2.rs:227:5 [INFO] [stdout] | [INFO] [stdout] 227 | mut coords: [(usize, usize); N], [INFO] [stdout] | ----^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/day15_2.rs:246:21 [INFO] [stdout] | [INFO] [stdout] 246 | let mut a; [INFO] [stdout] | ----^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/day15_2.rs:253:21 [INFO] [stdout] | [INFO] [stdout] 253 | let mut a; [INFO] [stdout] | ----^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `width` [INFO] [stdout] --> src/day15_2.rs:382:9 [INFO] [stdout] | [INFO] [stdout] 382 | let width = m[0].len(); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_width` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `width` [INFO] [stdout] --> src/day15_2.rs:395:9 [INFO] [stdout] | [INFO] [stdout] 395 | let width = m[0].len(); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_width` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/day17.rs:11:10 [INFO] [stdout] | [INFO] [stdout] 11 | let (mut registers, program) = parse_program(&input); [INFO] [stdout] | ----^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/day12.rs:26:9 [INFO] [stdout] | [INFO] [stdout] 26 | let mut field = fs::read_to_string("src/input/input12.txt") [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: `swaps` [INFO] [stdout] --> src/day24.rs:14:9 [INFO] [stdout] | [INFO] [stdout] 14 | let swaps = find_swaps(&wire_vals, &mut operations, correct_res); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_swaps` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `wire_vals` [INFO] [stdout] --> src/day24.rs:39:5 [INFO] [stdout] | [INFO] [stdout] 39 | wire_vals: &HashMap<&str, i32>, [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_wire_vals` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `operations` [INFO] [stdout] --> src/day24.rs:40:5 [INFO] [stdout] | [INFO] [stdout] 40 | operations: &mut VecDeque<((&str, &str, &str), fn(i32, i32) -> i32)>, [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_operations` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `other` [INFO] [stdout] --> src/day15_2.rs:37:13 [INFO] [stdout] | [INFO] [stdout] 37 | other => unreachable!(), [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_other` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/day21_2.rs:309:13 [INFO] [stdout] | [INFO] [stdout] 309 | let mut inp = inp.trim(); [INFO] [stdout] | ----^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/day15_2.rs:184:5 [INFO] [stdout] | [INFO] [stdout] 184 | mut coords: [(usize, usize); N], [INFO] [stdout] | ----^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `map` [INFO] [stdout] --> src/day15_2.rs:186:5 [INFO] [stdout] | [INFO] [stdout] 186 | map: &WideMap, [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_map` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/day15_2.rs:227:5 [INFO] [stdout] | [INFO] [stdout] 227 | mut coords: [(usize, usize); N], [INFO] [stdout] | ----^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/day15_2.rs:246:21 [INFO] [stdout] | [INFO] [stdout] 246 | let mut a; [INFO] [stdout] | ----^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/day15_2.rs:253:21 [INFO] [stdout] | [INFO] [stdout] 253 | let mut a; [INFO] [stdout] | ----^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `width` [INFO] [stdout] --> src/day15_2.rs:382:9 [INFO] [stdout] | [INFO] [stdout] 382 | let width = m[0].len(); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_width` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `width` [INFO] [stdout] --> src/day15_2.rs:395:9 [INFO] [stdout] | [INFO] [stdout] 395 | let width = m[0].len(); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_width` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/day17.rs:11:10 [INFO] [stdout] | [INFO] [stdout] 11 | let (mut registers, program) = parse_program(&input); [INFO] [stdout] | ----^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `count_corners` is never used [INFO] [stdout] --> src/day12.rs:115:4 [INFO] [stdout] | [INFO] [stdout] 115 | fn count_corners(region_tiles: &[Tile], max_row: usize, max_col: usize) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `dijkstra` is never used [INFO] [stdout] --> src/day13.rs:126:4 [INFO] [stdout] | [INFO] [stdout] 126 | fn dijkstra(dx_a: i64, dy_a: i64, dx_b: i64, dy_b: i64, goal: (i64, i64)) -> Option { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Robot` is never constructed [INFO] [stdout] --> src/day14.rs:9:8 [INFO] [stdout] | [INFO] [stdout] 9 | struct Robot { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Quadrant` is never used [INFO] [stdout] --> src/day14.rs:16:6 [INFO] [stdout] | [INFO] [stdout] 16 | enum Quadrant { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Occuppation` is never used [INFO] [stdout] --> src/day14.rs:25:6 [INFO] [stdout] | [INFO] [stdout] 25 | enum Occuppation { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated functions `new` and `create_robot` are never used [INFO] [stdout] --> src/day14.rs:31:14 [INFO] [stdout] | [INFO] [stdout] 30 | impl Robot { [INFO] [stdout] | ---------- associated functions in this implementation [INFO] [stdout] 31 | const fn new(pos_x: i32, pos_y: i32, vel_x: i32, vel_y: i32) -> Robot { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 40 | fn create_robot(data: &str) -> Robot { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `run` is never used [INFO] [stdout] --> src/day14.rs:55:8 [INFO] [stdout] | [INFO] [stdout] 55 | pub fn run() { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `simulate_movement` is never used [INFO] [stdout] --> src/day14.rs:95:4 [INFO] [stdout] | [INFO] [stdout] 95 | fn simulate_movement(n: i32, mut robot: Robot, room_width: i32, room_height: i32) -> Robot { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `count_robots_in_quadrants` is never used [INFO] [stdout] --> src/day14.rs:119:4 [INFO] [stdout] | [INFO] [stdout] 119 | fn count_robots_in_quadrants(robots: &[Robot], room_width: i32, room_height: i32) -> [i32; 4] { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_quadrant` is never used [INFO] [stdout] --> src/day14.rs:135:4 [INFO] [stdout] | [INFO] [stdout] 135 | fn get_quadrant(robot: &Robot, room_width: i32, room_height: i32) -> Quadrant { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `find_christmas_tree` is never used [INFO] [stdout] --> src/day14.rs:154:4 [INFO] [stdout] | [INFO] [stdout] 154 | fn find_christmas_tree( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `print_robots` is never used [INFO] [stdout] --> src/day14.rs:209:4 [INFO] [stdout] | [INFO] [stdout] 209 | fn print_robots(robots: &[Robot], room_width: i32, room_height: i32, file: &mut File) { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variants `LeftBox` and `RightBox` are never constructed [INFO] [stdout] --> src/day15.rs:17:5 [INFO] [stdout] | [INFO] [stdout] 12 | enum Tile { [INFO] [stdout] | ---- variants in this enum [INFO] [stdout] ... [INFO] [stdout] 17 | LeftBox, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] 18 | RightBox, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Tile` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_big_warehouse` is never used [INFO] [stdout] --> src/day15.rs:261:4 [INFO] [stdout] | [INFO] [stdout] 261 | fn get_big_warehouse(data: &str) -> (Vec>, Robot) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `step_2` is never used [INFO] [stdout] --> src/day15.rs:291:4 [INFO] [stdout] | [INFO] [stdout] 291 | fn step_2(warehouse: &mut Vec>, robot: &mut Robot, direction: &Direction) { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type alias `Map` is never used [INFO] [stdout] --> src/day15_2.rs:3:6 [INFO] [stdout] | [INFO] [stdout] 3 | type Map = Vec>; [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type alias `WideMap` is never used [INFO] [stdout] --> src/day15_2.rs:4:6 [INFO] [stdout] | [INFO] [stdout] 4 | type WideMap = Vec>; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Tile` is never used [INFO] [stdout] --> src/day15_2.rs:6:6 [INFO] [stdout] | [INFO] [stdout] 6 | enum Tile { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `WideTile` is never used [INFO] [stdout] --> src/day15_2.rs:14:6 [INFO] [stdout] | [INFO] [stdout] 14 | enum WideTile { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Direction` is never used [INFO] [stdout] --> src/day15_2.rs:23:6 [INFO] [stdout] | [INFO] [stdout] 23 | enum Direction { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `print_grid` is never used [INFO] [stdout] --> src/day15_2.rs:90:4 [INFO] [stdout] | [INFO] [stdout] 90 | fn print_grid(m: &[Vec]) { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_cell` is never used [INFO] [stdout] --> src/day15_2.rs:99:4 [INFO] [stdout] | [INFO] [stdout] 99 | fn get_cell(xy: (usize, usize), m: &[Vec]) -> &T { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `char_to_wide_tiles` is never used [INFO] [stdout] --> src/day15_2.rs:103:4 [INFO] [stdout] | [INFO] [stdout] 103 | fn char_to_wide_tiles(value: char) -> [WideTile; 2] { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_map` is never used [INFO] [stdout] --> src/day15_2.rs:113:4 [INFO] [stdout] | [INFO] [stdout] 113 | fn parse_map(s: &str) -> Map { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_wide_map` is never used [INFO] [stdout] --> src/day15_2.rs:119:4 [INFO] [stdout] | [INFO] [stdout] 119 | fn parse_wide_map(s: &str) -> WideMap { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_input` is never used [INFO] [stdout] --> src/day15_2.rs:126:4 [INFO] [stdout] | [INFO] [stdout] 126 | fn parse_input(s: &str) -> (Map, Vec) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_input_wide` is never used [INFO] [stdout] --> src/day15_2.rs:139:4 [INFO] [stdout] | [INFO] [stdout] 139 | fn parse_input_wide(s: &str) -> (WideMap, Vec) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `robot_coord` is never used [INFO] [stdout] --> src/day15_2.rs:151:4 [INFO] [stdout] | [INFO] [stdout] 151 | fn robot_coord(m: &Map) -> (usize, usize) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `robot_coord_wide` is never used [INFO] [stdout] --> src/day15_2.rs:163:4 [INFO] [stdout] | [INFO] [stdout] 163 | fn robot_coord_wide(m: &WideMap) -> (usize, usize) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `next_coord` is never used [INFO] [stdout] --> src/day15_2.rs:174:4 [INFO] [stdout] | [INFO] [stdout] 174 | fn next_coord(xy: (usize, usize), mve: &Direction) -> (usize, usize) { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `next_coords` is never used [INFO] [stdout] --> src/day15_2.rs:183:4 [INFO] [stdout] | [INFO] [stdout] 183 | fn next_coords( [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `next_empty_tile_coord` is never used [INFO] [stdout] --> src/day15_2.rs:192:4 [INFO] [stdout] | [INFO] [stdout] 192 | fn next_empty_tile_coord( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `next_empty_tile_coord_wide_horiz` is never used [INFO] [stdout] --> src/day15_2.rs:208:4 [INFO] [stdout] | [INFO] [stdout] 208 | fn next_empty_tile_coord_wide_horiz( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `check_moves_vert_wide` is never used [INFO] [stdout] --> src/day15_2.rs:226:4 [INFO] [stdout] | [INFO] [stdout] 226 | fn check_moves_vert_wide( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `apply_move` is never used [INFO] [stdout] --> src/day15_2.rs:265:4 [INFO] [stdout] | [INFO] [stdout] 265 | fn apply_move(mut map: Map, mve: Direction) -> Map { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `shift_boxes_horiz` is never used [INFO] [stdout] --> src/day15_2.rs:289:4 [INFO] [stdout] | [INFO] [stdout] 289 | fn shift_boxes_horiz(map: &mut [Vec], start: (usize, usize), end: (usize, usize)) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `shift_boxes_vert` is never used [INFO] [stdout] --> src/day15_2.rs:304:4 [INFO] [stdout] | [INFO] [stdout] 304 | fn shift_boxes_vert( [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `apply_move_wide` is never used [INFO] [stdout] --> src/day15_2.rs:335:4 [INFO] [stdout] | [INFO] [stdout] 335 | fn apply_move_wide(mut map: Vec>, mve: Direction) -> Vec> { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `total_gps_coords` is never used [INFO] [stdout] --> src/day15_2.rs:380:4 [INFO] [stdout] | [INFO] [stdout] 380 | fn total_gps_coords(m: &Map) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `total_gps_coords_wide` is never used [INFO] [stdout] --> src/day15_2.rs:393:4 [INFO] [stdout] | [INFO] [stdout] 393 | fn total_gps_coords_wide(m: &WideMap) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `solve_part_1` is never used [INFO] [stdout] --> src/day15_2.rs:406:4 [INFO] [stdout] | [INFO] [stdout] 406 | fn solve_part_1(s: &str) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `solve_part_2` is never used [INFO] [stdout] --> src/day15_2.rs:414:4 [INFO] [stdout] | [INFO] [stdout] 414 | fn solve_part_2(s: &str) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `run` is never used [INFO] [stdout] --> src/day15_2.rs:423:8 [INFO] [stdout] | [INFO] [stdout] 423 | pub fn run() { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Coordinate` is never constructed [INFO] [stdout] --> src/day16.rs:9:8 [INFO] [stdout] | [INFO] [stdout] 9 | struct Coordinate { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/day16.rs:15:8 [INFO] [stdout] | [INFO] [stdout] 14 | impl Coordinate { [INFO] [stdout] | --------------- associated function in this implementation [INFO] [stdout] 15 | fn new(row: usize, col: usize) -> Coordinate { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Reindeer` is never constructed [INFO] [stdout] --> src/day16.rs:27:8 [INFO] [stdout] | [INFO] [stdout] 27 | struct Reindeer { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/day16.rs:34:8 [INFO] [stdout] | [INFO] [stdout] 33 | impl Reindeer { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 34 | fn new(row: usize, col: usize, direction: Direction) -> Reindeer { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Direction` is never used [INFO] [stdout] --> src/day16.rs:50:6 [INFO] [stdout] | [INFO] [stdout] 50 | enum Direction { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Tile` is never used [INFO] [stdout] --> src/day16.rs:58:6 [INFO] [stdout] | [INFO] [stdout] 58 | enum Tile { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `run` is never used [INFO] [stdout] --> src/day16.rs:63:8 [INFO] [stdout] | [INFO] [stdout] 63 | pub fn run() { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_map` is never used [INFO] [stdout] --> src/day16.rs:91:4 [INFO] [stdout] | [INFO] [stdout] 91 | fn parse_map(input: &str) -> (Reindeer, Coordinate, Vec>) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `print_map` is never used [INFO] [stdout] --> src/day16.rs:122:4 [INFO] [stdout] | [INFO] [stdout] 122 | fn print_map(map: &[Vec], reindeer: &Reindeer, end: &Coordinate) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `print_paths` is never used [INFO] [stdout] --> src/day16.rs:138:4 [INFO] [stdout] | [INFO] [stdout] 138 | fn print_paths(map: &[Vec], paths: &[Vec]) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `print_path` is never used [INFO] [stdout] --> src/day16.rs:142:4 [INFO] [stdout] | [INFO] [stdout] 142 | fn print_path(map: &[Vec], path: &[Coordinate]) { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_min_cost` is never used [INFO] [stdout] --> src/day16.rs:157:4 [INFO] [stdout] | [INFO] [stdout] 157 | fn get_min_cost(map: &[Vec], reindeer: Reindeer, end: &Coordinate) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_best_paths` is never used [INFO] [stdout] --> src/day16.rs:166:4 [INFO] [stdout] | [INFO] [stdout] 166 | fn get_best_paths(map: &[Vec], reindeer: Reindeer, end: &Coordinate) -> Vec> { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `step` is never used [INFO] [stdout] --> src/day16.rs:170:4 [INFO] [stdout] | [INFO] [stdout] 170 | fn step( [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `step_queue` is never used [INFO] [stdout] --> src/day16.rs:248:4 [INFO] [stdout] | [INFO] [stdout] 248 | fn step_queue(map: &[Vec], reindeer: Reindeer, end: &Coordinate) -> Vec { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `dijkstra` is never used [INFO] [stdout] --> src/day16.rs:319:4 [INFO] [stdout] | [INFO] [stdout] 319 | fn dijkstra(map: &[Vec], reindeer: Reindeer, end: &Coordinate) -> i32 { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `dijkstra_all_best_paths` is never used [INFO] [stdout] --> src/day16.rs:383:4 [INFO] [stdout] | [INFO] [stdout] 383 | fn dijkstra_all_best_paths( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `brute_force` is never used [INFO] [stdout] --> src/day17.rs:92:4 [INFO] [stdout] | [INFO] [stdout] 92 | fn brute_force(program: &[u64]) -> u64 { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `first_blocking_byte_brute_force` is never used [INFO] [stdout] --> src/day18.rs:85:4 [INFO] [stdout] | [INFO] [stdout] 85 | fn first_blocking_byte_brute_force( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `test_patterns` is never used [INFO] [stdout] --> src/day19.rs:36:4 [INFO] [stdout] | [INFO] [stdout] 36 | fn test_patterns(design: &str, patterns: &[&str]) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Coordinate` is never constructed [INFO] [stdout] --> src/day20.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 4 | struct Coordinate { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/day20.rs:10:8 [INFO] [stdout] | [INFO] [stdout] 9 | impl Coordinate { [INFO] [stdout] | --------------- associated function in this implementation [INFO] [stdout] 10 | fn new(row: usize, col: usize) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Tile` is never used [INFO] [stdout] --> src/day20.rs:16:6 [INFO] [stdout] | [INFO] [stdout] 16 | enum Tile { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `run` is never used [INFO] [stdout] --> src/day20.rs:23:8 [INFO] [stdout] | [INFO] [stdout] 23 | pub fn run() { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `find_path` is never used [INFO] [stdout] --> src/day20.rs:63:4 [INFO] [stdout] | [INFO] [stdout] 63 | fn find_path(map: &[Vec], start: Coordinate, width: usize, height: usize) -> Vec { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `find_best_shortcuts` is never used [INFO] [stdout] --> src/day20.rs:92:4 [INFO] [stdout] | [INFO] [stdout] 92 | fn find_best_shortcuts(path: &[Coordinate]) -> Vec<(Coordinate, Coordinate)> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `calculate_distance` is never used [INFO] [stdout] --> src/day20.rs:110:4 [INFO] [stdout] | [INFO] [stdout] 110 | fn calculate_distance(start: Coordinate, end: Coordinate) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `print_path` is never used [INFO] [stdout] --> src/day21.rs:61:4 [INFO] [stdout] | [INFO] [stdout] 61 | fn print_path(path: &[Vec]) { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `run` is never used [INFO] [stdout] --> src/day22.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn run() { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `generate_nth_secret_num` is never used [INFO] [stdout] --> src/day22.rs:37:4 [INFO] [stdout] | [INFO] [stdout] 37 | fn generate_nth_secret_num(start: usize, n: usize) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `generate_next_secret_num` is never used [INFO] [stdout] --> src/day22.rs:47:4 [INFO] [stdout] | [INFO] [stdout] 47 | fn generate_next_secret_num(prev: usize) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `mix` is never used [INFO] [stdout] --> src/day22.rs:55:4 [INFO] [stdout] | [INFO] [stdout] 55 | fn mix(secret_num: usize, val: usize) -> usize { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `prune` is never used [INFO] [stdout] --> src/day22.rs:59:4 [INFO] [stdout] | [INFO] [stdout] 59 | fn prune(secret_num: usize) -> usize { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_n_secrets` is never used [INFO] [stdout] --> src/day22.rs:63:4 [INFO] [stdout] | [INFO] [stdout] 63 | fn get_n_secrets(start: usize, n: usize) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_secret_first_digits` is never used [INFO] [stdout] --> src/day22.rs:73:4 [INFO] [stdout] | [INFO] [stdout] 73 | fn get_secret_first_digits(secrets: &[usize]) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_changes` is never used [INFO] [stdout] --> src/day22.rs:77:4 [INFO] [stdout] | [INFO] [stdout] 77 | fn get_changes(secrets: &[usize]) -> HashMap<(isize, isize, isize, isize), usize> { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `combine_changes` is never used [INFO] [stdout] --> src/day22.rs:97:4 [INFO] [stdout] | [INFO] [stdout] 97 | fn combine_changes(changes: &[HashMap<(isize, isize, isize, isize),usize>]) -> HashMap<(isize, isize, isize, isize),Vec> { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_highest_value` is never used [INFO] [stdout] --> src/day22.rs:108:4 [INFO] [stdout] | [INFO] [stdout] 108 | fn get_highest_value(changes: &HashMap<(isize, isize, isize, isize),Vec>) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `File` is never constructed [INFO] [stdout] --> src/day9.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 4 | struct File { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/day9.rs:10:14 [INFO] [stdout] | [INFO] [stdout] 9 | impl File { [INFO] [stdout] | --------- associated function in this implementation [INFO] [stdout] 10 | const fn new(val: isize, len: usize) -> File { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Block` is never used [INFO] [stdout] --> src/day9.rs:16:6 [INFO] [stdout] | [INFO] [stdout] 16 | enum Block { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `run` is never used [INFO] [stdout] --> src/day9.rs:21:8 [INFO] [stdout] | [INFO] [stdout] 21 | pub fn run() { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `calculate_first_checksum` is never used [INFO] [stdout] --> src/day9.rs:41:4 [INFO] [stdout] | [INFO] [stdout] 41 | fn calculate_first_checksum(input: &[u32]) -> isize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `calculate_second_checksum` is never used [INFO] [stdout] --> src/day9.rs:72:4 [INFO] [stdout] | [INFO] [stdout] 72 | fn calculate_second_checksum(input: &[u32]) -> isize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type alias `Position` is never used [INFO] [stdout] --> src/day20_2.rs:3:6 [INFO] [stdout] | [INFO] [stdout] 3 | type Position = (i32, i32); [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `DEPRECATED_CHEAT_DURATION` is never used [INFO] [stdout] --> src/day20_2.rs:5:7 [INFO] [stdout] | [INFO] [stdout] 5 | const DEPRECATED_CHEAT_DURATION: i32 = 2; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `LATEST_CHEAT_DURATION` is never used [INFO] [stdout] --> src/day20_2.rs:6:7 [INFO] [stdout] | [INFO] [stdout] 6 | const LATEST_CHEAT_DURATION: i32 = 20; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `RaceSetup` is never constructed [INFO] [stdout] --> src/day20_2.rs:9:8 [INFO] [stdout] | [INFO] [stdout] 9 | struct RaceSetup { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `run` is never used [INFO] [stdout] --> src/day20_2.rs:15:8 [INFO] [stdout] | [INFO] [stdout] 15 | pub fn run() { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_input` is never used [INFO] [stdout] --> src/day20_2.rs:30:4 [INFO] [stdout] | [INFO] [stdout] 30 | fn parse_input(input: &str) -> RaceSetup { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `distance` is never used [INFO] [stdout] --> src/day20_2.rs:58:4 [INFO] [stdout] | [INFO] [stdout] 58 | fn distance(position_a: &Position, position_b: &Position) -> i32 { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `count_deprecated_cheats` is never used [INFO] [stdout] --> src/day20_2.rs:62:4 [INFO] [stdout] | [INFO] [stdout] 62 | fn count_deprecated_cheats(race_setup: &RaceSetup, saved: i32) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part1` is never used [INFO] [stdout] --> src/day20_2.rs:101:4 [INFO] [stdout] | [INFO] [stdout] 101 | fn part1(race_setup: &RaceSetup) -> usize { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `count_latest_cheats` is never used [INFO] [stdout] --> src/day20_2.rs:105:4 [INFO] [stdout] | [INFO] [stdout] 105 | fn count_latest_cheats(race_setup: &RaceSetup, saved: i32) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part2` is never used [INFO] [stdout] --> src/day20_2.rs:142:4 [INFO] [stdout] | [INFO] [stdout] 142 | fn part2(race_setup: &RaceSetup) -> usize { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/day12.rs:145:13 [INFO] [stdout] | [INFO] [stdout] 145 | / (!has_up && !has_left) [INFO] [stdout] 146 | | || (!has_up && !has_right) [INFO] [stdout] 147 | | || (!has_down && !has_left) [INFO] [stdout] 148 | | || (!has_down && !has_right) [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] 145 - (!has_up && !has_left) [INFO] [stdout] 146 - || (!has_up && !has_right) [INFO] [stdout] 147 - || (!has_down && !has_left) [INFO] [stdout] 148 - || (!has_down && !has_right) [INFO] [stdout] 145 + !(has_left && has_right || has_up && has_down) [INFO] [stdout] | [INFO] [stdout] 145 - (!has_up && !has_left) [INFO] [stdout] 146 - || (!has_up && !has_right) [INFO] [stdout] 147 - || (!has_down && !has_left) [INFO] [stdout] 148 - || (!has_down && !has_right) [INFO] [stdout] 145 + (!has_down || !has_up) && (!has_right || !has_left) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/day12.rs:145:13 [INFO] [stdout] | [INFO] [stdout] 145 | / (!has_up && !has_left) [INFO] [stdout] 146 | | || (!has_up && !has_right) [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] 145 - (!has_up && !has_left) [INFO] [stdout] 146 - || (!has_up && !has_right) [INFO] [stdout] 145 + !(has_up || has_left && has_right) [INFO] [stdout] | [INFO] [stdout] 145 - (!has_up && !has_left) [INFO] [stdout] 146 - || (!has_up && !has_right) [INFO] [stdout] 145 + (!has_right || !has_left) && !has_up [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/day12.rs:132:26 [INFO] [stdout] | [INFO] [stdout] 132 | let has_up = up.map_or(false, |(row, col)| { [INFO] [stdout] | __________________________^ [INFO] [stdout] 133 | | region_tiles.contains(&Tile::new(tile.tile_type, row, col)) [INFO] [stdout] 134 | | }); [INFO] [stdout] | |______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 132 - let has_up = up.map_or(false, |(row, col)| { [INFO] [stdout] 132 + let has_up = up.is_some_and(|(row, col)| { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/day12.rs:135:28 [INFO] [stdout] | [INFO] [stdout] 135 | let has_down = down.map_or(false, |(row, col)| { [INFO] [stdout] | ____________________________^ [INFO] [stdout] 136 | | region_tiles.contains(&Tile::new(tile.tile_type, row, col)) [INFO] [stdout] 137 | | }); [INFO] [stdout] | |______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 135 - let has_down = down.map_or(false, |(row, col)| { [INFO] [stdout] 135 + let has_down = down.is_some_and(|(row, col)| { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/day12.rs:138:28 [INFO] [stdout] | [INFO] [stdout] 138 | let has_left = left.map_or(false, |(row, col)| { [INFO] [stdout] | ____________________________^ [INFO] [stdout] 139 | | region_tiles.contains(&Tile::new(tile.tile_type, row, col)) [INFO] [stdout] 140 | | }); [INFO] [stdout] | |______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 138 - let has_left = left.map_or(false, |(row, col)| { [INFO] [stdout] 138 + let has_left = left.is_some_and(|(row, col)| { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/day12.rs:141:29 [INFO] [stdout] | [INFO] [stdout] 141 | let has_right = right.map_or(false, |(row, col)| { [INFO] [stdout] | _____________________________^ [INFO] [stdout] 142 | | region_tiles.contains(&Tile::new(tile.tile_type, row, col)) [INFO] [stdout] 143 | | }); [INFO] [stdout] | |______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 141 - let has_right = right.map_or(false, |(row, col)| { [INFO] [stdout] 141 + let has_right = right.is_some_and(|(row, col)| { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/day12_2.rs:8:14 [INFO] [stdout] | [INFO] [stdout] 8 | corners: Vec<((isize, isize), (isize, isize), (isize, isize))>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/day12_2.rs:75:19 [INFO] [stdout] | [INFO] [stdout] 75 | while investigate.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!investigate.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `swaps` [INFO] [stdout] --> src/day24.rs:14:9 [INFO] [stdout] | [INFO] [stdout] 14 | let swaps = find_swaps(&wire_vals, &mut operations, correct_res); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_swaps` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `wire_vals` [INFO] [stdout] --> src/day24.rs:39:5 [INFO] [stdout] | [INFO] [stdout] 39 | wire_vals: &HashMap<&str, i32>, [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_wire_vals` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/day13.rs:13:14 [INFO] [stdout] | [INFO] [stdout] 13 | .map(|input| parse_input(input)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `parse_input` [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: unused variable: `operations` [INFO] [stdout] --> src/day24.rs:40:5 [INFO] [stdout] | [INFO] [stdout] 40 | operations: &mut VecDeque<((&str, &str, &str), fn(i32, i32) -> i32)>, [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_operations` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/day13.rs:151:16 [INFO] [stdout] | [INFO] [stdout] 151 | && min_costs [INFO] [stdout] | ________________^ [INFO] [stdout] 152 | | .get(&(new_x, new_y)) [INFO] [stdout] 153 | | .map_or(true, |&min_cost| min_cost > new_cost) [INFO] [stdout] | |______________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_none_or` instead [INFO] [stdout] | [INFO] [stdout] 153 - .map_or(true, |&min_cost| min_cost > new_cost) [INFO] [stdout] 153 + .is_none_or(|&min_cost| min_cost > new_cost) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/day13.rs:165:16 [INFO] [stdout] | [INFO] [stdout] 165 | && min_costs [INFO] [stdout] | ________________^ [INFO] [stdout] 166 | | .get(&(new_x, new_y)) [INFO] [stdout] 167 | | .map_or(true, |&min_cost| min_cost > new_cost) [INFO] [stdout] | |______________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_none_or` instead [INFO] [stdout] | [INFO] [stdout] 167 - .map_or(true, |&min_cost| min_cost > new_cost) [INFO] [stdout] 167 + .is_none_or(|&min_cost| min_cost > new_cost) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/day21_2.rs:309:13 [INFO] [stdout] | [INFO] [stdout] 309 | let mut inp = inp.trim(); [INFO] [stdout] | ----^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/day14.rs:67:14 [INFO] [stdout] | [INFO] [stdout] 67 | .map(|line| Robot::create_robot(line)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Robot::create_robot` [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 `.fold` can be written more succinctly using another method [INFO] [stdout] --> src/day14.rs:89:10 [INFO] [stdout] | [INFO] [stdout] 89 | .fold(1, |acc, num| acc * num); [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: manual implementation of an assign operation [INFO] [stdout] --> src/day14.rs:103:13 [INFO] [stdout] | [INFO] [stdout] 103 | new_x = room_width + new_x; // addition because x is negative [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `new_x += room_width` [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/day14.rs:109:13 [INFO] [stdout] | [INFO] [stdout] 109 | new_y = room_height + new_y; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `new_y += room_height` [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: the borrowed expression implements the required traits [INFO] [stdout] --> src/day14.rs:202:41 [INFO] [stdout] | [INFO] [stdout] 202 | let mut file = File::create(&path).unwrap(); [INFO] [stdout] | ^^^^^ help: change this to: `path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` 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/day15.rs:136:20 [INFO] [stdout] | [INFO] [stdout] 136 | fn step(warehouse: &mut Vec>, robot: &mut Robot, direction: &Direction) { [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] 136 - fn step(warehouse: &mut Vec>, robot: &mut Robot, direction: &Direction) { [INFO] [stdout] 136 + fn step(warehouse: &mut [Vec], robot: &mut Robot, direction: &Direction) { [INFO] [stdout] | [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/day15.rs:291:22 [INFO] [stdout] | [INFO] [stdout] 291 | fn step_2(warehouse: &mut Vec>, robot: &mut Robot, direction: &Direction) { [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] 291 - fn step_2(warehouse: &mut Vec>, robot: &mut Robot, direction: &Direction) { [INFO] [stdout] 291 + fn step_2(warehouse: &mut [Vec], robot: &mut Robot, direction: &Direction) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to move all elements into a new `Vec` [INFO] [stdout] --> src/day15.rs:363:33 [INFO] [stdout] | [INFO] [stdout] 363 | let mut queue = boxes_to_check.drain(..).collect::>(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `mem::take`: `std::mem::take(&mut boxes_to_check)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#drain_collect [INFO] [stdout] = note: `#[warn(clippy::drain_collect)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to move all elements into a new `Vec` [INFO] [stdout] --> src/day15.rs:430:33 [INFO] [stdout] | [INFO] [stdout] 430 | let mut queue = boxes_to_check.drain(..).collect::>(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `mem::take`: `std::mem::take(&mut boxes_to_check)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#drain_collect [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: importing legacy numeric constants [INFO] [stdout] --> src/day16.rs:5:9 [INFO] [stdout] | [INFO] [stdout] 5 | fs, i32, [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `i32::` will resolve to the respective associated constant [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/day16.rs:163:5 [INFO] [stdout] | [INFO] [stdout] 162 | let min_cost = dijkstra(map, reindeer, end); [INFO] [stdout] | -------------------------------------------- unnecessary `let` binding [INFO] [stdout] 163 | min_cost [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] 162 ~ [INFO] [stdout] 163 ~ dijkstra(map, reindeer, end) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `count_corners` is never used [INFO] [stdout] --> src/day12.rs:115:4 [INFO] [stdout] | [INFO] [stdout] 115 | fn count_corners(region_tiles: &[Tile], max_row: usize, max_col: usize) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `dijkstra` is never used [INFO] [stdout] --> src/day13.rs:126:4 [INFO] [stdout] | [INFO] [stdout] 126 | fn dijkstra(dx_a: i64, dy_a: i64, dx_b: i64, dy_b: i64, goal: (i64, i64)) -> Option { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Robot` is never constructed [INFO] [stdout] --> src/day14.rs:9:8 [INFO] [stdout] | [INFO] [stdout] 9 | struct Robot { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Quadrant` is never used [INFO] [stdout] --> src/day14.rs:16:6 [INFO] [stdout] | [INFO] [stdout] 16 | enum Quadrant { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Occuppation` is never used [INFO] [stdout] --> src/day14.rs:25:6 [INFO] [stdout] | [INFO] [stdout] 25 | enum Occuppation { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated functions `new` and `create_robot` are never used [INFO] [stdout] --> src/day14.rs:31:14 [INFO] [stdout] | [INFO] [stdout] 30 | impl Robot { [INFO] [stdout] | ---------- associated functions in this implementation [INFO] [stdout] 31 | const fn new(pos_x: i32, pos_y: i32, vel_x: i32, vel_y: i32) -> Robot { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 40 | fn create_robot(data: &str) -> Robot { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `run` is never used [INFO] [stdout] --> src/day14.rs:55:8 [INFO] [stdout] | [INFO] [stdout] 55 | pub fn run() { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `simulate_movement` is never used [INFO] [stdout] --> src/day14.rs:95:4 [INFO] [stdout] | [INFO] [stdout] 95 | fn simulate_movement(n: i32, mut robot: Robot, room_width: i32, room_height: i32) -> Robot { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `count_robots_in_quadrants` is never used [INFO] [stdout] --> src/day14.rs:119:4 [INFO] [stdout] | [INFO] [stdout] 119 | fn count_robots_in_quadrants(robots: &[Robot], room_width: i32, room_height: i32) -> [i32; 4] { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_quadrant` is never used [INFO] [stdout] --> src/day14.rs:135:4 [INFO] [stdout] | [INFO] [stdout] 135 | fn get_quadrant(robot: &Robot, room_width: i32, room_height: i32) -> Quadrant { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `find_christmas_tree` is never used [INFO] [stdout] --> src/day14.rs:154:4 [INFO] [stdout] | [INFO] [stdout] 154 | fn find_christmas_tree( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `print_robots` is never used [INFO] [stdout] --> src/day14.rs:209:4 [INFO] [stdout] | [INFO] [stdout] 209 | fn print_robots(robots: &[Robot], room_width: i32, room_height: i32, file: &mut File) { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variants `LeftBox` and `RightBox` are never constructed [INFO] [stdout] --> src/day15.rs:17:5 [INFO] [stdout] | [INFO] [stdout] 12 | enum Tile { [INFO] [stdout] | ---- variants in this enum [INFO] [stdout] ... [INFO] [stdout] 17 | LeftBox, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] 18 | RightBox, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Tile` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_big_warehouse` is never used [INFO] [stdout] --> src/day15.rs:261:4 [INFO] [stdout] | [INFO] [stdout] 261 | fn get_big_warehouse(data: &str) -> (Vec>, Robot) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `step_2` is never used [INFO] [stdout] --> src/day15.rs:291:4 [INFO] [stdout] | [INFO] [stdout] 291 | fn step_2(warehouse: &mut Vec>, robot: &mut Robot, direction: &Direction) { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type alias `Map` is never used [INFO] [stdout] --> src/day15_2.rs:3:6 [INFO] [stdout] | [INFO] [stdout] 3 | type Map = Vec>; [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type alias `WideMap` is never used [INFO] [stdout] --> src/day15_2.rs:4:6 [INFO] [stdout] | [INFO] [stdout] 4 | type WideMap = Vec>; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Tile` is never used [INFO] [stdout] --> src/day15_2.rs:6:6 [INFO] [stdout] | [INFO] [stdout] 6 | enum Tile { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `WideTile` is never used [INFO] [stdout] --> src/day15_2.rs:14:6 [INFO] [stdout] | [INFO] [stdout] 14 | enum WideTile { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Direction` is never used [INFO] [stdout] --> src/day15_2.rs:23:6 [INFO] [stdout] | [INFO] [stdout] 23 | enum Direction { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `print_grid` is never used [INFO] [stdout] --> src/day15_2.rs:90:4 [INFO] [stdout] | [INFO] [stdout] 90 | fn print_grid(m: &[Vec]) { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_cell` is never used [INFO] [stdout] --> src/day15_2.rs:99:4 [INFO] [stdout] | [INFO] [stdout] 99 | fn get_cell(xy: (usize, usize), m: &[Vec]) -> &T { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `char_to_wide_tiles` is never used [INFO] [stdout] --> src/day15_2.rs:103:4 [INFO] [stdout] | [INFO] [stdout] 103 | fn char_to_wide_tiles(value: char) -> [WideTile; 2] { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_map` is never used [INFO] [stdout] --> src/day15_2.rs:113:4 [INFO] [stdout] | [INFO] [stdout] 113 | fn parse_map(s: &str) -> Map { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_wide_map` is never used [INFO] [stdout] --> src/day15_2.rs:119:4 [INFO] [stdout] | [INFO] [stdout] 119 | fn parse_wide_map(s: &str) -> WideMap { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_input` is never used [INFO] [stdout] --> src/day15_2.rs:126:4 [INFO] [stdout] | [INFO] [stdout] 126 | fn parse_input(s: &str) -> (Map, Vec) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_input_wide` is never used [INFO] [stdout] --> src/day15_2.rs:139:4 [INFO] [stdout] | [INFO] [stdout] 139 | fn parse_input_wide(s: &str) -> (WideMap, Vec) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `robot_coord` is never used [INFO] [stdout] --> src/day15_2.rs:151:4 [INFO] [stdout] | [INFO] [stdout] 151 | fn robot_coord(m: &Map) -> (usize, usize) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `robot_coord_wide` is never used [INFO] [stdout] --> src/day15_2.rs:163:4 [INFO] [stdout] | [INFO] [stdout] 163 | fn robot_coord_wide(m: &WideMap) -> (usize, usize) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `next_coord` is never used [INFO] [stdout] --> src/day15_2.rs:174:4 [INFO] [stdout] | [INFO] [stdout] 174 | fn next_coord(xy: (usize, usize), mve: &Direction) -> (usize, usize) { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `next_coords` is never used [INFO] [stdout] --> src/day15_2.rs:183:4 [INFO] [stdout] | [INFO] [stdout] 183 | fn next_coords( [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `next_empty_tile_coord` is never used [INFO] [stdout] --> src/day15_2.rs:192:4 [INFO] [stdout] | [INFO] [stdout] 192 | fn next_empty_tile_coord( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `next_empty_tile_coord_wide_horiz` is never used [INFO] [stdout] --> src/day15_2.rs:208:4 [INFO] [stdout] | [INFO] [stdout] 208 | fn next_empty_tile_coord_wide_horiz( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `check_moves_vert_wide` is never used [INFO] [stdout] --> src/day15_2.rs:226:4 [INFO] [stdout] | [INFO] [stdout] 226 | fn check_moves_vert_wide( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `apply_move` is never used [INFO] [stdout] --> src/day15_2.rs:265:4 [INFO] [stdout] | [INFO] [stdout] 265 | fn apply_move(mut map: Map, mve: Direction) -> Map { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `shift_boxes_horiz` is never used [INFO] [stdout] --> src/day15_2.rs:289:4 [INFO] [stdout] | [INFO] [stdout] 289 | fn shift_boxes_horiz(map: &mut [Vec], start: (usize, usize), end: (usize, usize)) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `shift_boxes_vert` is never used [INFO] [stdout] --> src/day15_2.rs:304:4 [INFO] [stdout] | [INFO] [stdout] 304 | fn shift_boxes_vert( [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `apply_move_wide` is never used [INFO] [stdout] --> src/day15_2.rs:335:4 [INFO] [stdout] | [INFO] [stdout] 335 | fn apply_move_wide(mut map: Vec>, mve: Direction) -> Vec> { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `total_gps_coords` is never used [INFO] [stdout] --> src/day15_2.rs:380:4 [INFO] [stdout] | [INFO] [stdout] 380 | fn total_gps_coords(m: &Map) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `total_gps_coords_wide` is never used [INFO] [stdout] --> src/day15_2.rs:393:4 [INFO] [stdout] | [INFO] [stdout] 393 | fn total_gps_coords_wide(m: &WideMap) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `solve_part_1` is never used [INFO] [stdout] --> src/day15_2.rs:406:4 [INFO] [stdout] | [INFO] [stdout] 406 | fn solve_part_1(s: &str) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `solve_part_2` is never used [INFO] [stdout] --> src/day15_2.rs:414:4 [INFO] [stdout] | [INFO] [stdout] 414 | fn solve_part_2(s: &str) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `run` is never used [INFO] [stdout] --> src/day15_2.rs:423:8 [INFO] [stdout] | [INFO] [stdout] 423 | pub fn run() { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Coordinate` is never constructed [INFO] [stdout] --> src/day16.rs:9:8 [INFO] [stdout] | [INFO] [stdout] 9 | struct Coordinate { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/day16.rs:15:8 [INFO] [stdout] | [INFO] [stdout] 14 | impl Coordinate { [INFO] [stdout] | --------------- associated function in this implementation [INFO] [stdout] 15 | fn new(row: usize, col: usize) -> Coordinate { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Reindeer` is never constructed [INFO] [stdout] --> src/day16.rs:27:8 [INFO] [stdout] | [INFO] [stdout] 27 | struct Reindeer { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/day16.rs:34:8 [INFO] [stdout] | [INFO] [stdout] 33 | impl Reindeer { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 34 | fn new(row: usize, col: usize, direction: Direction) -> Reindeer { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Direction` is never used [INFO] [stdout] --> src/day16.rs:50:6 [INFO] [stdout] | [INFO] [stdout] 50 | enum Direction { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Tile` is never used [INFO] [stdout] --> src/day16.rs:58:6 [INFO] [stdout] | [INFO] [stdout] 58 | enum Tile { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `run` is never used [INFO] [stdout] --> src/day16.rs:63:8 [INFO] [stdout] | [INFO] [stdout] 63 | pub fn run() { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_map` is never used [INFO] [stdout] --> src/day16.rs:91:4 [INFO] [stdout] | [INFO] [stdout] 91 | fn parse_map(input: &str) -> (Reindeer, Coordinate, Vec>) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `print_map` is never used [INFO] [stdout] --> src/day16.rs:122:4 [INFO] [stdout] | [INFO] [stdout] 122 | fn print_map(map: &[Vec], reindeer: &Reindeer, end: &Coordinate) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `print_paths` is never used [INFO] [stdout] --> src/day16.rs:138:4 [INFO] [stdout] | [INFO] [stdout] 138 | fn print_paths(map: &[Vec], paths: &[Vec]) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `print_path` is never used [INFO] [stdout] --> src/day16.rs:142:4 [INFO] [stdout] | [INFO] [stdout] 142 | fn print_path(map: &[Vec], path: &[Coordinate]) { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_min_cost` is never used [INFO] [stdout] --> src/day16.rs:157:4 [INFO] [stdout] | [INFO] [stdout] 157 | fn get_min_cost(map: &[Vec], reindeer: Reindeer, end: &Coordinate) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_best_paths` is never used [INFO] [stdout] --> src/day16.rs:166:4 [INFO] [stdout] | [INFO] [stdout] 166 | fn get_best_paths(map: &[Vec], reindeer: Reindeer, end: &Coordinate) -> Vec> { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `step` is never used [INFO] [stdout] --> src/day16.rs:170:4 [INFO] [stdout] | [INFO] [stdout] 170 | fn step( [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `step_queue` is never used [INFO] [stdout] --> src/day16.rs:248:4 [INFO] [stdout] | [INFO] [stdout] 248 | fn step_queue(map: &[Vec], reindeer: Reindeer, end: &Coordinate) -> Vec { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `dijkstra` is never used [INFO] [stdout] --> src/day16.rs:319:4 [INFO] [stdout] | [INFO] [stdout] 319 | fn dijkstra(map: &[Vec], reindeer: Reindeer, end: &Coordinate) -> i32 { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `dijkstra_all_best_paths` is never used [INFO] [stdout] --> src/day16.rs:383:4 [INFO] [stdout] | [INFO] [stdout] 383 | fn dijkstra_all_best_paths( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `brute_force` is never used [INFO] [stdout] --> src/day17.rs:92:4 [INFO] [stdout] | [INFO] [stdout] 92 | fn brute_force(program: &[u64]) -> u64 { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `first_blocking_byte_brute_force` is never used [INFO] [stdout] --> src/day18.rs:85:4 [INFO] [stdout] | [INFO] [stdout] 85 | fn first_blocking_byte_brute_force( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `test_patterns` is never used [INFO] [stdout] --> src/day19.rs:36:4 [INFO] [stdout] | [INFO] [stdout] 36 | fn test_patterns(design: &str, patterns: &[&str]) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Coordinate` is never constructed [INFO] [stdout] --> src/day20.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 4 | struct Coordinate { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/day20.rs:10:8 [INFO] [stdout] | [INFO] [stdout] 9 | impl Coordinate { [INFO] [stdout] | --------------- associated function in this implementation [INFO] [stdout] 10 | fn new(row: usize, col: usize) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Tile` is never used [INFO] [stdout] --> src/day20.rs:16:6 [INFO] [stdout] | [INFO] [stdout] 16 | enum Tile { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `run` is never used [INFO] [stdout] --> src/day20.rs:23:8 [INFO] [stdout] | [INFO] [stdout] 23 | pub fn run() { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `find_path` is never used [INFO] [stdout] --> src/day20.rs:63:4 [INFO] [stdout] | [INFO] [stdout] 63 | fn find_path(map: &[Vec], start: Coordinate, width: usize, height: usize) -> Vec { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `find_best_shortcuts` is never used [INFO] [stdout] --> src/day20.rs:92:4 [INFO] [stdout] | [INFO] [stdout] 92 | fn find_best_shortcuts(path: &[Coordinate]) -> Vec<(Coordinate, Coordinate)> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `calculate_distance` is never used [INFO] [stdout] --> src/day20.rs:110:4 [INFO] [stdout] | [INFO] [stdout] 110 | fn calculate_distance(start: Coordinate, end: Coordinate) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `print_path` is never used [INFO] [stdout] --> src/day21.rs:61:4 [INFO] [stdout] | [INFO] [stdout] 61 | fn print_path(path: &[Vec]) { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `run` is never used [INFO] [stdout] --> src/day22.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn run() { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `generate_nth_secret_num` is never used [INFO] [stdout] --> src/day22.rs:37:4 [INFO] [stdout] | [INFO] [stdout] 37 | fn generate_nth_secret_num(start: usize, n: usize) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `generate_next_secret_num` is never used [INFO] [stdout] --> src/day22.rs:47:4 [INFO] [stdout] | [INFO] [stdout] 47 | fn generate_next_secret_num(prev: usize) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `mix` is never used [INFO] [stdout] --> src/day22.rs:55:4 [INFO] [stdout] | [INFO] [stdout] 55 | fn mix(secret_num: usize, val: usize) -> usize { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `prune` is never used [INFO] [stdout] --> src/day22.rs:59:4 [INFO] [stdout] | [INFO] [stdout] 59 | fn prune(secret_num: usize) -> usize { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_n_secrets` is never used [INFO] [stdout] --> src/day22.rs:63:4 [INFO] [stdout] | [INFO] [stdout] 63 | fn get_n_secrets(start: usize, n: usize) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_secret_first_digits` is never used [INFO] [stdout] --> src/day22.rs:73:4 [INFO] [stdout] | [INFO] [stdout] 73 | fn get_secret_first_digits(secrets: &[usize]) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_changes` is never used [INFO] [stdout] --> src/day22.rs:77:4 [INFO] [stdout] | [INFO] [stdout] 77 | fn get_changes(secrets: &[usize]) -> HashMap<(isize, isize, isize, isize), usize> { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `combine_changes` is never used [INFO] [stdout] --> src/day22.rs:97:4 [INFO] [stdout] | [INFO] [stdout] 97 | fn combine_changes(changes: &[HashMap<(isize, isize, isize, isize),usize>]) -> HashMap<(isize, isize, isize, isize),Vec> { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_highest_value` is never used [INFO] [stdout] --> src/day22.rs:108:4 [INFO] [stdout] | [INFO] [stdout] 108 | fn get_highest_value(changes: &HashMap<(isize, isize, isize, isize),Vec>) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `File` is never constructed [INFO] [stdout] --> src/day9.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 4 | struct File { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/day9.rs:10:14 [INFO] [stdout] | [INFO] [stdout] 9 | impl File { [INFO] [stdout] | --------- associated function in this implementation [INFO] [stdout] 10 | const fn new(val: isize, len: usize) -> File { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Block` is never used [INFO] [stdout] --> src/day9.rs:16:6 [INFO] [stdout] | [INFO] [stdout] 16 | enum Block { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `run` is never used [INFO] [stdout] --> src/day9.rs:21:8 [INFO] [stdout] | [INFO] [stdout] 21 | pub fn run() { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `calculate_first_checksum` is never used [INFO] [stdout] --> src/day9.rs:41:4 [INFO] [stdout] | [INFO] [stdout] 41 | fn calculate_first_checksum(input: &[u32]) -> isize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `calculate_second_checksum` is never used [INFO] [stdout] --> src/day9.rs:72:4 [INFO] [stdout] | [INFO] [stdout] 72 | fn calculate_second_checksum(input: &[u32]) -> isize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type alias `Position` is never used [INFO] [stdout] --> src/day20_2.rs:3:6 [INFO] [stdout] | [INFO] [stdout] 3 | type Position = (i32, i32); [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `DEPRECATED_CHEAT_DURATION` is never used [INFO] [stdout] --> src/day20_2.rs:5:7 [INFO] [stdout] | [INFO] [stdout] 5 | const DEPRECATED_CHEAT_DURATION: i32 = 2; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `LATEST_CHEAT_DURATION` is never used [INFO] [stdout] --> src/day20_2.rs:6:7 [INFO] [stdout] | [INFO] [stdout] 6 | const LATEST_CHEAT_DURATION: i32 = 20; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `RaceSetup` is never constructed [INFO] [stdout] --> src/day20_2.rs:9:8 [INFO] [stdout] | [INFO] [stdout] 9 | struct RaceSetup { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `run` is never used [INFO] [stdout] --> src/day20_2.rs:15:8 [INFO] [stdout] | [INFO] [stdout] 15 | pub fn run() { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_input` is never used [INFO] [stdout] --> src/day20_2.rs:30:4 [INFO] [stdout] | [INFO] [stdout] 30 | fn parse_input(input: &str) -> RaceSetup { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `distance` is never used [INFO] [stdout] --> src/day20_2.rs:58:4 [INFO] [stdout] | [INFO] [stdout] 58 | fn distance(position_a: &Position, position_b: &Position) -> i32 { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `count_deprecated_cheats` is never used [INFO] [stdout] --> src/day20_2.rs:62:4 [INFO] [stdout] | [INFO] [stdout] 62 | fn count_deprecated_cheats(race_setup: &RaceSetup, saved: i32) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part1` is never used [INFO] [stdout] --> src/day20_2.rs:101:4 [INFO] [stdout] | [INFO] [stdout] 101 | fn part1(race_setup: &RaceSetup) -> usize { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `count_latest_cheats` is never used [INFO] [stdout] --> src/day20_2.rs:105:4 [INFO] [stdout] | [INFO] [stdout] 105 | fn count_latest_cheats(race_setup: &RaceSetup, saved: i32) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part2` is never used [INFO] [stdout] --> src/day20_2.rs:142:4 [INFO] [stdout] | [INFO] [stdout] 142 | fn part2(race_setup: &RaceSetup) -> usize { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this OR pattern can be rewritten using a range [INFO] [stdout] --> src/day17.rs:83:9 [INFO] [stdout] | [INFO] [stdout] 83 | 0 | 1 | 2 | 3 => operand as u32, [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `0..=3` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_patterns [INFO] [stdout] = note: `#[warn(clippy::manual_range_patterns)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day17.rs:115:46 [INFO] [stdout] | [INFO] [stdout] 115 | let output = execute([init_a, 0, 0], &program); [INFO] [stdout] | ^^^^^^^^ help: change this to: `program` [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: importing legacy numeric constants [INFO] [stdout] --> src/day18.rs:5:9 [INFO] [stdout] | [INFO] [stdout] 5 | fs, i32, [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `i32::` will resolve to the respective associated constant [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/day2.rs:40:20 [INFO] [stdout] | [INFO] [stdout] 40 | fn is_save(values: &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] 40 - fn is_save(values: &mut Vec) -> bool { [INFO] [stdout] 40 + fn is_save(values: &mut [i32]) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.iter().nth()` on a `Vec` [INFO] [stdout] --> src/day2.rs:41:25 [INFO] [stdout] | [INFO] [stdout] 41 | if values.first() > values.iter().nth(1) { [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] 41 - if values.first() > values.iter().nth(1) { [INFO] [stdout] 41 + if values.first() > values.get(1) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/day12.rs:145:13 [INFO] [stdout] | [INFO] [stdout] 145 | / (!has_up && !has_left) [INFO] [stdout] 146 | | || (!has_up && !has_right) [INFO] [stdout] 147 | | || (!has_down && !has_left) [INFO] [stdout] 148 | | || (!has_down && !has_right) [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] 145 - (!has_up && !has_left) [INFO] [stdout] 146 - || (!has_up && !has_right) [INFO] [stdout] 147 - || (!has_down && !has_left) [INFO] [stdout] 148 - || (!has_down && !has_right) [INFO] [stdout] 145 + !(has_left && has_right || has_up && has_down) [INFO] [stdout] | [INFO] [stdout] 145 - (!has_up && !has_left) [INFO] [stdout] 146 - || (!has_up && !has_right) [INFO] [stdout] 147 - || (!has_down && !has_left) [INFO] [stdout] 148 - || (!has_down && !has_right) [INFO] [stdout] 145 + (!has_down || !has_up) && (!has_right || !has_left) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/day12.rs:145:13 [INFO] [stdout] | [INFO] [stdout] 145 | / (!has_up && !has_left) [INFO] [stdout] 146 | | || (!has_up && !has_right) [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] 145 - (!has_up && !has_left) [INFO] [stdout] 146 - || (!has_up && !has_right) [INFO] [stdout] 145 + !(has_up || has_left && has_right) [INFO] [stdout] | [INFO] [stdout] 145 - (!has_up && !has_left) [INFO] [stdout] 146 - || (!has_up && !has_right) [INFO] [stdout] 145 + (!has_right || !has_left) && !has_up [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/day12.rs:132:26 [INFO] [stdout] | [INFO] [stdout] 132 | let has_up = up.map_or(false, |(row, col)| { [INFO] [stdout] | __________________________^ [INFO] [stdout] 133 | | region_tiles.contains(&Tile::new(tile.tile_type, row, col)) [INFO] [stdout] 134 | | }); [INFO] [stdout] | |______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 132 - let has_up = up.map_or(false, |(row, col)| { [INFO] [stdout] 132 + let has_up = up.is_some_and(|(row, col)| { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/day12.rs:135:28 [INFO] [stdout] | [INFO] [stdout] 135 | let has_down = down.map_or(false, |(row, col)| { [INFO] [stdout] | ____________________________^ [INFO] [stdout] 136 | | region_tiles.contains(&Tile::new(tile.tile_type, row, col)) [INFO] [stdout] 137 | | }); [INFO] [stdout] | |______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 135 - let has_down = down.map_or(false, |(row, col)| { [INFO] [stdout] 135 + let has_down = down.is_some_and(|(row, col)| { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/day12.rs:138:28 [INFO] [stdout] | [INFO] [stdout] 138 | let has_left = left.map_or(false, |(row, col)| { [INFO] [stdout] | ____________________________^ [INFO] [stdout] 139 | | region_tiles.contains(&Tile::new(tile.tile_type, row, col)) [INFO] [stdout] 140 | | }); [INFO] [stdout] | |______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 138 - let has_left = left.map_or(false, |(row, col)| { [INFO] [stdout] 138 + let has_left = left.is_some_and(|(row, col)| { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/day12.rs:141:29 [INFO] [stdout] | [INFO] [stdout] 141 | let has_right = right.map_or(false, |(row, col)| { [INFO] [stdout] | _____________________________^ [INFO] [stdout] 142 | | region_tiles.contains(&Tile::new(tile.tile_type, row, col)) [INFO] [stdout] 143 | | }); [INFO] [stdout] | |______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 141 - let has_right = right.map_or(false, |(row, col)| { [INFO] [stdout] 141 + let has_right = right.is_some_and(|(row, col)| { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/day12_2.rs:8:14 [INFO] [stdout] | [INFO] [stdout] 8 | corners: Vec<((isize, isize), (isize, isize), (isize, isize))>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is only used to index `path` [INFO] [stdout] --> src/day20.rs:98:18 [INFO] [stdout] | [INFO] [stdout] 98 | for j in i + 100..path.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 98 - for j in i + 100..path.len() { [INFO] [stdout] 98 + for in path.iter().skip(i + 100) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `isize::abs()` to usize [INFO] [stdout] --> src/day20.rs:111:5 [INFO] [stdout] | [INFO] [stdout] 111 | (start.row as isize - end.row as isize).abs() as usize [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `(start.row as isize - end.row as isize).unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] = note: `#[warn(clippy::cast_abs_to_unsigned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `isize::abs()` to usize [INFO] [stdout] --> src/day20.rs:112:11 [INFO] [stdout] | [INFO] [stdout] 112 | + (start.col as isize - end.col as isize).abs() as usize [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `(start.col as isize - end.col as isize).unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/day12_2.rs:75:19 [INFO] [stdout] | [INFO] [stdout] 75 | while investigate.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!investigate.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day21.rs:145:58 [INFO] [stdout] | [INFO] [stdout] 145 | let goal = get_coordinate_controller(&action); [INFO] [stdout] | ^^^^^^^ help: change this to: `action` [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: redundant closure [INFO] [stdout] --> src/day13.rs:13:14 [INFO] [stdout] | [INFO] [stdout] 13 | .map(|input| parse_input(input)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `parse_input` [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: returning the result of a `let` binding from a block [INFO] [stdout] --> src/day22.rs:52:5 [INFO] [stdout] | [INFO] [stdout] 50 | let secret_num_final = prune(mix(secret_num_middle, secret_num_middle * 2048)); [INFO] [stdout] | ------------------------------------------------------------------------------- unnecessary `let` binding [INFO] [stdout] 51 | [INFO] [stdout] 52 | secret_num_final [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] 50 ~ [INFO] [stdout] 51 | [INFO] [stdout] 52 ~ prune(mix(secret_num_middle, secret_num_middle * 2048)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> src/day22.rs:89:13 [INFO] [stdout] | [INFO] [stdout] 89 | / if !acc.contains_key(&seq) { [INFO] [stdout] 90 | | acc.insert(seq, secrets[idx + 4]); [INFO] [stdout] 91 | | } [INFO] [stdout] | |_____________^ help: try: `acc.entry(seq).or_insert(secrets[idx + 4]);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry [INFO] [stdout] = note: `#[warn(clippy::map_entry)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/day22.rs:97:29 [INFO] [stdout] | [INFO] [stdout] 97 | fn combine_changes(changes: &[HashMap<(isize, isize, isize, isize),usize>]) -> HashMap<(isize, isize, isize, isize),Vec> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: iterating on a map's values [INFO] [stdout] --> src/day22.rs:109:5 [INFO] [stdout] | [INFO] [stdout] 109 | changes.iter().map(|(_,vals)| vals.iter().sum()).max().unwrap() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `changes.values().map(|vals| vals.iter().sum())` [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] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `matrix` [INFO] [stdout] --> src/day23.rs:26:14 [INFO] [stdout] | [INFO] [stdout] 26 | for i in 0..CAPACITY { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 26 - for i in 0..CAPACITY { [INFO] [stdout] 26 + for (i, ) in matrix.iter_mut().enumerate().take(CAPACITY) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/day23.rs:33:18 [INFO] [stdout] | [INFO] [stdout] 33 | .map(|s| get_integer_val(s)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `get_integer_val` [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 `map_or` can be simplified [INFO] [stdout] --> src/day13.rs:151:16 [INFO] [stdout] | [INFO] [stdout] 151 | && min_costs [INFO] [stdout] | ________________^ [INFO] [stdout] 152 | | .get(&(new_x, new_y)) [INFO] [stdout] 153 | | .map_or(true, |&min_cost| min_cost > new_cost) [INFO] [stdout] | |______________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_none_or` instead [INFO] [stdout] | [INFO] [stdout] 153 - .map_or(true, |&min_cost| min_cost > new_cost) [INFO] [stdout] 153 + .is_none_or(|&min_cost| min_cost > new_cost) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: found `.or(Some(…)).unwrap()` [INFO] [stdout] --> src/day23.rs:62:72 [INFO] [stdout] | [INFO] [stdout] 62 | **sec_connection && *matrix[col].get(*sec_col).or(Some(&false)).unwrap() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or(&false)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_then_unwrap [INFO] [stdout] = note: `#[warn(clippy::or_then_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/day13.rs:165:16 [INFO] [stdout] | [INFO] [stdout] 165 | && min_costs [INFO] [stdout] | ________________^ [INFO] [stdout] 166 | | .get(&(new_x, new_y)) [INFO] [stdout] 167 | | .map_or(true, |&min_cost| min_cost > new_cost) [INFO] [stdout] | |______________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_none_or` instead [INFO] [stdout] | [INFO] [stdout] 167 - .map_or(true, |&min_cost| min_cost > new_cost) [INFO] [stdout] 167 + .is_none_or(|&min_cost| min_cost > new_cost) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: found `.or(Some(…)).unwrap()` [INFO] [stdout] --> src/day23.rs:73:72 [INFO] [stdout] | [INFO] [stdout] 73 | **sec_connection && *matrix[row].get(*sec_row).or(Some(&false)).unwrap() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or(&false)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_then_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this let-binding has unit value [INFO] [stdout] --> src/day24.rs:14:5 [INFO] [stdout] | [INFO] [stdout] 14 | let swaps = find_swaps(&wire_vals, &mut operations, correct_res); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value [INFO] [stdout] = note: `#[warn(clippy::let_unit_value)]` on by default [INFO] [stdout] help: omit the `let` binding [INFO] [stdout] | [INFO] [stdout] 14 - let swaps = find_swaps(&wire_vals, &mut operations, correct_res); [INFO] [stdout] 14 + find_swaps(&wire_vals, &mut operations, correct_res); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/day14.rs:67:14 [INFO] [stdout] | [INFO] [stdout] 67 | .map(|line| Robot::create_robot(line)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Robot::create_robot` [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 `.fold` can be written more succinctly using another method [INFO] [stdout] --> src/day14.rs:89:10 [INFO] [stdout] | [INFO] [stdout] 89 | .fold(1, |acc, num| acc * num); [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: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/day24.rs:40:17 [INFO] [stdout] | [INFO] [stdout] 40 | operations: &mut VecDeque<((&str, &str, &str), fn(i32, i32) -> i32)>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/day14.rs:103:13 [INFO] [stdout] | [INFO] [stdout] 103 | new_x = room_width + new_x; // addition because x is negative [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `new_x += room_width` [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/day14.rs:109:13 [INFO] [stdout] | [INFO] [stdout] 109 | new_y = room_height + new_y; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `new_y += room_height` [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: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/day24.rs:68:17 [INFO] [stdout] | [INFO] [stdout] 68 | operations: &mut VecDeque<((&'a str, &'a str, &'a str), fn(i32, i32) -> i32)>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/day24.rs:86:6 [INFO] [stdout] | [INFO] [stdout] 86 | ) -> ( [INFO] [stdout] | ______^ [INFO] [stdout] 87 | | HashMap<&str, i32>, [INFO] [stdout] 88 | | VecDeque<((&str, &str, &str), fn(i32, i32) -> i32)>, [INFO] [stdout] 89 | | ) { [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/day25.rs:16:39 [INFO] [stdout] | [INFO] [stdout] 16 | fn get_locks_and_keys(input: &str) -> (Vec>, Vec>) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/day14.rs:202:41 [INFO] [stdout] | [INFO] [stdout] 202 | let mut file = File::create(&path).unwrap(); [INFO] [stdout] | ^^^^^ help: change this to: `path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` 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/day15.rs:136:20 [INFO] [stdout] | [INFO] [stdout] 136 | fn step(warehouse: &mut Vec>, robot: &mut Robot, direction: &Direction) { [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] 136 - fn step(warehouse: &mut Vec>, robot: &mut Robot, direction: &Direction) { [INFO] [stdout] 136 + fn step(warehouse: &mut [Vec], robot: &mut Robot, direction: &Direction) { [INFO] [stdout] | [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/day15.rs:291:22 [INFO] [stdout] | [INFO] [stdout] 291 | fn step_2(warehouse: &mut Vec>, robot: &mut Robot, direction: &Direction) { [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] 291 - fn step_2(warehouse: &mut Vec>, robot: &mut Robot, direction: &Direction) { [INFO] [stdout] 291 + fn step_2(warehouse: &mut [Vec], robot: &mut Robot, direction: &Direction) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to move all elements into a new `Vec` [INFO] [stdout] --> src/day15.rs:363:33 [INFO] [stdout] | [INFO] [stdout] 363 | let mut queue = boxes_to_check.drain(..).collect::>(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `mem::take`: `std::mem::take(&mut boxes_to_check)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#drain_collect [INFO] [stdout] = note: `#[warn(clippy::drain_collect)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to move all elements into a new `Vec` [INFO] [stdout] --> src/day15.rs:430:33 [INFO] [stdout] | [INFO] [stdout] 430 | let mut queue = boxes_to_check.drain(..).collect::>(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `mem::take`: `std::mem::take(&mut boxes_to_check)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#drain_collect [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day21_2.rs:286:26 [INFO] [stdout] | [INFO] [stdout] 286 | fn solve_keycode(counts: &Vec, depth: i32) -> i128 { [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] 286 ~ fn solve_keycode(counts: &[i128], depth: i32) -> i128 { [INFO] [stdout] 287 ~ let mut counts = counts.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/day3.rs:19:16 [INFO] [stdout] | [INFO] [stdout] 19 | if (&input[idx..]).starts_with("don't()") { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `input[idx..]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/day3.rs:22:23 [INFO] [stdout] | [INFO] [stdout] 22 | } else if (&input[idx..]).starts_with("mul(") { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `input[idx..]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/day3.rs:34:16 [INFO] [stdout] | [INFO] [stdout] 34 | if (&input[idx..]).starts_with("do()") { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `input[idx..]` [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 `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day4.rs:90:26 [INFO] [stdout] | [INFO] [stdout] 90 | fn read_xmas_from_vec(v: &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] 90 - fn read_xmas_from_vec(v: &Vec>) -> i32 { [INFO] [stdout] 90 + fn read_xmas_from_vec(v: &[Vec]) -> i32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: importing legacy numeric constants [INFO] [stdout] --> src/day16.rs:5:9 [INFO] [stdout] | [INFO] [stdout] 5 | fs, i32, [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `i32::` will resolve to the respective associated constant [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/day8.rs:36:41 [INFO] [stdout] | [INFO] [stdout] 36 | .or_insert_with(|| Vec::new()) [INFO] [stdout] | ^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Vec::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: iterating on a map's values [INFO] [stdout] --> src/day8.rs:42:20 [INFO] [stdout] | [INFO] [stdout] 42 | println!("{}", points_map.iter().map(|(_, v)| v.len()).sum::()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `points_map.values().map(|v| v.len())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_kv_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the function definition [INFO] [stdout] --> src/day8.rs:66:19 [INFO] [stdout] | [INFO] [stdout] 66 | fn find_antinodes<'a>(a: &Point, b: &Point) -> Vec { [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] = note: `#[warn(clippy::extra_unused_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/day16.rs:163:5 [INFO] [stdout] | [INFO] [stdout] 162 | let min_cost = dijkstra(map, reindeer, end); [INFO] [stdout] | -------------------------------------------- unnecessary `let` binding [INFO] [stdout] 163 | min_cost [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] 162 ~ [INFO] [stdout] 163 ~ dijkstra(map, reindeer, end) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `C` should have a snake case name [INFO] [stdout] --> src/day13.rs:70:24 [INFO] [stdout] | [INFO] [stdout] 70 | fn solve1(input: &str, C: isize) -> usize { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `c` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` (part of `#[warn(nonstandard_style)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this OR pattern can be rewritten using a range [INFO] [stdout] --> src/day17.rs:83:9 [INFO] [stdout] | [INFO] [stdout] 83 | 0 | 1 | 2 | 3 => operand as u32, [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `0..=3` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_patterns [INFO] [stdout] = note: `#[warn(clippy::manual_range_patterns)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day17.rs:115:46 [INFO] [stdout] | [INFO] [stdout] 115 | let output = execute([init_a, 0, 0], &program); [INFO] [stdout] | ^^^^^^^^ help: change this to: `program` [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: importing legacy numeric constants [INFO] [stdout] --> src/day18.rs:5:9 [INFO] [stdout] | [INFO] [stdout] 5 | fs, i32, [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `i32::` will resolve to the respective associated constant [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/day2.rs:40:20 [INFO] [stdout] | [INFO] [stdout] 40 | fn is_save(values: &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] 40 - fn is_save(values: &mut Vec) -> bool { [INFO] [stdout] 40 + fn is_save(values: &mut [i32]) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.iter().nth()` on a `Vec` [INFO] [stdout] --> src/day2.rs:41:25 [INFO] [stdout] | [INFO] [stdout] 41 | if values.first() > values.iter().nth(1) { [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] 41 - if values.first() > values.iter().nth(1) { [INFO] [stdout] 41 + if values.first() > values.get(1) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is only used to index `path` [INFO] [stdout] --> src/day20.rs:98:18 [INFO] [stdout] | [INFO] [stdout] 98 | for j in i + 100..path.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 98 - for j in i + 100..path.len() { [INFO] [stdout] 98 + for in path.iter().skip(i + 100) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `isize::abs()` to usize [INFO] [stdout] --> src/day20.rs:111:5 [INFO] [stdout] | [INFO] [stdout] 111 | (start.row as isize - end.row as isize).abs() as usize [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `(start.row as isize - end.row as isize).unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] = note: `#[warn(clippy::cast_abs_to_unsigned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `isize::abs()` to usize [INFO] [stdout] --> src/day20.rs:112:11 [INFO] [stdout] | [INFO] [stdout] 112 | + (start.col as isize - end.col as isize).abs() as usize [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `(start.col as isize - end.col as isize).unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day21.rs:145:58 [INFO] [stdout] | [INFO] [stdout] 145 | let goal = get_coordinate_controller(&action); [INFO] [stdout] | ^^^^^^^ help: change this to: `action` [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: returning the result of a `let` binding from a block [INFO] [stdout] --> src/day22.rs:52:5 [INFO] [stdout] | [INFO] [stdout] 50 | let secret_num_final = prune(mix(secret_num_middle, secret_num_middle * 2048)); [INFO] [stdout] | ------------------------------------------------------------------------------- unnecessary `let` binding [INFO] [stdout] 51 | [INFO] [stdout] 52 | secret_num_final [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] 50 ~ [INFO] [stdout] 51 | [INFO] [stdout] 52 ~ prune(mix(secret_num_middle, secret_num_middle * 2048)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> src/day22.rs:89:13 [INFO] [stdout] | [INFO] [stdout] 89 | / if !acc.contains_key(&seq) { [INFO] [stdout] 90 | | acc.insert(seq, secrets[idx + 4]); [INFO] [stdout] 91 | | } [INFO] [stdout] | |_____________^ help: try: `acc.entry(seq).or_insert(secrets[idx + 4]);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry [INFO] [stdout] = note: `#[warn(clippy::map_entry)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/day22.rs:97:29 [INFO] [stdout] | [INFO] [stdout] 97 | fn combine_changes(changes: &[HashMap<(isize, isize, isize, isize),usize>]) -> HashMap<(isize, isize, isize, isize),Vec> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: iterating on a map's values [INFO] [stdout] --> src/day22.rs:109:5 [INFO] [stdout] | [INFO] [stdout] 109 | changes.iter().map(|(_,vals)| vals.iter().sum()).max().unwrap() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `changes.values().map(|vals| vals.iter().sum())` [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] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `matrix` [INFO] [stdout] --> src/day23.rs:26:14 [INFO] [stdout] | [INFO] [stdout] 26 | for i in 0..CAPACITY { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 26 - for i in 0..CAPACITY { [INFO] [stdout] 26 + for (i, ) in matrix.iter_mut().enumerate().take(CAPACITY) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/day23.rs:33:18 [INFO] [stdout] | [INFO] [stdout] 33 | .map(|s| get_integer_val(s)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `get_integer_val` [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: found `.or(Some(…)).unwrap()` [INFO] [stdout] --> src/day23.rs:62:72 [INFO] [stdout] | [INFO] [stdout] 62 | **sec_connection && *matrix[col].get(*sec_col).or(Some(&false)).unwrap() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or(&false)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_then_unwrap [INFO] [stdout] = note: `#[warn(clippy::or_then_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: found `.or(Some(…)).unwrap()` [INFO] [stdout] --> src/day23.rs:73:72 [INFO] [stdout] | [INFO] [stdout] 73 | **sec_connection && *matrix[row].get(*sec_row).or(Some(&false)).unwrap() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or(&false)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_then_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this let-binding has unit value [INFO] [stdout] --> src/day24.rs:14:5 [INFO] [stdout] | [INFO] [stdout] 14 | let swaps = find_swaps(&wire_vals, &mut operations, correct_res); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value [INFO] [stdout] = note: `#[warn(clippy::let_unit_value)]` on by default [INFO] [stdout] help: omit the `let` binding [INFO] [stdout] | [INFO] [stdout] 14 - let swaps = find_swaps(&wire_vals, &mut operations, correct_res); [INFO] [stdout] 14 + find_swaps(&wire_vals, &mut operations, correct_res); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/day24.rs:40:17 [INFO] [stdout] | [INFO] [stdout] 40 | operations: &mut VecDeque<((&str, &str, &str), fn(i32, i32) -> i32)>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/day24.rs:68:17 [INFO] [stdout] | [INFO] [stdout] 68 | operations: &mut VecDeque<((&'a str, &'a str, &'a str), fn(i32, i32) -> i32)>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/day24.rs:86:6 [INFO] [stdout] | [INFO] [stdout] 86 | ) -> ( [INFO] [stdout] | ______^ [INFO] [stdout] 87 | | HashMap<&str, i32>, [INFO] [stdout] 88 | | VecDeque<((&str, &str, &str), fn(i32, i32) -> i32)>, [INFO] [stdout] 89 | | ) { [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/day25.rs:16:39 [INFO] [stdout] | [INFO] [stdout] 16 | fn get_locks_and_keys(input: &str) -> (Vec>, Vec>) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day21_2.rs:286:26 [INFO] [stdout] | [INFO] [stdout] 286 | fn solve_keycode(counts: &Vec, depth: i32) -> i128 { [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] 286 ~ fn solve_keycode(counts: &[i128], depth: i32) -> i128 { [INFO] [stdout] 287 ~ let mut counts = counts.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/day3.rs:19:16 [INFO] [stdout] | [INFO] [stdout] 19 | if (&input[idx..]).starts_with("don't()") { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `input[idx..]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/day3.rs:22:23 [INFO] [stdout] | [INFO] [stdout] 22 | } else if (&input[idx..]).starts_with("mul(") { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `input[idx..]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/day3.rs:34:16 [INFO] [stdout] | [INFO] [stdout] 34 | if (&input[idx..]).starts_with("do()") { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `input[idx..]` [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 `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day4.rs:90:26 [INFO] [stdout] | [INFO] [stdout] 90 | fn read_xmas_from_vec(v: &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] 90 - fn read_xmas_from_vec(v: &Vec>) -> i32 { [INFO] [stdout] 90 + fn read_xmas_from_vec(v: &[Vec]) -> i32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/day8.rs:36:41 [INFO] [stdout] | [INFO] [stdout] 36 | .or_insert_with(|| Vec::new()) [INFO] [stdout] | ^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Vec::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: iterating on a map's values [INFO] [stdout] --> src/day8.rs:42:20 [INFO] [stdout] | [INFO] [stdout] 42 | println!("{}", points_map.iter().map(|(_, v)| v.len()).sum::()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `points_map.values().map(|v| v.len())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_kv_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the function definition [INFO] [stdout] --> src/day8.rs:66:19 [INFO] [stdout] | [INFO] [stdout] 66 | fn find_antinodes<'a>(a: &Point, b: &Point) -> Vec { [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] = note: `#[warn(clippy::extra_unused_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `C` should have a snake case name [INFO] [stdout] --> src/day13.rs:70:24 [INFO] [stdout] | [INFO] [stdout] 70 | fn solve1(input: &str, C: isize) -> usize { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `c` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` (part of `#[warn(nonstandard_style)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 1.30s [INFO] running `Command { std: "docker" "inspect" "27d2c92d20fa146794317025a1e9aeba7db068ecac15a8724f9501644b13213f", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "27d2c92d20fa146794317025a1e9aeba7db068ecac15a8724f9501644b13213f", kill_on_drop: false }` [INFO] [stdout] 27d2c92d20fa146794317025a1e9aeba7db068ecac15a8724f9501644b13213f