[INFO] cloning repository https://github.com/lindend/aoc24 [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/lindend/aoc24" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Flindend%2Faoc24", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Flindend%2Faoc24'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 4dd900d845447be2dfc82e57c21c427a247a1efe [INFO] linting lindend/aoc24 against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Flindend%2Faoc24" "/workspace/builds/worker-3-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-3-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/lindend/aoc24 [INFO] finished tweaking git repo https://github.com/lindend/aoc24 [INFO] tweaked toml for git repo https://github.com/lindend/aoc24 written to /workspace/builds/worker-3-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/lindend/aoc24 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/lindend/aoc24 already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] d71ad184a58dc20e1fdc9b27fd64d2520e9a9a1d620a5140e03b247b8f996537 [INFO] running `Command { std: "docker" "start" "-a" "d71ad184a58dc20e1fdc9b27fd64d2520e9a9a1d620a5140e03b247b8f996537", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "d71ad184a58dc20e1fdc9b27fd64d2520e9a9a1d620a5140e03b247b8f996537", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "d71ad184a58dc20e1fdc9b27fd64d2520e9a9a1d620a5140e03b247b8f996537", kill_on_drop: false }` [INFO] [stdout] d71ad184a58dc20e1fdc9b27fd64d2520e9a9a1d620a5140e03b247b8f996537 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 4c98807786811ea6a130f51ab1066a0d78ae0571723ddc90e878f95198e1fcc3 [INFO] running `Command { std: "docker" "start" "-a" "4c98807786811ea6a130f51ab1066a0d78ae0571723ddc90e878f95198e1fcc3", kill_on_drop: false }` [INFO] [stderr] Checking memchr v2.7.4 [INFO] [stderr] Checking aho-corasick v1.1.3 [INFO] [stderr] Checking regex-automata v0.4.9 [INFO] [stderr] Checking regex v1.11.1 [INFO] [stderr] Checking aoc24 v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unnecessary parentheses around closure body [INFO] [stdout] --> src/day14.rs:72:31 [INFO] [stdout] | [INFO] [stdout] 72 | .map(|&n| ((n + ('0' as u8)) as char)) [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 72 - .map(|&n| ((n + ('0' as u8)) as char)) [INFO] [stdout] 72 + .map(|&n| (n + ('0' as u8)) as char ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::HashMap` [INFO] [stdout] --> src/day21.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::collections::HashMap; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/day21.rs:48:12 [INFO] [stdout] | [INFO] [stdout] 48 | if (current.y == bad.y && target.x == bad.x) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 48 - if (current.y == bad.y && target.x == bad.x) { [INFO] [stdout] 48 + if current.y == bad.y && target.x == bad.x { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around closure body [INFO] [stdout] --> src/day14.rs:72:31 [INFO] [stdout] | [INFO] [stdout] 72 | .map(|&n| ((n + ('0' as u8)) as char)) [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 72 - .map(|&n| ((n + ('0' as u8)) as char)) [INFO] [stdout] 72 + .map(|&n| (n + ('0' as u8)) as char ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::HashMap` [INFO] [stdout] --> src/day21.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::collections::HashMap; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/day21.rs:48:12 [INFO] [stdout] | [INFO] [stdout] 48 | if (current.y == bad.y && target.x == bad.x) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 48 - if (current.y == bad.y && target.x == bad.x) { [INFO] [stdout] 48 + if current.y == bad.y && target.x == bad.x { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/day11.rs:49:9 [INFO] [stdout] | [INFO] [stdout] 49 | for i in 0..25 { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/day14.rs:38:47 [INFO] [stdout] | [INFO] [stdout] 38 | num_at_positions.entry(p).and_modify(|mut n| *n += 1).or_insert(1); [INFO] [stdout] | ----^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `half_room` [INFO] [stdout] --> src/day14.rs:25:9 [INFO] [stdout] | [INFO] [stdout] 25 | let half_room = room_size / 2; [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_half_room` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/day14.rs:64:47 [INFO] [stdout] | [INFO] [stdout] 64 | num_at_positions.entry(p).and_modify(|mut n| *n += 1).or_insert(1); [INFO] [stdout] | ----^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/day11.rs:49:9 [INFO] [stdout] | [INFO] [stdout] 49 | for i in 0..25 { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `pos` [INFO] [stdout] --> src/day15.rs:154:44 [INFO] [stdout] | [INFO] [stdout] 154 | let mut robot_pos = *map.iter().find(|(pos, obj)| **obj == Obj::Robot).expect("Could not find robot").0; [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_pos` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `pos` [INFO] [stdout] --> src/day15.rs:170:44 [INFO] [stdout] | [INFO] [stdout] 170 | let mut robot_pos = *map.iter().find(|(pos, obj)| **obj == Obj::Robot).expect("Could not find robot").0; [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_pos` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/day14.rs:38:47 [INFO] [stdout] | [INFO] [stdout] 38 | num_at_positions.entry(p).and_modify(|mut n| *n += 1).or_insert(1); [INFO] [stdout] | ----^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `half_room` [INFO] [stdout] --> src/day14.rs:25:9 [INFO] [stdout] | [INFO] [stdout] 25 | let half_room = room_size / 2; [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_half_room` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/day14.rs:64:47 [INFO] [stdout] | [INFO] [stdout] 64 | num_at_positions.entry(p).and_modify(|mut n| *n += 1).or_insert(1); [INFO] [stdout] | ----^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `pos` [INFO] [stdout] --> src/day15.rs:154:44 [INFO] [stdout] | [INFO] [stdout] 154 | let mut robot_pos = *map.iter().find(|(pos, obj)| **obj == Obj::Robot).expect("Could not find robot").0; [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_pos` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `pos` [INFO] [stdout] --> src/day15.rs:170:44 [INFO] [stdout] | [INFO] [stdout] 170 | let mut robot_pos = *map.iter().find(|(pos, obj)| **obj == Obj::Robot).expect("Could not find robot").0; [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_pos` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `context` [INFO] [stdout] --> src/day21_2.rs:264:22 [INFO] [stdout] | [INFO] [stdout] 264 | |&state, context| (0, state) [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_context` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/day22.rs:55:17 [INFO] [stdout] | [INFO] [stdout] 55 | for i in 0..2000 { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `d0` is never read [INFO] [stdout] --> src/day22.rs:68:22 [INFO] [stdout] | [INFO] [stdout] 68 | let mut d0 = None; [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `context` [INFO] [stdout] --> src/day21_2.rs:264:22 [INFO] [stdout] | [INFO] [stdout] 264 | |&state, context| (0, state) [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_context` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/day22.rs:55:17 [INFO] [stdout] | [INFO] [stdout] 55 | for i in 0..2000 { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `d0` is never read [INFO] [stdout] --> src/day22.rs:68:22 [INFO] [stdout] | [INFO] [stdout] 68 | let mut d0 = None; [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `c` [INFO] [stdout] --> src/day8.rs:8:10 [INFO] [stdout] | [INFO] [stdout] 8 | for (c, ts) in towers { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_c` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `c` [INFO] [stdout] --> src/day8.rs:46:10 [INFO] [stdout] | [INFO] [stdout] 46 | for (c, ts) in towers { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_c` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `c` [INFO] [stdout] --> src/day8.rs:8:10 [INFO] [stdout] | [INFO] [stdout] 8 | for (c, ts) in towers { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_c` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `c` [INFO] [stdout] --> src/day8.rs:46:10 [INFO] [stdout] | [INFO] [stdout] 46 | for (c, ts) in towers { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_c` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_input_line` is never used [INFO] [stdout] --> src/day1.rs:3:4 [INFO] [stdout] | [INFO] [stdout] 3 | fn parse_input_line(line: &str) -> Option<(i32, i32)> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part1` is never used [INFO] [stdout] --> src/day1.rs:13:4 [INFO] [stdout] | [INFO] [stdout] 13 | fn part1(left: &Vec, right: &Vec) -> i32 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part2` is never used [INFO] [stdout] --> src/day1.rs:23:4 [INFO] [stdout] | [INFO] [stdout] 23 | fn part2(left: &Vec, right: &Vec) -> i64 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day1` is never used [INFO] [stdout] --> src/day1.rs:40:8 [INFO] [stdout] | [INFO] [stdout] 40 | pub fn day1() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day10` is never used [INFO] [stdout] --> src/day10.rs:89:8 [INFO] [stdout] | [INFO] [stdout] 89 | pub fn day10() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `split_stone_2` is never used [INFO] [stdout] --> src/day11.rs:9:4 [INFO] [stdout] | [INFO] [stdout] 9 | fn split_stone_2(stone: u64) -> (u64, u64) { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `blink_stone` is never used [INFO] [stdout] --> src/day11.rs:24:4 [INFO] [stdout] | [INFO] [stdout] 24 | fn blink_stone(stone: u64, max_level: i32, level: i32, memoize: &mut HashMap<(u64, i32), u64>) -> u64 { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part2` is never used [INFO] [stdout] --> src/day11.rs:55:4 [INFO] [stdout] | [INFO] [stdout] 55 | fn part2(stones: &Vec, max_level: i32) -> u64 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day11` is never used [INFO] [stdout] --> src/day11.rs:66:8 [INFO] [stdout] | [INFO] [stdout] 66 | pub fn day11() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day12` is never used [INFO] [stdout] --> src/day12.rs:104:8 [INFO] [stdout] | [INFO] [stdout] 104 | pub fn day12() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_primes` is never used [INFO] [stdout] --> src/day13.rs:72:4 [INFO] [stdout] | [INFO] [stdout] 72 | fn get_primes(max: i64) -> Vec { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_prime_factors` is never used [INFO] [stdout] --> src/day13.rs:84:4 [INFO] [stdout] | [INFO] [stdout] 84 | fn get_prime_factors(num: i64, primes: &[i64]) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day13` is never used [INFO] [stdout] --> src/day13.rs:156:8 [INFO] [stdout] | [INFO] [stdout] 156 | pub fn day13() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `is_christmas_tree` is never used [INFO] [stdout] --> src/day14.rs:24:4 [INFO] [stdout] | [INFO] [stdout] 24 | fn is_christmas_tree(ps: &Vec>, room_size: Vec2) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `print_robots` is never used [INFO] [stdout] --> src/day14.rs:59:4 [INFO] [stdout] | [INFO] [stdout] 59 | fn print_robots(rs: &Vec>, room_size: Vec2) -> String { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part2` is never used [INFO] [stdout] --> src/day14.rs:100:4 [INFO] [stdout] | [INFO] [stdout] 100 | fn part2(robots: &[Robot], room_size: Vec2) -> i32 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day14` is never used [INFO] [stdout] --> src/day14.rs:124:8 [INFO] [stdout] | [INFO] [stdout] 124 | pub fn day14() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day15` is never used [INFO] [stdout] --> src/day15.rs:187:8 [INFO] [stdout] | [INFO] [stdout] 187 | pub fn day15() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day16` is never used [INFO] [stdout] --> src/day16.rs:132:8 [INFO] [stdout] | [INFO] [stdout] 132 | pub fn day16() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day17` is never used [INFO] [stdout] --> src/day17.rs:163:8 [INFO] [stdout] | [INFO] [stdout] 163 | pub fn day17() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day18` is never used [INFO] [stdout] --> src/day18.rs:99:8 [INFO] [stdout] | [INFO] [stdout] 99 | pub fn day18() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day19` is never used [INFO] [stdout] --> src/day19.rs:48:8 [INFO] [stdout] | [INFO] [stdout] 48 | pub fn day19() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_input_line` is never used [INFO] [stdout] --> src/day2.rs:3:4 [INFO] [stdout] | [INFO] [stdout] 3 | fn parse_input_line(line: &str) -> Option> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part1` is never used [INFO] [stdout] --> src/day2.rs:39:4 [INFO] [stdout] | [INFO] [stdout] 39 | fn part1(input: &Vec>) -> usize { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part2` is never used [INFO] [stdout] --> src/day2.rs:45:4 [INFO] [stdout] | [INFO] [stdout] 45 | fn part2(input: &Vec>) -> usize { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day2` is never used [INFO] [stdout] --> src/day2.rs:51:8 [INFO] [stdout] | [INFO] [stdout] 51 | pub fn day2() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day20` is never used [INFO] [stdout] --> src/day20.rs:86:8 [INFO] [stdout] | [INFO] [stdout] 86 | pub fn day20() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day21` is never used [INFO] [stdout] --> src/day21.rs:126:8 [INFO] [stdout] | [INFO] [stdout] 126 | pub fn day21() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `Numpad` is never constructed [INFO] [stdout] --> src/day21_2.rs:212:5 [INFO] [stdout] | [INFO] [stdout] 211 | enum PadId { [INFO] [stdout] | ----- variant in this enum [INFO] [stdout] 212 | Numpad, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `PadId` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day21` is never used [INFO] [stdout] --> src/day21_2.rs:298:8 [INFO] [stdout] | [INFO] [stdout] 298 | pub fn day21() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day22` is never used [INFO] [stdout] --> src/day22.rs:114:8 [INFO] [stdout] | [INFO] [stdout] 114 | pub fn day22() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day23` is never used [INFO] [stdout] --> src/day23.rs:100:8 [INFO] [stdout] | [INFO] [stdout] 100 | pub fn day23() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_nodes` is never used [INFO] [stdout] --> src/day24.rs:207:4 [INFO] [stdout] | [INFO] [stdout] 207 | fn get_nodes<'a>(node: &'a str, nodes: &'a [Node]) -> Vec<&'a str> { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `test_bit` is never used [INFO] [stdout] --> src/day24.rs:224:4 [INFO] [stdout] | [INFO] [stdout] 224 | fn test_bit<'a>( [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part2` is never used [INFO] [stdout] --> src/day24.rs:307:4 [INFO] [stdout] | [INFO] [stdout] 307 | fn part2(nodes: &Vec) -> String { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day24` is never used [INFO] [stdout] --> src/day24.rs:499:8 [INFO] [stdout] | [INFO] [stdout] 499 | pub fn day24() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day25` is never used [INFO] [stdout] --> src/day25.rs:48:8 [INFO] [stdout] | [INFO] [stdout] 48 | pub fn day25() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day3` is never used [INFO] [stdout] --> src/day3.rs:26:8 [INFO] [stdout] | [INFO] [stdout] 26 | pub fn day3() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day4` is never used [INFO] [stdout] --> src/day4.rs:72:8 [INFO] [stdout] | [INFO] [stdout] 72 | pub fn day4() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day5` is never used [INFO] [stdout] --> src/day5.rs:92:8 [INFO] [stdout] | [INFO] [stdout] 92 | pub fn day5() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `subtract` is never used [INFO] [stdout] --> src/day6.rs:30:4 [INFO] [stdout] | [INFO] [stdout] 30 | fn subtract((x0, y0): Pos, (x1, y1): Pos) -> Pos { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `turn_left` is never used [INFO] [stdout] --> src/day6.rs:38:4 [INFO] [stdout] | [INFO] [stdout] 38 | fn turn_left((dx, dy): Pos) -> Pos { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `backtrack` is never used [INFO] [stdout] --> src/day6.rs:73:4 [INFO] [stdout] | [INFO] [stdout] 73 | fn backtrack(pos: Pos, forward: Pos, obstacles: &HashSet, size: Pos, visited: &mut HashMap>) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part2` is never used [INFO] [stdout] --> src/day6.rs:99:4 [INFO] [stdout] | [INFO] [stdout] 99 | fn part2(guard_pos: Pos, obstacles: &HashSet, size: Pos) -> i32 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day6` is never used [INFO] [stdout] --> src/day6.rs:163:8 [INFO] [stdout] | [INFO] [stdout] 163 | pub fn day6() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day7` is never used [INFO] [stdout] --> src/day7.rs:44:8 [INFO] [stdout] | [INFO] [stdout] 44 | pub fn day7() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day8` is never used [INFO] [stdout] --> src/day8.rs:82:8 [INFO] [stdout] | [INFO] [stdout] 82 | pub fn day8() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day9` is never used [INFO] [stdout] --> src/day9.rs:108:8 [INFO] [stdout] | [INFO] [stdout] 108 | pub fn day9() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `print_grid` is never used [INFO] [stdout] --> src/util/print_grid.rs:5:8 [INFO] [stdout] | [INFO] [stdout] 5 | pub fn print_grid(grid: &HashMap, TV>, size: Vec2) -> String { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `print_grid_hashset` is never used [INFO] [stdout] --> src/util/print_grid.rs:23:8 [INFO] [stdout] | [INFO] [stdout] 23 | pub fn print_grid_hashset(grid: &HashSet>, size: Vec2) -> String { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `max` and `min` are never used [INFO] [stdout] --> src/util/vec2.rs:78:12 [INFO] [stdout] | [INFO] [stdout] 69 | impl + Ord> Vec2 { [INFO] [stdout] | -------------------------------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 78 | pub fn max(self, other: Self) -> Vec2 { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 85 | pub fn min(self, other: Self) -> Vec2 { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day1.rs:13:16 [INFO] [stdout] | [INFO] [stdout] 13 | fn part1(left: &Vec, right: &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] 13 - fn part1(left: &Vec, right: &Vec) -> i32 { [INFO] [stdout] 13 + fn part1(left: &[i32], right: &Vec) -> 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/day1.rs:13:34 [INFO] [stdout] | [INFO] [stdout] 13 | fn part1(left: &Vec, right: &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] 13 - fn part1(left: &Vec, right: &Vec) -> i32 { [INFO] [stdout] 13 + fn part1(left: &Vec, right: &[i32]) -> i32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day1.rs:23:34 [INFO] [stdout] | [INFO] [stdout] 23 | fn part2(left: &Vec, right: &Vec) -> i64 { [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] 23 - fn part2(left: &Vec, right: &Vec) -> i64 { [INFO] [stdout] 23 + fn part2(left: &Vec, right: &[i32]) -> i64 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/day10.rs:19:13 [INFO] [stdout] | [INFO] [stdout] 19 | / if c.in_bounds(Vec2::zero(), size - Vec2::one()) { [INFO] [stdout] 20 | | if map[c.y as usize][c.x as usize] == level + 1 { [INFO] [stdout] 21 | | children.push(get_node(&map, level + 1, c)); [INFO] [stdout] 22 | | } [INFO] [stdout] 23 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 19 ~ if c.in_bounds(Vec2::zero(), size - Vec2::one()) [INFO] [stdout] 20 ~ && map[c.y as usize][c.x as usize] == level + 1 { [INFO] [stdout] 21 | children.push(get_node(&map, level + 1, c)); [INFO] [stdout] 22 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day10.rs:21:44 [INFO] [stdout] | [INFO] [stdout] 21 | children.push(get_node(&map, level + 1, c)); [INFO] [stdout] | ^^^^ help: change this to: `map` [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: redundant closure [INFO] [stdout] --> src/day10.rs:46:35 [INFO] [stdout] | [INFO] [stdout] 46 | trail.children.iter().map(|node| crate::day10::count_rating(node)).sum() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `crate::day10::count_rating` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day10.rs:55:37 [INFO] [stdout] | [INFO] [stdout] 55 | let node = get_node(&map, 0, Vec2::new(x as i32, y as i32)); [INFO] [stdout] | ^^^^ help: change this to: `map` [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/day10.rs:64:25 [INFO] [stdout] | [INFO] [stdout] 64 | let tree = get_tree(&input); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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/day10.rs:75:25 [INFO] [stdout] | [INFO] [stdout] 75 | let tree = get_tree(&input); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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/day10.rs:78:31 [INFO] [stdout] | [INFO] [stdout] 78 | .map(|n| count_rating(&n)) [INFO] [stdout] | ^^ help: change this to: `n` [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/day10.rs:112:31 [INFO] [stdout] | [INFO] [stdout] 112 | let map = parse_input(&input); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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/day10.rs:126:31 [INFO] [stdout] | [INFO] [stdout] 126 | let map = parse_input(&input); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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/day11.rs:14:18 [INFO] [stdout] | [INFO] [stdout] 14 | fn blink(stones: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 14 - fn blink(stones: &Vec) -> Vec { [INFO] [stdout] 14 + fn blink(stones: &[u64]) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day11.rs:32:55 [INFO] [stdout] | [INFO] [stdout] 32 | 0 => blink_stone(1, max_level, level + 1, &mut memoize), [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `memoize` [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/day11.rs:35:54 [INFO] [stdout] | [INFO] [stdout] 35 | blink_stone(l, max_level, level + 1, &mut memoize) + blink_stone(r, max_level, level + 1, &mut memoize) [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `memoize` [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/day11.rs:35:107 [INFO] [stdout] | [INFO] [stdout] 35 | blink_stone(l, max_level, level + 1, &mut memoize) + blink_stone(r, max_level, level + 1, &mut memoize) [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `memoize` [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/day11.rs:37:65 [INFO] [stdout] | [INFO] [stdout] 37 | blink_stone(stone * 2024, max_level, level + 1, &mut memoize) [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `memoize` [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/day11.rs:47:18 [INFO] [stdout] | [INFO] [stdout] 47 | fn part1(stones: &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] 47 ~ fn part1(stones: &[u64]) -> i32 { [INFO] [stdout] 48 ~ let mut stones = stones.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/day11.rs:55:18 [INFO] [stdout] | [INFO] [stdout] 55 | fn part2(stones: &Vec, max_level: i32) -> 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] 55 - fn part2(stones: &Vec, max_level: i32) -> u64 { [INFO] [stdout] 55 + fn part2(stones: &[u64], max_level: i32) -> u64 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day11.rs:82:34 [INFO] [stdout] | [INFO] [stdout] 82 | let stones = parse_input(&input); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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/day12.rs:10:26 [INFO] [stdout] | [INFO] [stdout] 10 | pub fn find_cells(input: &Vec>, pos: Vec2, name: char) -> HashSet> { [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] 10 - pub fn find_cells(input: &Vec>, pos: Vec2, name: char) -> HashSet> { [INFO] [stdout] 10 + pub fn find_cells(input: &[Vec], pos: Vec2, name: char) -> HashSet> { [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/day12.rs:19:9 [INFO] [stdout] | [INFO] [stdout] 19 | let head = heads.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] 18 ~ while let Some(head) = heads.pop() { [INFO] [stdout] 19 ~ [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/day12.rs:92:21 [INFO] [stdout] | [INFO] [stdout] 92 | pub fn part1(areas: &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] 92 - pub fn part1(areas: &Vec) -> i32 { [INFO] [stdout] 92 + pub fn part1(areas: &[Area]) -> i32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/day12.rs:94:14 [INFO] [stdout] | [INFO] [stdout] 94 | .map(|a| get_area_cost(a)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `get_area_cost` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day12.rs:98:21 [INFO] [stdout] | [INFO] [stdout] 98 | pub fn part2(areas: &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] 98 - pub fn part2(areas: &Vec) -> i32 { [INFO] [stdout] 98 + pub fn part2(areas: &[Area]) -> i32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/day12.rs:100:14 [INFO] [stdout] | [INFO] [stdout] 100 | .map(|a| get_area_cost_p2(a)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `get_area_cost_p2` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_input_line` is never used [INFO] [stdout] --> src/day1.rs:3:4 [INFO] [stdout] | [INFO] [stdout] 3 | fn parse_input_line(line: &str) -> Option<(i32, i32)> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part1` is never used [INFO] [stdout] --> src/day1.rs:13:4 [INFO] [stdout] | [INFO] [stdout] 13 | fn part1(left: &Vec, right: &Vec) -> i32 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part2` is never used [INFO] [stdout] --> src/day1.rs:23:4 [INFO] [stdout] | [INFO] [stdout] 23 | fn part2(left: &Vec, right: &Vec) -> i64 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day1` is never used [INFO] [stdout] --> src/day1.rs:40:8 [INFO] [stdout] | [INFO] [stdout] 40 | pub fn day1() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Node` is never constructed [INFO] [stdout] --> src/day10.rs:5:12 [INFO] [stdout] | [INFO] [stdout] 5 | pub struct Node { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_node` is never used [INFO] [stdout] --> src/day10.rs:12:8 [INFO] [stdout] | [INFO] [stdout] 12 | pub fn get_node(map: &Vec>, level: u32, pos: Vec2) -> Node { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `count_peaks` is never used [INFO] [stdout] --> src/day10.rs:34:8 [INFO] [stdout] | [INFO] [stdout] 34 | pub fn count_peaks(trail: &Node, visited: &mut HashSet>) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `count_rating` is never used [INFO] [stdout] --> src/day10.rs:42:8 [INFO] [stdout] | [INFO] [stdout] 42 | pub fn count_rating(trail: &Node) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_tree` is never used [INFO] [stdout] --> src/day10.rs:50:8 [INFO] [stdout] | [INFO] [stdout] 50 | pub fn get_tree(map: &Vec>) -> Vec { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part1` is never used [INFO] [stdout] --> src/day10.rs:63:8 [INFO] [stdout] | [INFO] [stdout] 63 | pub fn part1(input: &Vec>) -> i32 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part2` is never used [INFO] [stdout] --> src/day10.rs:74:8 [INFO] [stdout] | [INFO] [stdout] 74 | pub fn part2(input: &Vec>) -> i32 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_input` is never used [INFO] [stdout] --> src/day10.rs:82:8 [INFO] [stdout] | [INFO] [stdout] 82 | pub fn parse_input(input: &str) -> Vec> { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day12.rs:130:33 [INFO] [stdout] | [INFO] [stdout] 130 | let areas = parse_input(&input); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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: function `day10` is never used [INFO] [stdout] --> src/day10.rs:89:8 [INFO] [stdout] | [INFO] [stdout] 89 | pub fn day10() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `split_stone` is never used [INFO] [stdout] --> src/day11.rs:4:4 [INFO] [stdout] | [INFO] [stdout] 4 | fn split_stone(stone: u64) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `split_stone_2` is never used [INFO] [stdout] --> src/day11.rs:9:4 [INFO] [stdout] | [INFO] [stdout] 9 | fn split_stone_2(stone: u64) -> (u64, u64) { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `blink` is never used [INFO] [stdout] --> src/day11.rs:14:4 [INFO] [stdout] | [INFO] [stdout] 14 | fn blink(stones: &Vec) -> Vec { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `blink_stone` is never used [INFO] [stdout] --> src/day11.rs:24:4 [INFO] [stdout] | [INFO] [stdout] 24 | fn blink_stone(stone: u64, max_level: i32, level: i32, memoize: &mut HashMap<(u64, i32), u64>) -> u64 { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part1` is never used [INFO] [stdout] --> src/day11.rs:47:4 [INFO] [stdout] | [INFO] [stdout] 47 | fn part1(stones: &Vec) -> i32 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part2` is never used [INFO] [stdout] --> src/day11.rs:55:4 [INFO] [stdout] | [INFO] [stdout] 55 | fn part2(stones: &Vec, max_level: i32) -> u64 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_input` is never used [INFO] [stdout] --> src/day11.rs:61:4 [INFO] [stdout] | [INFO] [stdout] 61 | fn parse_input(input: &str) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day11` is never used [INFO] [stdout] --> src/day11.rs:66:8 [INFO] [stdout] | [INFO] [stdout] 66 | pub fn day11() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day12.rs:140:33 [INFO] [stdout] | [INFO] [stdout] 140 | let areas = parse_input(&input); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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: struct `Area` is never constructed [INFO] [stdout] --> src/day12.rs:5:12 [INFO] [stdout] | [INFO] [stdout] 5 | pub struct Area { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `find_cells` is never used [INFO] [stdout] --> src/day12.rs:10:8 [INFO] [stdout] | [INFO] [stdout] 10 | pub fn find_cells(input: &Vec>, pos: Vec2, name: char) -> HashSet> { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day12.rs:151:33 [INFO] [stdout] | [INFO] [stdout] 151 | let areas = parse_input(&input); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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/day12.rs:163:33 [INFO] [stdout] | [INFO] [stdout] 163 | let areas = parse_input(&input); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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: function `parse_input` is never used [INFO] [stdout] --> src/day12.rs:34:8 [INFO] [stdout] | [INFO] [stdout] 34 | pub fn parse_input(input: &str) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_area_cost` is never used [INFO] [stdout] --> src/day12.rs:58:4 [INFO] [stdout] | [INFO] [stdout] 58 | fn get_area_cost(area: &Area) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_area_cost_p2` is never used [INFO] [stdout] --> src/day12.rs:71:4 [INFO] [stdout] | [INFO] [stdout] 71 | fn get_area_cost_p2(area: &Area) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part1` is never used [INFO] [stdout] --> src/day12.rs:92:8 [INFO] [stdout] | [INFO] [stdout] 92 | pub fn part1(areas: &Vec) -> i32 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part2` is never used [INFO] [stdout] --> src/day12.rs:98:8 [INFO] [stdout] | [INFO] [stdout] 98 | pub fn part2(areas: &Vec) -> i32 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day12` is never used [INFO] [stdout] --> src/day12.rs:104:8 [INFO] [stdout] | [INFO] [stdout] 104 | pub fn day12() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Machine` is never constructed [INFO] [stdout] --> src/day13.rs:6:12 [INFO] [stdout] | [INFO] [stdout] 6 | pub struct Machine { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `input_to_vec2` is never used [INFO] [stdout] --> src/day13.rs:12:4 [INFO] [stdout] | [INFO] [stdout] 12 | fn input_to_vec2(input: &str) -> Vec2 { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_input` is never used [INFO] [stdout] --> src/day13.rs:18:8 [INFO] [stdout] | [INFO] [stdout] 18 | pub fn parse_input(input: &str) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `A_COST` is never used [INFO] [stdout] --> src/day13.rs:39:7 [INFO] [stdout] | [INFO] [stdout] 39 | const A_COST: i64 = 3; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `B_COST` is never used [INFO] [stdout] --> src/day13.rs:40:7 [INFO] [stdout] | [INFO] [stdout] 40 | const B_COST: i64 = 1; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `solve_machine` is never used [INFO] [stdout] --> src/day13.rs:42:4 [INFO] [stdout] | [INFO] [stdout] 42 | fn solve_machine(machine: &Machine) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_primes` is never used [INFO] [stdout] --> src/day13.rs:72:4 [INFO] [stdout] | [INFO] [stdout] 72 | fn get_primes(max: i64) -> Vec { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_prime_factors` is never used [INFO] [stdout] --> src/day13.rs:84:4 [INFO] [stdout] | [INFO] [stdout] 84 | fn get_prime_factors(num: i64, primes: &[i64]) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `to_vec_float64` is never used [INFO] [stdout] --> src/day13.rs:98:4 [INFO] [stdout] | [INFO] [stdout] 98 | fn to_vec_float64(v: &Vec2) -> Vec2 { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `solve_machine_v2` is never used [INFO] [stdout] --> src/day13.rs:102:4 [INFO] [stdout] | [INFO] [stdout] 102 | fn solve_machine_v2(machine: &Machine) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part1` is never used [INFO] [stdout] --> src/day13.rs:139:8 [INFO] [stdout] | [INFO] [stdout] 139 | pub fn part1(machines: &[Machine]) -> i64 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part2` is never used [INFO] [stdout] --> src/day13.rs:146:8 [INFO] [stdout] | [INFO] [stdout] 146 | pub fn part2(machines: &[Machine], offset: i64) -> i64 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day13` is never used [INFO] [stdout] --> src/day13.rs:156:8 [INFO] [stdout] | [INFO] [stdout] 156 | pub fn day13() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day13.rs:14:44 [INFO] [stdout] | [INFO] [stdout] 14 | let (_, [x, y]) = input_regex.captures(&input).expect("Could not match regex").extract(); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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: type alias `Robot` is never used [INFO] [stdout] --> src/day14.rs:6:6 [INFO] [stdout] | [INFO] [stdout] 6 | type Robot = (Vec2, Vec2); [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_input` is never used [INFO] [stdout] --> src/day14.rs:8:4 [INFO] [stdout] | [INFO] [stdout] 8 | fn parse_input(input: &str) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `move_robots` is never used [INFO] [stdout] --> src/day14.rs:17:4 [INFO] [stdout] | [INFO] [stdout] 17 | fn move_robots(robots: &[Robot], room_size: Vec2, num_steps: i32) -> Vec> { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `is_christmas_tree` is never used [INFO] [stdout] --> src/day14.rs:24:4 [INFO] [stdout] | [INFO] [stdout] 24 | fn is_christmas_tree(ps: &Vec>, room_size: Vec2) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `print_robots` is never used [INFO] [stdout] --> src/day14.rs:59:4 [INFO] [stdout] | [INFO] [stdout] 59 | fn print_robots(rs: &Vec>, room_size: Vec2) -> String { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part1` is never used [INFO] [stdout] --> src/day14.rs:81:4 [INFO] [stdout] | [INFO] [stdout] 81 | fn part1(robots: &[Robot], room_size: Vec2) -> i32 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part2` is never used [INFO] [stdout] --> src/day14.rs:100:4 [INFO] [stdout] | [INFO] [stdout] 100 | fn part2(robots: &[Robot], room_size: Vec2) -> i32 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day14` is never used [INFO] [stdout] --> src/day14.rs:124:8 [INFO] [stdout] | [INFO] [stdout] 124 | pub fn day14() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Input` is never used [INFO] [stdout] --> src/day15.rs:6:6 [INFO] [stdout] | [INFO] [stdout] 6 | enum Input { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `get_move` is never used [INFO] [stdout] --> src/day15.rs:14:8 [INFO] [stdout] | [INFO] [stdout] 13 | impl Input { [INFO] [stdout] | ---------- method in this implementation [INFO] [stdout] 14 | fn get_move(&self) -> Vec2 { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type alias `Inputs` is never used [INFO] [stdout] --> src/day15.rs:38:6 [INFO] [stdout] | [INFO] [stdout] 38 | type Inputs = Vec; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/day13.rs:24:12 [INFO] [stdout] | [INFO] [stdout] 24 | if !a.is_some() { [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `a.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Obj` is never used [INFO] [stdout] --> src/day15.rs:41:6 [INFO] [stdout] | [INFO] [stdout] 41 | enum Obj { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/day15.rs:50:8 [INFO] [stdout] | [INFO] [stdout] 49 | impl Obj { [INFO] [stdout] | -------- associated function in this implementation [INFO] [stdout] 50 | fn new(c: char) -> Option { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type alias `Map` is never used [INFO] [stdout] --> src/day15.rs:71:6 [INFO] [stdout] | [INFO] [stdout] 71 | type Map = HashMap, Obj>; [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `move_obj` is never used [INFO] [stdout] --> src/day15.rs:73:4 [INFO] [stdout] | [INFO] [stdout] 73 | fn move_obj(map: &mut Map, from: Vec2, to: Vec2) { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_input` is never used [INFO] [stdout] --> src/day15.rs:78:4 [INFO] [stdout] | [INFO] [stdout] 78 | fn parse_input(input: &str) -> (Map, Inputs) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `widen_pos` is never used [INFO] [stdout] --> src/day15.rs:97:4 [INFO] [stdout] | [INFO] [stdout] 97 | fn widen_pos(pos: Vec2) -> Vec2 { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `widen_map` is never used [INFO] [stdout] --> src/day15.rs:101:4 [INFO] [stdout] | [INFO] [stdout] 101 | fn widen_map(map: &Map) -> Map { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `move_object` is never used [INFO] [stdout] --> src/day15.rs:113:4 [INFO] [stdout] | [INFO] [stdout] 113 | fn move_object(pos: Vec2, dir: Vec2, map: &mut Map) -> bool { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `gps_coord` is never used [INFO] [stdout] --> src/day15.rs:148:4 [INFO] [stdout] | [INFO] [stdout] 148 | fn gps_coord(pos: Vec2) -> i32 { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part1` is never used [INFO] [stdout] --> src/day15.rs:152:4 [INFO] [stdout] | [INFO] [stdout] 152 | fn part1(map: &Map, inputs: &Inputs) -> i32 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part2` is never used [INFO] [stdout] --> src/day15.rs:168:4 [INFO] [stdout] | [INFO] [stdout] 168 | fn part2(map: &Map, inputs: &Inputs) -> i32 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day15` is never used [INFO] [stdout] --> src/day15.rs:187:8 [INFO] [stdout] | [INFO] [stdout] 187 | pub fn day15() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type alias `Path` is never used [INFO] [stdout] --> src/day16.rs:6:6 [INFO] [stdout] | [INFO] [stdout] 6 | type Path = HashSet>; [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `State` is never constructed [INFO] [stdout] --> src/day16.rs:9:8 [INFO] [stdout] | [INFO] [stdout] 9 | struct State { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `shortest_paths` is never used [INFO] [stdout] --> src/day16.rs:29:4 [INFO] [stdout] | [INFO] [stdout] 29 | fn shortest_paths(start: Vec2, end: Vec2, obstacles: &HashSet>) -> (Vec, i32) { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part1` is never used [INFO] [stdout] --> src/day16.rs:94:4 [INFO] [stdout] | [INFO] [stdout] 94 | fn part1(start: Vec2, end: Vec2, obstacles: &HashSet>) -> i32 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part2` is never used [INFO] [stdout] --> src/day16.rs:99:4 [INFO] [stdout] | [INFO] [stdout] 99 | fn part2(start: Vec2, end: Vec2, obstacles: &HashSet>) -> i32 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_input` is never used [INFO] [stdout] --> src/day16.rs:113:4 [INFO] [stdout] | [INFO] [stdout] 113 | fn parse_input(input: &str) -> (Vec2, Vec2, HashSet>) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day16` is never used [INFO] [stdout] --> src/day16.rs:132:8 [INFO] [stdout] | [INFO] [stdout] 132 | pub fn day16() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type alias `Registers` is never used [INFO] [stdout] --> src/day17.rs:3:6 [INFO] [stdout] | [INFO] [stdout] 3 | type Registers = (i64, i64, i64); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type alias `State` is never used [INFO] [stdout] --> src/day17.rs:5:6 [INFO] [stdout] | [INFO] [stdout] 5 | type State = (Registers, 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/day13.rs:49:9 [INFO] [stdout] | [INFO] [stdout] 49 | let (prize, num_a, num_b) = heads.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] help: consider using a `while..let` loop [INFO] [stdout] | [INFO] [stdout] 48 ~ while let Some((prize, num_a, num_b)) = heads.pop() { [INFO] [stdout] 49 ~ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type alias `Program` is never used [INFO] [stdout] --> src/day17.rs:6:6 [INFO] [stdout] | [INFO] [stdout] 6 | type Program = Vec; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_input` is never used [INFO] [stdout] --> src/day17.rs:8:4 [INFO] [stdout] | [INFO] [stdout] 8 | fn parse_input(input: &str) -> (Registers, Program) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `inc_pc` is never used [INFO] [stdout] --> src/day17.rs:33:4 [INFO] [stdout] | [INFO] [stdout] 33 | fn inc_pc(state: &State) -> State { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `set_pc` is never used [INFO] [stdout] --> src/day17.rs:37:4 [INFO] [stdout] | [INFO] [stdout] 37 | fn set_pc(state: &State, pc: i32) -> State { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/day13.rs:91:13 [INFO] [stdout] | [INFO] [stdout] 91 | pn = pn / p; [INFO] [stdout] | ^^^^^^^^^^^ help: replace it with: `pn /= p` [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: function `set_a` is never used [INFO] [stdout] --> src/day17.rs:41:4 [INFO] [stdout] | [INFO] [stdout] 41 | fn set_a(state: &State, a: i64) -> State { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `set_b` is never used [INFO] [stdout] --> src/day17.rs:45:4 [INFO] [stdout] | [INFO] [stdout] 45 | fn set_b(state: &State, b: i64) -> State { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `set_c` is never used [INFO] [stdout] --> src/day17.rs:49:4 [INFO] [stdout] | [INFO] [stdout] 49 | fn set_c(state: &State, c: i64) -> State { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_a` is never used [INFO] [stdout] --> src/day17.rs:53:4 [INFO] [stdout] | [INFO] [stdout] 53 | fn get_a(state: &State) -> i64 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_b` is never used [INFO] [stdout] --> src/day17.rs:57:4 [INFO] [stdout] | [INFO] [stdout] 57 | fn get_b(state: &State) -> i64 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_c` is never used [INFO] [stdout] --> src/day17.rs:62:4 [INFO] [stdout] | [INFO] [stdout] 62 | fn get_c(state: &State) -> i64 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `combo_op` is never used [INFO] [stdout] --> src/day17.rs:67:4 [INFO] [stdout] | [INFO] [stdout] 67 | fn combo_op(state: &State, op: i32) -> i64 { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `handle_opcode` is never used [INFO] [stdout] --> src/day17.rs:77:4 [INFO] [stdout] | [INFO] [stdout] 77 | fn handle_opcode(state: &State, program: &Program) -> Option<(State, Option)> { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part1` is never used [INFO] [stdout] --> src/day17.rs:106:4 [INFO] [stdout] | [INFO] [stdout] 106 | fn part1(registers: &Registers, program: &Program) -> Vec { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part2` is never used [INFO] [stdout] --> src/day17.rs:124:4 [INFO] [stdout] | [INFO] [stdout] 124 | fn part2(program: &Program) -> i64 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `fmt_part1` is never used [INFO] [stdout] --> src/day17.rs:159:4 [INFO] [stdout] | [INFO] [stdout] 159 | fn fmt_part1(out: &Vec) -> String { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day17` is never used [INFO] [stdout] --> src/day17.rs:163:8 [INFO] [stdout] | [INFO] [stdout] 163 | pub fn day17() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `State` is never constructed [INFO] [stdout] --> src/day18.rs:7:8 [INFO] [stdout] | [INFO] [stdout] 7 | struct State { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `shortest_path` is never used [INFO] [stdout] --> src/day18.rs:25:4 [INFO] [stdout] | [INFO] [stdout] 25 | fn shortest_path(start: Vec2, end: Vec2, obstacles: &HashSet>, min: Vec2, max: Vec2) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part1` is never used [INFO] [stdout] --> src/day18.rs:70:4 [INFO] [stdout] | [INFO] [stdout] 70 | fn part1(falling: &Vec>, num_steps: usize, size: Vec2) -> i32 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_input` is never used [INFO] [stdout] --> src/day18.rs:75:4 [INFO] [stdout] | [INFO] [stdout] 75 | fn parse_input(input: &str) -> Vec> { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part2` is never used [INFO] [stdout] --> src/day18.rs:82:4 [INFO] [stdout] | [INFO] [stdout] 82 | fn part2(falling: &Vec>, size: Vec2) -> Vec2 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day18` is never used [INFO] [stdout] --> src/day18.rs:99:8 [INFO] [stdout] | [INFO] [stdout] 99 | pub fn day18() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_input` is never used [INFO] [stdout] --> src/day19.rs:3:4 [INFO] [stdout] | [INFO] [stdout] 3 | fn parse_input(input: &str) -> (Vec<&str>, Vec<&str>) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `match_pattern` is never used [INFO] [stdout] --> src/day19.rs:16:4 [INFO] [stdout] | [INFO] [stdout] 16 | fn match_pattern<'a>(towels: &'a [&str], pattern: &'a str, memoize: &mut HashMap<&'a str, i64>) -> i64 { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part1` is never used [INFO] [stdout] --> src/day19.rs:36:4 [INFO] [stdout] | [INFO] [stdout] 36 | fn part1(towels: &Vec<&str>, patterns: &Vec<&str>) -> i32 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part2` is never used [INFO] [stdout] --> src/day19.rs:42:4 [INFO] [stdout] | [INFO] [stdout] 42 | fn part2(towels: &Vec<&str>, patterns: &Vec<&str>) -> i64 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day19` is never used [INFO] [stdout] --> src/day19.rs:48:8 [INFO] [stdout] | [INFO] [stdout] 48 | pub fn day19() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_input_line` is never used [INFO] [stdout] --> src/day2.rs:3:4 [INFO] [stdout] | [INFO] [stdout] 3 | fn parse_input_line(line: &str) -> Option> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `is_correct_report` is never used [INFO] [stdout] --> src/day2.rs:14:4 [INFO] [stdout] | [INFO] [stdout] 14 | fn is_correct_report(v: &[i32]) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `is_correct_report_p2_v2` is never used [INFO] [stdout] --> src/day2.rs:27:4 [INFO] [stdout] | [INFO] [stdout] 27 | fn is_correct_report_p2_v2(v: &[i32]) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part1` is never used [INFO] [stdout] --> src/day2.rs:39:4 [INFO] [stdout] | [INFO] [stdout] 39 | fn part1(input: &Vec>) -> usize { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part2` is never used [INFO] [stdout] --> src/day2.rs:45:4 [INFO] [stdout] | [INFO] [stdout] 45 | fn part2(input: &Vec>) -> usize { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day2` is never used [INFO] [stdout] --> src/day2.rs:51:8 [INFO] [stdout] | [INFO] [stdout] 51 | pub fn day2() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_input` is never used [INFO] [stdout] --> src/day20.rs:5:4 [INFO] [stdout] | [INFO] [stdout] 5 | fn parse_input(input: &str) -> Vec> { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part1` is never used [INFO] [stdout] --> src/day20.rs:55:4 [INFO] [stdout] | [INFO] [stdout] 55 | fn part1(track: &Vec>, min_shortcut: i32, cheat_length: i32) -> i32 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day20` is never used [INFO] [stdout] --> src/day20.rs:86:8 [INFO] [stdout] | [INFO] [stdout] 86 | pub fn day20() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Input` is never used [INFO] [stdout] --> src/day21.rs:7:6 [INFO] [stdout] | [INFO] [stdout] 7 | enum Input { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `repeat` is never used [INFO] [stdout] --> src/day21.rs:27:4 [INFO] [stdout] | [INFO] [stdout] 27 | fn repeat(num_times: i32, when_positive: T, when_negative: T) -> Vec { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `input_sequences` is never used [INFO] [stdout] --> src/day21.rs:37:4 [INFO] [stdout] | [INFO] [stdout] 37 | fn input_sequences(targets: &Vec>, pos: Vec2, bad: Vec2) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `keypad_sequences` is never used [INFO] [stdout] --> src/day21.rs:63:4 [INFO] [stdout] | [INFO] [stdout] 63 | fn keypad_sequences(code: &str) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `dir_pad_sequences` is never used [INFO] [stdout] --> src/day21.rs:85:4 [INFO] [stdout] | [INFO] [stdout] 85 | fn dir_pad_sequences(code: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part1` is never used [INFO] [stdout] --> src/day21.rs:100:4 [INFO] [stdout] | [INFO] [stdout] 100 | fn part1(codes: &Vec<&str>) -> i64 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day21` is never used [INFO] [stdout] --> src/day21.rs:126:8 [INFO] [stdout] | [INFO] [stdout] 126 | pub fn day21() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Input` is never used [INFO] [stdout] --> src/day21_2.rs:8:6 [INFO] [stdout] | [INFO] [stdout] 8 | enum Input { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `from_vec` is never used [INFO] [stdout] --> src/day21_2.rs:17:8 [INFO] [stdout] | [INFO] [stdout] 16 | impl Input { [INFO] [stdout] | ---------- associated function in this implementation [INFO] [stdout] 17 | fn from_vec(v: Vec2) -> Self { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `State` is never constructed [INFO] [stdout] --> src/day21_2.rs:42:8 [INFO] [stdout] | [INFO] [stdout] 42 | struct State<'a, T: Clone + std::fmt::Debug> { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `CostState` is never constructed [INFO] [stdout] --> src/day21_2.rs:65:8 [INFO] [stdout] | [INFO] [stdout] 65 | struct CostState { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `shortest_path` is never used [INFO] [stdout] --> src/day21_2.rs:71:4 [INFO] [stdout] | [INFO] [stdout] 71 | fn shortest_path( [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_dir_pad_target` is never used [INFO] [stdout] --> src/day21_2.rs:148:4 [INFO] [stdout] | [INFO] [stdout] 148 | fn get_dir_pad_target(input: &Input) -> Vec2 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `keypad_sequences` is never used [INFO] [stdout] --> src/day21_2.rs:158:4 [INFO] [stdout] | [INFO] [stdout] 158 | fn keypad_sequences( [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `PadId` is never used [INFO] [stdout] --> src/day21_2.rs:211:6 [INFO] [stdout] | [INFO] [stdout] 211 | enum PadId { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `dir_pad_sequences` is never used [INFO] [stdout] --> src/day21_2.rs:217:4 [INFO] [stdout] | [INFO] [stdout] 217 | fn dir_pad_sequences( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part1` is never used [INFO] [stdout] --> src/day21_2.rs:274:4 [INFO] [stdout] | [INFO] [stdout] 274 | fn part1(codes: &Vec<&str>) -> i64 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day21` is never used [INFO] [stdout] --> src/day21_2.rs:298:8 [INFO] [stdout] | [INFO] [stdout] 298 | pub fn day21() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `mix` is never used [INFO] [stdout] --> src/day22.rs:31:4 [INFO] [stdout] | [INFO] [stdout] 31 | fn mix(n1: i64, n2: i64) -> i64 { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `prune` is never used [INFO] [stdout] --> src/day22.rs:35:4 [INFO] [stdout] | [INFO] [stdout] 35 | fn prune(n: i64) -> i64 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `next_secret` is never used [INFO] [stdout] --> src/day22.rs:39:4 [INFO] [stdout] | [INFO] [stdout] 39 | fn next_secret(secret: i64) -> i64 { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `ones` is never used [INFO] [stdout] --> src/day22.rs:46:4 [INFO] [stdout] | [INFO] [stdout] 46 | fn ones(n: i64) -> i64 { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part1` is never used [INFO] [stdout] --> src/day22.rs:50:4 [INFO] [stdout] | [INFO] [stdout] 50 | fn part1(secrets: &[i64]) -> i64 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part2` is never used [INFO] [stdout] --> src/day22.rs:63:4 [INFO] [stdout] | [INFO] [stdout] 63 | fn part2(secrets: &[i64]) -> i64 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_input` is never used [INFO] [stdout] --> src/day22.rs:103:4 [INFO] [stdout] | [INFO] [stdout] 103 | fn parse_input(input: &str) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day22` is never used [INFO] [stdout] --> src/day22.rs:114:8 [INFO] [stdout] | [INFO] [stdout] 114 | pub fn day22() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type alias `Link` is never used [INFO] [stdout] --> src/day23.rs:6:6 [INFO] [stdout] | [INFO] [stdout] 6 | type Link<'a> = (&'a str, &'a str); [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_input` is never used [INFO] [stdout] --> src/day23.rs:8:4 [INFO] [stdout] | [INFO] [stdout] 8 | fn parse_input(input: &str) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part1` is never used [INFO] [stdout] --> src/day23.rs:15:4 [INFO] [stdout] | [INFO] [stdout] 15 | fn part1(links: &Vec) -> i32 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part2` is never used [INFO] [stdout] --> src/day23.rs:54:4 [INFO] [stdout] | [INFO] [stdout] 54 | fn part2(links: &[Link]) -> String { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day23` is never used [INFO] [stdout] --> src/day23.rs:100:8 [INFO] [stdout] | [INFO] [stdout] 100 | pub fn day23() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Operation` is never used [INFO] [stdout] --> src/day24.rs:10:6 [INFO] [stdout] | [INFO] [stdout] 10 | enum Operation { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Node` is never constructed [INFO] [stdout] --> src/day24.rs:38:8 [INFO] [stdout] | [INFO] [stdout] 38 | struct Node<'a> { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type alias `NodeValues` is never used [INFO] [stdout] --> src/day24.rs:45:6 [INFO] [stdout] | [INFO] [stdout] 45 | type NodeValues<'a> = HashMap<&'a str, bool>; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_input` is never used [INFO] [stdout] --> src/day24.rs:47:4 [INFO] [stdout] | [INFO] [stdout] 47 | fn parse_input(input: &str) -> (Vec, NodeValues) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `resolve_values` is never used [INFO] [stdout] --> src/day24.rs:74:4 [INFO] [stdout] | [INFO] [stdout] 74 | fn resolve_values<'a>(nodes: &'a Vec, values: &'a NodeValues) -> NodeValues<'a> { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part1` is never used [INFO] [stdout] --> src/day24.rs:123:4 [INFO] [stdout] | [INFO] [stdout] 123 | fn part1(nodes: &Vec, values: &NodeValues) -> i64 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `show_graph` is never used [INFO] [stdout] --> src/day24.rs:161:4 [INFO] [stdout] | [INFO] [stdout] 161 | fn show_graph(node: &str, nodes: &Vec, values: &NodeValues) -> String { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_nodes` is never used [INFO] [stdout] --> src/day24.rs:207:4 [INFO] [stdout] | [INFO] [stdout] 207 | fn get_nodes<'a>(node: &'a str, nodes: &'a [Node]) -> Vec<&'a str> { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `test_bit` is never used [INFO] [stdout] --> src/day24.rs:224:4 [INFO] [stdout] | [INFO] [stdout] 224 | fn test_bit<'a>( [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `swap_nodes` is never used [INFO] [stdout] --> src/day24.rs:297:4 [INFO] [stdout] | [INFO] [stdout] 297 | fn swap_nodes<'a>(nodes: &mut Vec>, node0: &'a str, node1: &'a str) { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part2` is never used [INFO] [stdout] --> src/day24.rs:307:4 [INFO] [stdout] | [INFO] [stdout] 307 | fn part2(nodes: &Vec) -> String { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day24` is never used [INFO] [stdout] --> src/day24.rs:499:8 [INFO] [stdout] | [INFO] [stdout] 499 | pub fn day24() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type alias `Schematic` is never used [INFO] [stdout] --> src/day25.rs:5:6 [INFO] [stdout] | [INFO] [stdout] 5 | type Schematic = [i32; 5]; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_input` is never used [INFO] [stdout] --> src/day25.rs:7:4 [INFO] [stdout] | [INFO] [stdout] 7 | fn parse_input(input: &str) -> (Vec, Vec) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part1` is never used [INFO] [stdout] --> src/day25.rs:31:4 [INFO] [stdout] | [INFO] [stdout] 31 | fn part1(keys: &Vec, locks: &Vec) -> i32 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day25` is never used [INFO] [stdout] --> src/day25.rs:48:8 [INFO] [stdout] | [INFO] [stdout] 48 | pub fn day25() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part1` is never used [INFO] [stdout] --> src/day3.rs:4:4 [INFO] [stdout] | [INFO] [stdout] 4 | fn part1(input: &str) -> i32 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part2` is never used [INFO] [stdout] --> src/day3.rs:13:4 [INFO] [stdout] | [INFO] [stdout] 13 | fn part2(input: &str) -> i32 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day3` is never used [INFO] [stdout] --> src/day3.rs:26:8 [INFO] [stdout] | [INFO] [stdout] 26 | pub fn day3() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `check_pattern` is never used [INFO] [stdout] --> src/day4.rs:3:4 [INFO] [stdout] | [INFO] [stdout] 3 | fn check_pattern(input: &Vec>, x: usize, y: usize, dx: i32, dy: i32, search: &Vec) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part1_v2` is never used [INFO] [stdout] --> src/day4.rs:23:8 [INFO] [stdout] | [INFO] [stdout] 23 | pub fn part1_v2(input: &Vec>) -> i32 { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `is_m_and_s` is never used [INFO] [stdout] --> src/day4.rs:43:4 [INFO] [stdout] | [INFO] [stdout] 43 | fn is_m_and_s(input: &Vec>, x: usize, y: usize, (dx, dy): (i32, i32)) -> bool { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part2` is never used [INFO] [stdout] --> src/day4.rs:55:8 [INFO] [stdout] | [INFO] [stdout] 55 | pub fn part2(input: &Vec>) -> i32 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day4` is never used [INFO] [stdout] --> src/day4.rs:72:8 [INFO] [stdout] | [INFO] [stdout] 72 | pub fn day4() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `is_valid_update` is never used [INFO] [stdout] --> src/day5.rs:4:4 [INFO] [stdout] | [INFO] [stdout] 4 | fn is_valid_update(update: &Vec, rules: &Vec<(i32, i32)>) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `middle_sum` is never used [INFO] [stdout] --> src/day5.rs:21:4 [INFO] [stdout] | [INFO] [stdout] 21 | fn middle_sum(v: &Vec<&Vec>) -> i32 { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part1` is never used [INFO] [stdout] --> src/day5.rs:25:4 [INFO] [stdout] | [INFO] [stdout] 25 | fn part1(rules: &Vec<(i32, i32)>, updates: &Vec>) -> i32 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `fix_update` is never used [INFO] [stdout] --> src/day5.rs:36:4 [INFO] [stdout] | [INFO] [stdout] 36 | fn fix_update(rules: &Vec<(i32, i32)>, update: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part2` is never used [INFO] [stdout] --> src/day5.rs:56:4 [INFO] [stdout] | [INFO] [stdout] 56 | fn part2(rules: &Vec<(i32, i32)>, updates: &Vec>) -> i32 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_input` is never used [INFO] [stdout] --> src/day5.rs:68:8 [INFO] [stdout] | [INFO] [stdout] 68 | pub fn parse_input(input: &str) -> (Vec<(i32, i32)>, Vec>) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day5` is never used [INFO] [stdout] --> src/day5.rs:92:8 [INFO] [stdout] | [INFO] [stdout] 92 | pub fn day5() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type alias `Pos` is never used [INFO] [stdout] --> src/day6.rs:4:6 [INFO] [stdout] | [INFO] [stdout] 4 | type Pos = (i32, i32); [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_input` is never used [INFO] [stdout] --> src/day6.rs:6:4 [INFO] [stdout] | [INFO] [stdout] 6 | fn parse_input(input: &str) -> (Pos, HashSet, Pos) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `add` is never used [INFO] [stdout] --> src/day6.rs:26:4 [INFO] [stdout] | [INFO] [stdout] 26 | fn add((x0, y0): Pos, (x1, y1): Pos) -> Pos { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `subtract` is never used [INFO] [stdout] --> src/day6.rs:30:4 [INFO] [stdout] | [INFO] [stdout] 30 | fn subtract((x0, y0): Pos, (x1, y1): Pos) -> Pos { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `turn_right` is never used [INFO] [stdout] --> src/day6.rs:34:4 [INFO] [stdout] | [INFO] [stdout] 34 | fn turn_right((dx, dy): Pos) -> Pos { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `turn_left` is never used [INFO] [stdout] --> src/day6.rs:38:4 [INFO] [stdout] | [INFO] [stdout] 38 | fn turn_left((dx, dy): Pos) -> Pos { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `in_bounds` is never used [INFO] [stdout] --> src/day6.rs:42:4 [INFO] [stdout] | [INFO] [stdout] 42 | fn in_bounds((px, py): Pos, (width, height): Pos) -> bool { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part1` is never used [INFO] [stdout] --> src/day6.rs:46:4 [INFO] [stdout] | [INFO] [stdout] 46 | fn part1(guard_pos: Pos, forward: Pos, obstacles: &HashSet, size: Pos) -> Option>> { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `backtrack` is never used [INFO] [stdout] --> src/day6.rs:73:4 [INFO] [stdout] | [INFO] [stdout] 73 | fn backtrack(pos: Pos, forward: Pos, obstacles: &HashSet, size: Pos, visited: &mut HashMap>) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part2` is never used [INFO] [stdout] --> src/day6.rs:99:4 [INFO] [stdout] | [INFO] [stdout] 99 | fn part2(guard_pos: Pos, obstacles: &HashSet, size: Pos) -> i32 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part2_v2` is never used [INFO] [stdout] --> src/day6.rs:134:4 [INFO] [stdout] | [INFO] [stdout] 134 | fn part2_v2(guard_pos: Pos, obstacles: &HashSet, size: Pos) -> i32 { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day6` is never used [INFO] [stdout] --> src/day6.rs:163:8 [INFO] [stdout] | [INFO] [stdout] 163 | pub fn day6() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `concat_numbers` is never used [INFO] [stdout] --> src/day7.rs:3:4 [INFO] [stdout] | [INFO] [stdout] 3 | fn concat_numbers(num1: i64, num2: i64) -> i64 { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `test_operations` is never used [INFO] [stdout] --> src/day7.rs:7:4 [INFO] [stdout] | [INFO] [stdout] 7 | fn test_operations(target: &i64, current_sum: i64, nums: &[i64], ext: bool) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part1` is never used [INFO] [stdout] --> src/day7.rs:19:4 [INFO] [stdout] | [INFO] [stdout] 19 | fn part1(input: &Vec<(i64, Vec)>) -> i64 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part2` is never used [INFO] [stdout] --> src/day7.rs:26:4 [INFO] [stdout] | [INFO] [stdout] 26 | fn part2(input: &Vec<(i64, Vec)>) -> i64 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_input` is never used [INFO] [stdout] --> src/day7.rs:34:8 [INFO] [stdout] | [INFO] [stdout] 34 | pub fn parse_input(input: &str) -> Vec<(i64, Vec)> { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day7` is never used [INFO] [stdout] --> src/day7.rs:44:8 [INFO] [stdout] | [INFO] [stdout] 44 | pub fn day7() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part1` is never used [INFO] [stdout] --> src/day8.rs:5:4 [INFO] [stdout] | [INFO] [stdout] 5 | fn part1(towers: &HashMap>>, size: Vec2) -> i32 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `add_antinodes` is never used [INFO] [stdout] --> src/day8.rs:30:4 [INFO] [stdout] | [INFO] [stdout] 30 | fn add_antinodes(origin: Vec2, delta: Vec2, antinodes: &mut HashSet>, size: Vec2) { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part2` is never used [INFO] [stdout] --> src/day8.rs:43:4 [INFO] [stdout] | [INFO] [stdout] 43 | fn part2(towers: &HashMap>>, size: Vec2) -> i32 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_input` is never used [INFO] [stdout] --> src/day8.rs:61:4 [INFO] [stdout] | [INFO] [stdout] 61 | fn parse_input(input: &str) -> (HashMap>>, Vec2) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day8` is never used [INFO] [stdout] --> src/day8.rs:82:8 [INFO] [stdout] | [INFO] [stdout] 82 | pub fn day8() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `DiskBlock` is never used [INFO] [stdout] --> src/day9.rs:4:10 [INFO] [stdout] | [INFO] [stdout] 4 | pub enum DiskBlock { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type alias `DiskChunk` is never used [INFO] [stdout] --> src/day9.rs:9:6 [INFO] [stdout] | [INFO] [stdout] 9 | type DiskChunk = (DiskBlock, u64, u64); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `checksum_disk` is never used [INFO] [stdout] --> src/day9.rs:11:4 [INFO] [stdout] | [INFO] [stdout] 11 | fn checksum_disk(disk: &Vec) -> u64 { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part1` is never used [INFO] [stdout] --> src/day9.rs:22:8 [INFO] [stdout] | [INFO] [stdout] 22 | pub fn part1(input: &Vec) -> u64 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part2` is never used [INFO] [stdout] --> src/day9.rs:46:8 [INFO] [stdout] | [INFO] [stdout] 46 | pub fn part2(input: &Vec) -> u64 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_input1` is never used [INFO] [stdout] --> src/day9.rs:79:8 [INFO] [stdout] | [INFO] [stdout] 79 | pub fn parse_input1(input: &str) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/day13.rs:141:21 [INFO] [stdout] | [INFO] [stdout] 141 | .filter_map(|m| solve_machine(m)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `solve_machine` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day13.rs:184:36 [INFO] [stdout] | [INFO] [stdout] 184 | let machines = parse_input(&input); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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/day13.rs:205:36 [INFO] [stdout] | [INFO] [stdout] 205 | let machines = parse_input(&input); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/day14.rs:71:37 [INFO] [stdout] | [INFO] [stdout] 71 | .get(&Vec2::new(x as i32, y as i32)) [INFO] [stdout] | ^^^^^^^^ help: try: `x` [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 (`i32` -> `i32`) [INFO] [stdout] --> src/day14.rs:71:47 [INFO] [stdout] | [INFO] [stdout] 71 | .get(&Vec2::new(x as i32, y as i32)) [INFO] [stdout] | ^^^^^^^^ help: try: `y` [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 a character literal to `u8` truncates [INFO] [stdout] --> src/day14.rs:72:37 [INFO] [stdout] | [INFO] [stdout] 72 | .map(|&n| ((n + ('0' as u8)) as char)) [INFO] [stdout] | ^^^^^^^^^^^ help: use a byte literal instead: `b'0'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] = note: `#[warn(clippy::char_lit_as_u8)]` 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/day14.rs:82:37 [INFO] [stdout] | [INFO] [stdout] 82 | let new_positions = move_robots(&robots, room_size, 100); [INFO] [stdout] | ^^^^^^^ help: change this to: `robots` [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 `.fold` can be written more succinctly using another method [INFO] [stdout] --> src/day14.rs:97:10 [INFO] [stdout] | [INFO] [stdout] 97 | .fold(1, |a, n| a * n) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `product()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fold [INFO] [stdout] = note: `#[warn(clippy::unnecessary_fold)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day14.rs:104:30 [INFO] [stdout] | [INFO] [stdout] 104 | let ps = move_robots(&robots, room_size, i); [INFO] [stdout] | ^^^^^^^ help: change this to: `robots` [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/day14.rs:150:34 [INFO] [stdout] | [INFO] [stdout] 150 | let robots = parse_input(&input); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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: manual implementation of `Option::map` [INFO] [stdout] --> src/day15.rs:86:30 [INFO] [stdout] | [INFO] [stdout] 86 | .filter_map(|(p, e)| match e { [INFO] [stdout] | ______________________________^ [INFO] [stdout] 87 | | Some(obj) => Some((p, obj)), [INFO] [stdout] 88 | | None => None, [INFO] [stdout] 89 | | }); [INFO] [stdout] | |_________^ help: try: `e.map(|obj| (p, obj))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/day15.rs:121:13 [INFO] [stdout] | [INFO] [stdout] 121 | / if move_object(target_pos, dir, map) { [INFO] [stdout] 122 | | true [INFO] [stdout] 123 | | } else { [INFO] [stdout] 124 | | false [INFO] [stdout] 125 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 120 ~ Some(Obj::Box) [INFO] [stdout] 121 ~ if move_object(target_pos, dir, map) => { [INFO] [stdout] 122 | true [INFO] [stdout] 123 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/day15.rs:121:13 [INFO] [stdout] | [INFO] [stdout] 121 | / if move_object(target_pos, dir, map) { [INFO] [stdout] 122 | | true [INFO] [stdout] 123 | | } else { [INFO] [stdout] 124 | | false [INFO] [stdout] 125 | | } [INFO] [stdout] | |_____________^ help: you can reduce it to: `move_object(target_pos, dir, map)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] = note: `#[warn(clippy::needless_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/day15.rs:128:27 [INFO] [stdout] | [INFO] [stdout] 128 | if dir.x == 1 { [INFO] [stdout] | ___________________________^ [INFO] [stdout] 129 | | move_object(target_pos + Vec2::new(1, 0), dir, map) && move_object(target_pos, dir, map) [INFO] [stdout] 130 | | } else { [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/day15.rs:130:20 [INFO] [stdout] | [INFO] [stdout] 130 | } else { [INFO] [stdout] | ____________________^ [INFO] [stdout] 131 | | move_object(target_pos, dir, map) && move_object(target_pos + Vec2::new(1, 0), dir, map) [INFO] [stdout] 132 | | }, [INFO] [stdout] | |_____________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/day15.rs:134:28 [INFO] [stdout] | [INFO] [stdout] 134 | if dir.x == -1 { [INFO] [stdout] | ____________________________^ [INFO] [stdout] 135 | | move_object(target_pos + Vec2::new(-1, 0), dir, map) && move_object(target_pos, dir, map) [INFO] [stdout] 136 | | } else { [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/day15.rs:136:20 [INFO] [stdout] | [INFO] [stdout] 136 | } else { [INFO] [stdout] | ____________________^ [INFO] [stdout] 137 | | move_object(target_pos, dir, map) && move_object(target_pos + Vec2::new(-1, 0), dir, map) [INFO] [stdout] 138 | | }, [INFO] [stdout] | |_____________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day15.rs:222:41 [INFO] [stdout] | [INFO] [stdout] 222 | let (map, inputs) = parse_input(&input); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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/day15.rs:250:41 [INFO] [stdout] | [INFO] [stdout] 250 | let (map, inputs) = parse_input(&input); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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/day16.rs:95:47 [INFO] [stdout] | [INFO] [stdout] 95 | let (_, len) = shortest_paths(start, end, &obstacles); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `obstacles` [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/day16.rs:100:49 [INFO] [stdout] | [INFO] [stdout] 100 | let (paths, _) = shortest_paths(start, end, &obstacles); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `obstacles` [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/day16.rs:161:51 [INFO] [stdout] | [INFO] [stdout] 161 | let (start, end, obstacles) = parse_input(&input); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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/day16.rs:184:51 [INFO] [stdout] | [INFO] [stdout] 184 | let (start, end, obstacles) = parse_input(&input); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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/day16.rs:205:51 [INFO] [stdout] | [INFO] [stdout] 205 | let (start, end, obstacles) = parse_input(&input); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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/day16.rs:228:51 [INFO] [stdout] | [INFO] [stdout] 228 | let (start, end, obstacles) = parse_input(&input); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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/day17.rs:89:28 [INFO] [stdout] | [INFO] [stdout] 89 | 0 => inc_pc(&set_a(&state, get_a(&state) / i64::pow(2, combo_op(&state, operand) as u32))), [INFO] [stdout] | ^^^^^^ help: change this to: `state` [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/day17.rs:89:42 [INFO] [stdout] | [INFO] [stdout] 89 | 0 => inc_pc(&set_a(&state, get_a(&state) / i64::pow(2, combo_op(&state, operand) as u32))), [INFO] [stdout] | ^^^^^^ help: change this to: `state` [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/day17.rs:89:73 [INFO] [stdout] | [INFO] [stdout] 89 | 0 => inc_pc(&set_a(&state, get_a(&state) / i64::pow(2, combo_op(&state, operand) as u32))), [INFO] [stdout] | ^^^^^^ help: change this to: `state` [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/day17.rs:90:28 [INFO] [stdout] | [INFO] [stdout] 90 | 1 => inc_pc(&set_b(&state, get_b(&state) ^ operand as i64)), [INFO] [stdout] | ^^^^^^ help: change this to: `state` [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/day17.rs:90:42 [INFO] [stdout] | [INFO] [stdout] 90 | 1 => inc_pc(&set_b(&state, get_b(&state) ^ operand as i64)), [INFO] [stdout] | ^^^^^^ help: change this to: `state` [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/day17.rs:91:28 [INFO] [stdout] | [INFO] [stdout] 91 | 2 => inc_pc(&set_b(&state, combo_op(&state, operand) % 8)), [INFO] [stdout] | ^^^^^^ help: change this to: `state` [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/day17.rs:91:45 [INFO] [stdout] | [INFO] [stdout] 91 | 2 => inc_pc(&set_b(&state, combo_op(&state, operand) % 8)), [INFO] [stdout] | ^^^^^^ help: change this to: `state` [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/day17.rs:92:23 [INFO] [stdout] | [INFO] [stdout] 92 | 3 => if get_a(&state) == 0 { inc_pc(&state) } else { set_pc(&state, operand) }, [INFO] [stdout] | ^^^^^^ help: change this to: `state` [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/day17.rs:92:45 [INFO] [stdout] | [INFO] [stdout] 92 | 3 => if get_a(&state) == 0 { inc_pc(&state) } else { set_pc(&state, operand) }, [INFO] [stdout] | ^^^^^^ help: change this to: `state` [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/day17.rs:92:69 [INFO] [stdout] | [INFO] [stdout] 92 | 3 => if get_a(&state) == 0 { inc_pc(&state) } else { set_pc(&state, operand) }, [INFO] [stdout] | ^^^^^^ help: change this to: `state` [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/day17.rs:93:28 [INFO] [stdout] | [INFO] [stdout] 93 | 4 => inc_pc(&set_b(&state, get_b(&state) ^ get_c(&state))), [INFO] [stdout] | ^^^^^^ help: change this to: `state` [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/day17.rs:93:42 [INFO] [stdout] | [INFO] [stdout] 93 | 4 => inc_pc(&set_b(&state, get_b(&state) ^ get_c(&state))), [INFO] [stdout] | ^^^^^^ help: change this to: `state` [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/day17.rs:93:58 [INFO] [stdout] | [INFO] [stdout] 93 | 4 => inc_pc(&set_b(&state, get_b(&state) ^ get_c(&state))), [INFO] [stdout] | ^^^^^^ help: change this to: `state` [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/day17.rs:95:37 [INFO] [stdout] | [INFO] [stdout] 95 | output = Some((combo_op(&state, operand) % 8) as i32); [INFO] [stdout] | ^^^^^^ help: change this to: `state` [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/day17.rs:96:20 [INFO] [stdout] | [INFO] [stdout] 96 | inc_pc(&state) [INFO] [stdout] | ^^^^^^ help: change this to: `state` [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/day17.rs:98:28 [INFO] [stdout] | [INFO] [stdout] 98 | 6 => inc_pc(&set_b(&state, get_a(&state) / i64::pow(2, combo_op(&state, operand) as u32))), [INFO] [stdout] | ^^^^^^ help: change this to: `state` [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/day17.rs:98:42 [INFO] [stdout] | [INFO] [stdout] 98 | 6 => inc_pc(&set_b(&state, get_a(&state) / i64::pow(2, combo_op(&state, operand) as u32))), [INFO] [stdout] | ^^^^^^ help: change this to: `state` [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/day17.rs:98:73 [INFO] [stdout] | [INFO] [stdout] 98 | 6 => inc_pc(&set_b(&state, get_a(&state) / i64::pow(2, combo_op(&state, operand) as u32))), [INFO] [stdout] | ^^^^^^ help: change this to: `state` [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/day17.rs:99:28 [INFO] [stdout] | [INFO] [stdout] 99 | 7 => inc_pc(&set_c(&state, get_a(&state) / i64::pow(2, combo_op(&state, operand) as u32))), [INFO] [stdout] | ^^^^^^ help: change this to: `state` [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/day17.rs:99:42 [INFO] [stdout] | [INFO] [stdout] 99 | 7 => inc_pc(&set_c(&state, get_a(&state) / i64::pow(2, combo_op(&state, operand) as u32))), [INFO] [stdout] | ^^^^^^ help: change this to: `state` [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/day17.rs:99:73 [INFO] [stdout] | [INFO] [stdout] 99 | 7 => inc_pc(&set_c(&state, get_a(&state) / i64::pow(2, combo_op(&state, operand) as u32))), [INFO] [stdout] | ^^^^^^ help: change this to: `state` [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: function `parse_input2` is never used [INFO] [stdout] --> src/day9.rs:87:8 [INFO] [stdout] | [INFO] [stdout] 87 | pub fn parse_input2(input: &str) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day9` is never used [INFO] [stdout] --> src/day9.rs:108:8 [INFO] [stdout] | [INFO] [stdout] 108 | pub fn day9() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `print_grid` is never used [INFO] [stdout] --> src/util/print_grid.rs:5:8 [INFO] [stdout] | [INFO] [stdout] 5 | pub fn print_grid(grid: &HashMap, TV>, size: Vec2) -> String { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `print_grid_hashset` is never used [INFO] [stdout] --> src/util/print_grid.rs:23:8 [INFO] [stdout] | [INFO] [stdout] 23 | pub fn print_grid_hashset(grid: &HashSet>, size: Vec2) -> String { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `transpose` is never used [INFO] [stdout] --> src/util/str_util.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn transpose(s: &str) -> Vec { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `one`, `max`, `min`, and `in_bounds` are never used [INFO] [stdout] --> src/util/vec2.rs:74:12 [INFO] [stdout] | [INFO] [stdout] 69 | impl + Ord> Vec2 { [INFO] [stdout] | -------------------------------------- associated items in this implementation [INFO] [stdout] ... [INFO] [stdout] 74 | pub fn one() -> Vec2 { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 78 | pub fn max(self, other: Self) -> Vec2 { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 85 | pub fn min(self, other: Self) -> Vec2 { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 92 | pub fn in_bounds(self, min: Self, max: Self) -> bool { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `abs`, `manhattan_distance`, and `all_dirs` are never used [INFO] [stdout] --> src/util/vec2.rs:99:12 [INFO] [stdout] | [INFO] [stdout] 98 | impl Vec2 { [INFO] [stdout] | -------------- associated items in this implementation [INFO] [stdout] 99 | pub fn abs(&self) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 103 | pub fn manhattan_distance(&self) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 108 | pub fn all_dirs() -> Vec> { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day1.rs:13:16 [INFO] [stdout] | [INFO] [stdout] 13 | fn part1(left: &Vec, right: &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] 13 - fn part1(left: &Vec, right: &Vec) -> i32 { [INFO] [stdout] 13 + fn part1(left: &[i32], right: &Vec) -> 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/day1.rs:13:34 [INFO] [stdout] | [INFO] [stdout] 13 | fn part1(left: &Vec, right: &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] 13 - fn part1(left: &Vec, right: &Vec) -> i32 { [INFO] [stdout] 13 + fn part1(left: &Vec, right: &[i32]) -> i32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day1.rs:23:34 [INFO] [stdout] | [INFO] [stdout] 23 | fn part2(left: &Vec, right: &Vec) -> i64 { [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] 23 - fn part2(left: &Vec, right: &Vec) -> i64 { [INFO] [stdout] 23 + fn part2(left: &Vec, right: &[i32]) -> i64 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/day10.rs:19:13 [INFO] [stdout] | [INFO] [stdout] 19 | / if c.in_bounds(Vec2::zero(), size - Vec2::one()) { [INFO] [stdout] 20 | | if map[c.y as usize][c.x as usize] == level + 1 { [INFO] [stdout] 21 | | children.push(get_node(&map, level + 1, c)); [INFO] [stdout] 22 | | } [INFO] [stdout] 23 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 19 ~ if c.in_bounds(Vec2::zero(), size - Vec2::one()) [INFO] [stdout] 20 ~ && map[c.y as usize][c.x as usize] == level + 1 { [INFO] [stdout] 21 | children.push(get_node(&map, level + 1, c)); [INFO] [stdout] 22 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day10.rs:21:44 [INFO] [stdout] | [INFO] [stdout] 21 | children.push(get_node(&map, level + 1, c)); [INFO] [stdout] | ^^^^ help: change this to: `map` [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: redundant closure [INFO] [stdout] --> src/day10.rs:46:35 [INFO] [stdout] | [INFO] [stdout] 46 | trail.children.iter().map(|node| crate::day10::count_rating(node)).sum() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `crate::day10::count_rating` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day10.rs:55:37 [INFO] [stdout] | [INFO] [stdout] 55 | let node = get_node(&map, 0, Vec2::new(x as i32, y as i32)); [INFO] [stdout] | ^^^^ help: change this to: `map` [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/day10.rs:64:25 [INFO] [stdout] | [INFO] [stdout] 64 | let tree = get_tree(&input); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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/day10.rs:75:25 [INFO] [stdout] | [INFO] [stdout] 75 | let tree = get_tree(&input); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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/day10.rs:78:31 [INFO] [stdout] | [INFO] [stdout] 78 | .map(|n| count_rating(&n)) [INFO] [stdout] | ^^ help: change this to: `n` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> src/day17.rs:110:5 [INFO] [stdout] | [INFO] [stdout] 110 | / loop { [INFO] [stdout] 111 | | if let Some(res) = handle_opcode(&state, &program) { [INFO] [stdout] 112 | | state = res.0; [INFO] [stdout] 113 | | if let Some(out) = res.1 { [INFO] [stdout] ... | [INFO] [stdout] 119 | | } [INFO] [stdout] | |_____^ help: try: `while let Some(res) = handle_opcode(&state, &program) { .. }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] = note: `#[warn(clippy::while_let_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day17.rs:111:50 [INFO] [stdout] | [INFO] [stdout] 111 | if let Some(res) = handle_opcode(&state, &program) { [INFO] [stdout] | ^^^^^^^^ help: change this to: `program` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day17.rs:133:39 [INFO] [stdout] | [INFO] [stdout] 133 | let o = part1(®isters, &program); [INFO] [stdout] | ^^^^^^^^ help: change this to: `program` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day17.rs:159:19 [INFO] [stdout] | [INFO] [stdout] 159 | fn fmt_part1(out: &Vec) -> String { [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] 159 - fn fmt_part1(out: &Vec) -> String { [INFO] [stdout] 159 + fn fmt_part1(out: &[i32]) -> String { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day17.rs:183:48 [INFO] [stdout] | [INFO] [stdout] 183 | let (registers, program) = parse_input(&input); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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/day17.rs:195:40 [INFO] [stdout] | [INFO] [stdout] 195 | let (_, program) = parse_input(&input); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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/day11.rs:14:18 [INFO] [stdout] | [INFO] [stdout] 14 | fn blink(stones: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 14 - fn blink(stones: &Vec) -> Vec { [INFO] [stdout] 14 + fn blink(stones: &[u64]) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day11.rs:32:55 [INFO] [stdout] | [INFO] [stdout] 32 | 0 => blink_stone(1, max_level, level + 1, &mut memoize), [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `memoize` [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/day11.rs:35:54 [INFO] [stdout] | [INFO] [stdout] 35 | blink_stone(l, max_level, level + 1, &mut memoize) + blink_stone(r, max_level, level + 1, &mut memoize) [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `memoize` [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/day18.rs:70:19 [INFO] [stdout] | [INFO] [stdout] 70 | fn part1(falling: &Vec>, num_steps: usize, size: Vec2) -> 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] 70 - fn part1(falling: &Vec>, num_steps: usize, size: Vec2) -> i32 { [INFO] [stdout] 70 + fn part1(falling: &[Vec2], num_steps: usize, size: Vec2) -> i32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day11.rs:35:107 [INFO] [stdout] | [INFO] [stdout] 35 | blink_stone(l, max_level, level + 1, &mut memoize) + blink_stone(r, max_level, level + 1, &mut memoize) [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `memoize` [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/day11.rs:37:65 [INFO] [stdout] | [INFO] [stdout] 37 | blink_stone(stone * 2024, max_level, level + 1, &mut memoize) [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `memoize` [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/day18.rs:82:19 [INFO] [stdout] | [INFO] [stdout] 82 | fn part2(falling: &Vec>, size: Vec2) -> Vec2 { [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] 82 - fn part2(falling: &Vec>, size: Vec2) -> Vec2 { [INFO] [stdout] 82 + fn part2(falling: &[Vec2], size: Vec2) -> Vec2 { [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/day11.rs:47:18 [INFO] [stdout] | [INFO] [stdout] 47 | fn part1(stones: &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] 47 ~ fn part1(stones: &[u64]) -> i32 { [INFO] [stdout] 48 ~ let mut stones = stones.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/day11.rs:55:18 [INFO] [stdout] | [INFO] [stdout] 55 | fn part2(stones: &Vec, max_level: i32) -> 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] 55 - fn part2(stones: &Vec, max_level: i32) -> u64 { [INFO] [stdout] 55 + fn part2(stones: &[u64], max_level: i32) -> u64 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day18.rs:88:46 [INFO] [stdout] | [INFO] [stdout] 88 | if shortest_path(Vec2::zero(), size, &obstacles, Vec2::zero(), size).is_some() { [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `obstacles` [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/day12.rs:10:26 [INFO] [stdout] | [INFO] [stdout] 10 | pub fn find_cells(input: &Vec>, pos: Vec2, name: char) -> HashSet> { [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] 10 - pub fn find_cells(input: &Vec>, pos: Vec2, name: char) -> HashSet> { [INFO] [stdout] 10 + pub fn find_cells(input: &[Vec], pos: Vec2, name: char) -> HashSet> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day18.rs:139:35 [INFO] [stdout] | [INFO] [stdout] 139 | let falling = parse_input(&input); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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/day18.rs:170:35 [INFO] [stdout] | [INFO] [stdout] 170 | let falling = parse_input(&input); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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: length comparison to zero [INFO] [stdout] --> src/day19.rs:8:21 [INFO] [stdout] | [INFO] [stdout] 8 | .filter(|t| t.len() > 0) [INFO] [stdout] | ^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!t.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/day19.rs:17:8 [INFO] [stdout] | [INFO] [stdout] 17 | if pattern.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `pattern.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to pop elements from a `Vec` in a loop [INFO] [stdout] --> src/day12.rs:19:9 [INFO] [stdout] | [INFO] [stdout] 19 | let head = heads.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] 18 ~ while let Some(head) = heads.pop() { [INFO] [stdout] 19 ~ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day19.rs:74:46 [INFO] [stdout] | [INFO] [stdout] 74 | let (towels, patterns) = parse_input(&input); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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/day19.rs:91:46 [INFO] [stdout] | [INFO] [stdout] 91 | let (towels, patterns) = parse_input(&input); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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/day12.rs:92:21 [INFO] [stdout] | [INFO] [stdout] 92 | pub fn part1(areas: &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] 92 - pub fn part1(areas: &Vec) -> i32 { [INFO] [stdout] 92 + pub fn part1(areas: &[Area]) -> i32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `v` [INFO] [stdout] --> src/day2.rs:17:14 [INFO] [stdout] | [INFO] [stdout] 17 | for i in 1..v.len() { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 17 - for i in 1..v.len() { [INFO] [stdout] 17 + for in v.iter().skip(1) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/day12.rs:94:14 [INFO] [stdout] | [INFO] [stdout] 94 | .map(|a| get_area_cost(a)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `get_area_cost` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day12.rs:98:21 [INFO] [stdout] | [INFO] [stdout] 98 | pub fn part2(areas: &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] 98 - pub fn part2(areas: &Vec) -> i32 { [INFO] [stdout] 98 + pub fn part2(areas: &[Area]) -> i32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/day12.rs:100:14 [INFO] [stdout] | [INFO] [stdout] 100 | .map(|a| get_area_cost_p2(a)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `get_area_cost_p2` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day2.rs:39:17 [INFO] [stdout] | [INFO] [stdout] 39 | fn part1(input: &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] 39 - fn part1(input: &Vec>) -> usize { [INFO] [stdout] 39 + fn part1(input: &[Vec]) -> usize { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day2.rs:45:17 [INFO] [stdout] | [INFO] [stdout] 45 | fn part2(input: &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] 45 - fn part2(input: &Vec>) -> usize { [INFO] [stdout] 45 + fn part2(input: &[Vec]) -> usize { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day13.rs:14:44 [INFO] [stdout] | [INFO] [stdout] 14 | let (_, [x, y]) = input_regex.captures(&input).expect("Could not match regex").extract(); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/day13.rs:24:12 [INFO] [stdout] | [INFO] [stdout] 24 | if !a.is_some() { [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `a.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/day2.rs:68:9 [INFO] [stdout] | [INFO] [stdout] 68 | assert_eq!(true, is_correct_report(&vec!(1, 2, 3, 4, 5))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_assert_comparison)]` on by default [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 68 - assert_eq!(true, is_correct_report(&vec!(1, 2, 3, 4, 5))); [INFO] [stdout] 68 + assert!(is_correct_report(&vec!(1, 2, 3, 4, 5))); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/day2.rs:73:9 [INFO] [stdout] | [INFO] [stdout] 73 | assert_eq!(true, is_correct_report(&vec!(1, 2, 3, 4, 5))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 73 - assert_eq!(true, is_correct_report(&vec!(1, 2, 3, 4, 5))); [INFO] [stdout] 73 + assert!(is_correct_report(&vec!(1, 2, 3, 4, 5))); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/day2.rs:78:9 [INFO] [stdout] | [INFO] [stdout] 78 | assert_eq!(true, is_correct_report(&vec!(1, 2, 3, 4, 7))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 78 - assert_eq!(true, is_correct_report(&vec!(1, 2, 3, 4, 7))); [INFO] [stdout] 78 + assert!(is_correct_report(&vec!(1, 2, 3, 4, 7))); [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/day13.rs:49:9 [INFO] [stdout] | [INFO] [stdout] 49 | let (prize, num_a, num_b) = heads.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] help: consider using a `while..let` loop [INFO] [stdout] | [INFO] [stdout] 48 ~ while let Some((prize, num_a, num_b)) = heads.pop() { [INFO] [stdout] 49 ~ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/day13.rs:91:13 [INFO] [stdout] | [INFO] [stdout] 91 | pn = pn / p; [INFO] [stdout] | ^^^^^^^^^^^ help: replace it with: `pn /= p` [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: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/day2.rs:83:9 [INFO] [stdout] | [INFO] [stdout] 83 | assert_eq!(false, is_correct_report(&vec!(1, 2, 1, 2, 3))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 83 - assert_eq!(false, is_correct_report(&vec!(1, 2, 1, 2, 3))); [INFO] [stdout] 83 + assert!(!is_correct_report(&vec!(1, 2, 1, 2, 3))); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/day13.rs:141:21 [INFO] [stdout] | [INFO] [stdout] 141 | .filter_map(|m| solve_machine(m)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `solve_machine` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/day2.rs:88:9 [INFO] [stdout] | [INFO] [stdout] 88 | assert_eq!(false, is_correct_report(&vec!(1, 2, 3, 4, 8))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 88 - assert_eq!(false, is_correct_report(&vec!(1, 2, 3, 4, 8))); [INFO] [stdout] 88 + assert!(!is_correct_report(&vec!(1, 2, 3, 4, 8))); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/day2.rs:93:9 [INFO] [stdout] | [INFO] [stdout] 93 | assert_eq!(false, is_correct_report(&vec!(1, 2, 2, 4, 5))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 93 - assert_eq!(false, is_correct_report(&vec!(1, 2, 2, 4, 5))); [INFO] [stdout] 93 + assert!(!is_correct_report(&vec!(1, 2, 2, 4, 5))); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/day2.rs:99:9 [INFO] [stdout] | [INFO] [stdout] 99 | assert_eq!(true, is_correct_report_p2_v2(&vec!(1, 2, 3, 4, 10))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 99 - assert_eq!(true, is_correct_report_p2_v2(&vec!(1, 2, 3, 4, 10))); [INFO] [stdout] 99 + assert!(is_correct_report_p2_v2(&vec!(1, 2, 3, 4, 10))); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/day2.rs:104:9 [INFO] [stdout] | [INFO] [stdout] 104 | assert_eq!(true, is_correct_report_p2_v2(&vec!(1, 2, 1, 3, 4, 5))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 104 - assert_eq!(true, is_correct_report_p2_v2(&vec!(1, 2, 1, 3, 4, 5))); [INFO] [stdout] 104 + assert!(is_correct_report_p2_v2(&vec!(1, 2, 1, 3, 4, 5))); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/day2.rs:109:9 [INFO] [stdout] | [INFO] [stdout] 109 | assert_eq!(true, is_correct_report_p2_v2(&vec!(20, 2, 3, 4, 5))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 109 - assert_eq!(true, is_correct_report_p2_v2(&vec!(20, 2, 3, 4, 5))); [INFO] [stdout] 109 + assert!(is_correct_report_p2_v2(&vec!(20, 2, 3, 4, 5))); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/day14.rs:71:37 [INFO] [stdout] | [INFO] [stdout] 71 | .get(&Vec2::new(x as i32, y as i32)) [INFO] [stdout] | ^^^^^^^^ help: try: `x` [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: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/day2.rs:114:9 [INFO] [stdout] | [INFO] [stdout] 114 | assert_eq!(true, is_correct_report_p2_v2(&vec!(8, 6, 4, 4, 1))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 114 - assert_eq!(true, is_correct_report_p2_v2(&vec!(8, 6, 4, 4, 1))); [INFO] [stdout] 114 + assert!(is_correct_report_p2_v2(&vec!(8, 6, 4, 4, 1))); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/day14.rs:71:47 [INFO] [stdout] | [INFO] [stdout] 71 | .get(&Vec2::new(x as i32, y as i32)) [INFO] [stdout] | ^^^^^^^^ help: try: `y` [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 a character literal to `u8` truncates [INFO] [stdout] --> src/day14.rs:72:37 [INFO] [stdout] | [INFO] [stdout] 72 | .map(|&n| ((n + ('0' as u8)) as char)) [INFO] [stdout] | ^^^^^^^^^^^ help: use a byte literal instead: `b'0'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] = note: `#[warn(clippy::char_lit_as_u8)]` 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/day14.rs:82:37 [INFO] [stdout] | [INFO] [stdout] 82 | let new_positions = move_robots(&robots, room_size, 100); [INFO] [stdout] | ^^^^^^^ help: change this to: `robots` [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: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/day2.rs:119:9 [INFO] [stdout] | [INFO] [stdout] 119 | assert_eq!(true, is_correct_report_p2_v2(&vec!(8, 7, 4, 4, 1))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 119 - assert_eq!(true, is_correct_report_p2_v2(&vec!(8, 7, 4, 4, 1))); [INFO] [stdout] 119 + assert!(is_correct_report_p2_v2(&vec!(8, 7, 4, 4, 1))); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.fold` can be written more succinctly using another method [INFO] [stdout] --> src/day14.rs:97:10 [INFO] [stdout] | [INFO] [stdout] 97 | .fold(1, |a, n| a * n) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `product()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fold [INFO] [stdout] = note: `#[warn(clippy::unnecessary_fold)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/day2.rs:124:9 [INFO] [stdout] | [INFO] [stdout] 124 | assert_eq!(false, is_correct_report_p2_v2(&vec!(1, 2, 1, 3, 4, 10))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 124 - assert_eq!(false, is_correct_report_p2_v2(&vec!(1, 2, 1, 3, 4, 10))); [INFO] [stdout] 124 + assert!(!is_correct_report_p2_v2(&vec!(1, 2, 1, 3, 4, 10))); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day14.rs:104:30 [INFO] [stdout] | [INFO] [stdout] 104 | let ps = move_robots(&robots, room_size, i); [INFO] [stdout] | ^^^^^^^ help: change this to: `robots` [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: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/day2.rs:129:9 [INFO] [stdout] | [INFO] [stdout] 129 | assert_eq!(false, is_correct_report_p2_v2(&vec!(9, 7, 6, 2, 1))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 129 - assert_eq!(false, is_correct_report_p2_v2(&vec!(9, 7, 6, 2, 1))); [INFO] [stdout] 129 + assert!(!is_correct_report_p2_v2(&vec!(9, 7, 6, 2, 1))); [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/day20.rs:55:17 [INFO] [stdout] | [INFO] [stdout] 55 | fn part1(track: &Vec>, min_shortcut: i32, cheat_length: 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] 55 - fn part1(track: &Vec>, min_shortcut: i32, cheat_length: i32) -> i32 { [INFO] [stdout] 55 + fn part1(track: &[Vec2], min_shortcut: i32, cheat_length: i32) -> i32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/day15.rs:86:30 [INFO] [stdout] | [INFO] [stdout] 86 | .filter_map(|(p, e)| match e { [INFO] [stdout] | ______________________________^ [INFO] [stdout] 87 | | Some(obj) => Some((p, obj)), [INFO] [stdout] 88 | | None => None, [INFO] [stdout] 89 | | }); [INFO] [stdout] | |_________^ help: try: `e.map(|obj| (p, obj))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` 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/day20.rs:117:33 [INFO] [stdout] | [INFO] [stdout] 117 | let track = parse_input(&input); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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/day20.rs:139:33 [INFO] [stdout] | [INFO] [stdout] 139 | let track = parse_input(&input); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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 `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/day15.rs:121:13 [INFO] [stdout] | [INFO] [stdout] 121 | / if move_object(target_pos, dir, map) { [INFO] [stdout] 122 | | true [INFO] [stdout] 123 | | } else { [INFO] [stdout] 124 | | false [INFO] [stdout] 125 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 120 ~ Some(Obj::Box) [INFO] [stdout] 121 ~ if move_object(target_pos, dir, map) => { [INFO] [stdout] 122 | true [INFO] [stdout] 123 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/day15.rs:121:13 [INFO] [stdout] | [INFO] [stdout] 121 | / if move_object(target_pos, dir, map) { [INFO] [stdout] 122 | | true [INFO] [stdout] 123 | | } else { [INFO] [stdout] 124 | | false [INFO] [stdout] 125 | | } [INFO] [stdout] | |_____________^ help: you can reduce it to: `move_object(target_pos, dir, map)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] = note: `#[warn(clippy::needless_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/day15.rs:128:27 [INFO] [stdout] | [INFO] [stdout] 128 | if dir.x == 1 { [INFO] [stdout] | ___________________________^ [INFO] [stdout] 129 | | move_object(target_pos + Vec2::new(1, 0), dir, map) && move_object(target_pos, dir, map) [INFO] [stdout] 130 | | } else { [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/day15.rs:130:20 [INFO] [stdout] | [INFO] [stdout] 130 | } else { [INFO] [stdout] | ____________________^ [INFO] [stdout] 131 | | move_object(target_pos, dir, map) && move_object(target_pos + Vec2::new(1, 0), dir, map) [INFO] [stdout] 132 | | }, [INFO] [stdout] | |_____________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/day15.rs:134:28 [INFO] [stdout] | [INFO] [stdout] 134 | if dir.x == -1 { [INFO] [stdout] | ____________________________^ [INFO] [stdout] 135 | | move_object(target_pos + Vec2::new(-1, 0), dir, map) && move_object(target_pos, dir, map) [INFO] [stdout] 136 | | } else { [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/day15.rs:136:20 [INFO] [stdout] | [INFO] [stdout] 136 | } else { [INFO] [stdout] | ____________________^ [INFO] [stdout] 137 | | move_object(target_pos, dir, map) && move_object(target_pos + Vec2::new(-1, 0), dir, map) [INFO] [stdout] 138 | | }, [INFO] [stdout] | |_____________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `i32::abs()` to usize [INFO] [stdout] --> src/day21.rs:33:11 [INFO] [stdout] | [INFO] [stdout] 33 | .take(num_times.abs() as usize) [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: replace with: `num_times.unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] = note: `#[warn(clippy::cast_abs_to_unsigned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day21.rs:85:28 [INFO] [stdout] | [INFO] [stdout] 85 | fn dir_pad_sequences(code: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 85 - fn dir_pad_sequences(code: &Vec) -> Vec { [INFO] [stdout] 85 + fn dir_pad_sequences(code: &[Input]) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day16.rs:95:47 [INFO] [stdout] | [INFO] [stdout] 95 | let (_, len) = shortest_paths(start, end, &obstacles); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `obstacles` [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/day16.rs:100:49 [INFO] [stdout] | [INFO] [stdout] 100 | let (paths, _) = shortest_paths(start, end, &obstacles); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `obstacles` [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: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/day21_2.rs:75:14 [INFO] [stdout] | [INFO] [stdout] 75 | cost_fn: fn(Vec2, Vec2, &ST, &mut T) -> (i32, ST), [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day17.rs:89:28 [INFO] [stdout] | [INFO] [stdout] 89 | 0 => inc_pc(&set_a(&state, get_a(&state) / i64::pow(2, combo_op(&state, operand) as u32))), [INFO] [stdout] | ^^^^^^ help: change this to: `state` [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/day17.rs:89:42 [INFO] [stdout] | [INFO] [stdout] 89 | 0 => inc_pc(&set_a(&state, get_a(&state) / i64::pow(2, combo_op(&state, operand) as u32))), [INFO] [stdout] | ^^^^^^ help: change this to: `state` [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/day17.rs:89:73 [INFO] [stdout] | [INFO] [stdout] 89 | 0 => inc_pc(&set_a(&state, get_a(&state) / i64::pow(2, combo_op(&state, operand) as u32))), [INFO] [stdout] | ^^^^^^ help: change this to: `state` [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/day17.rs:90:28 [INFO] [stdout] | [INFO] [stdout] 90 | 1 => inc_pc(&set_b(&state, get_b(&state) ^ operand as i64)), [INFO] [stdout] | ^^^^^^ help: change this to: `state` [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/day17.rs:90:42 [INFO] [stdout] | [INFO] [stdout] 90 | 1 => inc_pc(&set_b(&state, get_b(&state) ^ operand as i64)), [INFO] [stdout] | ^^^^^^ help: change this to: `state` [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/day17.rs:91:28 [INFO] [stdout] | [INFO] [stdout] 91 | 2 => inc_pc(&set_b(&state, combo_op(&state, operand) % 8)), [INFO] [stdout] | ^^^^^^ help: change this to: `state` [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/day17.rs:91:45 [INFO] [stdout] | [INFO] [stdout] 91 | 2 => inc_pc(&set_b(&state, combo_op(&state, operand) % 8)), [INFO] [stdout] | ^^^^^^ help: change this to: `state` [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/day17.rs:92:23 [INFO] [stdout] | [INFO] [stdout] 92 | 3 => if get_a(&state) == 0 { inc_pc(&state) } else { set_pc(&state, operand) }, [INFO] [stdout] | ^^^^^^ help: change this to: `state` [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/day17.rs:92:45 [INFO] [stdout] | [INFO] [stdout] 92 | 3 => if get_a(&state) == 0 { inc_pc(&state) } else { set_pc(&state, operand) }, [INFO] [stdout] | ^^^^^^ help: change this to: `state` [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/day17.rs:92:69 [INFO] [stdout] | [INFO] [stdout] 92 | 3 => if get_a(&state) == 0 { inc_pc(&state) } else { set_pc(&state, operand) }, [INFO] [stdout] | ^^^^^^ help: change this to: `state` [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/day17.rs:93:28 [INFO] [stdout] | [INFO] [stdout] 93 | 4 => inc_pc(&set_b(&state, get_b(&state) ^ get_c(&state))), [INFO] [stdout] | ^^^^^^ help: change this to: `state` [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/day17.rs:93:42 [INFO] [stdout] | [INFO] [stdout] 93 | 4 => inc_pc(&set_b(&state, get_b(&state) ^ get_c(&state))), [INFO] [stdout] | ^^^^^^ help: change this to: `state` [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/day17.rs:93:58 [INFO] [stdout] | [INFO] [stdout] 93 | 4 => inc_pc(&set_b(&state, get_b(&state) ^ get_c(&state))), [INFO] [stdout] | ^^^^^^ help: change this to: `state` [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/day17.rs:95:37 [INFO] [stdout] | [INFO] [stdout] 95 | output = Some((combo_op(&state, operand) % 8) as i32); [INFO] [stdout] | ^^^^^^ help: change this to: `state` [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/day17.rs:96:20 [INFO] [stdout] | [INFO] [stdout] 96 | inc_pc(&state) [INFO] [stdout] | ^^^^^^ help: change this to: `state` [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/day17.rs:98:28 [INFO] [stdout] | [INFO] [stdout] 98 | 6 => inc_pc(&set_b(&state, get_a(&state) / i64::pow(2, combo_op(&state, operand) as u32))), [INFO] [stdout] | ^^^^^^ help: change this to: `state` [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/day17.rs:98:42 [INFO] [stdout] | [INFO] [stdout] 98 | 6 => inc_pc(&set_b(&state, get_a(&state) / i64::pow(2, combo_op(&state, operand) as u32))), [INFO] [stdout] | ^^^^^^ help: change this to: `state` [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/day17.rs:98:73 [INFO] [stdout] | [INFO] [stdout] 98 | 6 => inc_pc(&set_b(&state, get_a(&state) / i64::pow(2, combo_op(&state, operand) as u32))), [INFO] [stdout] | ^^^^^^ help: change this to: `state` [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/day17.rs:99:28 [INFO] [stdout] | [INFO] [stdout] 99 | 7 => inc_pc(&set_c(&state, get_a(&state) / i64::pow(2, combo_op(&state, operand) as u32))), [INFO] [stdout] | ^^^^^^ help: change this to: `state` [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/day17.rs:99:42 [INFO] [stdout] | [INFO] [stdout] 99 | 7 => inc_pc(&set_c(&state, get_a(&state) / i64::pow(2, combo_op(&state, operand) as u32))), [INFO] [stdout] | ^^^^^^ help: change this to: `state` [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/day17.rs:99:73 [INFO] [stdout] | [INFO] [stdout] 99 | 7 => inc_pc(&set_c(&state, get_a(&state) / i64::pow(2, combo_op(&state, operand) as u32))), [INFO] [stdout] | ^^^^^^ help: change this to: `state` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> src/day17.rs:110:5 [INFO] [stdout] | [INFO] [stdout] 110 | / loop { [INFO] [stdout] 111 | | if let Some(res) = handle_opcode(&state, &program) { [INFO] [stdout] 112 | | state = res.0; [INFO] [stdout] 113 | | if let Some(out) = res.1 { [INFO] [stdout] ... | [INFO] [stdout] 119 | | } [INFO] [stdout] | |_____^ help: try: `while let Some(res) = handle_opcode(&state, &program) { .. }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] = note: `#[warn(clippy::while_let_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day17.rs:111:50 [INFO] [stdout] | [INFO] [stdout] 111 | if let Some(res) = handle_opcode(&state, &program) { [INFO] [stdout] | ^^^^^^^^ help: change this to: `program` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day17.rs:133:39 [INFO] [stdout] | [INFO] [stdout] 133 | let o = part1(®isters, &program); [INFO] [stdout] | ^^^^^^^^ help: change this to: `program` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day17.rs:159:19 [INFO] [stdout] | [INFO] [stdout] 159 | fn fmt_part1(out: &Vec) -> String { [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] 159 - fn fmt_part1(out: &Vec) -> String { [INFO] [stdout] 159 + fn fmt_part1(out: &[i32]) -> String { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `CostState` which implements the `Copy` trait [INFO] [stdout] --> src/day21_2.rs:224:24 [INFO] [stdout] | [INFO] [stdout] 224 | return (*cost, new_state.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*new_state` [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day18.rs:70:19 [INFO] [stdout] | [INFO] [stdout] 70 | fn part1(falling: &Vec>, num_steps: usize, size: Vec2) -> 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] 70 - fn part1(falling: &Vec>, num_steps: usize, size: Vec2) -> i32 { [INFO] [stdout] 70 + fn part1(falling: &[Vec2], num_steps: usize, size: Vec2) -> i32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `CostState` which implements the `Copy` trait [INFO] [stdout] --> src/day21_2.rs:271:9 [INFO] [stdout] | [INFO] [stdout] 271 | (c, new_state.clone()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `new_state` [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day18.rs:82:19 [INFO] [stdout] | [INFO] [stdout] 82 | fn part2(falling: &Vec>, size: Vec2) -> Vec2 { [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] 82 - fn part2(falling: &Vec>, size: Vec2) -> Vec2 { [INFO] [stdout] 82 + fn part2(falling: &[Vec2], size: Vec2) -> Vec2 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day18.rs:88:46 [INFO] [stdout] | [INFO] [stdout] 88 | if shortest_path(Vec2::zero(), size, &obstacles, Vec2::zero(), size).is_some() { [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `obstacles` [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: length comparison to zero [INFO] [stdout] --> src/day19.rs:8:21 [INFO] [stdout] | [INFO] [stdout] 8 | .filter(|t| t.len() > 0) [INFO] [stdout] | ^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!t.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/day19.rs:17:8 [INFO] [stdout] | [INFO] [stdout] 17 | if pattern.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `pattern.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `i32::abs()` to usize [INFO] [stdout] --> src/day21_4.rs:51:15 [INFO] [stdout] | [INFO] [stdout] 51 | .take(num_times.abs() as usize) [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: replace with: `num_times.unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `v` [INFO] [stdout] --> src/day2.rs:17:14 [INFO] [stdout] | [INFO] [stdout] 17 | for i in 1..v.len() { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 17 - for i in 1..v.len() { [INFO] [stdout] 17 + for in v.iter().skip(1) { [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/day2.rs:39:17 [INFO] [stdout] | [INFO] [stdout] 39 | fn part1(input: &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] 39 - fn part1(input: &Vec>) -> usize { [INFO] [stdout] 39 + fn part1(input: &[Vec]) -> usize { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day2.rs:45:17 [INFO] [stdout] | [INFO] [stdout] 45 | fn part2(input: &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] 45 - fn part2(input: &Vec>) -> usize { [INFO] [stdout] 45 + fn part2(input: &[Vec]) -> usize { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day21_4.rs:113:28 [INFO] [stdout] | [INFO] [stdout] 113 | if is_bad(pos, &combination, bad) { [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `combination` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/day21_4.rs:128:14 [INFO] [stdout] | [INFO] [stdout] 128 | .map(|s| cmd_processor(s)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `cmd_processor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day20.rs:55:17 [INFO] [stdout] | [INFO] [stdout] 55 | fn part1(track: &Vec>, min_shortcut: i32, cheat_length: 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] 55 - fn part1(track: &Vec>, min_shortcut: i32, cheat_length: i32) -> i32 { [INFO] [stdout] 55 + fn part1(track: &[Vec2], min_shortcut: i32, cheat_length: i32) -> i32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> src/day21_4.rs:185:13 [INFO] [stdout] | [INFO] [stdout] 185 | memo.get(&key).map(|c| c.clone()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `memo.get(&key).copied()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] = note: `#[warn(clippy::map_clone)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i64` which implements the `Copy` trait [INFO] [stdout] --> src/day21_4.rs:185:36 [INFO] [stdout] | [INFO] [stdout] 185 | memo.get(&key).map(|c| c.clone()) [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*c` [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: casting the result of `i32::abs()` to usize [INFO] [stdout] --> src/day21.rs:33:11 [INFO] [stdout] | [INFO] [stdout] 33 | .take(num_times.abs() as usize) [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: replace with: `num_times.unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] = note: `#[warn(clippy::cast_abs_to_unsigned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day21.rs:85:28 [INFO] [stdout] | [INFO] [stdout] 85 | fn dir_pad_sequences(code: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 85 - fn dir_pad_sequences(code: &Vec) -> Vec { [INFO] [stdout] 85 + fn dir_pad_sequences(code: &[Input]) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/day22.rs:43:5 [INFO] [stdout] | [INFO] [stdout] 42 | let secret = prune(mix(secret, secret * 2048)); [INFO] [stdout] | ----------------------------------------------- unnecessary `let` binding [INFO] [stdout] 43 | secret [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 42 ~ [INFO] [stdout] 43 ~ prune(mix(secret, secret * 2048)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/day22.rs:58:13 [INFO] [stdout] | [INFO] [stdout] 58 | s as i64 [INFO] [stdout] | ^^^^^^^^ help: try: `s` [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: called `unwrap` on `d0` after checking its variant with `is_some` [INFO] [stdout] --> src/day22.rs:83:28 [INFO] [stdout] | [INFO] [stdout] 82 | if d0.is_some() { [INFO] [stdout] | --------------- help: try: `if let Some() = d0` [INFO] [stdout] 83 | let key = (d0.unwrap(), d1.unwrap(), d2.unwrap(), d3.unwrap()); [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: iterating on a map's values [INFO] [stdout] --> src/day22.rs:96:5 [INFO] [stdout] | [INFO] [stdout] 96 | / best_sequences [INFO] [stdout] 97 | | .iter() [INFO] [stdout] 98 | | .map(|(_, v)| v.iter().sum()) [INFO] [stdout] | |_____________________________________^ help: try: `best_sequences.values().map(|v| v.iter().sum())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_kv_map [INFO] [stdout] = note: `#[warn(clippy::iter_kv_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/day22.rs:109:18 [INFO] [stdout] | [INFO] [stdout] 109 | .expect(format!("Could not parse `{l}` as int").as_str()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("Could not parse `{l}` as int"))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] = note: `#[warn(clippy::expect_fun_call)]` 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/day22.rs:131:35 [INFO] [stdout] | [INFO] [stdout] 131 | let secrets = parse_input(&input); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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/day22.rs:141:35 [INFO] [stdout] | [INFO] [stdout] 141 | let secrets = parse_input(&input); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/day21_2.rs:75:14 [INFO] [stdout] | [INFO] [stdout] 75 | cost_fn: fn(Vec2, Vec2, &ST, &mut T) -> (i32, ST), [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day23.rs:39:59 [INFO] [stdout] | [INFO] [stdout] 39 | if link_map.get(link_0).unwrap().contains(&link_1) { [INFO] [stdout] | ^^^^^^^ help: change this to: `link_1` [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/day23.rs:147:33 [INFO] [stdout] | [INFO] [stdout] 147 | let links = parse_input(&input); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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/day23.rs:186:33 [INFO] [stdout] | [INFO] [stdout] 186 | let links = parse_input(&input); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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 if-then-else expression returns a bool literal [INFO] [stdout] --> src/day24.rs:54:37 [INFO] [stdout] | [INFO] [stdout] 54 | .map(|(id, value)| (id, if value.trim() == "0" { false } else { true })), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can reduce it to: `value.trim() != "0"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Node<'_>` which implements the `Copy` trait [INFO] [stdout] --> src/day24.rs:78:87 [INFO] [stdout] | [INFO] [stdout] 78 | let nodes: HashMap<&str, Node> = HashMap::from_iter(nodes.iter().map(|n| (n.name, n.clone()))); [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*n` [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 `CostState` which implements the `Copy` trait [INFO] [stdout] --> src/day21_2.rs:224:24 [INFO] [stdout] | [INFO] [stdout] 224 | return (*cost, new_state.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*new_state` [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: function call inside of `expect` [INFO] [stdout] --> src/day24.rs:101:22 [INFO] [stdout] | [INFO] [stdout] 101 | .expect(format!("Invalid node {}", node.left).as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|| panic!("Invalid node {}", node.left))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/day24.rs:107:22 [INFO] [stdout] | [INFO] [stdout] 107 | .expect(format!("Invalid node {}", node.right).as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|| panic!("Invalid node {}", node.right))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `CostState` which implements the `Copy` trait [INFO] [stdout] --> src/day21_2.rs:271:9 [INFO] [stdout] | [INFO] [stdout] 271 | (c, new_state.clone()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `new_state` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day24.rs:124:33 [INFO] [stdout] | [INFO] [stdout] 124 | let values = resolve_values(&nodes, &values); [INFO] [stdout] | ^^^^^^ help: change this to: `nodes` [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/day24.rs:124:41 [INFO] [stdout] | [INFO] [stdout] 124 | let values = resolve_values(&nodes, &values); [INFO] [stdout] | ^^^^^^^ help: change this to: `values` [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: function call inside of `expect` [INFO] [stdout] --> src/day24.rs:149:14 [INFO] [stdout] | [INFO] [stdout] 149 | .expect(format!("Has not collected value for {z_node}").as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|| panic!("Has not collected value for {z_node}"))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/day24.rs:204:5 [INFO] [stdout] | [INFO] [stdout] 204 | return res; [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] 204 - return res; [INFO] [stdout] 204 + res [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `i32::abs()` to usize [INFO] [stdout] --> src/day21_4.rs:51:15 [INFO] [stdout] | [INFO] [stdout] 51 | .take(num_times.abs() as usize) [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: replace with: `num_times.unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to pop elements from a `Vec` in a loop [INFO] [stdout] --> src/day24.rs:166:9 [INFO] [stdout] | [INFO] [stdout] 166 | let (depth, top) = 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] help: consider using a `while..let` loop [INFO] [stdout] | [INFO] [stdout] 165 ~ while let Some((depth, top)) = stack.pop() { [INFO] [stdout] 166 ~ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day21_4.rs:113:28 [INFO] [stdout] | [INFO] [stdout] 113 | if is_bad(pos, &combination, bad) { [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `combination` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/day21_4.rs:128:14 [INFO] [stdout] | [INFO] [stdout] 128 | .map(|s| cmd_processor(s)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `cmd_processor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to pop elements from a `Vec` in a loop [INFO] [stdout] --> src/day24.rs:212:9 [INFO] [stdout] | [INFO] [stdout] 212 | let n = queue.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] help: consider using a `while..let` loop [INFO] [stdout] | [INFO] [stdout] 211 ~ while let Some(n) = queue.pop() { [INFO] [stdout] 212 ~ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day24.rs:241:33 [INFO] [stdout] | [INFO] [stdout] 241 | let output = resolve_values(&nodes, &values); [INFO] [stdout] | ^^^^^^ help: change this to: `nodes` [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/day24.rs:257:33 [INFO] [stdout] | [INFO] [stdout] 257 | let output = resolve_values(&nodes, &values); [INFO] [stdout] | ^^^^^^ help: change this to: `nodes` [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/day24.rs:274:33 [INFO] [stdout] | [INFO] [stdout] 274 | let output = resolve_values(&nodes, &values); [INFO] [stdout] | ^^^^^^ help: change this to: `nodes` [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: you are using an explicit closure for copying elements [INFO] [stdout] --> src/day21_4.rs:185:13 [INFO] [stdout] | [INFO] [stdout] 185 | memo.get(&key).map(|c| c.clone()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `memo.get(&key).copied()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] = note: `#[warn(clippy::map_clone)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i64` which implements the `Copy` trait [INFO] [stdout] --> src/day21_4.rs:185:36 [INFO] [stdout] | [INFO] [stdout] 185 | memo.get(&key).map(|c| c.clone()) [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*c` [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: returning the result of a `let` binding from a block [INFO] [stdout] --> src/day22.rs:43:5 [INFO] [stdout] | [INFO] [stdout] 42 | let secret = prune(mix(secret, secret * 2048)); [INFO] [stdout] | ----------------------------------------------- unnecessary `let` binding [INFO] [stdout] 43 | secret [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 42 ~ [INFO] [stdout] 43 ~ prune(mix(secret, secret * 2048)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day24.rs:345:37 [INFO] [stdout] | [INFO] [stdout] 345 | let output = resolve_values(&nodes, &values); [INFO] [stdout] | ^^^^^^ help: change this to: `nodes` [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: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/day22.rs:58:13 [INFO] [stdout] | [INFO] [stdout] 58 | s as i64 [INFO] [stdout] | ^^^^^^^^ help: try: `s` [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: called `unwrap` on `d0` after checking its variant with `is_some` [INFO] [stdout] --> src/day22.rs:83:28 [INFO] [stdout] | [INFO] [stdout] 82 | if d0.is_some() { [INFO] [stdout] | --------------- help: try: `if let Some() = d0` [INFO] [stdout] 83 | let key = (d0.unwrap(), d1.unwrap(), d2.unwrap(), d3.unwrap()); [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day24.rs:361:37 [INFO] [stdout] | [INFO] [stdout] 361 | let output = resolve_values(&nodes, &values); [INFO] [stdout] | ^^^^^^ help: change this to: `nodes` [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: iterating on a map's values [INFO] [stdout] --> src/day22.rs:96:5 [INFO] [stdout] | [INFO] [stdout] 96 | / best_sequences [INFO] [stdout] 97 | | .iter() [INFO] [stdout] 98 | | .map(|(_, v)| v.iter().sum()) [INFO] [stdout] | |_____________________________________^ help: try: `best_sequences.values().map(|v| v.iter().sum())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_kv_map [INFO] [stdout] = note: `#[warn(clippy::iter_kv_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day24.rs:373:37 [INFO] [stdout] | [INFO] [stdout] 373 | let output = resolve_values(&nodes, &values); [INFO] [stdout] | ^^^^^^ help: change this to: `nodes` [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: function call inside of `expect` [INFO] [stdout] --> src/day22.rs:109:18 [INFO] [stdout] | [INFO] [stdout] 109 | .expect(format!("Could not parse `{l}` as int").as_str()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("Could not parse `{l}` as int"))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] = note: `#[warn(clippy::expect_fun_call)]` 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/day23.rs:39:59 [INFO] [stdout] | [INFO] [stdout] 39 | if link_map.get(link_0).unwrap().contains(&link_1) { [INFO] [stdout] | ^^^^^^^ help: change this to: `link_1` [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/day24.rs:386:49 [INFO] [stdout] | [INFO] [stdout] 386 | let nodes_in_output = get_nodes(z_node, &nodes); [INFO] [stdout] | ^^^^^^ help: change this to: `nodes` [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/day24.rs:387:54 [INFO] [stdout] | [INFO] [stdout] 387 | let nodes_in_carry = get_nodes(z_carry_node, &nodes); [INFO] [stdout] | ^^^^^^ help: change this to: `nodes` [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 if-then-else expression returns a bool literal [INFO] [stdout] --> src/day24.rs:54:37 [INFO] [stdout] | [INFO] [stdout] 54 | .map(|(id, value)| (id, if value.trim() == "0" { false } else { true })), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can reduce it to: `value.trim() != "0"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/day24.rs:427:19 [INFO] [stdout] | [INFO] [stdout] 427 | let mut best: Option<(Vec, [&(String, String); 4])> = None; [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: using `clone` on type `Node<'_>` which implements the `Copy` trait [INFO] [stdout] --> src/day24.rs:78:87 [INFO] [stdout] | [INFO] [stdout] 78 | let nodes: HashMap<&str, Node> = HashMap::from_iter(nodes.iter().map(|n| (n.name, n.clone()))); [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*n` [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: useless conversion to the same type: `std::vec::Vec` [INFO] [stdout] --> src/day24.rs:457:26 [INFO] [stdout] | [INFO] [stdout] 457 | best = Some((failed_bits.clone().into(), [swap_0, swap_1, swap_2, swap_3])); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `failed_bits.clone()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/day24.rs:101:22 [INFO] [stdout] | [INFO] [stdout] 101 | .expect(format!("Invalid node {}", node.left).as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|| panic!("Invalid node {}", node.left))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day24.rs:562:43 [INFO] [stdout] | [INFO] [stdout] 562 | let (nodes, values) = parse_input(&input); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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: function call inside of `expect` [INFO] [stdout] --> src/day24.rs:107:22 [INFO] [stdout] | [INFO] [stdout] 107 | .expect(format!("Invalid node {}", node.right).as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|| panic!("Invalid node {}", node.right))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day24.rs:124:33 [INFO] [stdout] | [INFO] [stdout] 124 | let values = resolve_values(&nodes, &values); [INFO] [stdout] | ^^^^^^ help: change this to: `nodes` [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/day25.rs:102:41 [INFO] [stdout] | [INFO] [stdout] 102 | let (keys, locks) = parse_input(&input); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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/day24.rs:124:41 [INFO] [stdout] | [INFO] [stdout] 124 | let values = resolve_values(&nodes, &values); [INFO] [stdout] | ^^^^^^^ help: change this to: `values` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day4.rs:3:25 [INFO] [stdout] | [INFO] [stdout] 3 | fn check_pattern(input: &Vec>, x: usize, y: usize, dx: i32, dy: i32, search: &Vec) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 3 - fn check_pattern(input: &Vec>, x: usize, y: usize, dx: i32, dy: i32, search: &Vec) -> bool { [INFO] [stdout] 3 + fn check_pattern(input: &[Vec], x: usize, y: usize, dx: i32, dy: i32, search: &Vec) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/day24.rs:149:14 [INFO] [stdout] | [INFO] [stdout] 149 | .expect(format!("Has not collected value for {z_node}").as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|| panic!("Has not collected value for {z_node}"))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day4.rs:3:88 [INFO] [stdout] | [INFO] [stdout] 3 | fn check_pattern(input: &Vec>, x: usize, y: usize, dx: i32, dy: i32, search: &Vec) -> bool { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 3 - fn check_pattern(input: &Vec>, x: usize, y: usize, dx: i32, dy: i32, search: &Vec) -> bool { [INFO] [stdout] 3 + fn check_pattern(input: &Vec>, x: usize, y: usize, dx: i32, dy: i32, search: &[char]) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/day24.rs:204:5 [INFO] [stdout] | [INFO] [stdout] 204 | return res; [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] 204 - return res; [INFO] [stdout] 204 + res [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `search` [INFO] [stdout] --> src/day4.rs:7:14 [INFO] [stdout] | [INFO] [stdout] 7 | for i in 1..search.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] 7 - for i in 1..search.len() { [INFO] [stdout] 7 + for (i, ) in search.iter().enumerate().skip(1) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day4.rs:32:38 [INFO] [stdout] | [INFO] [stdout] 32 | if check_pattern(&input, x, y, dx, dy, &search) { [INFO] [stdout] | ^^^^^^ help: change this to: `input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day4.rs:43:22 [INFO] [stdout] | [INFO] [stdout] 43 | fn is_m_and_s(input: &Vec>, x: usize, y: usize, (dx, dy): (i32, i32)) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 43 - fn is_m_and_s(input: &Vec>, x: usize, y: usize, (dx, dy): (i32, i32)) -> bool { [INFO] [stdout] 43 + fn is_m_and_s(input: &[Vec], x: usize, y: usize, (dx, dy): (i32, i32)) -> bool { [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/day24.rs:166:9 [INFO] [stdout] | [INFO] [stdout] 166 | let (depth, top) = 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] help: consider using a `while..let` loop [INFO] [stdout] | [INFO] [stdout] 165 ~ while let Some((depth, top)) = stack.pop() { [INFO] [stdout] 166 ~ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/day4.rs:61:13 [INFO] [stdout] | [INFO] [stdout] 61 | / if input[x][y] == 'A' { [INFO] [stdout] 62 | | if is_m_and_s(&input, x, y, patterns[0]) && is_m_and_s(&input, x, y, patterns[1]) { [INFO] [stdout] 63 | | count += 1; [INFO] [stdout] 64 | | } [INFO] [stdout] 65 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 61 ~ if input[x][y] == 'A' [INFO] [stdout] 62 ~ && is_m_and_s(&input, x, y, patterns[0]) && is_m_and_s(&input, x, y, patterns[1]) { [INFO] [stdout] 63 | count += 1; [INFO] [stdout] 64 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day4.rs:62:31 [INFO] [stdout] | [INFO] [stdout] 62 | if is_m_and_s(&input, x, y, patterns[0]) && is_m_and_s(&input, x, y, patterns[1]) { [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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: you seem to be trying to pop elements from a `Vec` in a loop [INFO] [stdout] --> src/day24.rs:212:9 [INFO] [stdout] | [INFO] [stdout] 212 | let n = queue.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] help: consider using a `while..let` loop [INFO] [stdout] | [INFO] [stdout] 211 ~ while let Some(n) = queue.pop() { [INFO] [stdout] 212 ~ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day4.rs:62:72 [INFO] [stdout] | [INFO] [stdout] 62 | if is_m_and_s(&input, x, y, patterns[0]) && is_m_and_s(&input, x, y, patterns[1]) { [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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/day24.rs:241:33 [INFO] [stdout] | [INFO] [stdout] 241 | let output = resolve_values(&nodes, &values); [INFO] [stdout] | ^^^^^^ help: change this to: `nodes` [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/day5.rs:4:28 [INFO] [stdout] | [INFO] [stdout] 4 | fn is_valid_update(update: &Vec, rules: &Vec<(i32, i32)>) -> bool { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 4 - fn is_valid_update(update: &Vec, rules: &Vec<(i32, i32)>) -> bool { [INFO] [stdout] 4 + fn is_valid_update(update: &[i32], rules: &Vec<(i32, i32)>) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day24.rs:257:33 [INFO] [stdout] | [INFO] [stdout] 257 | let output = resolve_values(&nodes, &values); [INFO] [stdout] | ^^^^^^ help: change this to: `nodes` [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/day5.rs:29:36 [INFO] [stdout] | [INFO] [stdout] 29 | if is_valid_update(update, &rules) { [INFO] [stdout] | ^^^^^^ help: change this to: `rules` [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/day24.rs:274:33 [INFO] [stdout] | [INFO] [stdout] 274 | let output = resolve_values(&nodes, &values); [INFO] [stdout] | ^^^^^^ help: change this to: `nodes` [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/day24.rs:345:37 [INFO] [stdout] | [INFO] [stdout] 345 | let output = resolve_values(&nodes, &values); [INFO] [stdout] | ^^^^^^ help: change this to: `nodes` [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/day5.rs:36:48 [INFO] [stdout] | [INFO] [stdout] 36 | fn fix_update(rules: &Vec<(i32, i32)>, update: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 36 - fn fix_update(rules: &Vec<(i32, i32)>, update: &Vec) -> Vec { [INFO] [stdout] 36 + fn fix_update(rules: &Vec<(i32, i32)>, update: &[i32]) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day5.rs:60:37 [INFO] [stdout] | [INFO] [stdout] 60 | if !is_valid_update(update, &rules) { [INFO] [stdout] | ^^^^^^ help: change this to: `rules` [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/day5.rs:61:52 [INFO] [stdout] | [INFO] [stdout] 61 | invalid_updates.push(fix_update(rules, &update)); [INFO] [stdout] | ^^^^^^^ help: change this to: `update` [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/day24.rs:361:37 [INFO] [stdout] | [INFO] [stdout] 361 | let output = resolve_values(&nodes, &values); [INFO] [stdout] | ^^^^^^ help: change this to: `nodes` [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/day24.rs:373:37 [INFO] [stdout] | [INFO] [stdout] 373 | let output = resolve_values(&nodes, &values); [INFO] [stdout] | ^^^^^^ help: change this to: `nodes` [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: unnecessary map of the identity function [INFO] [stdout] --> src/day5.rs:65:39 [INFO] [stdout] | [INFO] [stdout] 65 | middle_sum(&invalid_updates.iter().map(|v| v).collect()) [INFO] [stdout] | ^^^^^^^^^^^ help: remove the call to `map` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_identity [INFO] [stdout] = note: `#[warn(clippy::map_identity)]` 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/day24.rs:386:49 [INFO] [stdout] | [INFO] [stdout] 386 | let nodes_in_output = get_nodes(z_node, &nodes); [INFO] [stdout] | ^^^^^^ help: change this to: `nodes` [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/day24.rs:387:54 [INFO] [stdout] | [INFO] [stdout] 387 | let nodes_in_carry = get_nodes(z_carry_node, &nodes); [INFO] [stdout] | ^^^^^^ help: change this to: `nodes` [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: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/day24.rs:427:19 [INFO] [stdout] | [INFO] [stdout] 427 | let mut best: Option<(Vec, [&(String, String); 4])> = None; [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: useless conversion to the same type: `std::vec::Vec` [INFO] [stdout] --> src/day24.rs:457:26 [INFO] [stdout] | [INFO] [stdout] 457 | best = Some((failed_bits.clone().into(), [swap_0, swap_1, swap_2, swap_3])); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `failed_bits.clone()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day6.rs:106:37 [INFO] [stdout] | [INFO] [stdout] 106 | backtrack(current_pos, forward, &obstacles, size, &mut visited); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `obstacles` [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/day6.rs:120:45 [INFO] [stdout] | [INFO] [stdout] 120 | backtrack(current_pos, forward, &obstacles, size, &mut visited); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `obstacles` [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: binary comparison to literal `Option::None` [INFO] [stdout] --> src/day6.rs:155:16 [INFO] [stdout] | [INFO] [stdout] 155 | if part1(guard_pos, (0, -1), &obstacles, size) == None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `part1(guard_pos, (0, -1), &obstacles, size).is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] = note: `#[warn(clippy::partialeq_to_none)]` 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/day6.rs:189:56 [INFO] [stdout] | [INFO] [stdout] 189 | let (guard_pos, obstacles, size) = parse_input(&input); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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/day6.rs:205:56 [INFO] [stdout] | [INFO] [stdout] 205 | let (guard_pos, obstacles, size) = parse_input(&input); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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: length comparison to zero [INFO] [stdout] --> src/day7.rs:10:15 [INFO] [stdout] | [INFO] [stdout] 10 | } else if nums.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `nums.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day4.rs:3:25 [INFO] [stdout] | [INFO] [stdout] 3 | fn check_pattern(input: &Vec>, x: usize, y: usize, dx: i32, dy: i32, search: &Vec) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 3 - fn check_pattern(input: &Vec>, x: usize, y: usize, dx: i32, dy: i32, search: &Vec) -> bool { [INFO] [stdout] 3 + fn check_pattern(input: &[Vec], x: usize, y: usize, dx: i32, dy: i32, search: &Vec) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day7.rs:19:17 [INFO] [stdout] | [INFO] [stdout] 19 | fn part1(input: &Vec<(i64, Vec)>) -> i64 { [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] 19 - fn part1(input: &Vec<(i64, Vec)>) -> i64 { [INFO] [stdout] 19 + fn part1(input: &[(i64, Vec)]) -> i64 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day4.rs:3:88 [INFO] [stdout] | [INFO] [stdout] 3 | fn check_pattern(input: &Vec>, x: usize, y: usize, dx: i32, dy: i32, search: &Vec) -> bool { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 3 - fn check_pattern(input: &Vec>, x: usize, y: usize, dx: i32, dy: i32, search: &Vec) -> bool { [INFO] [stdout] 3 + fn check_pattern(input: &Vec>, x: usize, y: usize, dx: i32, dy: i32, search: &[char]) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `search` [INFO] [stdout] --> src/day4.rs:7:14 [INFO] [stdout] | [INFO] [stdout] 7 | for i in 1..search.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] 7 - for i in 1..search.len() { [INFO] [stdout] 7 + for (i, ) in search.iter().enumerate().skip(1) { [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/day7.rs:26:17 [INFO] [stdout] | [INFO] [stdout] 26 | fn part2(input: &Vec<(i64, Vec)>) -> i64 { [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] 26 - fn part2(input: &Vec<(i64, Vec)>) -> i64 { [INFO] [stdout] 26 + fn part2(input: &[(i64, Vec)]) -> i64 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day4.rs:32:38 [INFO] [stdout] | [INFO] [stdout] 32 | if check_pattern(&input, x, y, dx, dy, &search) { [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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/day7.rs:66:29 [INFO] [stdout] | [INFO] [stdout] 66 | let p = parse_input(&input); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day4.rs:43:22 [INFO] [stdout] | [INFO] [stdout] 43 | fn is_m_and_s(input: &Vec>, x: usize, y: usize, (dx, dy): (i32, i32)) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 43 - fn is_m_and_s(input: &Vec>, x: usize, y: usize, (dx, dy): (i32, i32)) -> bool { [INFO] [stdout] 43 + fn is_m_and_s(input: &[Vec], x: usize, y: usize, (dx, dy): (i32, i32)) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day7.rs:81:29 [INFO] [stdout] | [INFO] [stdout] 81 | let p = parse_input(&input); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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 `if` statement can be collapsed [INFO] [stdout] --> src/day4.rs:61:13 [INFO] [stdout] | [INFO] [stdout] 61 | / if input[x][y] == 'A' { [INFO] [stdout] 62 | | if is_m_and_s(&input, x, y, patterns[0]) && is_m_and_s(&input, x, y, patterns[1]) { [INFO] [stdout] 63 | | count += 1; [INFO] [stdout] 64 | | } [INFO] [stdout] 65 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 61 ~ if input[x][y] == 'A' [INFO] [stdout] 62 ~ && is_m_and_s(&input, x, y, patterns[0]) && is_m_and_s(&input, x, y, patterns[1]) { [INFO] [stdout] 63 | count += 1; [INFO] [stdout] 64 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day4.rs:62:31 [INFO] [stdout] | [INFO] [stdout] 62 | if is_m_and_s(&input, x, y, patterns[0]) && is_m_and_s(&input, x, y, patterns[1]) { [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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/day4.rs:62:72 [INFO] [stdout] | [INFO] [stdout] 62 | if is_m_and_s(&input, x, y, patterns[0]) && is_m_and_s(&input, x, y, patterns[1]) { [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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: manual implementation of an assign operation [INFO] [stdout] --> src/day8.rs:39:9 [INFO] [stdout] | [INFO] [stdout] 39 | freq = freq + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: replace it with: `freq += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day5.rs:4:28 [INFO] [stdout] | [INFO] [stdout] 4 | fn is_valid_update(update: &Vec, rules: &Vec<(i32, i32)>) -> bool { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 4 - fn is_valid_update(update: &Vec, rules: &Vec<(i32, i32)>) -> bool { [INFO] [stdout] 4 + fn is_valid_update(update: &[i32], rules: &Vec<(i32, i32)>) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/day8.rs:67:10 [INFO] [stdout] | [INFO] [stdout] 67 | .map(|(y, line)| line.chars().enumerate() [INFO] [stdout] | __________^ [INFO] [stdout] 68 | | .filter(|(_, c)| *c != '.') [INFO] [stdout] 69 | | .map(move |(x, c)| (c, Vec2::new(x as i32, y as i32)))) [INFO] [stdout] 70 | | .flatten(); [INFO] [stdout] | |__________________^ [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] help: try replacing `map` with `flat_map` and remove the `.flatten()` [INFO] [stdout] | [INFO] [stdout] 67 ~ .flat_map(|(y, line)| line.chars().enumerate() [INFO] [stdout] 68 + .filter(|(_, c)| *c != '.') [INFO] [stdout] 69 ~ .map(move |(x, c)| (c, Vec2::new(x as i32, y as i32)))); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day8.rs:110:42 [INFO] [stdout] | [INFO] [stdout] 110 | let (towers, size) = parse_input(&input); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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/day5.rs:29:36 [INFO] [stdout] | [INFO] [stdout] 29 | if is_valid_update(update, &rules) { [INFO] [stdout] | ^^^^^^ help: change this to: `rules` [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/day5.rs:36:48 [INFO] [stdout] | [INFO] [stdout] 36 | fn fix_update(rules: &Vec<(i32, i32)>, update: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 36 - fn fix_update(rules: &Vec<(i32, i32)>, update: &Vec) -> Vec { [INFO] [stdout] 36 + fn fix_update(rules: &Vec<(i32, i32)>, update: &[i32]) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day5.rs:60:37 [INFO] [stdout] | [INFO] [stdout] 60 | if !is_valid_update(update, &rules) { [INFO] [stdout] | ^^^^^^ help: change this to: `rules` [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/day5.rs:61:52 [INFO] [stdout] | [INFO] [stdout] 61 | invalid_updates.push(fix_update(rules, &update)); [INFO] [stdout] | ^^^^^^^ help: change this to: `update` [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: unnecessary map of the identity function [INFO] [stdout] --> src/day5.rs:65:39 [INFO] [stdout] | [INFO] [stdout] 65 | middle_sum(&invalid_updates.iter().map(|v| v).collect()) [INFO] [stdout] | ^^^^^^^^^^^ help: remove the call to `map` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_identity [INFO] [stdout] = note: `#[warn(clippy::map_identity)]` 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/day8.rs:128:42 [INFO] [stdout] | [INFO] [stdout] 128 | let (towers, size) = parse_input(&input); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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/day9.rs:11:24 [INFO] [stdout] | [INFO] [stdout] 11 | fn checksum_disk(disk: &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] 11 - fn checksum_disk(disk: &Vec) -> u64 { [INFO] [stdout] 11 + fn checksum_disk(disk: &[DiskBlock]) -> u64 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day9.rs:22:21 [INFO] [stdout] | [INFO] [stdout] 22 | pub fn part1(input: &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] 22 - pub fn part1(input: &Vec) -> u64 { [INFO] [stdout] 22 + pub fn part1(input: &[DiskBlock]) -> u64 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day9.rs:46:21 [INFO] [stdout] | [INFO] [stdout] 46 | pub fn part2(input: &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] 46 ~ pub fn part2(input: &[DiskChunk]) -> u64 { [INFO] [stdout] 47 ~ let mut compressed = input.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/day9.rs:51:47 [INFO] [stdout] | [INFO] [stdout] 51 | let (old_block, old_size, old_free) = (&compressed[j]).clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `compressed[j]` [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/day6.rs:106:37 [INFO] [stdout] | [INFO] [stdout] 106 | backtrack(current_pos, forward, &obstacles, size, &mut visited); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `obstacles` [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/day6.rs:120:45 [INFO] [stdout] | [INFO] [stdout] 120 | backtrack(current_pos, forward, &obstacles, size, &mut visited); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `obstacles` [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/day9.rs:125:33 [INFO] [stdout] | [INFO] [stdout] 125 | let disk = parse_input1(&input); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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/day9.rs:132:33 [INFO] [stdout] | [INFO] [stdout] 132 | let disk = parse_input2(&input); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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: binary comparison to literal `Option::None` [INFO] [stdout] --> src/day6.rs:155:16 [INFO] [stdout] | [INFO] [stdout] 155 | if part1(guard_pos, (0, -1), &obstacles, size) == None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `part1(guard_pos, (0, -1), &obstacles, size).is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] = note: `#[warn(clippy::partialeq_to_none)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/day7.rs:10:15 [INFO] [stdout] | [INFO] [stdout] 10 | } else if nums.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `nums.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day7.rs:19:17 [INFO] [stdout] | [INFO] [stdout] 19 | fn part1(input: &Vec<(i64, Vec)>) -> i64 { [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] 19 - fn part1(input: &Vec<(i64, Vec)>) -> i64 { [INFO] [stdout] 19 + fn part1(input: &[(i64, Vec)]) -> i64 { [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/day7.rs:26:17 [INFO] [stdout] | [INFO] [stdout] 26 | fn part2(input: &Vec<(i64, Vec)>) -> i64 { [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] 26 - fn part2(input: &Vec<(i64, Vec)>) -> i64 { [INFO] [stdout] 26 + fn part2(input: &[(i64, Vec)]) -> i64 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/util/str_util.rs:26:32 [INFO] [stdout] | [INFO] [stdout] 26 | let result = transpose(&input); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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: manual implementation of an assign operation [INFO] [stdout] --> src/day8.rs:39:9 [INFO] [stdout] | [INFO] [stdout] 39 | freq = freq + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: replace it with: `freq += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/day8.rs:67:10 [INFO] [stdout] | [INFO] [stdout] 67 | .map(|(y, line)| line.chars().enumerate() [INFO] [stdout] | __________^ [INFO] [stdout] 68 | | .filter(|(_, c)| *c != '.') [INFO] [stdout] 69 | | .map(move |(x, c)| (c, Vec2::new(x as i32, y as i32)))) [INFO] [stdout] 70 | | .flatten(); [INFO] [stdout] | |__________________^ [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] help: try replacing `map` with `flat_map` and remove the `.flatten()` [INFO] [stdout] | [INFO] [stdout] 67 ~ .flat_map(|(y, line)| line.chars().enumerate() [INFO] [stdout] 68 + .filter(|(_, c)| *c != '.') [INFO] [stdout] 69 ~ .map(move |(x, c)| (c, Vec2::new(x as i32, y as 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/day9.rs:11:24 [INFO] [stdout] | [INFO] [stdout] 11 | fn checksum_disk(disk: &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] 11 - fn checksum_disk(disk: &Vec) -> u64 { [INFO] [stdout] 11 + fn checksum_disk(disk: &[DiskBlock]) -> u64 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day9.rs:22:21 [INFO] [stdout] | [INFO] [stdout] 22 | pub fn part1(input: &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] 22 - pub fn part1(input: &Vec) -> u64 { [INFO] [stdout] 22 + pub fn part1(input: &[DiskBlock]) -> u64 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/day12.rs:14:20 [INFO] [stdout] | [INFO] [stdout] 14 | let all_dirs = vec![Vec2::new(1, 0), Vec2::new(-1, 0), Vec2::new(0, 1), Vec2::new(0, -1)]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[Vec2::new(1, 0), Vec2::new(-1, 0), Vec2::new(0, 1), Vec2::new(0, -1)]` [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day9.rs:46:21 [INFO] [stdout] | [INFO] [stdout] 46 | pub fn part2(input: &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] 46 ~ pub fn part2(input: &[DiskChunk]) -> u64 { [INFO] [stdout] 47 ~ let mut compressed = input.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/day9.rs:51:47 [INFO] [stdout] | [INFO] [stdout] 51 | let (old_block, old_size, old_free) = (&compressed[j]).clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `compressed[j]` [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: useless use of `vec!` [INFO] [stdout] --> src/day12.rs:59:20 [INFO] [stdout] | [INFO] [stdout] 59 | let all_dirs = vec![Vec2::new(1, 0), Vec2::new(-1, 0), Vec2::new(0, 1), Vec2::new(0, -1)]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[Vec2::new(1, 0), Vec2::new(-1, 0), Vec2::new(0, 1), Vec2::new(0, -1)]` [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/day12.rs:72:20 [INFO] [stdout] | [INFO] [stdout] 72 | let all_dirs = vec![Vec2::new(1, 0), Vec2::new(-1, 0), Vec2::new(0, 1), Vec2::new(0, -1)]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[Vec2::new(1, 0), Vec2::new(-1, 0), Vec2::new(0, 1), Vec2::new(0, -1)]` [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/day12.rs:84:14 [INFO] [stdout] | [INFO] [stdout] 84 | !vec![Vec2::new(1, 0), Vec2::new(0, 1)].iter() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[Vec2::new(1, 0), Vec2::new(0, 1)]` [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/day14.rs:84:21 [INFO] [stdout] | [INFO] [stdout] 84 | let quadrants = vec![ [INFO] [stdout] | _____________________^ [INFO] [stdout] 85 | | Vec2::zero(), Vec2::new(half_size.x + 1, 0), [INFO] [stdout] 86 | | Vec2::new(0, half_size.y + 1), half_size + Vec2::one() [INFO] [stdout] 87 | | ]; [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] help: you can use an array directly [INFO] [stdout] | [INFO] [stdout] 84 ~ let quadrants = [Vec2::zero(), Vec2::new(half_size.x + 1, 0), [INFO] [stdout] 85 ~ Vec2::new(0, half_size.y + 1), half_size + Vec2::one()]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/day2.rs:68:44 [INFO] [stdout] | [INFO] [stdout] 68 | assert_eq!(true, is_correct_report(&vec!(1, 2, 3, 4, 5))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: you can use a slice directly: `&[1, 2, 3, 4, 5]` [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/day2.rs:73:44 [INFO] [stdout] | [INFO] [stdout] 73 | assert_eq!(true, is_correct_report(&vec!(1, 2, 3, 4, 5))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: you can use a slice directly: `&[1, 2, 3, 4, 5]` [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/day2.rs:78:44 [INFO] [stdout] | [INFO] [stdout] 78 | assert_eq!(true, is_correct_report(&vec!(1, 2, 3, 4, 7))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: you can use a slice directly: `&[1, 2, 3, 4, 7]` [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/day2.rs:83:45 [INFO] [stdout] | [INFO] [stdout] 83 | assert_eq!(false, is_correct_report(&vec!(1, 2, 1, 2, 3))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: you can use a slice directly: `&[1, 2, 1, 2, 3]` [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/day2.rs:88:45 [INFO] [stdout] | [INFO] [stdout] 88 | assert_eq!(false, is_correct_report(&vec!(1, 2, 3, 4, 8))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: you can use a slice directly: `&[1, 2, 3, 4, 8]` [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/day2.rs:93:45 [INFO] [stdout] | [INFO] [stdout] 93 | assert_eq!(false, is_correct_report(&vec!(1, 2, 2, 4, 5))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: you can use a slice directly: `&[1, 2, 2, 4, 5]` [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/day2.rs:99:50 [INFO] [stdout] | [INFO] [stdout] 99 | assert_eq!(true, is_correct_report_p2_v2(&vec!(1, 2, 3, 4, 10))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: you can use a slice directly: `&[1, 2, 3, 4, 10]` [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/day2.rs:104:50 [INFO] [stdout] | [INFO] [stdout] 104 | assert_eq!(true, is_correct_report_p2_v2(&vec!(1, 2, 1, 3, 4, 5))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: you can use a slice directly: `&[1, 2, 1, 3, 4, 5]` [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/day2.rs:109:50 [INFO] [stdout] | [INFO] [stdout] 109 | assert_eq!(true, is_correct_report_p2_v2(&vec!(20, 2, 3, 4, 5))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: you can use a slice directly: `&[20, 2, 3, 4, 5]` [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/day2.rs:114:50 [INFO] [stdout] | [INFO] [stdout] 114 | assert_eq!(true, is_correct_report_p2_v2(&vec!(8, 6, 4, 4, 1))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: you can use a slice directly: `&[8, 6, 4, 4, 1]` [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/day2.rs:119:50 [INFO] [stdout] | [INFO] [stdout] 119 | assert_eq!(true, is_correct_report_p2_v2(&vec!(8, 7, 4, 4, 1))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: you can use a slice directly: `&[8, 7, 4, 4, 1]` [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/day2.rs:124:51 [INFO] [stdout] | [INFO] [stdout] 124 | assert_eq!(false, is_correct_report_p2_v2(&vec!(1, 2, 1, 3, 4, 10))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use a slice directly: `&[1, 2, 1, 3, 4, 10]` [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/day2.rs:129:51 [INFO] [stdout] | [INFO] [stdout] 129 | assert_eq!(false, is_correct_report_p2_v2(&vec!(9, 7, 6, 2, 1))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: you can use a slice directly: `&[9, 7, 6, 2, 1]` [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/day24.rs:461:26 [INFO] [stdout] | [INFO] [stdout] 461 | let mut sw = vec![ [INFO] [stdout] | __________________________^ [INFO] [stdout] 462 | | swap_0.clone().0.clone(), [INFO] [stdout] 463 | | swap_0.clone().1.clone(), [INFO] [stdout] 464 | | swap_1.clone().0.clone(), [INFO] [stdout] ... | [INFO] [stdout] 469 | | swap_3.clone().1.clone(), [INFO] [stdout] 470 | | ]; [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] help: you can use an array directly [INFO] [stdout] | [INFO] [stdout] 461 ~ let mut sw = [swap_0.clone().0.clone(), [INFO] [stdout] 462 + swap_0.clone().1.clone(), [INFO] [stdout] 463 + swap_1.clone().0.clone(), [INFO] [stdout] 464 + swap_1.clone().1.clone(), [INFO] [stdout] 465 + swap_2.clone().0.clone(), [INFO] [stdout] 466 + swap_2.clone().1.clone(), [INFO] [stdout] 467 + swap_3.clone().0.clone(), [INFO] [stdout] 468 ~ swap_3.clone().1.clone()]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `B` should have a snake case name [INFO] [stdout] --> src/day13.rs:106:9 [INFO] [stdout] | [INFO] [stdout] 106 | let B = (a.y * p.x - a.x * p.y) / (a.y * b.x - a.x * b.y); [INFO] [stdout] | ^ help: convert the identifier to snake case: `b` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` (part of `#[warn(nonstandard_style)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `A` should have a snake case name [INFO] [stdout] --> src/day13.rs:107:9 [INFO] [stdout] | [INFO] [stdout] 107 | let A = (p.y - B * b.y) / a.y; [INFO] [stdout] | ^ help: convert the identifier to snake case: `a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/day23.rs:8:23 [INFO] [stdout] | [INFO] [stdout] 8 | fn parse_input(input: &str) -> Vec { [INFO] [stdout] | ^^^^ ^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 8 | fn parse_input(input: &str) -> Vec> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/day24.rs:47:23 [INFO] [stdout] | [INFO] [stdout] 47 | fn parse_input(input: &str) -> (Vec, NodeValues) { [INFO] [stdout] | ^^^^ ^^^^ ^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | | [INFO] [stdout] | | the same lifetime is hidden here [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 47 | fn parse_input(input: &str) -> (Vec>, NodeValues<'_>) { [INFO] [stdout] | ++++ ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `.clone()` on a double reference, which returns `(std::string::String, std::string::String)` instead of cloning the inner type [INFO] [stdout] --> src/day24.rs:462:23 [INFO] [stdout] | [INFO] [stdout] 462 | swap_0.clone().0.clone(), [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(suspicious_double_ref_op)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `.clone()` on a double reference, which returns `(std::string::String, std::string::String)` instead of cloning the inner type [INFO] [stdout] --> src/day24.rs:463:23 [INFO] [stdout] | [INFO] [stdout] 463 | swap_0.clone().1.clone(), [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `.clone()` on a double reference, which returns `(std::string::String, std::string::String)` instead of cloning the inner type [INFO] [stdout] --> src/day24.rs:464:23 [INFO] [stdout] | [INFO] [stdout] 464 | swap_1.clone().0.clone(), [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `.clone()` on a double reference, which returns `(std::string::String, std::string::String)` instead of cloning the inner type [INFO] [stdout] --> src/day24.rs:465:23 [INFO] [stdout] | [INFO] [stdout] 465 | swap_1.clone().1.clone(), [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `.clone()` on a double reference, which returns `(std::string::String, std::string::String)` instead of cloning the inner type [INFO] [stdout] --> src/day24.rs:466:23 [INFO] [stdout] | [INFO] [stdout] 466 | swap_2.clone().0.clone(), [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `.clone()` on a double reference, which returns `(std::string::String, std::string::String)` instead of cloning the inner type [INFO] [stdout] --> src/day24.rs:467:23 [INFO] [stdout] | [INFO] [stdout] 467 | swap_2.clone().1.clone(), [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `.clone()` on a double reference, which returns `(std::string::String, std::string::String)` instead of cloning the inner type [INFO] [stdout] --> src/day24.rs:468:23 [INFO] [stdout] | [INFO] [stdout] 468 | swap_3.clone().0.clone(), [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `.clone()` on a double reference, which returns `(std::string::String, std::string::String)` instead of cloning the inner type [INFO] [stdout] --> src/day24.rs:469:23 [INFO] [stdout] | [INFO] [stdout] 469 | swap_3.clone().1.clone(), [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/day12.rs:14:20 [INFO] [stdout] | [INFO] [stdout] 14 | let all_dirs = vec![Vec2::new(1, 0), Vec2::new(-1, 0), Vec2::new(0, 1), Vec2::new(0, -1)]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[Vec2::new(1, 0), Vec2::new(-1, 0), Vec2::new(0, 1), Vec2::new(0, -1)]` [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/day12.rs:59:20 [INFO] [stdout] | [INFO] [stdout] 59 | let all_dirs = vec![Vec2::new(1, 0), Vec2::new(-1, 0), Vec2::new(0, 1), Vec2::new(0, -1)]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[Vec2::new(1, 0), Vec2::new(-1, 0), Vec2::new(0, 1), Vec2::new(0, -1)]` [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/day12.rs:72:20 [INFO] [stdout] | [INFO] [stdout] 72 | let all_dirs = vec![Vec2::new(1, 0), Vec2::new(-1, 0), Vec2::new(0, 1), Vec2::new(0, -1)]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[Vec2::new(1, 0), Vec2::new(-1, 0), Vec2::new(0, 1), Vec2::new(0, -1)]` [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/day12.rs:84:14 [INFO] [stdout] | [INFO] [stdout] 84 | !vec![Vec2::new(1, 0), Vec2::new(0, 1)].iter() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[Vec2::new(1, 0), Vec2::new(0, 1)]` [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/day14.rs:84:21 [INFO] [stdout] | [INFO] [stdout] 84 | let quadrants = vec![ [INFO] [stdout] | _____________________^ [INFO] [stdout] 85 | | Vec2::zero(), Vec2::new(half_size.x + 1, 0), [INFO] [stdout] 86 | | Vec2::new(0, half_size.y + 1), half_size + Vec2::one() [INFO] [stdout] 87 | | ]; [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] help: you can use an array directly [INFO] [stdout] | [INFO] [stdout] 84 ~ let quadrants = [Vec2::zero(), Vec2::new(half_size.x + 1, 0), [INFO] [stdout] 85 ~ Vec2::new(0, half_size.y + 1), half_size + Vec2::one()]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/day24.rs:461:26 [INFO] [stdout] | [INFO] [stdout] 461 | let mut sw = vec![ [INFO] [stdout] | __________________________^ [INFO] [stdout] 462 | | swap_0.clone().0.clone(), [INFO] [stdout] 463 | | swap_0.clone().1.clone(), [INFO] [stdout] 464 | | swap_1.clone().0.clone(), [INFO] [stdout] ... | [INFO] [stdout] 469 | | swap_3.clone().1.clone(), [INFO] [stdout] 470 | | ]; [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] help: you can use an array directly [INFO] [stdout] | [INFO] [stdout] 461 ~ let mut sw = [swap_0.clone().0.clone(), [INFO] [stdout] 462 + swap_0.clone().1.clone(), [INFO] [stdout] 463 + swap_1.clone().0.clone(), [INFO] [stdout] 464 + swap_1.clone().1.clone(), [INFO] [stdout] 465 + swap_2.clone().0.clone(), [INFO] [stdout] 466 + swap_2.clone().1.clone(), [INFO] [stdout] 467 + swap_3.clone().0.clone(), [INFO] [stdout] 468 ~ swap_3.clone().1.clone()]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `B` should have a snake case name [INFO] [stdout] --> src/day13.rs:106:9 [INFO] [stdout] | [INFO] [stdout] 106 | let B = (a.y * p.x - a.x * p.y) / (a.y * b.x - a.x * b.y); [INFO] [stdout] | ^ help: convert the identifier to snake case: `b` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` (part of `#[warn(nonstandard_style)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `A` should have a snake case name [INFO] [stdout] --> src/day13.rs:107:9 [INFO] [stdout] | [INFO] [stdout] 107 | let A = (p.y - B * b.y) / a.y; [INFO] [stdout] | ^ help: convert the identifier to snake case: `a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/day23.rs:8:23 [INFO] [stdout] | [INFO] [stdout] 8 | fn parse_input(input: &str) -> Vec { [INFO] [stdout] | ^^^^ ^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 8 | fn parse_input(input: &str) -> Vec> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/day24.rs:47:23 [INFO] [stdout] | [INFO] [stdout] 47 | fn parse_input(input: &str) -> (Vec, NodeValues) { [INFO] [stdout] | ^^^^ ^^^^ ^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | | [INFO] [stdout] | | the same lifetime is hidden here [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 47 | fn parse_input(input: &str) -> (Vec>, NodeValues<'_>) { [INFO] [stdout] | ++++ ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `.clone()` on a double reference, which returns `(std::string::String, std::string::String)` instead of cloning the inner type [INFO] [stdout] --> src/day24.rs:462:23 [INFO] [stdout] | [INFO] [stdout] 462 | swap_0.clone().0.clone(), [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(suspicious_double_ref_op)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `.clone()` on a double reference, which returns `(std::string::String, std::string::String)` instead of cloning the inner type [INFO] [stdout] --> src/day24.rs:463:23 [INFO] [stdout] | [INFO] [stdout] 463 | swap_0.clone().1.clone(), [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `.clone()` on a double reference, which returns `(std::string::String, std::string::String)` instead of cloning the inner type [INFO] [stdout] --> src/day24.rs:464:23 [INFO] [stdout] | [INFO] [stdout] 464 | swap_1.clone().0.clone(), [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `.clone()` on a double reference, which returns `(std::string::String, std::string::String)` instead of cloning the inner type [INFO] [stdout] --> src/day24.rs:465:23 [INFO] [stdout] | [INFO] [stdout] 465 | swap_1.clone().1.clone(), [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `.clone()` on a double reference, which returns `(std::string::String, std::string::String)` instead of cloning the inner type [INFO] [stdout] --> src/day24.rs:466:23 [INFO] [stdout] | [INFO] [stdout] 466 | swap_2.clone().0.clone(), [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `.clone()` on a double reference, which returns `(std::string::String, std::string::String)` instead of cloning the inner type [INFO] [stdout] --> src/day24.rs:467:23 [INFO] [stdout] | [INFO] [stdout] 467 | swap_2.clone().1.clone(), [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `.clone()` on a double reference, which returns `(std::string::String, std::string::String)` instead of cloning the inner type [INFO] [stdout] --> src/day24.rs:468:23 [INFO] [stdout] | [INFO] [stdout] 468 | swap_3.clone().0.clone(), [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `.clone()` on a double reference, which returns `(std::string::String, std::string::String)` instead of cloning the inner type [INFO] [stdout] --> src/day24.rs:469:23 [INFO] [stdout] | [INFO] [stdout] 469 | swap_3.clone().1.clone(), [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 5.75s [INFO] running `Command { std: "docker" "inspect" "4c98807786811ea6a130f51ab1066a0d78ae0571723ddc90e878f95198e1fcc3", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "4c98807786811ea6a130f51ab1066a0d78ae0571723ddc90e878f95198e1fcc3", kill_on_drop: false }` [INFO] [stdout] 4c98807786811ea6a130f51ab1066a0d78ae0571723ddc90e878f95198e1fcc3