[INFO] cloning repository https://github.com/paweenpit/aoc2024-rust [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/paweenpit/aoc2024-rust" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fpaweenpit%2Faoc2024-rust", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fpaweenpit%2Faoc2024-rust'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 9603e76599ef4667c216bef0265b2ee311c42919 [INFO] linting paweenpit/aoc2024-rust against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fpaweenpit%2Faoc2024-rust" "/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/paweenpit/aoc2024-rust [INFO] finished tweaking git repo https://github.com/paweenpit/aoc2024-rust [INFO] tweaked toml for git repo https://github.com/paweenpit/aoc2024-rust written to /workspace/builds/worker-6-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/paweenpit/aoc2024-rust 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/paweenpit/aoc2024-rust 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] Updating crates.io index [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded num-complex v0.4.6 [INFO] [stderr] Downloaded priority-queue v2.1.1 [INFO] [stderr] Downloaded num-rational v0.4.2 [INFO] [stderr] Downloaded aoc-runner v0.3.0 [INFO] [stderr] Downloaded indoc v2.0.5 [INFO] [stderr] Downloaded aoc-runner-derive v0.3.0 [INFO] [stderr] Downloaded eval v0.4.3 [INFO] [stderr] Downloaded anyhow v1.0.94 [INFO] [stderr] Downloaded safe_arch v0.7.2 [INFO] [stderr] Downloaded serde_derive v1.0.215 [INFO] [stderr] Downloaded matrixmultiply v0.3.9 [INFO] [stderr] Downloaded proc-macro2 v1.0.92 [INFO] [stderr] Downloaded bytemuck v1.20.0 [INFO] [stderr] Downloaded wide v0.7.30 [INFO] [stderr] Downloaded serde v1.0.215 [INFO] [stderr] Downloaded syn v2.0.90 [INFO] [stderr] Downloaded unicode-ident v1.0.14 [INFO] [stderr] Downloaded aoc-runner-internal v0.1.0 [INFO] [stderr] Downloaded quick-error v1.2.3 [INFO] [stderr] Downloaded foldhash v0.1.4 [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] 4725814084c0edee5fa0cf5208962a7bfaa49bbe25ff93ba412c87e0eb27825c [INFO] running `Command { std: "docker" "start" "-a" "4725814084c0edee5fa0cf5208962a7bfaa49bbe25ff93ba412c87e0eb27825c", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "4725814084c0edee5fa0cf5208962a7bfaa49bbe25ff93ba412c87e0eb27825c", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "4725814084c0edee5fa0cf5208962a7bfaa49bbe25ff93ba412c87e0eb27825c", kill_on_drop: false }` [INFO] [stdout] 4725814084c0edee5fa0cf5208962a7bfaa49bbe25ff93ba412c87e0eb27825c [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] 82febffe5332230463c2cf41ae7ace0891442da06ba29d38690956a0f78a1dd8 [INFO] running `Command { std: "docker" "start" "-a" "82febffe5332230463c2cf41ae7ace0891442da06ba29d38690956a0f78a1dd8", kill_on_drop: false }` [INFO] [stderr] Compiling autocfg v1.4.0 [INFO] [stderr] Compiling proc-macro2 v1.0.92 [INFO] [stderr] Compiling unicode-ident v1.0.14 [INFO] [stderr] Compiling serde v1.0.215 [INFO] [stderr] Compiling serde_json v1.0.133 [INFO] [stderr] Checking memchr v2.7.4 [INFO] [stderr] Checking allocator-api2 v0.2.21 [INFO] [stderr] Checking bytemuck v1.20.0 [INFO] [stderr] Checking foldhash v0.1.4 [INFO] [stderr] Checking equivalent v1.0.1 [INFO] [stderr] Compiling typenum v1.17.0 [INFO] [stderr] Compiling syn v1.0.109 [INFO] [stderr] Compiling itoa v1.0.14 [INFO] [stderr] Compiling ryu v1.0.18 [INFO] [stderr] Compiling anyhow v1.0.94 [INFO] [stderr] Checking rawpointer v0.2.1 [INFO] [stderr] Checking regex-syntax v0.8.5 [INFO] [stderr] Checking fixedbitset v0.4.2 [INFO] [stderr] Checking either v1.13.0 [INFO] [stderr] Checking quick-error v1.2.3 [INFO] [stderr] Compiling indoc v2.0.5 [INFO] [stderr] Checking smallvec v1.13.2 [INFO] [stderr] Checking safe_arch v0.7.2 [INFO] [stderr] Checking aoc-runner v0.3.0 [INFO] [stderr] Checking hashbrown v0.15.2 [INFO] [stderr] Checking itertools v0.13.0 [INFO] [stderr] Compiling num-traits v0.2.19 [INFO] [stderr] Compiling matrixmultiply v0.3.9 [INFO] [stderr] Checking wide v0.7.30 [INFO] [stderr] Checking aho-corasick v1.1.3 [INFO] [stderr] Compiling quote v1.0.37 [INFO] [stderr] Checking indexmap v2.7.0 [INFO] [stderr] Compiling syn v2.0.90 [INFO] [stderr] Checking num-complex v0.4.6 [INFO] [stderr] Checking num-integer v0.1.46 [INFO] [stderr] Checking approx v0.5.1 [INFO] [stderr] Checking num-rational v0.4.2 [INFO] [stderr] Checking petgraph v0.6.5 [INFO] [stderr] Checking priority-queue v2.1.1 [INFO] [stderr] Checking regex-automata v0.4.9 [INFO] [stderr] Checking simba v0.9.0 [INFO] [stderr] Checking eval v0.4.3 [INFO] [stderr] Checking regex v1.11.1 [INFO] [stderr] Compiling serde_derive v1.0.215 [INFO] [stderr] Compiling nalgebra-macros v0.2.2 [INFO] [stderr] Checking nalgebra v0.33.2 [INFO] [stderr] Compiling aoc-runner-internal v0.1.0 [INFO] [stderr] Compiling aoc-runner-derive v0.3.0 [INFO] [stderr] Checking aoc2024-rust v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `std::sync::Arc` [INFO] [stdout] --> src/days/day20.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::sync::Arc; [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: `super::*` [INFO] [stdout] --> src/days/day9sol.rs:111:9 [INFO] [stdout] | [INFO] [stdout] 111 | use super::*; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::sync::Arc` [INFO] [stdout] --> src/days/day20.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::sync::Arc; [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: `super::*` [INFO] [stdout] --> src/days/day9sol.rs:111:9 [INFO] [stdout] | [INFO] [stdout] 111 | use super::*; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `itertools::Itertools` [INFO] [stdout] --> src/days/day18.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use itertools::Itertools; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `itertools::Itertools` [INFO] [stdout] --> src/days/day18.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use itertools::Itertools; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `n` [INFO] [stdout] --> src/days/day14.rs:14:58 [INFO] [stdout] | [INFO] [stdout] 14 | fn is_reflect_xaxis(positions: &Vec<(i64, i64)>, m: i64, n: i64) -> bool { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_n` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/days/day15.rs:175:42 [INFO] [stdout] | [INFO] [stdout] 175 | moves.chars().enumerate().for_each(|(i, c)| { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/days/day15.rs:145:42 [INFO] [stdout] | [INFO] [stdout] 145 | moves.chars().enumerate().for_each(|(i, c)| { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `d` [INFO] [stdout] --> src/days/day16.rs:50:22 [INFO] [stdout] | [INFO] [stdout] 50 | while let Some(((d, (i, j), dir), _)) = queue.pop() { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_d` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `n` [INFO] [stdout] --> src/days/day14.rs:14:58 [INFO] [stdout] | [INFO] [stdout] 14 | fn is_reflect_xaxis(positions: &Vec<(i64, i64)>, m: i64, n: i64) -> bool { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_n` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/days/day15.rs:175:42 [INFO] [stdout] | [INFO] [stdout] 175 | moves.chars().enumerate().for_each(|(i, c)| { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/days/day15.rs:145:42 [INFO] [stdout] | [INFO] [stdout] 145 | moves.chars().enumerate().for_each(|(i, c)| { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `d` [INFO] [stdout] --> src/days/day16.rs:50:22 [INFO] [stdout] | [INFO] [stdout] 50 | while let Some(((d, (i, j), dir), _)) = queue.pop() { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_d` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `resx` [INFO] [stdout] --> src/days/day24.rs:90:14 [INFO] [stdout] | [INFO] [stdout] 90 | let (resx, totalx) = get_bin_value('x', &wires2); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_resx` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `resy` [INFO] [stdout] --> src/days/day24.rs:91:14 [INFO] [stdout] | [INFO] [stdout] 91 | let (resy, totaly) = get_bin_value('y', &wires2); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_resy` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `resz` [INFO] [stdout] --> src/days/day24.rs:92:14 [INFO] [stdout] | [INFO] [stdout] 92 | let (resz, totalz) = get_bin_value('z', &wires2); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_resz` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `total2` [INFO] [stdout] --> src/days/day24.rs:99:13 [INFO] [stdout] | [INFO] [stdout] 99 | let total2 = res2.iter().sorted().join(",").to_string(); [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_total2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `k` [INFO] [stdout] --> src/days/day24.rs:135:16 [INFO] [stdout] | [INFO] [stdout] 135 | .map(|(k, v)| v) [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_k` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `v` [INFO] [stdout] --> src/days/day24.rs:134:22 [INFO] [stdout] | [INFO] [stdout] 134 | .filter(|(k, v)| k.starts_with(c)) [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_v` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `resx` [INFO] [stdout] --> src/days/day24.rs:90:14 [INFO] [stdout] | [INFO] [stdout] 90 | let (resx, totalx) = get_bin_value('x', &wires2); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_resx` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `resy` [INFO] [stdout] --> src/days/day24.rs:91:14 [INFO] [stdout] | [INFO] [stdout] 91 | let (resy, totaly) = get_bin_value('y', &wires2); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_resy` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `resz` [INFO] [stdout] --> src/days/day24.rs:92:14 [INFO] [stdout] | [INFO] [stdout] 92 | let (resz, totalz) = get_bin_value('z', &wires2); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_resz` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `total2` [INFO] [stdout] --> src/days/day24.rs:99:13 [INFO] [stdout] | [INFO] [stdout] 99 | let total2 = res2.iter().sorted().join(",").to_string(); [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_total2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `k` [INFO] [stdout] --> src/days/day24.rs:135:16 [INFO] [stdout] | [INFO] [stdout] 135 | .map(|(k, v)| v) [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_k` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `v` [INFO] [stdout] --> src/days/day24.rs:134:22 [INFO] [stdout] | [INFO] [stdout] 134 | .filter(|(k, v)| k.starts_with(c)) [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_v` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/days/day1.rs:5:8 [INFO] [stdout] | [INFO] [stdout] 5 | pub fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Map` is never constructed [INFO] [stdout] --> src/days/day10.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 4 | struct Map(nalgebra::DMatrix); [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `parse` and `nodes` are never used [INFO] [stdout] --> src/days/day10.rs:6:8 [INFO] [stdout] | [INFO] [stdout] 5 | impl Map { [INFO] [stdout] | -------- associated items in this implementation [INFO] [stdout] 6 | fn parse(input: &str) -> Self { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 19 | fn nodes(&self) -> HashMap> { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part1` is never used [INFO] [stdout] --> src/days/day10.rs:31:8 [INFO] [stdout] | [INFO] [stdout] 31 | pub fn part1() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part2` is never used [INFO] [stdout] --> src/days/day10.rs:72:8 [INFO] [stdout] | [INFO] [stdout] 72 | pub fn part2() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/days/day10.rs:104:8 [INFO] [stdout] | [INFO] [stdout] 104 | pub fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `blink` is never used [INFO] [stdout] --> src/days/day11.rs:3:4 [INFO] [stdout] | [INFO] [stdout] 3 | fn blink(n: Vec) -> Vec { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `remove_leading_zero` is never used [INFO] [stdout] --> src/days/day11.rs:10:4 [INFO] [stdout] | [INFO] [stdout] 10 | fn remove_leading_zero(n: String) -> String { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `blink_str` is never used [INFO] [stdout] --> src/days/day11.rs:18:4 [INFO] [stdout] | [INFO] [stdout] 18 | fn blink_str(n: String) -> Vec { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/days/day11.rs:34:8 [INFO] [stdout] | [INFO] [stdout] 34 | pub fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Point` is never constructed [INFO] [stdout] --> src/days/day12.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 4 | struct Point { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `area` is never used [INFO] [stdout] --> src/days/day12.rs:9:4 [INFO] [stdout] | [INFO] [stdout] 9 | fn area(coords: &Vec) -> i32 { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `neighbor` is never used [INFO] [stdout] --> src/days/day12.rs:13:4 [INFO] [stdout] | [INFO] [stdout] 13 | fn neighbor(p1: Point, p2: Point) -> bool { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `neighbor2` is never used [INFO] [stdout] --> src/days/day12.rs:21:4 [INFO] [stdout] | [INFO] [stdout] 21 | fn neighbor2(p1: Point, p2: Point, points: &Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `perimeter` is never used [INFO] [stdout] --> src/days/day12.rs:56:4 [INFO] [stdout] | [INFO] [stdout] 56 | fn perimeter(coords: &Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `perimeter2` is never used [INFO] [stdout] --> src/days/day12.rs:68:4 [INFO] [stdout] | [INFO] [stdout] 68 | fn perimeter2(coords: &Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_islands` is never used [INFO] [stdout] --> src/days/day12.rs:81:4 [INFO] [stdout] | [INFO] [stdout] 81 | fn get_islands(points: Vec) -> Vec> { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/days/day12.rs:107:8 [INFO] [stdout] | [INFO] [stdout] 107 | pub fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `foo` is never used [INFO] [stdout] --> src/days/day13.rs:1:4 [INFO] [stdout] | [INFO] [stdout] 1 | fn foo(x1: i64, y1: i64, x2: i64, y2: i64, t1: i64, t2: i64) -> i64 { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/days/day13.rs:32:8 [INFO] [stdout] | [INFO] [stdout] 32 | pub fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `print_map` is never used [INFO] [stdout] --> src/days/day14.rs:1:4 [INFO] [stdout] | [INFO] [stdout] 1 | fn print_map(positions: &Vec<(i64, i64)>, m: i64, n: i64) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `is_reflect_xaxis` is never used [INFO] [stdout] --> src/days/day14.rs:14:4 [INFO] [stdout] | [INFO] [stdout] 14 | fn is_reflect_xaxis(positions: &Vec<(i64, i64)>, m: i64, n: i64) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/days/day14.rs:23:8 [INFO] [stdout] | [INFO] [stdout] 23 | pub fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `mv` is never used [INFO] [stdout] --> src/days/day15.rs:3:4 [INFO] [stdout] | [INFO] [stdout] 3 | fn mv(map: &mut Vec>, x: i32, y: i32, dx: i32, dy: i32) -> (i32, i32) { [INFO] [stdout] | ^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `mv2` is never used [INFO] [stdout] --> src/days/day15.rs:35:4 [INFO] [stdout] | [INFO] [stdout] 35 | fn mv2(map: &mut Vec>, x: i32, y: i32, dx: i32, dy: i32) -> (i32, i32) { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `print_map` is never used [INFO] [stdout] --> src/days/day15.rs:93:4 [INFO] [stdout] | [INFO] [stdout] 93 | fn print_map(map: &mut Vec>) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `find_robot` is never used [INFO] [stdout] --> src/days/day15.rs:102:4 [INFO] [stdout] | [INFO] [stdout] 102 | fn find_robot(map: &mut Vec>) -> (i32, i32) { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `find_blocks` is never used [INFO] [stdout] --> src/days/day15.rs:113:4 [INFO] [stdout] | [INFO] [stdout] 113 | fn find_blocks(map: &mut Vec>) -> Vec<(i32, i32)> { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `find_blocks2` is never used [INFO] [stdout] --> src/days/day15.rs:125:4 [INFO] [stdout] | [INFO] [stdout] 125 | fn find_blocks2(map: &mut Vec>) -> Vec<(i32, i32)> { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/days/day15.rs:137:8 [INFO] [stdout] | [INFO] [stdout] 137 | pub fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `neighbors` is never used [INFO] [stdout] --> src/days/day16.rs:7:4 [INFO] [stdout] | [INFO] [stdout] 7 | fn neighbors( [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `diajkstra` is never used [INFO] [stdout] --> src/days/day16.rs:36:4 [INFO] [stdout] | [INFO] [stdout] 36 | fn diajkstra( [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/days/day16.rs:83:8 [INFO] [stdout] | [INFO] [stdout] 83 | pub fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `bench` is never used [INFO] [stdout] --> src/days/day16sol.rs:4:4 [INFO] [stdout] | [INFO] [stdout] 4 | fn bench(f: F) -> R [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `dijkstra` is never used [INFO] [stdout] --> src/days/day16sol.rs:14:4 [INFO] [stdout] | [INFO] [stdout] 14 | fn dijkstra( [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part_1` is never used [INFO] [stdout] --> src/days/day16sol.rs:61:4 [INFO] [stdout] | [INFO] [stdout] 61 | fn part_1() { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `trace_back` is never used [INFO] [stdout] --> src/days/day16sol.rs:96:4 [INFO] [stdout] | [INFO] [stdout] 96 | fn trace_back( [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part_2` is never used [INFO] [stdout] --> src/days/day16sol.rs:144:4 [INFO] [stdout] | [INFO] [stdout] 144 | fn part_2() { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/days/day16sol.rs:187:8 [INFO] [stdout] | [INFO] [stdout] 187 | pub fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `combo` is never used [INFO] [stdout] --> src/days/day17.rs:4:4 [INFO] [stdout] | [INFO] [stdout] 4 | fn combo(c: u64, registers: &Vec) -> u64 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `perform` is never used [INFO] [stdout] --> src/days/day17.rs:20:4 [INFO] [stdout] | [INFO] [stdout] 20 | fn perform(index: &u64, registers: &mut Vec, program: &Vec) -> (u64, u64) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/days/day17.rs:59:8 [INFO] [stdout] | [INFO] [stdout] 59 | pub fn main() -> anyhow::Result<()> { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `print_map` is never used [INFO] [stdout] --> src/days/day18.rs:5:4 [INFO] [stdout] | [INFO] [stdout] 5 | fn print_map(nodes: &HashSet<(u32, u32)>, blocks: &HashMap) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `bfs` is never used [INFO] [stdout] --> src/days/day18.rs:20:4 [INFO] [stdout] | [INFO] [stdout] 20 | fn bfs(nodes: HashSet<(u32, u32)>, start: (u32, u32), end: (u32, u32)) -> i32 { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part1` is never used [INFO] [stdout] --> src/days/day18.rs:48:4 [INFO] [stdout] | [INFO] [stdout] 48 | fn part1(blocks: &HashMap, i: u32) -> i32 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/days/day18.rs:66:8 [INFO] [stdout] | [INFO] [stdout] 66 | pub fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `dp` is never used [INFO] [stdout] --> src/days/day19.rs:3:4 [INFO] [stdout] | [INFO] [stdout] 3 | fn dp(towels: &HashSet<&str>, design: &str) -> u64 { [INFO] [stdout] | ^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/days/day19.rs:18:8 [INFO] [stdout] | [INFO] [stdout] 18 | pub fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `bfs` is never used [INFO] [stdout] --> src/days/day20.rs:9:4 [INFO] [stdout] | [INFO] [stdout] 9 | fn bfs( [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_valid_neighbors` is never used [INFO] [stdout] --> src/days/day20.rs:38:4 [INFO] [stdout] | [INFO] [stdout] 38 | fn get_valid_neighbors(map: &Vec>, l: i32, i: i32, j: i32) -> HashMap<(i32, i32), i32> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part1` is never used [INFO] [stdout] --> src/days/day20.rs:55:4 [INFO] [stdout] | [INFO] [stdout] 55 | fn part1( [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/days/day20.rs:103:8 [INFO] [stdout] | [INFO] [stdout] 103 | pub fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `dp` is never used [INFO] [stdout] --> src/days/day21.rs:44:4 [INFO] [stdout] | [INFO] [stdout] 44 | fn dp(n: u32) -> Vec> { [INFO] [stdout] | ^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `filter_validate_paths` is never used [INFO] [stdout] --> src/days/day21.rs:135:4 [INFO] [stdout] | [INFO] [stdout] 135 | fn filter_validate_paths(k1: (u32, u32), paths: Vec>) -> Vec> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_shortest_paths` is never used [INFO] [stdout] --> src/days/day21.rs:157:4 [INFO] [stdout] | [INFO] [stdout] 157 | fn get_shortest_paths(k1: (u32, u32), k2: (u32, u32)) -> Vec> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `convert_path` is never used [INFO] [stdout] --> src/days/day21.rs:185:4 [INFO] [stdout] | [INFO] [stdout] 185 | fn convert_path(path: Vec) -> Vec<(u32, u32)> { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/days/day21.rs:203:8 [INFO] [stdout] | [INFO] [stdout] 203 | pub fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `convert_numpad_to_loc` is never used [INFO] [stdout] --> src/days/day21.rs:255:4 [INFO] [stdout] | [INFO] [stdout] 255 | fn convert_numpad_to_loc(c: char) -> (u32, u32) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `mix` is never used [INFO] [stdout] --> src/days/day22.rs:4:4 [INFO] [stdout] | [INFO] [stdout] 4 | fn mix(a: u64, m: u64) -> u64 { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `prune` is never used [INFO] [stdout] --> src/days/day22.rs:8:4 [INFO] [stdout] | [INFO] [stdout] 8 | fn prune(a: u64) -> u64 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `secret` is never used [INFO] [stdout] --> src/days/day22.rs:12:4 [INFO] [stdout] | [INFO] [stdout] 12 | fn secret(a: u64) -> u64 { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/days/day22.rs:20:8 [INFO] [stdout] | [INFO] [stdout] 20 | pub fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/days/day23.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 4 | pub fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type alias `Graph` is never used [INFO] [stdout] --> src/days/day23.rs:63:6 [INFO] [stdout] | [INFO] [stdout] 63 | type Graph = HashMap>; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `bron_kerbosch` is never used [INFO] [stdout] --> src/days/day23.rs:65:4 [INFO] [stdout] | [INFO] [stdout] 65 | fn bron_kerbosch( [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/days/day24.rs:5:8 [INFO] [stdout] | [INFO] [stdout] 5 | pub fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `print_zn` is never used [INFO] [stdout] --> src/days/day24.rs:120:4 [INFO] [stdout] | [INFO] [stdout] 120 | fn print_zn(n: u32, orders: &Vec<(&str, &str, &str, &str)>) { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_bin_value` is never used [INFO] [stdout] --> src/days/day24.rs:128:4 [INFO] [stdout] | [INFO] [stdout] 128 | fn get_bin_value(c: char, wires: &HashMap<&str, u32>) -> (String, i64) { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `swap_gates` is never used [INFO] [stdout] --> src/days/day24.rs:143:4 [INFO] [stdout] | [INFO] [stdout] 143 | fn swap_gates<'a>(gates: &mut Vec<(&'a str, &'a str, &'a str, &'a str)>, a: &'a str, b: &'a str) { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `compute` is never used [INFO] [stdout] --> src/days/day24.rs:153:4 [INFO] [stdout] | [INFO] [stdout] 153 | fn compute<'a>( [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type alias `Entry` is never used [INFO] [stdout] --> src/days/day24sol.rs:8:6 [INFO] [stdout] | [INFO] [stdout] 8 | type Entry = (String, Node, String, String); [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Node` is never used [INFO] [stdout] --> src/days/day24sol.rs:11:6 [INFO] [stdout] | [INFO] [stdout] 11 | enum Node { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Func` is never used [INFO] [stdout] --> src/days/day24sol.rs:19:6 [INFO] [stdout] | [INFO] [stdout] 19 | enum Func { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `NodeFunc` is never constructed [INFO] [stdout] --> src/days/day24sol.rs:27:8 [INFO] [stdout] | [INFO] [stdout] 27 | struct NodeFunc { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `add`, `swap`, `contains`, `get`, and `get_reverse` are never used [INFO] [stdout] --> src/days/day24sol.rs:33:12 [INFO] [stdout] | [INFO] [stdout] 32 | impl NodeFunc { [INFO] [stdout] | ------------- associated items in this implementation [INFO] [stdout] 33 | pub fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 40 | pub fn add(&mut self, node: &str, func: Func) { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 45 | pub fn swap(&mut self, act: &str, exp: &str) { [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 56 | pub fn contains(&self, node: &str) -> bool { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 60 | pub fn get(&self, node: &str) -> Func { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 64 | pub fn get_reverse(&self, func: Func) -> String { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part1` is never used [INFO] [stdout] --> src/days/day24sol.rs:69:4 [INFO] [stdout] | [INFO] [stdout] 69 | fn part1(entries: &[Entry], mut values: HashMap, mut starts: Vec) -> u64 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `apply_swap` is never used [INFO] [stdout] --> src/days/day24sol.rs:123:4 [INFO] [stdout] | [INFO] [stdout] 123 | fn apply_swap(entries: &mut [Entry], node_func: &mut NodeFunc, act: &str, exp: &str) { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_next` is never used [INFO] [stdout] --> src/days/day24sol.rs:134:4 [INFO] [stdout] | [INFO] [stdout] 134 | fn get_next(entries: &[Entry], node_func: &NodeFunc) -> Vec { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part2` is never used [INFO] [stdout] --> src/days/day24sol.rs:161:4 [INFO] [stdout] | [INFO] [stdout] 161 | fn part2(entries: &mut [Entry]) -> String { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/days/day24sol.rs:246:8 [INFO] [stdout] | [INFO] [stdout] 246 | pub fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/days/day3.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 4 | pub fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/days/day4.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/days/day5.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 4 | pub fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `start_pos` is never used [INFO] [stdout] --> src/days/day6.rs:4:4 [INFO] [stdout] | [INFO] [stdout] 4 | fn start_pos(maze: &Vec>) -> (usize, usize) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `print_maze` is never used [INFO] [stdout] --> src/days/day6.rs:15:4 [INFO] [stdout] | [INFO] [stdout] 15 | fn print_maze(maze: &Vec>) { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `move1` is never used [INFO] [stdout] --> src/days/day6.rs:24:4 [INFO] [stdout] | [INFO] [stdout] 24 | fn move1( [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `count` is never used [INFO] [stdout] --> src/days/day6.rs:64:4 [INFO] [stdout] | [INFO] [stdout] 64 | fn count(maze: &Vec>) -> usize { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/days/day6.rs:70:8 [INFO] [stdout] | [INFO] [stdout] 70 | pub fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `is_solvable_part1` is never used [INFO] [stdout] --> src/days/day7.rs:1:4 [INFO] [stdout] | [INFO] [stdout] 1 | fn is_solvable_part1( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `is_solvable_part2` is never used [INFO] [stdout] --> src/days/day7.rs:33:4 [INFO] [stdout] | [INFO] [stdout] 33 | fn is_solvable_part2( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/days/day7.rs:72:8 [INFO] [stdout] | [INFO] [stdout] 72 | pub fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/days/day8.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part1` is never used [INFO] [stdout] --> src/days/day9sol.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 4 | pub fn part1(input: &str) -> usize { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part2` is never used [INFO] [stdout] --> src/days/day9sol.rs:52:8 [INFO] [stdout] | [INFO] [stdout] 52 | pub fn part2(input: &str) -> usize { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `File` is never constructed [INFO] [stdout] --> src/days/day9sol.rs:104:8 [INFO] [stdout] | [INFO] [stdout] 104 | struct File { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/days/day9sol.rs:110:8 [INFO] [stdout] | [INFO] [stdout] 110 | pub fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/days/day11.rs:5:10 [INFO] [stdout] | [INFO] [stdout] 5 | .map(|x| blink_str(x.to_string())) [INFO] [stdout] | __________^ [INFO] [stdout] 6 | | .flatten() [INFO] [stdout] | |__________________^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(|x| blink_str(x.to_string()))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] = note: `#[warn(clippy::map_flatten)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/days/day11.rs:31:5 [INFO] [stdout] | [INFO] [stdout] 31 | return vec![(n.parse::().unwrap() * 2024).to_string()]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 31 - return vec![(n.parse::().unwrap() * 2024).to_string()]; [INFO] [stdout] 31 + vec![(n.parse::().unwrap() * 2024).to_string()] [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/days/day11.rs:24:8 [INFO] [stdout] | [INFO] [stdout] 24 | if n_len % 2 == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace with: `n_len.is_multiple_of(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/days/day12.rs:9:17 [INFO] [stdout] | [INFO] [stdout] 9 | fn area(coords: &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] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 9 - fn area(coords: &Vec) -> i32 { [INFO] [stdout] 9 + fn area(coords: &[Point]) -> i32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/days/day12.rs:14:5 [INFO] [stdout] | [INFO] [stdout] 14 | / (p1.x == p2.x && p1.y == p2.y + 1) [INFO] [stdout] 15 | | || (p1.x == p2.x && p1.y + 1 == p2.y) [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] 14 - (p1.x == p2.x && p1.y == p2.y + 1) [INFO] [stdout] 15 - || (p1.x == p2.x && p1.y + 1 == p2.y) [INFO] [stdout] 14 + !(p1.x != p2.x || p1.y != p2.y + 1 && p1.y + 1 != p2.y) [INFO] [stdout] | [INFO] [stdout] 14 - (p1.x == p2.x && p1.y == p2.y + 1) [INFO] [stdout] 15 - || (p1.x == p2.x && p1.y + 1 == p2.y) [INFO] [stdout] 14 + (p1.y + 1 == p2.y || p1.y == p2.y + 1) && p1.x == p2.x [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/days/day12.rs:21:44 [INFO] [stdout] | [INFO] [stdout] 21 | fn neighbor2(p1: Point, p2: Point, points: &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] 21 - fn neighbor2(p1: Point, p2: Point, points: &Vec) -> i32 { [INFO] [stdout] 21 + fn neighbor2(p1: Point, p2: Point, points: &[Point]) -> i32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/days/day12.rs:56:22 [INFO] [stdout] | [INFO] [stdout] 56 | fn perimeter(coords: &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] 56 - fn perimeter(coords: &Vec) -> i32 { [INFO] [stdout] 56 + fn perimeter(coords: &[Point]) -> i32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to pop elements from a `Vec` in a loop [INFO] [stdout] --> src/days/day12.rs:89:17 [INFO] [stdout] | [INFO] [stdout] 89 | let current = stack.pop().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_while_let_some [INFO] [stdout] = note: `#[warn(clippy::manual_while_let_some)]` on by default [INFO] [stdout] help: consider using a `while..let` loop [INFO] [stdout] | [INFO] [stdout] 88 ~ while let Some(current) = stack.pop() { [INFO] [stdout] 89 ~ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> src/days/day12.rs:93:49 [INFO] [stdout] | [INFO] [stdout] 93 | let neighbors: Vec = points [INFO] [stdout] | _________________________________________________^ [INFO] [stdout] 94 | | .iter() [INFO] [stdout] 95 | | .filter(|p| neighbor(current, **p)) [INFO] [stdout] 96 | | .map(|p| *p) [INFO] [stdout] | |____________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] = note: `#[warn(clippy::map_clone)]` on by default [INFO] [stdout] help: consider calling the dedicated `copied` method [INFO] [stdout] | [INFO] [stdout] 93 ~ let neighbors: Vec = points [INFO] [stdout] 94 + .iter() [INFO] [stdout] 95 + .filter(|p| neighbor(current, **p)).copied() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: iterating on a map's values [INFO] [stdout] --> src/days/day12.rs:127:22 [INFO] [stdout] | [INFO] [stdout] 127 | let total: i32 = map_island [INFO] [stdout] | ______________________^ [INFO] [stdout] 128 | | .iter() [INFO] [stdout] 129 | | .map(|(_, islands)| { [INFO] [stdout] 130 | | islands [INFO] [stdout] ... | [INFO] [stdout] 133 | | .sum::() [INFO] [stdout] 134 | | }) [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_kv_map [INFO] [stdout] = note: `#[warn(clippy::iter_kv_map)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 127 ~ let total: i32 = map_island.values().map(|islands| { [INFO] [stdout] 128 + islands [INFO] [stdout] 129 + .iter() [INFO] [stdout] 130 + .map(|island| area(island) * perimeter(island)) [INFO] [stdout] 131 + .sum::() [INFO] [stdout] 132 + }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: iterating on a map's values [INFO] [stdout] --> src/days/day12.rs:138:23 [INFO] [stdout] | [INFO] [stdout] 138 | let total2: i32 = map_island [INFO] [stdout] | _______________________^ [INFO] [stdout] 139 | | .iter() [INFO] [stdout] 140 | | .map(|(_, islands)| { [INFO] [stdout] 141 | | islands [INFO] [stdout] ... | [INFO] [stdout] 144 | | .sum::() [INFO] [stdout] 145 | | }) [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_kv_map [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 138 ~ let total2: i32 = map_island.values().map(|islands| { [INFO] [stdout] 139 + islands [INFO] [stdout] 140 + .iter() [INFO] [stdout] 141 + .map(|island| area(island) * perimeter2(island)) [INFO] [stdout] 142 + .sum::() [INFO] [stdout] 143 + }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/days/day13.rs:29:5 [INFO] [stdout] | [INFO] [stdout] 29 | return 3 * a1 + a2; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 29 - return 3 * a1 + a2; [INFO] [stdout] 29 + 3 * a1 + a2 [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/days/day15.rs:3:12 [INFO] [stdout] | [INFO] [stdout] 3 | fn mv(map: &mut Vec>, x: i32, y: i32, dx: i32, dy: i32) -> (i32, i32) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 3 - fn mv(map: &mut Vec>, x: i32, y: i32, dx: i32, dy: i32) -> (i32, i32) { [INFO] [stdout] 3 + fn mv(map: &mut [Vec], x: i32, y: i32, dx: i32, dy: i32) -> (i32, i32) { [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/days/day15.rs:35:13 [INFO] [stdout] | [INFO] [stdout] 35 | fn mv2(map: &mut Vec>, x: i32, y: i32, dx: i32, dy: i32) -> (i32, i32) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 35 - fn mv2(map: &mut Vec>, x: i32, y: i32, dx: i32, dy: i32) -> (i32, i32) { [INFO] [stdout] 35 + fn mv2(map: &mut [Vec], x: i32, y: i32, dx: i32, dy: i32) -> (i32, i32) { [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/days/day15.rs:93:19 [INFO] [stdout] | [INFO] [stdout] 93 | fn print_map(map: &mut Vec>) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 93 - fn print_map(map: &mut Vec>) { [INFO] [stdout] 93 + fn print_map(map: &mut [Vec]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/days/day15.rs:96:30 [INFO] [stdout] | [INFO] [stdout] 96 | print!("{}", map[i as usize][j as usize]); [INFO] [stdout] | ^^^^^^^^^^ help: try: `{ i }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/days/day15.rs:96:42 [INFO] [stdout] | [INFO] [stdout] 96 | print!("{}", map[i as usize][j as usize]); [INFO] [stdout] | ^^^^^^^^^^ help: try: `j` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/days/day15.rs:110:5 [INFO] [stdout] | [INFO] [stdout] 110 | return (0, 0); [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 110 - return (0, 0); [INFO] [stdout] 110 + (0, 0) [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/days/day15.rs:102:20 [INFO] [stdout] | [INFO] [stdout] 102 | fn find_robot(map: &mut Vec>) -> (i32, i32) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 102 - fn find_robot(map: &mut Vec>) -> (i32, i32) { [INFO] [stdout] 102 + fn find_robot(map: &mut [Vec]) -> (i32, i32) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is used to index `map` [INFO] [stdout] --> src/days/day15.rs:104:18 [INFO] [stdout] | [INFO] [stdout] 104 | for j in 0..map[0].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 and enumerate() [INFO] [stdout] | [INFO] [stdout] 104 - for j in 0..map[0].len() { [INFO] [stdout] 104 + for (j, ) in map.iter().enumerate().take(map[0].len()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/days/day15.rs:122:5 [INFO] [stdout] | [INFO] [stdout] 122 | return blocks; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 122 - return blocks; [INFO] [stdout] 122 + blocks [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/days/day15.rs:113:21 [INFO] [stdout] | [INFO] [stdout] 113 | fn find_blocks(map: &mut Vec>) -> Vec<(i32, i32)> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 113 - fn find_blocks(map: &mut Vec>) -> Vec<(i32, i32)> { [INFO] [stdout] 113 + fn find_blocks(map: &mut [Vec]) -> Vec<(i32, i32)> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is used to index `map` [INFO] [stdout] --> src/days/day15.rs:116:18 [INFO] [stdout] | [INFO] [stdout] 116 | for j in 0..map[0].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] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 116 - for j in 0..map[0].len() { [INFO] [stdout] 116 + for (j, ) in map.iter().enumerate().take(map[0].len()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/days/day15.rs:134:5 [INFO] [stdout] | [INFO] [stdout] 134 | return blocks; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 134 - return blocks; [INFO] [stdout] 134 + blocks [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/days/day15.rs:125:22 [INFO] [stdout] | [INFO] [stdout] 125 | fn find_blocks2(map: &mut Vec>) -> Vec<(i32, i32)> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 125 - fn find_blocks2(map: &mut Vec>) -> Vec<(i32, i32)> { [INFO] [stdout] 125 + fn find_blocks2(map: &mut [Vec]) -> Vec<(i32, i32)> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is used to index `map` [INFO] [stdout] --> src/days/day15.rs:128:18 [INFO] [stdout] | [INFO] [stdout] 128 | for j in 0..map[0].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] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 128 - for j in 0..map[0].len() { [INFO] [stdout] 128 + for (j, ) in map.iter().enumerate().take(map[0].len()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/days/day1.rs:5:8 [INFO] [stdout] | [INFO] [stdout] 5 | pub fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Map` is never constructed [INFO] [stdout] --> src/days/day10.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 4 | struct Map(nalgebra::DMatrix); [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `parse` and `nodes` are never used [INFO] [stdout] --> src/days/day10.rs:6:8 [INFO] [stdout] | [INFO] [stdout] 5 | impl Map { [INFO] [stdout] | -------- associated items in this implementation [INFO] [stdout] 6 | fn parse(input: &str) -> Self { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 19 | fn nodes(&self) -> HashMap> { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part1` is never used [INFO] [stdout] --> src/days/day10.rs:31:8 [INFO] [stdout] | [INFO] [stdout] 31 | pub fn part1() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part2` is never used [INFO] [stdout] --> src/days/day10.rs:72:8 [INFO] [stdout] | [INFO] [stdout] 72 | pub fn part2() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/days/day10.rs:104:8 [INFO] [stdout] | [INFO] [stdout] 104 | pub fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `blink` is never used [INFO] [stdout] --> src/days/day11.rs:3:4 [INFO] [stdout] | [INFO] [stdout] 3 | fn blink(n: Vec) -> Vec { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/days/day16.rs:39:6 [INFO] [stdout] | [INFO] [stdout] 39 | ) -> ( [INFO] [stdout] | ______^ [INFO] [stdout] 40 | | HashMap<(usize, usize, i32), i32>, [INFO] [stdout] 41 | | HashMap<(usize, usize, i32), Vec>>, [INFO] [stdout] 42 | | ) { [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: function `remove_leading_zero` is never used [INFO] [stdout] --> src/days/day11.rs:10:4 [INFO] [stdout] | [INFO] [stdout] 10 | fn remove_leading_zero(n: String) -> String { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `blink_str` is never used [INFO] [stdout] --> src/days/day11.rs:18:4 [INFO] [stdout] | [INFO] [stdout] 18 | fn blink_str(n: String) -> Vec { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/days/day11.rs:34:8 [INFO] [stdout] | [INFO] [stdout] 34 | pub fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Point` is never constructed [INFO] [stdout] --> src/days/day12.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 4 | struct Point { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `area` is never used [INFO] [stdout] --> src/days/day12.rs:9:4 [INFO] [stdout] | [INFO] [stdout] 9 | fn area(coords: &Vec) -> i32 { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `neighbor` is never used [INFO] [stdout] --> src/days/day12.rs:13:4 [INFO] [stdout] | [INFO] [stdout] 13 | fn neighbor(p1: Point, p2: Point) -> bool { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `neighbor2` is never used [INFO] [stdout] --> src/days/day12.rs:21:4 [INFO] [stdout] | [INFO] [stdout] 21 | fn neighbor2(p1: Point, p2: Point, points: &Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/days/day16.rs:45:20 [INFO] [stdout] | [INFO] [stdout] 45 | let mut paths: HashMap<(usize, usize, i32), Vec>> = HashMap::new(); // (i, j, dir) -> [path1, path2, ...] [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: function `perimeter` is never used [INFO] [stdout] --> src/days/day12.rs:56:4 [INFO] [stdout] | [INFO] [stdout] 56 | fn perimeter(coords: &Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `perimeter2` is never used [INFO] [stdout] --> src/days/day12.rs:68:4 [INFO] [stdout] | [INFO] [stdout] 68 | fn perimeter2(coords: &Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_islands` is never used [INFO] [stdout] --> src/days/day12.rs:81:4 [INFO] [stdout] | [INFO] [stdout] 81 | fn get_islands(points: Vec) -> Vec> { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/days/day12.rs:107:8 [INFO] [stdout] | [INFO] [stdout] 107 | pub fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `foo` is never used [INFO] [stdout] --> src/days/day13.rs:1:4 [INFO] [stdout] | [INFO] [stdout] 1 | fn foo(x1: i64, y1: i64, x2: i64, y2: i64, t1: i64, t2: i64) -> i64 { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/days/day13.rs:32:8 [INFO] [stdout] | [INFO] [stdout] 32 | pub fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `print_map` is never used [INFO] [stdout] --> src/days/day14.rs:1:4 [INFO] [stdout] | [INFO] [stdout] 1 | fn print_map(positions: &Vec<(i64, i64)>, m: i64, n: i64) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `is_reflect_xaxis` is never used [INFO] [stdout] --> src/days/day14.rs:14:4 [INFO] [stdout] | [INFO] [stdout] 14 | fn is_reflect_xaxis(positions: &Vec<(i64, i64)>, m: i64, n: i64) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/days/day14.rs:23:8 [INFO] [stdout] | [INFO] [stdout] 23 | pub fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/days/day16.rs:60:32 [INFO] [stdout] | [INFO] [stdout] 60 | .unwrap_or(std::i32::MAX); [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 60 - .unwrap_or(std::i32::MAX); [INFO] [stdout] 60 + .unwrap_or(i32::MAX); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `mv` is never used [INFO] [stdout] --> src/days/day15.rs:3:4 [INFO] [stdout] | [INFO] [stdout] 3 | fn mv(map: &mut Vec>, x: i32, y: i32, dx: i32, dy: i32) -> (i32, i32) { [INFO] [stdout] | ^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `mv2` is never used [INFO] [stdout] --> src/days/day15.rs:35:4 [INFO] [stdout] | [INFO] [stdout] 35 | fn mv2(map: &mut Vec>, x: i32, y: i32, dx: i32, dy: i32) -> (i32, i32) { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `print_map` is never used [INFO] [stdout] --> src/days/day15.rs:93:4 [INFO] [stdout] | [INFO] [stdout] 93 | fn print_map(map: &mut Vec>) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `find_robot` is never used [INFO] [stdout] --> src/days/day15.rs:102:4 [INFO] [stdout] | [INFO] [stdout] 102 | fn find_robot(map: &mut Vec>) -> (i32, i32) { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `find_blocks` is never used [INFO] [stdout] --> src/days/day15.rs:113:4 [INFO] [stdout] | [INFO] [stdout] 113 | fn find_blocks(map: &mut Vec>) -> Vec<(i32, i32)> { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `find_blocks2` is never used [INFO] [stdout] --> src/days/day15.rs:125:4 [INFO] [stdout] | [INFO] [stdout] 125 | fn find_blocks2(map: &mut Vec>) -> Vec<(i32, i32)> { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/days/day15.rs:137:8 [INFO] [stdout] | [INFO] [stdout] 137 | pub fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `neighbors` is never used [INFO] [stdout] --> src/days/day16.rs:7:4 [INFO] [stdout] | [INFO] [stdout] 7 | fn neighbors( [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `diajkstra` is never used [INFO] [stdout] --> src/days/day16.rs:36:4 [INFO] [stdout] | [INFO] [stdout] 36 | fn diajkstra( [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/days/day16.rs:83:8 [INFO] [stdout] | [INFO] [stdout] 83 | pub fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `bench` is never used [INFO] [stdout] --> src/days/day16sol.rs:4:4 [INFO] [stdout] | [INFO] [stdout] 4 | fn bench(f: F) -> R [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `dijkstra` is never used [INFO] [stdout] --> src/days/day16sol.rs:14:4 [INFO] [stdout] | [INFO] [stdout] 14 | fn dijkstra( [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part_1` is never used [INFO] [stdout] --> src/days/day16sol.rs:61:4 [INFO] [stdout] | [INFO] [stdout] 61 | fn part_1() { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `trace_back` is never used [INFO] [stdout] --> src/days/day16sol.rs:96:4 [INFO] [stdout] | [INFO] [stdout] 96 | fn trace_back( [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part_2` is never used [INFO] [stdout] --> src/days/day16sol.rs:144:4 [INFO] [stdout] | [INFO] [stdout] 144 | fn part_2() { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/days/day16sol.rs:187:8 [INFO] [stdout] | [INFO] [stdout] 187 | pub fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `combo` is never used [INFO] [stdout] --> src/days/day17.rs:4:4 [INFO] [stdout] | [INFO] [stdout] 4 | fn combo(c: u64, registers: &Vec) -> u64 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `perform` is never used [INFO] [stdout] --> src/days/day17.rs:20:4 [INFO] [stdout] | [INFO] [stdout] 20 | fn perform(index: &u64, registers: &mut Vec, program: &Vec) -> (u64, u64) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/days/day17.rs:59:8 [INFO] [stdout] | [INFO] [stdout] 59 | pub fn main() -> anyhow::Result<()> { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `print_map` is never used [INFO] [stdout] --> src/days/day18.rs:5:4 [INFO] [stdout] | [INFO] [stdout] 5 | fn print_map(nodes: &HashSet<(u32, u32)>, blocks: &HashMap) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `bfs` is never used [INFO] [stdout] --> src/days/day18.rs:20:4 [INFO] [stdout] | [INFO] [stdout] 20 | fn bfs(nodes: HashSet<(u32, u32)>, start: (u32, u32), end: (u32, u32)) -> i32 { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part1` is never used [INFO] [stdout] --> src/days/day18.rs:48:4 [INFO] [stdout] | [INFO] [stdout] 48 | fn part1(blocks: &HashMap, i: u32) -> i32 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/days/day18.rs:66:8 [INFO] [stdout] | [INFO] [stdout] 66 | pub fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `dp` is never used [INFO] [stdout] --> src/days/day19.rs:3:4 [INFO] [stdout] | [INFO] [stdout] 3 | fn dp(towels: &HashSet<&str>, design: &str) -> u64 { [INFO] [stdout] | ^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/days/day19.rs:18:8 [INFO] [stdout] | [INFO] [stdout] 18 | pub fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `bfs` is never used [INFO] [stdout] --> src/days/day20.rs:9:4 [INFO] [stdout] | [INFO] [stdout] 9 | fn bfs( [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_valid_neighbors` is never used [INFO] [stdout] --> src/days/day20.rs:38:4 [INFO] [stdout] | [INFO] [stdout] 38 | fn get_valid_neighbors(map: &Vec>, l: i32, i: i32, j: i32) -> HashMap<(i32, i32), i32> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part1` is never used [INFO] [stdout] --> src/days/day20.rs:55:4 [INFO] [stdout] | [INFO] [stdout] 55 | fn part1( [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/days/day20.rs:103:8 [INFO] [stdout] | [INFO] [stdout] 103 | pub fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `dp` is never used [INFO] [stdout] --> src/days/day21.rs:44:4 [INFO] [stdout] | [INFO] [stdout] 44 | fn dp(n: u32) -> Vec> { [INFO] [stdout] | ^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `filter_validate_paths` is never used [INFO] [stdout] --> src/days/day21.rs:135:4 [INFO] [stdout] | [INFO] [stdout] 135 | fn filter_validate_paths(k1: (u32, u32), paths: Vec>) -> Vec> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_shortest_paths` is never used [INFO] [stdout] --> src/days/day21.rs:157:4 [INFO] [stdout] | [INFO] [stdout] 157 | fn get_shortest_paths(k1: (u32, u32), k2: (u32, u32)) -> Vec> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `convert_path` is never used [INFO] [stdout] --> src/days/day21.rs:185:4 [INFO] [stdout] | [INFO] [stdout] 185 | fn convert_path(path: Vec) -> Vec<(u32, u32)> { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/days/day21.rs:203:8 [INFO] [stdout] | [INFO] [stdout] 203 | pub fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `convert_numpad_to_loc` is never used [INFO] [stdout] --> src/days/day21.rs:255:4 [INFO] [stdout] | [INFO] [stdout] 255 | fn convert_numpad_to_loc(c: char) -> (u32, u32) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `mix` is never used [INFO] [stdout] --> src/days/day22.rs:4:4 [INFO] [stdout] | [INFO] [stdout] 4 | fn mix(a: u64, m: u64) -> u64 { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `prune` is never used [INFO] [stdout] --> src/days/day22.rs:8:4 [INFO] [stdout] | [INFO] [stdout] 8 | fn prune(a: u64) -> u64 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `secret` is never used [INFO] [stdout] --> src/days/day22.rs:12:4 [INFO] [stdout] | [INFO] [stdout] 12 | fn secret(a: u64) -> u64 { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/days/day22.rs:20:8 [INFO] [stdout] | [INFO] [stdout] 20 | pub fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/days/day23.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 4 | pub fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type alias `Graph` is never used [INFO] [stdout] --> src/days/day23.rs:63:6 [INFO] [stdout] | [INFO] [stdout] 63 | type Graph = HashMap>; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `bron_kerbosch` is never used [INFO] [stdout] --> src/days/day23.rs:65:4 [INFO] [stdout] | [INFO] [stdout] 65 | fn bron_kerbosch( [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/days/day24.rs:5:8 [INFO] [stdout] | [INFO] [stdout] 5 | pub fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `print_zn` is never used [INFO] [stdout] --> src/days/day24.rs:120:4 [INFO] [stdout] | [INFO] [stdout] 120 | fn print_zn(n: u32, orders: &Vec<(&str, &str, &str, &str)>) { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_bin_value` is never used [INFO] [stdout] --> src/days/day24.rs:128:4 [INFO] [stdout] | [INFO] [stdout] 128 | fn get_bin_value(c: char, wires: &HashMap<&str, u32>) -> (String, i64) { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `swap_gates` is never used [INFO] [stdout] --> src/days/day24.rs:143:4 [INFO] [stdout] | [INFO] [stdout] 143 | fn swap_gates<'a>(gates: &mut Vec<(&'a str, &'a str, &'a str, &'a str)>, a: &'a str, b: &'a str) { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `compute` is never used [INFO] [stdout] --> src/days/day24.rs:153:4 [INFO] [stdout] | [INFO] [stdout] 153 | fn compute<'a>( [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type alias `Entry` is never used [INFO] [stdout] --> src/days/day24sol.rs:8:6 [INFO] [stdout] | [INFO] [stdout] 8 | type Entry = (String, Node, String, String); [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Node` is never used [INFO] [stdout] --> src/days/day24sol.rs:11:6 [INFO] [stdout] | [INFO] [stdout] 11 | enum Node { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Func` is never used [INFO] [stdout] --> src/days/day24sol.rs:19:6 [INFO] [stdout] | [INFO] [stdout] 19 | enum Func { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `NodeFunc` is never constructed [INFO] [stdout] --> src/days/day24sol.rs:27:8 [INFO] [stdout] | [INFO] [stdout] 27 | struct NodeFunc { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `add`, `swap`, `contains`, `get`, and `get_reverse` are never used [INFO] [stdout] --> src/days/day24sol.rs:33:12 [INFO] [stdout] | [INFO] [stdout] 32 | impl NodeFunc { [INFO] [stdout] | ------------- associated items in this implementation [INFO] [stdout] 33 | pub fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 40 | pub fn add(&mut self, node: &str, func: Func) { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 45 | pub fn swap(&mut self, act: &str, exp: &str) { [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 56 | pub fn contains(&self, node: &str) -> bool { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 60 | pub fn get(&self, node: &str) -> Func { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 64 | pub fn get_reverse(&self, func: Func) -> String { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part1` is never used [INFO] [stdout] --> src/days/day24sol.rs:69:4 [INFO] [stdout] | [INFO] [stdout] 69 | fn part1(entries: &[Entry], mut values: HashMap, mut starts: Vec) -> u64 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `apply_swap` is never used [INFO] [stdout] --> src/days/day24sol.rs:123:4 [INFO] [stdout] | [INFO] [stdout] 123 | fn apply_swap(entries: &mut [Entry], node_func: &mut NodeFunc, act: &str, exp: &str) { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_next` is never used [INFO] [stdout] --> src/days/day24sol.rs:134:4 [INFO] [stdout] | [INFO] [stdout] 134 | fn get_next(entries: &[Entry], node_func: &NodeFunc) -> Vec { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part2` is never used [INFO] [stdout] --> src/days/day24sol.rs:161:4 [INFO] [stdout] | [INFO] [stdout] 161 | fn part2(entries: &mut [Entry]) -> String { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/days/day24sol.rs:246:8 [INFO] [stdout] | [INFO] [stdout] 246 | pub fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/days/day3.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 4 | pub fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/days/day4.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/days/day5.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 4 | pub fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `start_pos` is never used [INFO] [stdout] --> src/days/day6.rs:4:4 [INFO] [stdout] | [INFO] [stdout] 4 | fn start_pos(maze: &Vec>) -> (usize, usize) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/days/day16.rs:97:24 [INFO] [stdout] | [INFO] [stdout] 97 | let mut min_dist = std::i32::MAX; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 97 - let mut min_dist = std::i32::MAX; [INFO] [stdout] 97 + let mut min_dist = i32::MAX; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> src/days/day16.rs:109:14 [INFO] [stdout] | [INFO] [stdout] 109 | .into_iter() [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] = note: `#[warn(clippy::into_iter_on_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `print_maze` is never used [INFO] [stdout] --> src/days/day6.rs:15:4 [INFO] [stdout] | [INFO] [stdout] 15 | fn print_maze(maze: &Vec>) { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `move1` is never used [INFO] [stdout] --> src/days/day6.rs:24:4 [INFO] [stdout] | [INFO] [stdout] 24 | fn move1( [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `count` is never used [INFO] [stdout] --> src/days/day6.rs:64:4 [INFO] [stdout] | [INFO] [stdout] 64 | fn count(maze: &Vec>) -> usize { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/days/day6.rs:70:8 [INFO] [stdout] | [INFO] [stdout] 70 | pub fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `is_solvable_part1` is never used [INFO] [stdout] --> src/days/day7.rs:1:4 [INFO] [stdout] | [INFO] [stdout] 1 | fn is_solvable_part1( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `is_solvable_part2` is never used [INFO] [stdout] --> src/days/day7.rs:33:4 [INFO] [stdout] | [INFO] [stdout] 33 | fn is_solvable_part2( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/days/day7.rs:72:8 [INFO] [stdout] | [INFO] [stdout] 72 | pub fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/days/day8.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part1` is never used [INFO] [stdout] --> src/days/day9sol.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 4 | pub fn part1(input: &str) -> usize { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part2` is never used [INFO] [stdout] --> src/days/day9sol.rs:52:8 [INFO] [stdout] | [INFO] [stdout] 52 | pub fn part2(input: &str) -> usize { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `File` is never constructed [INFO] [stdout] --> src/days/day9sol.rs:104:8 [INFO] [stdout] | [INFO] [stdout] 104 | struct File { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/days/day9sol.rs:110:8 [INFO] [stdout] | [INFO] [stdout] 110 | pub fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/days/day16sol.rs:31:12 [INFO] [stdout] | [INFO] [stdout] 31 | if visited.get(&((cx, cy), cd)).map_or(false, |&v| v < score) { [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] 31 - if visited.get(&((cx, cy), cd)).map_or(false, |&v| v < score) { [INFO] [stdout] 31 + if visited.get(&((cx, cy), cd)).is_some_and(|&v| v < score) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/days/day16sol.rs:39:41 [INFO] [stdout] | [INFO] [stdout] 39 | if free_spaces.contains(&np) && visited.get(&(np, cd)).map_or(true, |&v| v > score + 1) { [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] 39 - if free_spaces.contains(&np) && visited.get(&(np, cd)).map_or(true, |&v| v > score + 1) { [INFO] [stdout] 39 + if free_spaces.contains(&np) && visited.get(&(np, cd)).is_none_or(|&v| v > score + 1) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/days/day16sol.rs:48:16 [INFO] [stdout] | [INFO] [stdout] 48 | if visited [INFO] [stdout] | ________________^ [INFO] [stdout] 49 | | .get(&((cx, cy), nd)) [INFO] [stdout] 50 | | .map_or(true, |&v| v > score + 1000) [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] 50 - .map_or(true, |&v| v > score + 1000) [INFO] [stdout] 50 + .is_none_or(|&v| v > score + 1000) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/days/day16sol.rs:114:12 [INFO] [stdout] | [INFO] [stdout] 114 | if visited [INFO] [stdout] | ____________^ [INFO] [stdout] 115 | | .get(&(np, cd)) [INFO] [stdout] 116 | | .map_or(false, |&v| v + 1 == visited[&(cp, cd)]) [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] 116 - .map_or(false, |&v| v + 1 == visited[&(cp, cd)]) [INFO] [stdout] 116 + .is_some_and(|&v| v + 1 == visited[&(cp, cd)]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/days/day16sol.rs:127:12 [INFO] [stdout] | [INFO] [stdout] 127 | if visited [INFO] [stdout] | ____________^ [INFO] [stdout] 128 | | .get(&(cp, nd1)) [INFO] [stdout] 129 | | .map_or(false, |&v| v + 1000 == visited[&(cp, cd)]) [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] 129 - .map_or(false, |&v| v + 1000 == visited[&(cp, cd)]) [INFO] [stdout] 129 + .is_some_and(|&v| v + 1000 == visited[&(cp, cd)]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/days/day16sol.rs:133:12 [INFO] [stdout] | [INFO] [stdout] 133 | if visited [INFO] [stdout] | ____________^ [INFO] [stdout] 134 | | .get(&(cp, nd2)) [INFO] [stdout] 135 | | .map_or(false, |&v| v + 1000 == visited[&(cp, cd)]) [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 - .map_or(false, |&v| v + 1000 == visited[&(cp, cd)]) [INFO] [stdout] 135 + .is_some_and(|&v| v + 1000 == visited[&(cp, cd)]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/days/day17.rs:4:29 [INFO] [stdout] | [INFO] [stdout] 4 | fn combo(c: u64, registers: &Vec) -> u64 { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 4 - fn combo(c: u64, registers: &Vec) -> u64 { [INFO] [stdout] 4 + fn combo(c: u64, registers: &[u64]) -> u64 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/days/day17.rs:5:8 [INFO] [stdout] | [INFO] [stdout] 5 | if 4 <= c && c <= 6 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: use: `(4..=6).contains(&c)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/days/day17.rs:56:5 [INFO] [stdout] | [INFO] [stdout] 56 | return (0, 0); [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 56 - return (0, 0); [INFO] [stdout] 56 + (0, 0) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/days/day17.rs:20:60 [INFO] [stdout] | [INFO] [stdout] 20 | fn perform(index: &u64, registers: &mut Vec, program: &Vec) -> (u64, u64) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 20 - fn perform(index: &u64, registers: &mut Vec, program: &Vec) -> (u64, u64) { [INFO] [stdout] 20 + fn perform(index: &u64, registers: &mut Vec, program: &[u64]) -> (u64, u64) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/days/day17.rs:31:13 [INFO] [stdout] | [INFO] [stdout] 31 | registers[0] = registers[0] / 2u64.pow(combo(operand, registers) as u32); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `registers[0] /= 2u64.pow(combo(operand, registers) as u32)` [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/days/day17.rs:34:13 [INFO] [stdout] | [INFO] [stdout] 34 | registers[1] = registers[1] ^ operand; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `registers[1] ^= operand` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/days/day17.rs:45:13 [INFO] [stdout] | [INFO] [stdout] 45 | registers[1] = registers[1] ^ registers[2]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `registers[1] ^= registers[2]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/days/day11.rs:5:10 [INFO] [stdout] | [INFO] [stdout] 5 | .map(|x| blink_str(x.to_string())) [INFO] [stdout] | __________^ [INFO] [stdout] 6 | | .flatten() [INFO] [stdout] | |__________________^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(|x| blink_str(x.to_string()))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] = note: `#[warn(clippy::map_flatten)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/days/day11.rs:31:5 [INFO] [stdout] | [INFO] [stdout] 31 | return vec![(n.parse::().unwrap() * 2024).to_string()]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 31 - return vec![(n.parse::().unwrap() * 2024).to_string()]; [INFO] [stdout] 31 + vec![(n.parse::().unwrap() * 2024).to_string()] [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/days/day11.rs:24:8 [INFO] [stdout] | [INFO] [stdout] 24 | if n_len % 2 == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace with: `n_len.is_multiple_of(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/days/day17.rs:120:12 [INFO] [stdout] | [INFO] [stdout] 120 | if new_a % 1000 == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace with: `new_a.is_multiple_of(1000)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/days/day12.rs:9:17 [INFO] [stdout] | [INFO] [stdout] 9 | fn area(coords: &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] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 9 - fn area(coords: &Vec) -> i32 { [INFO] [stdout] 9 + fn area(coords: &[Point]) -> i32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/days/day12.rs:14:5 [INFO] [stdout] | [INFO] [stdout] 14 | / (p1.x == p2.x && p1.y == p2.y + 1) [INFO] [stdout] 15 | | || (p1.x == p2.x && p1.y + 1 == p2.y) [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] 14 - (p1.x == p2.x && p1.y == p2.y + 1) [INFO] [stdout] 15 - || (p1.x == p2.x && p1.y + 1 == p2.y) [INFO] [stdout] 14 + !(p1.x != p2.x || p1.y != p2.y + 1 && p1.y + 1 != p2.y) [INFO] [stdout] | [INFO] [stdout] 14 - (p1.x == p2.x && p1.y == p2.y + 1) [INFO] [stdout] 15 - || (p1.x == p2.x && p1.y + 1 == p2.y) [INFO] [stdout] 14 + (p1.y + 1 == p2.y || p1.y == p2.y + 1) && p1.x == p2.x [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/days/day12.rs:21:44 [INFO] [stdout] | [INFO] [stdout] 21 | fn neighbor2(p1: Point, p2: Point, points: &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] 21 - fn neighbor2(p1: Point, p2: Point, points: &Vec) -> i32 { [INFO] [stdout] 21 + fn neighbor2(p1: Point, p2: Point, points: &[Point]) -> i32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/days/day12.rs:56:22 [INFO] [stdout] | [INFO] [stdout] 56 | fn perimeter(coords: &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] 56 - fn perimeter(coords: &Vec) -> i32 { [INFO] [stdout] 56 + fn perimeter(coords: &[Point]) -> i32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to pop elements from a `Vec` in a loop [INFO] [stdout] --> src/days/day12.rs:89:17 [INFO] [stdout] | [INFO] [stdout] 89 | let current = stack.pop().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_while_let_some [INFO] [stdout] = note: `#[warn(clippy::manual_while_let_some)]` on by default [INFO] [stdout] help: consider using a `while..let` loop [INFO] [stdout] | [INFO] [stdout] 88 ~ while let Some(current) = stack.pop() { [INFO] [stdout] 89 ~ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> src/days/day12.rs:93:49 [INFO] [stdout] | [INFO] [stdout] 93 | let neighbors: Vec = points [INFO] [stdout] | _________________________________________________^ [INFO] [stdout] 94 | | .iter() [INFO] [stdout] 95 | | .filter(|p| neighbor(current, **p)) [INFO] [stdout] 96 | | .map(|p| *p) [INFO] [stdout] | |____________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] = note: `#[warn(clippy::map_clone)]` on by default [INFO] [stdout] help: consider calling the dedicated `copied` method [INFO] [stdout] | [INFO] [stdout] 93 ~ let neighbors: Vec = points [INFO] [stdout] 94 + .iter() [INFO] [stdout] 95 + .filter(|p| neighbor(current, **p)).copied() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: iterating on a map's values [INFO] [stdout] --> src/days/day12.rs:127:22 [INFO] [stdout] | [INFO] [stdout] 127 | let total: i32 = map_island [INFO] [stdout] | ______________________^ [INFO] [stdout] 128 | | .iter() [INFO] [stdout] 129 | | .map(|(_, islands)| { [INFO] [stdout] 130 | | islands [INFO] [stdout] ... | [INFO] [stdout] 133 | | .sum::() [INFO] [stdout] 134 | | }) [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_kv_map [INFO] [stdout] = note: `#[warn(clippy::iter_kv_map)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 127 ~ let total: i32 = map_island.values().map(|islands| { [INFO] [stdout] 128 + islands [INFO] [stdout] 129 + .iter() [INFO] [stdout] 130 + .map(|island| area(island) * perimeter(island)) [INFO] [stdout] 131 + .sum::() [INFO] [stdout] 132 + }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: iterating on a map's values [INFO] [stdout] --> src/days/day12.rs:138:23 [INFO] [stdout] | [INFO] [stdout] 138 | let total2: i32 = map_island [INFO] [stdout] | _______________________^ [INFO] [stdout] 139 | | .iter() [INFO] [stdout] 140 | | .map(|(_, islands)| { [INFO] [stdout] 141 | | islands [INFO] [stdout] ... | [INFO] [stdout] 144 | | .sum::() [INFO] [stdout] 145 | | }) [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_kv_map [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 138 ~ let total2: i32 = map_island.values().map(|islands| { [INFO] [stdout] 139 + islands [INFO] [stdout] 140 + .iter() [INFO] [stdout] 141 + .map(|island| area(island) * perimeter2(island)) [INFO] [stdout] 142 + .sum::() [INFO] [stdout] 143 + }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/days/day13.rs:29:5 [INFO] [stdout] | [INFO] [stdout] 29 | return 3 * a1 + a2; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 29 - return 3 * a1 + a2; [INFO] [stdout] 29 + 3 * a1 + a2 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/days/day20.rs:38:29 [INFO] [stdout] | [INFO] [stdout] 38 | fn get_valid_neighbors(map: &Vec>, l: i32, i: i32, j: i32) -> HashMap<(i32, i32), i32> { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 38 - fn get_valid_neighbors(map: &Vec>, l: i32, i: i32, j: i32) -> HashMap<(i32, i32), i32> { [INFO] [stdout] 38 + fn get_valid_neighbors(map: &[Vec], l: i32, i: i32, j: i32) -> HashMap<(i32, i32), i32> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/days/day20.rs:44:24 [INFO] [stdout] | [INFO] [stdout] 44 | let dist = ((i - i1).abs() + (j - j1).abs()) as i32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `((i - i1).abs() + (j - j1).abs())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/days/day20.rs:48:44 [INFO] [stdout] | [INFO] [stdout] 48 | neighbors.insert((i1, j1), dist as i32); [INFO] [stdout] | ^^^^^^^^^^^ help: try: `dist` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/days/day20.rs:83:32 [INFO] [stdout] | [INFO] [stdout] 83 | .get(&(i1.clone() as usize, j1.clone() as usize)) [INFO] [stdout] | ^^^^^^^^^^ help: try removing the `clone` call: `i1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/days/day20.rs:83:53 [INFO] [stdout] | [INFO] [stdout] 83 | .get(&(i1.clone() as usize, j1.clone() as usize)) [INFO] [stdout] | ^^^^^^^^^^ help: try removing the `clone` call: `j1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.filter_map(..)` can be written more simply using `.map(..)` [INFO] [stdout] --> src/days/day20.rs:97:10 [INFO] [stdout] | [INFO] [stdout] 97 | .filter_map(|(k, v)| if k >= 100 { Some(v as u32) } else { Some(0) }) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_filter_map [INFO] [stdout] = note: `#[warn(clippy::unnecessary_filter_map)]` 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/days/day15.rs:3:12 [INFO] [stdout] | [INFO] [stdout] 3 | fn mv(map: &mut Vec>, x: i32, y: i32, dx: i32, dy: i32) -> (i32, i32) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 3 - fn mv(map: &mut Vec>, x: i32, y: i32, dx: i32, dy: i32) -> (i32, i32) { [INFO] [stdout] 3 + fn mv(map: &mut [Vec], x: i32, y: i32, dx: i32, dy: i32) -> (i32, i32) { [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/days/day15.rs:35:13 [INFO] [stdout] | [INFO] [stdout] 35 | fn mv2(map: &mut Vec>, x: i32, y: i32, dx: i32, dy: i32) -> (i32, i32) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 35 - fn mv2(map: &mut Vec>, x: i32, y: i32, dx: i32, dy: i32) -> (i32, i32) { [INFO] [stdout] 35 + fn mv2(map: &mut [Vec], x: i32, y: i32, dx: i32, dy: i32) -> (i32, i32) { [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/days/day15.rs:93:19 [INFO] [stdout] | [INFO] [stdout] 93 | fn print_map(map: &mut Vec>) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 93 - fn print_map(map: &mut Vec>) { [INFO] [stdout] 93 + fn print_map(map: &mut [Vec]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/days/day15.rs:96:30 [INFO] [stdout] | [INFO] [stdout] 96 | print!("{}", map[i as usize][j as usize]); [INFO] [stdout] | ^^^^^^^^^^ help: try: `{ i }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/days/day15.rs:96:42 [INFO] [stdout] | [INFO] [stdout] 96 | print!("{}", map[i as usize][j as usize]); [INFO] [stdout] | ^^^^^^^^^^ help: try: `j` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `(u32, u32)` which implements the `Copy` trait [INFO] [stdout] --> src/days/day21.rs:139:31 [INFO] [stdout] | [INFO] [stdout] 139 | let mut current = k1.clone(); [INFO] [stdout] | ^^^^^^^^^^ help: try removing the `clone` call: `k1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `(u32, u32)` which implements the `Copy` trait [INFO] [stdout] --> src/days/day21.rs:159:23 [INFO] [stdout] | [INFO] [stdout] 159 | let mut current = k1.clone(); [INFO] [stdout] | ^^^^^^^^^^ help: try removing the `clone` call: `k1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/days/day15.rs:110:5 [INFO] [stdout] | [INFO] [stdout] 110 | return (0, 0); [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 110 - return (0, 0); [INFO] [stdout] 110 + (0, 0) [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/days/day15.rs:102:20 [INFO] [stdout] | [INFO] [stdout] 102 | fn find_robot(map: &mut Vec>) -> (i32, i32) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 102 - fn find_robot(map: &mut Vec>) -> (i32, i32) { [INFO] [stdout] 102 + fn find_robot(map: &mut [Vec]) -> (i32, i32) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is used to index `map` [INFO] [stdout] --> src/days/day15.rs:104:18 [INFO] [stdout] | [INFO] [stdout] 104 | for j in 0..map[0].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 and enumerate() [INFO] [stdout] | [INFO] [stdout] 104 - for j in 0..map[0].len() { [INFO] [stdout] 104 + for (j, ) in map.iter().enumerate().take(map[0].len()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/days/day15.rs:122:5 [INFO] [stdout] | [INFO] [stdout] 122 | return blocks; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 122 - return blocks; [INFO] [stdout] 122 + blocks [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/days/day15.rs:113:21 [INFO] [stdout] | [INFO] [stdout] 113 | fn find_blocks(map: &mut Vec>) -> Vec<(i32, i32)> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 113 - fn find_blocks(map: &mut Vec>) -> Vec<(i32, i32)> { [INFO] [stdout] 113 + fn find_blocks(map: &mut [Vec]) -> Vec<(i32, i32)> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is used to index `map` [INFO] [stdout] --> src/days/day15.rs:116:18 [INFO] [stdout] | [INFO] [stdout] 116 | for j in 0..map[0].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] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 116 - for j in 0..map[0].len() { [INFO] [stdout] 116 + for (j, ) in map.iter().enumerate().take(map[0].len()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/days/day15.rs:134:5 [INFO] [stdout] | [INFO] [stdout] 134 | return blocks; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 134 - return blocks; [INFO] [stdout] 134 + blocks [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/days/day15.rs:125:22 [INFO] [stdout] | [INFO] [stdout] 125 | fn find_blocks2(map: &mut Vec>) -> Vec<(i32, i32)> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 125 - fn find_blocks2(map: &mut Vec>) -> Vec<(i32, i32)> { [INFO] [stdout] 125 + fn find_blocks2(map: &mut [Vec]) -> Vec<(i32, i32)> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is used to index `map` [INFO] [stdout] --> src/days/day15.rs:128:18 [INFO] [stdout] | [INFO] [stdout] 128 | for j in 0..map[0].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] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 128 - for j in 0..map[0].len() { [INFO] [stdout] 128 + for (j, ) in map.iter().enumerate().take(map[0].len()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/days/day21.rs:219:20 [INFO] [stdout] | [INFO] [stdout] 219 | let mut costs: HashMap<((u32, u32), (u32, u32)), u64> = HashMap::new(); [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/days/day16.rs:39:6 [INFO] [stdout] | [INFO] [stdout] 39 | ) -> ( [INFO] [stdout] | ______^ [INFO] [stdout] 40 | | HashMap<(usize, usize, i32), i32>, [INFO] [stdout] 41 | | HashMap<(usize, usize, i32), Vec>>, [INFO] [stdout] 42 | | ) { [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: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/days/day16.rs:45:20 [INFO] [stdout] | [INFO] [stdout] 45 | let mut paths: HashMap<(usize, usize, i32), Vec>> = HashMap::new(); // (i, j, dir) -> [path1, path2, ...] [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: usage of a legacy numeric constant [INFO] [stdout] --> src/days/day16.rs:60:32 [INFO] [stdout] | [INFO] [stdout] 60 | .unwrap_or(std::i32::MAX); [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 60 - .unwrap_or(std::i32::MAX); [INFO] [stdout] 60 + .unwrap_or(i32::MAX); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/days/day16.rs:97:24 [INFO] [stdout] | [INFO] [stdout] 97 | let mut min_dist = std::i32::MAX; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 97 - let mut min_dist = std::i32::MAX; [INFO] [stdout] 97 + let mut min_dist = i32::MAX; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> src/days/day16.rs:109:14 [INFO] [stdout] | [INFO] [stdout] 109 | .into_iter() [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] = note: `#[warn(clippy::into_iter_on_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/days/day16sol.rs:31:12 [INFO] [stdout] | [INFO] [stdout] 31 | if visited.get(&((cx, cy), cd)).map_or(false, |&v| v < score) { [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] 31 - if visited.get(&((cx, cy), cd)).map_or(false, |&v| v < score) { [INFO] [stdout] 31 + if visited.get(&((cx, cy), cd)).is_some_and(|&v| v < score) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/days/day16sol.rs:39:41 [INFO] [stdout] | [INFO] [stdout] 39 | if free_spaces.contains(&np) && visited.get(&(np, cd)).map_or(true, |&v| v > score + 1) { [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] 39 - if free_spaces.contains(&np) && visited.get(&(np, cd)).map_or(true, |&v| v > score + 1) { [INFO] [stdout] 39 + if free_spaces.contains(&np) && visited.get(&(np, cd)).is_none_or(|&v| v > score + 1) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/days/day16sol.rs:48:16 [INFO] [stdout] | [INFO] [stdout] 48 | if visited [INFO] [stdout] | ________________^ [INFO] [stdout] 49 | | .get(&((cx, cy), nd)) [INFO] [stdout] 50 | | .map_or(true, |&v| v > score + 1000) [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] 50 - .map_or(true, |&v| v > score + 1000) [INFO] [stdout] 50 + .is_none_or(|&v| v > score + 1000) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/days/day16sol.rs:114:12 [INFO] [stdout] | [INFO] [stdout] 114 | if visited [INFO] [stdout] | ____________^ [INFO] [stdout] 115 | | .get(&(np, cd)) [INFO] [stdout] 116 | | .map_or(false, |&v| v + 1 == visited[&(cp, cd)]) [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] 116 - .map_or(false, |&v| v + 1 == visited[&(cp, cd)]) [INFO] [stdout] 116 + .is_some_and(|&v| v + 1 == visited[&(cp, cd)]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/days/day16sol.rs:127:12 [INFO] [stdout] | [INFO] [stdout] 127 | if visited [INFO] [stdout] | ____________^ [INFO] [stdout] 128 | | .get(&(cp, nd1)) [INFO] [stdout] 129 | | .map_or(false, |&v| v + 1000 == visited[&(cp, cd)]) [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] 129 - .map_or(false, |&v| v + 1000 == visited[&(cp, cd)]) [INFO] [stdout] 129 + .is_some_and(|&v| v + 1000 == visited[&(cp, cd)]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/days/day16sol.rs:133:12 [INFO] [stdout] | [INFO] [stdout] 133 | if visited [INFO] [stdout] | ____________^ [INFO] [stdout] 134 | | .get(&(cp, nd2)) [INFO] [stdout] 135 | | .map_or(false, |&v| v + 1000 == visited[&(cp, cd)]) [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 - .map_or(false, |&v| v + 1000 == visited[&(cp, cd)]) [INFO] [stdout] 135 + .is_some_and(|&v| v + 1000 == visited[&(cp, cd)]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/days/day17.rs:4:29 [INFO] [stdout] | [INFO] [stdout] 4 | fn combo(c: u64, registers: &Vec) -> u64 { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 4 - fn combo(c: u64, registers: &Vec) -> u64 { [INFO] [stdout] 4 + fn combo(c: u64, registers: &[u64]) -> u64 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/days/day17.rs:5:8 [INFO] [stdout] | [INFO] [stdout] 5 | if 4 <= c && c <= 6 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: use: `(4..=6).contains(&c)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/days/day17.rs:56:5 [INFO] [stdout] | [INFO] [stdout] 56 | return (0, 0); [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 56 - return (0, 0); [INFO] [stdout] 56 + (0, 0) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/days/day17.rs:20:60 [INFO] [stdout] | [INFO] [stdout] 20 | fn perform(index: &u64, registers: &mut Vec, program: &Vec) -> (u64, u64) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 20 - fn perform(index: &u64, registers: &mut Vec, program: &Vec) -> (u64, u64) { [INFO] [stdout] 20 + fn perform(index: &u64, registers: &mut Vec, program: &[u64]) -> (u64, u64) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/days/day17.rs:31:13 [INFO] [stdout] | [INFO] [stdout] 31 | registers[0] = registers[0] / 2u64.pow(combo(operand, registers) as u32); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `registers[0] /= 2u64.pow(combo(operand, registers) as u32)` [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/days/day17.rs:34:13 [INFO] [stdout] | [INFO] [stdout] 34 | registers[1] = registers[1] ^ operand; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `registers[1] ^= operand` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/days/day17.rs:45:13 [INFO] [stdout] | [INFO] [stdout] 45 | registers[1] = registers[1] ^ registers[2]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `registers[1] ^= registers[2]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/days/day17.rs:120:12 [INFO] [stdout] | [INFO] [stdout] 120 | if new_a % 1000 == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace with: `new_a.is_multiple_of(1000)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/days/day24.rs:77:18 [INFO] [stdout] | [INFO] [stdout] 77 | w.insert(&"x00", c[0]); [INFO] [stdout] | ^^^^^^ help: change this to: `"x00"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/days/day24.rs:78:18 [INFO] [stdout] | [INFO] [stdout] 78 | w.insert(&"x01", c[1]); [INFO] [stdout] | ^^^^^^ help: change this to: `"x01"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/days/day24.rs:79:18 [INFO] [stdout] | [INFO] [stdout] 79 | w.insert(&"x02", c[2]); [INFO] [stdout] | ^^^^^^ help: change this to: `"x02"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/days/day24.rs:80:18 [INFO] [stdout] | [INFO] [stdout] 80 | w.insert(&"y00", c[3]); [INFO] [stdout] | ^^^^^^ help: change this to: `"y00"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/days/day24.rs:81:18 [INFO] [stdout] | [INFO] [stdout] 81 | w.insert(&"y01", c[4]); [INFO] [stdout] | ^^^^^^ help: change this to: `"y01"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/days/day24.rs:82:18 [INFO] [stdout] | [INFO] [stdout] 82 | w.insert(&"y02", c[5]); [INFO] [stdout] | ^^^^^^ help: change this to: `"y02"` [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 `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> src/days/day24.rs:121:40 [INFO] [stdout] | [INFO] [stdout] 121 | for (i, (w1, op, w2, r)) in orders.into_iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: taken reference of right operand [INFO] [stdout] --> src/days/day24.rs:122:18 [INFO] [stdout] | [INFO] [stdout] 122 | if *r == "z".to_owned() + &n.to_string().as_str() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^----------------------- [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `n.to_string().as_str()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] = note: `#[warn(clippy::op_ref)]` 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/days/day24.rs:122:35 [INFO] [stdout] | [INFO] [stdout] 122 | if *r == "z".to_owned() + &n.to_string().as_str() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `n.to_string().as_str()` [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/days/day24.rs:155:12 [INFO] [stdout] | [INFO] [stdout] 155 | gates: &'a Vec<(&'a str, &'a str, &'a str, &'a str)>, [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] 155 ~ gates: &'a [(&'a str, &'a str, &'a str, &'a str)], [INFO] [stdout] 156 | ) -> HashMap<&'a str, u32> { [INFO] [stdout] 157 | let mut wires1 = wires.clone(); [INFO] [stdout] 158 ~ let mut gates1 = gates.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/days/day20.rs:38:29 [INFO] [stdout] | [INFO] [stdout] 38 | fn get_valid_neighbors(map: &Vec>, l: i32, i: i32, j: i32) -> HashMap<(i32, i32), i32> { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 38 - fn get_valid_neighbors(map: &Vec>, l: i32, i: i32, j: i32) -> HashMap<(i32, i32), i32> { [INFO] [stdout] 38 + fn get_valid_neighbors(map: &[Vec], l: i32, i: i32, j: i32) -> HashMap<(i32, i32), i32> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/days/day20.rs:44:24 [INFO] [stdout] | [INFO] [stdout] 44 | let dist = ((i - i1).abs() + (j - j1).abs()) as i32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `((i - i1).abs() + (j - j1).abs())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/days/day20.rs:48:44 [INFO] [stdout] | [INFO] [stdout] 48 | neighbors.insert((i1, j1), dist as i32); [INFO] [stdout] | ^^^^^^^^^^^ help: try: `dist` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/days/day20.rs:83:32 [INFO] [stdout] | [INFO] [stdout] 83 | .get(&(i1.clone() as usize, j1.clone() as usize)) [INFO] [stdout] | ^^^^^^^^^^ help: try removing the `clone` call: `i1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i32` which implements the `Copy` trait [INFO] [stdout] --> src/days/day20.rs:83:53 [INFO] [stdout] | [INFO] [stdout] 83 | .get(&(i1.clone() as usize, j1.clone() as usize)) [INFO] [stdout] | ^^^^^^^^^^ help: try removing the `clone` call: `j1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.filter_map(..)` can be written more simply using `.map(..)` [INFO] [stdout] --> src/days/day20.rs:97:10 [INFO] [stdout] | [INFO] [stdout] 97 | .filter_map(|(k, v)| if k >= 100 { Some(v as u32) } else { Some(0) }) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_filter_map [INFO] [stdout] = note: `#[warn(clippy::unnecessary_filter_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `(u32, u32)` which implements the `Copy` trait [INFO] [stdout] --> src/days/day21.rs:139:31 [INFO] [stdout] | [INFO] [stdout] 139 | let mut current = k1.clone(); [INFO] [stdout] | ^^^^^^^^^^ help: try removing the `clone` call: `k1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `(u32, u32)` which implements the `Copy` trait [INFO] [stdout] --> src/days/day21.rs:159:23 [INFO] [stdout] | [INFO] [stdout] 159 | let mut current = k1.clone(); [INFO] [stdout] | ^^^^^^^^^^ help: try removing the `clone` call: `k1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/days/day21.rs:219:20 [INFO] [stdout] | [INFO] [stdout] 219 | let mut costs: HashMap<((u32, u32), (u32, u32)), u64> = HashMap::new(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.filter_map(..)` can be written more simply using `.map(..)` [INFO] [stdout] --> src/days/day25.rs:5:42 [INFO] [stdout] | [INFO] [stdout] 5 | let keys_locks = input.split("\n\n").filter_map(|x| { [INFO] [stdout] | __________________________________________^ [INFO] [stdout] 6 | | let s = x.lines().collect::>(); [INFO] [stdout] 7 | | if s[0] == "....." { [INFO] [stdout] 8 | | return Some(("key", s)); [INFO] [stdout] ... | [INFO] [stdout] 12 | | }); [INFO] [stdout] | |______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_filter_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/days/day25.rs:8:13 [INFO] [stdout] | [INFO] [stdout] 8 | return Some(("key", s)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 8 - return Some(("key", s)); [INFO] [stdout] 8 + Some(("key", s)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/days/day25.rs:10:13 [INFO] [stdout] | [INFO] [stdout] 10 | return Some(("lock", s)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 10 - return Some(("lock", s)); [INFO] [stdout] 10 + Some(("lock", s)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/days/day25.rs:63:17 [INFO] [stdout] | [INFO] [stdout] 63 | return 1; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 63 - return 1; [INFO] [stdout] 63 + 1 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/days/day25.rs:65:17 [INFO] [stdout] | [INFO] [stdout] 65 | return 0; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 65 - return 0; [INFO] [stdout] 65 + 0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/days/day25.rs:59:21 [INFO] [stdout] | [INFO] [stdout] 59 | return None; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 59 - return None; [INFO] [stdout] 59 + None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this method chain can be written more clearly with `if .. else ..` [INFO] [stdout] --> src/days/day5.rs:25:13 [INFO] [stdout] | [INFO] [stdout] 25 | / book.is_sorted_by(|a, b| !orders.contains(&(*b, *a))) [INFO] [stdout] 26 | | .then_some(book[book.len() / 2]) [INFO] [stdout] 27 | | .unwrap_or(0) [INFO] [stdout] | |_____________________________^ help: try: `if book.is_sorted_by(|a, b| !orders.contains(&(*b, *a))) { book[book.len() / 2] } else { 0 }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#obfuscated_if_else [INFO] [stdout] = note: `#[warn(clippy::obfuscated_if_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this method chain can be written more clearly with `if .. else ..` [INFO] [stdout] --> src/days/day5.rs:37:13 [INFO] [stdout] | [INFO] [stdout] 37 | / (!book.is_sorted_by(|a, b| !orders.contains(&(*b, *a)))) [INFO] [stdout] 38 | | .then_some({ [INFO] [stdout] 39 | | book.sort_by(|a, b| { [INFO] [stdout] 40 | | if orders.contains(&(*a, *b)) { [INFO] [stdout] ... | [INFO] [stdout] 47 | | }) [INFO] [stdout] 48 | | .unwrap_or(0) [INFO] [stdout] | |_____________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#obfuscated_if_else [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 37 ~ if !book.is_sorted_by(|a, b| !orders.contains(&(*b, *a))) { { [INFO] [stdout] 38 + book.sort_by(|a, b| { [INFO] [stdout] 39 + if orders.contains(&(*a, *b)) { [INFO] [stdout] 40 + Ordering::Less [INFO] [stdout] 41 + } else { [INFO] [stdout] 42 + Ordering::Greater [INFO] [stdout] 43 + } [INFO] [stdout] 44 + }); [INFO] [stdout] 45 + book[book.len() / 2] [INFO] [stdout] 46 + } } else { 0 } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/days/day6.rs:4:20 [INFO] [stdout] | [INFO] [stdout] 4 | fn start_pos(maze: &Vec>) -> (usize, usize) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 4 - fn start_pos(maze: &Vec>) -> (usize, usize) { [INFO] [stdout] 4 + fn start_pos(maze: &[Vec]) -> (usize, usize) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/days/day6.rs:42:13 [INFO] [stdout] | [INFO] [stdout] 42 | return ((nx, ny), dir, false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 42 - return ((nx, ny), dir, false); [INFO] [stdout] 42 + ((nx, ny), dir, false) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/days/day6.rs:47:13 [INFO] [stdout] | [INFO] [stdout] 47 | return ((nx, ny), dir, false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 47 - return ((nx, ny), dir, false); [INFO] [stdout] 47 + ((nx, ny), dir, false) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/days/day6.rs:58:13 [INFO] [stdout] | [INFO] [stdout] 58 | return (pos, new_dir, false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 58 - return (pos, new_dir, false); [INFO] [stdout] 58 + (pos, new_dir, false) [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/days/day6.rs:25:11 [INFO] [stdout] | [INFO] [stdout] 25 | maze: &mut Vec>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 25 - maze: &mut Vec>, [INFO] [stdout] 25 + maze: &mut [Vec], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/days/day6.rs:64:16 [INFO] [stdout] | [INFO] [stdout] 64 | fn count(maze: &Vec>) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 64 - fn count(maze: &Vec>) -> usize { [INFO] [stdout] 64 + fn count(maze: &[Vec]) -> usize { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert` to construct default value [INFO] [stdout] --> src/days/day8.rs:14:26 [INFO] [stdout] | [INFO] [stdout] 14 | .or_insert(Vec::new()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::unwrap_or_default)]` 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/days/day24.rs:77:18 [INFO] [stdout] | [INFO] [stdout] 77 | w.insert(&"x00", c[0]); [INFO] [stdout] | ^^^^^^ help: change this to: `"x00"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/days/day24.rs:78:18 [INFO] [stdout] | [INFO] [stdout] 78 | w.insert(&"x01", c[1]); [INFO] [stdout] | ^^^^^^ help: change this to: `"x01"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/days/day24.rs:79:18 [INFO] [stdout] | [INFO] [stdout] 79 | w.insert(&"x02", c[2]); [INFO] [stdout] | ^^^^^^ help: change this to: `"x02"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/days/day24.rs:80:18 [INFO] [stdout] | [INFO] [stdout] 80 | w.insert(&"y00", c[3]); [INFO] [stdout] | ^^^^^^ help: change this to: `"y00"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/days/day24.rs:81:18 [INFO] [stdout] | [INFO] [stdout] 81 | w.insert(&"y01", c[4]); [INFO] [stdout] | ^^^^^^ help: change this to: `"y01"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/days/day24.rs:82:18 [INFO] [stdout] | [INFO] [stdout] 82 | w.insert(&"y02", c[5]); [INFO] [stdout] | ^^^^^^ help: change this to: `"y02"` [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 `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> src/days/day24.rs:121:40 [INFO] [stdout] | [INFO] [stdout] 121 | for (i, (w1, op, w2, r)) in orders.into_iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: taken reference of right operand [INFO] [stdout] --> src/days/day24.rs:122:18 [INFO] [stdout] | [INFO] [stdout] 122 | if *r == "z".to_owned() + &n.to_string().as_str() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^----------------------- [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `n.to_string().as_str()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] = note: `#[warn(clippy::op_ref)]` 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/days/day24.rs:122:35 [INFO] [stdout] | [INFO] [stdout] 122 | if *r == "z".to_owned() + &n.to_string().as_str() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `n.to_string().as_str()` [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/days/day24.rs:155:12 [INFO] [stdout] | [INFO] [stdout] 155 | gates: &'a Vec<(&'a str, &'a str, &'a str, &'a str)>, [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] 155 ~ gates: &'a [(&'a str, &'a str, &'a str, &'a str)], [INFO] [stdout] 156 | ) -> HashMap<&'a str, u32> { [INFO] [stdout] 157 | let mut wires1 = wires.clone(); [INFO] [stdout] 158 ~ let mut gates1 = gates.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/days/day20.rs:24:23 [INFO] [stdout] | [INFO] [stdout] 24 | for (i, j) in vec![(0, 1), (0, -1), (1, 0), (-1, 0)] { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[(0, 1), (0, -1), (1, 0), (-1, 0)]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/days/day24.rs:98:20 [INFO] [stdout] | [INFO] [stdout] 98 | let res2 = vec!["qgd", "mwk", "jmh", "z33", "z18", "z10", "hsw", "gqp"]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `["qgd", "mwk", "jmh", "z33", "z18", "z10", "hsw", "gqp"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/days/day24.rs:115:16 [INFO] [stdout] | [INFO] [stdout] 115 | let res2 = vec!["qgd", "mwk", "jmh", "z33", "z18", "z10", "hsw", "gqp"]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `["qgd", "mwk", "jmh", "z33", "z18", "z10", "hsw", "gqp"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.filter_map(..)` can be written more simply using `.map(..)` [INFO] [stdout] --> src/days/day25.rs:5:42 [INFO] [stdout] | [INFO] [stdout] 5 | let keys_locks = input.split("\n\n").filter_map(|x| { [INFO] [stdout] | __________________________________________^ [INFO] [stdout] 6 | | let s = x.lines().collect::>(); [INFO] [stdout] 7 | | if s[0] == "....." { [INFO] [stdout] 8 | | return Some(("key", s)); [INFO] [stdout] ... | [INFO] [stdout] 12 | | }); [INFO] [stdout] | |______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_filter_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/days/day25.rs:8:13 [INFO] [stdout] | [INFO] [stdout] 8 | return Some(("key", s)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 8 - return Some(("key", s)); [INFO] [stdout] 8 + Some(("key", s)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/days/day25.rs:10:13 [INFO] [stdout] | [INFO] [stdout] 10 | return Some(("lock", s)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 10 - return Some(("lock", s)); [INFO] [stdout] 10 + Some(("lock", s)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/days/day25.rs:63:17 [INFO] [stdout] | [INFO] [stdout] 63 | return 1; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 63 - return 1; [INFO] [stdout] 63 + 1 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/days/day25.rs:65:17 [INFO] [stdout] | [INFO] [stdout] 65 | return 0; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 65 - return 0; [INFO] [stdout] 65 + 0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/days/day25.rs:59:21 [INFO] [stdout] | [INFO] [stdout] 59 | return None; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 59 - return None; [INFO] [stdout] 59 + None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this method chain can be written more clearly with `if .. else ..` [INFO] [stdout] --> src/days/day5.rs:25:13 [INFO] [stdout] | [INFO] [stdout] 25 | / book.is_sorted_by(|a, b| !orders.contains(&(*b, *a))) [INFO] [stdout] 26 | | .then_some(book[book.len() / 2]) [INFO] [stdout] 27 | | .unwrap_or(0) [INFO] [stdout] | |_____________________________^ help: try: `if book.is_sorted_by(|a, b| !orders.contains(&(*b, *a))) { book[book.len() / 2] } else { 0 }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#obfuscated_if_else [INFO] [stdout] = note: `#[warn(clippy::obfuscated_if_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this method chain can be written more clearly with `if .. else ..` [INFO] [stdout] --> src/days/day5.rs:37:13 [INFO] [stdout] | [INFO] [stdout] 37 | / (!book.is_sorted_by(|a, b| !orders.contains(&(*b, *a)))) [INFO] [stdout] 38 | | .then_some({ [INFO] [stdout] 39 | | book.sort_by(|a, b| { [INFO] [stdout] 40 | | if orders.contains(&(*a, *b)) { [INFO] [stdout] ... | [INFO] [stdout] 47 | | }) [INFO] [stdout] 48 | | .unwrap_or(0) [INFO] [stdout] | |_____________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#obfuscated_if_else [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 37 ~ if !book.is_sorted_by(|a, b| !orders.contains(&(*b, *a))) { { [INFO] [stdout] 38 + book.sort_by(|a, b| { [INFO] [stdout] 39 + if orders.contains(&(*a, *b)) { [INFO] [stdout] 40 + Ordering::Less [INFO] [stdout] 41 + } else { [INFO] [stdout] 42 + Ordering::Greater [INFO] [stdout] 43 + } [INFO] [stdout] 44 + }); [INFO] [stdout] 45 + book[book.len() / 2] [INFO] [stdout] 46 + } } else { 0 } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/days/day6.rs:4:20 [INFO] [stdout] | [INFO] [stdout] 4 | fn start_pos(maze: &Vec>) -> (usize, usize) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 4 - fn start_pos(maze: &Vec>) -> (usize, usize) { [INFO] [stdout] 4 + fn start_pos(maze: &[Vec]) -> (usize, usize) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/days/day6.rs:42:13 [INFO] [stdout] | [INFO] [stdout] 42 | return ((nx, ny), dir, false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 42 - return ((nx, ny), dir, false); [INFO] [stdout] 42 + ((nx, ny), dir, false) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/days/day6.rs:47:13 [INFO] [stdout] | [INFO] [stdout] 47 | return ((nx, ny), dir, false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 47 - return ((nx, ny), dir, false); [INFO] [stdout] 47 + ((nx, ny), dir, false) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/days/day6.rs:58:13 [INFO] [stdout] | [INFO] [stdout] 58 | return (pos, new_dir, false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 58 - return (pos, new_dir, false); [INFO] [stdout] 58 + (pos, new_dir, false) [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/days/day6.rs:25:11 [INFO] [stdout] | [INFO] [stdout] 25 | maze: &mut Vec>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 25 - maze: &mut Vec>, [INFO] [stdout] 25 + maze: &mut [Vec], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/days/day6.rs:64:16 [INFO] [stdout] | [INFO] [stdout] 64 | fn count(maze: &Vec>) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 64 - fn count(maze: &Vec>) -> usize { [INFO] [stdout] 64 + fn count(maze: &[Vec]) -> usize { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert` to construct default value [INFO] [stdout] --> src/days/day8.rs:14:26 [INFO] [stdout] | [INFO] [stdout] 14 | .or_insert(Vec::new()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/days/day20.rs:24:23 [INFO] [stdout] | [INFO] [stdout] 24 | for (i, j) in vec![(0, 1), (0, -1), (1, 0), (-1, 0)] { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[(0, 1), (0, -1), (1, 0), (-1, 0)]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/days/day24.rs:98:20 [INFO] [stdout] | [INFO] [stdout] 98 | let res2 = vec!["qgd", "mwk", "jmh", "z33", "z18", "z10", "hsw", "gqp"]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `["qgd", "mwk", "jmh", "z33", "z18", "z10", "hsw", "gqp"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/days/day24.rs:115:16 [INFO] [stdout] | [INFO] [stdout] 115 | let res2 = vec!["qgd", "mwk", "jmh", "z33", "z18", "z10", "hsw", "gqp"]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `["qgd", "mwk", "jmh", "z33", "z18", "z10", "hsw", "gqp"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 52.26s [INFO] running `Command { std: "docker" "inspect" "82febffe5332230463c2cf41ae7ace0891442da06ba29d38690956a0f78a1dd8", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "82febffe5332230463c2cf41ae7ace0891442da06ba29d38690956a0f78a1dd8", kill_on_drop: false }` [INFO] [stdout] 82febffe5332230463c2cf41ae7ace0891442da06ba29d38690956a0f78a1dd8