[INFO] cloning repository https://github.com/venom1270/AdventOfCode-2022 [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/venom1270/AdventOfCode-2022" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fvenom1270%2FAdventOfCode-2022", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fvenom1270%2FAdventOfCode-2022'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 6db3cb054be9ae7c587592701c8ff88fbba3a00c [INFO] linting venom1270/AdventOfCode-2022 against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fvenom1270%2FAdventOfCode-2022" "/workspace/builds/worker-4-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-4-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/venom1270/AdventOfCode-2022 [INFO] finished tweaking git repo https://github.com/venom1270/AdventOfCode-2022 [INFO] tweaked toml for git repo https://github.com/venom1270/AdventOfCode-2022 written to /workspace/builds/worker-4-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/venom1270/AdventOfCode-2022 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/venom1270/AdventOfCode-2022 already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-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] 9a6b7f7218c5d7d77c90ac21382ea7aa25cf7f01c1341c5d0a5738a9d2d1b053 [INFO] running `Command { std: "docker" "start" "-a" "9a6b7f7218c5d7d77c90ac21382ea7aa25cf7f01c1341c5d0a5738a9d2d1b053", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "9a6b7f7218c5d7d77c90ac21382ea7aa25cf7f01c1341c5d0a5738a9d2d1b053", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "9a6b7f7218c5d7d77c90ac21382ea7aa25cf7f01c1341c5d0a5738a9d2d1b053", kill_on_drop: false }` [INFO] [stdout] 9a6b7f7218c5d7d77c90ac21382ea7aa25cf7f01c1341c5d0a5738a9d2d1b053 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-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] bbebb856920ed63f0f09fb5bf9ed78530ce4e010db2585cf1c89abbc4c2797b7 [INFO] running `Command { std: "docker" "start" "-a" "bbebb856920ed63f0f09fb5bf9ed78530ce4e010db2585cf1c89abbc4c2797b7", kill_on_drop: false }` [INFO] [stderr] Checking advent_of_code_2022 v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unnecessary parentheses around assigned value [INFO] [stdout] --> src/day3/day3.rs:23:41 [INFO] [stdout] | [INFO] [stdout] 23 | ... priority += (c as u32 - 65 + 27); [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] 23 - priority += (c as u32 - 65 + 27); [INFO] [stdout] 23 + priority += c as u32 - 65 + 27 ; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around assigned value [INFO] [stdout] --> src/day3/day3.rs:25:41 [INFO] [stdout] | [INFO] [stdout] 25 | ... priority += (c as u32 - 97 + 1); [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 25 - priority += (c as u32 - 97 + 1); [INFO] [stdout] 25 + priority += c as u32 - 97 + 1 ; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around assigned value [INFO] [stdout] --> src/day3/day3.rs:23:41 [INFO] [stdout] | [INFO] [stdout] 23 | ... priority += (c as u32 - 65 + 27); [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] 23 - priority += (c as u32 - 65 + 27); [INFO] [stdout] 23 + priority += c as u32 - 65 + 27 ; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around assigned value [INFO] [stdout] --> src/day3/day3.rs:25:41 [INFO] [stdout] | [INFO] [stdout] 25 | ... priority += (c as u32 - 97 + 1); [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 25 - priority += (c as u32 - 97 + 1); [INFO] [stdout] 25 + priority += c as u32 - 97 + 1 ; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `>= y + 1` or `x - 1 >=` [INFO] [stdout] --> src/day12/day12.rs:73:12 [INFO] [stdout] | [INFO] [stdout] 73 | if i as i32-1 >= 0 && grid.get((i-1) as usize).unwrap().get(j as usize).unwrap() <= &(val+1) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change it to: `i as i32 > 0` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#int_plus_one [INFO] [stdout] = note: `#[warn(clippy::int_plus_one)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `>= y + 1` or `x - 1 >=` [INFO] [stdout] --> src/day12/day12.rs:76:12 [INFO] [stdout] | [INFO] [stdout] 76 | if j as i32 -1 >= 0 && grid.get(i as usize).unwrap().get((j-1) as usize).unwrap() <= &(val+1) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change it to: `j as i32 > 0` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#int_plus_one [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `>= y + 1` or `x - 1 >=` [INFO] [stdout] --> src/day12/day12.rs:121:12 [INFO] [stdout] | [INFO] [stdout] 121 | if i as i32-1 >= 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change it to: `i as i32 > 0` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#int_plus_one [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `>= y + 1` or `x - 1 >=` [INFO] [stdout] --> src/day12/day12.rs:127:12 [INFO] [stdout] | [INFO] [stdout] 127 | if j as i32-1 >= 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change it to: `j as i32 > 0` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#int_plus_one [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `>= y + 1` or `x - 1 >=` [INFO] [stdout] --> src/day12/day12.rs:73:12 [INFO] [stdout] | [INFO] [stdout] 73 | if i as i32-1 >= 0 && grid.get((i-1) as usize).unwrap().get(j as usize).unwrap() <= &(val+1) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change it to: `i as i32 > 0` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#int_plus_one [INFO] [stdout] = note: `#[warn(clippy::int_plus_one)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `>= y + 1` or `x - 1 >=` [INFO] [stdout] --> src/day12/day12.rs:76:12 [INFO] [stdout] | [INFO] [stdout] 76 | if j as i32 -1 >= 0 && grid.get(i as usize).unwrap().get((j-1) as usize).unwrap() <= &(val+1) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change it to: `j as i32 > 0` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#int_plus_one [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `>= y + 1` or `x - 1 >=` [INFO] [stdout] --> src/day12/day12.rs:121:12 [INFO] [stdout] | [INFO] [stdout] 121 | if i as i32-1 >= 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change it to: `i as i32 > 0` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#int_plus_one [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `>= y + 1` or `x - 1 >=` [INFO] [stdout] --> src/day12/day12.rs:127:12 [INFO] [stdout] | [INFO] [stdout] 127 | if j as i32-1 >= 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change it to: `j as i32 > 0` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#int_plus_one [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `min` [INFO] [stdout] --> src/day16/day16.rs:3:20 [INFO] [stdout] | [INFO] [stdout] 3 | use std::cmp::{max,min}; [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `max` and `min` [INFO] [stdout] --> src/day17/day17.rs:3:16 [INFO] [stdout] | [INFO] [stdout] 3 | use std::cmp::{max,min}; [INFO] [stdout] | ^^^ ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `min` [INFO] [stdout] --> src/day16/day16.rs:3:20 [INFO] [stdout] | [INFO] [stdout] 3 | use std::cmp::{max,min}; [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `max` and `min` [INFO] [stdout] --> src/day17/day17.rs:3:16 [INFO] [stdout] | [INFO] [stdout] 3 | use std::cmp::{max,min}; [INFO] [stdout] | ^^^ ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `max` and `min` [INFO] [stdout] --> src/day18/day18.rs:5:16 [INFO] [stdout] | [INFO] [stdout] 5 | use std::cmp::{max,min}; [INFO] [stdout] | ^^^ ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::HashSet` [INFO] [stdout] --> src/day19/day19.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use std::collections::HashSet; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `max` and `min` [INFO] [stdout] --> src/day19/day19.rs:5:16 [INFO] [stdout] | [INFO] [stdout] 5 | use std::cmp::{max,min}; [INFO] [stdout] | ^^^ ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `max` and `min` [INFO] [stdout] --> src/day18/day18.rs:5:16 [INFO] [stdout] | [INFO] [stdout] 5 | use std::cmp::{max,min}; [INFO] [stdout] | ^^^ ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `max` and `min` [INFO] [stdout] --> src/day22/day22.rs:3:16 [INFO] [stdout] | [INFO] [stdout] 3 | use std::cmp::{min,max}; [INFO] [stdout] | ^^^ ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::HashSet` [INFO] [stdout] --> src/day19/day19.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use std::collections::HashSet; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `max` and `min` [INFO] [stdout] --> src/day19/day19.rs:5:16 [INFO] [stdout] | [INFO] [stdout] 5 | use std::cmp::{max,min}; [INFO] [stdout] | ^^^ ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `HashSet` [INFO] [stdout] --> src/day23/day23.rs:2:24 [INFO] [stdout] | [INFO] [stdout] 2 | use std::collections::{HashSet, HashMap}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `max` and `min` [INFO] [stdout] --> src/day22/day22.rs:3:16 [INFO] [stdout] | [INFO] [stdout] 3 | use std::cmp::{min,max}; [INFO] [stdout] | ^^^ ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `HashSet` [INFO] [stdout] --> src/day23/day23.rs:2:24 [INFO] [stdout] | [INFO] [stdout] 2 | use std::collections::{HashSet, HashMap}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `VecDeque` [INFO] [stdout] --> src/day24/day24.rs:2:42 [INFO] [stdout] | [INFO] [stdout] 2 | use std::collections::{HashSet, HashMap, VecDeque, BinaryHeap}; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `max` and `min` [INFO] [stdout] --> src/day24/day24.rs:3:16 [INFO] [stdout] | [INFO] [stdout] 3 | use std::cmp::{min,max, Ordering}; [INFO] [stdout] | ^^^ ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `VecDeque` [INFO] [stdout] --> src/day24/day24.rs:2:42 [INFO] [stdout] | [INFO] [stdout] 2 | use std::collections::{HashSet, HashMap, VecDeque, BinaryHeap}; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `max` and `min` [INFO] [stdout] --> src/day24/day24.rs:3:16 [INFO] [stdout] | [INFO] [stdout] 3 | use std::cmp::{min,max, Ordering}; [INFO] [stdout] | ^^^ ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `path` is never read [INFO] [stdout] --> src/day7/day7.rs:119:24 [INFO] [stdout] | [INFO] [stdout] 119 | let mut path = "".to_string(); [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: `tail_visited_len` [INFO] [stdout] --> src/day9/day9.rs:10:9 [INFO] [stdout] | [INFO] [stdout] 10 | let tail_visited_len = tail_visited.len(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_tail_visited_len` [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/day9/day9.rs:127:9 [INFO] [stdout] | [INFO] [stdout] 127 | for mut hs in tails_visited.iter_mut() { [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: value assigned to `val` is never read [INFO] [stdout] --> src/day11/day11.rs:39:23 [INFO] [stdout] | [INFO] [stdout] 39 | let mut val = 0; [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/day11/day11.rs:137:17 [INFO] [stdout] | [INFO] [stdout] 137 | for i in 0..9 { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/day11/day11.rs:145:17 [INFO] [stdout] | [INFO] [stdout] 145 | for i in 0..9 { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `round` [INFO] [stdout] --> src/day11/day11.rs:203:9 [INFO] [stdout] | [INFO] [stdout] 203 | for round in 0..ROUNDS { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_round` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `throws` is never read [INFO] [stdout] --> src/day11/day11.rs:192:39 [INFO] [stdout] | [INFO] [stdout] 192 | let mut throws: Vec<(u32, u32)> = Default::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `j` is never read [INFO] [stdout] --> src/day12/day12.rs:13:21 [INFO] [stdout] | [INFO] [stdout] 13 | let mut j = 0; [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `start` [INFO] [stdout] --> src/day12/day12.rs:91:10 [INFO] [stdout] | [INFO] [stdout] 91 | fn part2(start: (u32, u32), end: (u32, u32), grid: &Vec>) { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_start` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `path` is never read [INFO] [stdout] --> src/day7/day7.rs:119:24 [INFO] [stdout] | [INFO] [stdout] 119 | let mut path = "".to_string(); [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: variable does not need to be mutable [INFO] [stdout] --> src/day15/day15.rs:104:17 [INFO] [stdout] | [INFO] [stdout] 104 | let mut int_vec = &intervals[y as usize]; [INFO] [stdout] | ----^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `x_bound` is never read [INFO] [stdout] --> src/day15/day15.rs:96:31 [INFO] [stdout] | [INFO] [stdout] 96 | let mut x_bound = 0; [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/day16/day16.rs:51:118 [INFO] [stdout] | [INFO] [stdout] 51 | ...ashMap, current: String, time: i32, mut pressure: u32, memo: &mut HashMap<(String, i32), u32>) -> (u32, HashMap src/day16/day16.rs:102:140 [INFO] [stdout] | [INFO] [stdout] 102 | ..., bool>, me: String, elephant: String, time: i32, mut pressure: u32, memo: &mut HashMap<(String, String, i32), u32>) -> u32{ [INFO] [stdout] | ----^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `pressure_increase` is never read [INFO] [stdout] --> src/day16/day16.rs:174:33 [INFO] [stdout] | [INFO] [stdout] 174 | let mut pressure_increase = 0; [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `pressure_increase` is never read [INFO] [stdout] --> src/day16/day16.rs:196:33 [INFO] [stdout] | [INFO] [stdout] 196 | let mut pressure_increase = 0; [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `tail_visited_len` [INFO] [stdout] --> src/day9/day9.rs:10:9 [INFO] [stdout] | [INFO] [stdout] 10 | let tail_visited_len = tail_visited.len(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_tail_visited_len` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `op` [INFO] [stdout] --> src/day16/day16.rs:233:24 [INFO] [stdout] | [INFO] [stdout] 233 | let (max_pressure, op) = release_pressure(&valves, &mut opened, "AA".to_string(), 30, 0, memo); [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_op` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `coord_adjust` is never read [INFO] [stdout] --> src/day17/day17.rs:83:32 [INFO] [stdout] | [INFO] [stdout] 83 | let mut coord_adjust = 0; [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `coord_adjust` is never read [INFO] [stdout] --> src/day17/day17.rs:103:36 [INFO] [stdout] | [INFO] [stdout] 103 | let mut coord_adjust = 0; [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/day9/day9.rs:127:9 [INFO] [stdout] | [INFO] [stdout] 127 | for mut hs in tails_visited.iter_mut() { [INFO] [stdout] | ----^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/day18/day18.rs:11:15 [INFO] [stdout] | [INFO] [stdout] 11 | if let Ok(mut lines) = read_lines(file_path) { [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `val` is never read [INFO] [stdout] --> src/day11/day11.rs:39:23 [INFO] [stdout] | [INFO] [stdout] 39 | let mut val = 0; [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `size` is never read [INFO] [stdout] --> src/day18/day18.rs:124:20 [INFO] [stdout] | [INFO] [stdout] 124 | let mut size = 0; [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/day11/day11.rs:137:17 [INFO] [stdout] | [INFO] [stdout] 137 | for i in 0..9 { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `size` is never read [INFO] [stdout] --> src/day18/day18.rs:127:9 [INFO] [stdout] | [INFO] [stdout] 127 | size += 6; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `size` is never read [INFO] [stdout] --> src/day18/day18.rs:149:9 [INFO] [stdout] | [INFO] [stdout] 149 | size += 0; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `size` is never read [INFO] [stdout] --> src/day18/day18.rs:136:17 [INFO] [stdout] | [INFO] [stdout] 136 | size -= 2; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `size` is never read [INFO] [stdout] --> src/day18/day18.rs:141:17 [INFO] [stdout] | [INFO] [stdout] 141 | size -= 2; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `size` is never read [INFO] [stdout] --> src/day18/day18.rs:146:17 [INFO] [stdout] | [INFO] [stdout] 146 | size -= 2; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/day19/day19.rs:94:9 [INFO] [stdout] | [INFO] [stdout] 94 | let mut memo2: HashMap = Default::default(); [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/day19/day19.rs:116:21 [INFO] [stdout] | [INFO] [stdout] 116 | if let Some(mut m) = memo3.get_mut(&s.time) { [INFO] [stdout] | ----^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `memo2` [INFO] [stdout] --> src/day19/day19.rs:94:9 [INFO] [stdout] | [INFO] [stdout] 94 | let mut memo2: HashMap = Default::default(); [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_memo2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/day11/day11.rs:145:17 [INFO] [stdout] | [INFO] [stdout] 145 | for i in 0..9 { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `round` [INFO] [stdout] --> src/day11/day11.rs:203:9 [INFO] [stdout] | [INFO] [stdout] 203 | for round in 0..ROUNDS { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_round` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `throws` is never read [INFO] [stdout] --> src/day11/day11.rs:192:39 [INFO] [stdout] | [INFO] [stdout] 192 | let mut throws: Vec<(u32, u32)> = Default::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `j` is never read [INFO] [stdout] --> src/day12/day12.rs:13:21 [INFO] [stdout] | [INFO] [stdout] 13 | let mut j = 0; [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `start` [INFO] [stdout] --> src/day12/day12.rs:91:10 [INFO] [stdout] | [INFO] [stdout] 91 | fn part2(start: (u32, u32), end: (u32, u32), grid: &Vec>) { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_start` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/day20/day20.rs:63:10 [INFO] [stdout] | [INFO] [stdout] 63 | for (i, n) in numbers.iter() { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/day20/day20.rs:77:9 [INFO] [stdout] | [INFO] [stdout] 77 | let mut original_numbers = parse_input(file_path); [INFO] [stdout] | ----^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `result` is never read [INFO] [stdout] --> src/day21/day21.rs:60:34 [INFO] [stdout] | [INFO] [stdout] 60 | let mut result = 0; [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `op` [INFO] [stdout] --> src/day21/day21.rs:86:39 [INFO] [stdout] | [INFO] [stdout] 86 | if let Activity::Operation(x, op, y) = (*a).clone() { [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_op` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `tile` is never read [INFO] [stdout] --> src/day22/day22.rs:37:36 [INFO] [stdout] | [INFO] [stdout] 37 | let mut tile = Tile::Open; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `map` [INFO] [stdout] --> src/day22/day22.rs:154:26 [INFO] [stdout] | [INFO] [stdout] 154 | fn find_wrap_around_cube(map: &HashMap<(u32, u32), Tile>, mut current_position: (u32, u32), mut direction: u32, areas: [(u32, u32, ... [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_map` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/day22/day22.rs:162:25 [INFO] [stdout] | [INFO] [stdout] 162 | let a = areas[3]; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/day22/day22.rs:173:25 [INFO] [stdout] | [INFO] [stdout] 173 | let a = areas[5]; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/day22/day22.rs:185:25 [INFO] [stdout] | [INFO] [stdout] 185 | let a = areas[4]; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/day22/day22.rs:192:25 [INFO] [stdout] | [INFO] [stdout] 192 | let a = areas[2]; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/day22/day22.rs:199:25 [INFO] [stdout] | [INFO] [stdout] 199 | let a = areas[5]; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/day22/day22.rs:215:25 [INFO] [stdout] | [INFO] [stdout] 215 | let a = areas[1]; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/day22/day22.rs:222:25 [INFO] [stdout] | [INFO] [stdout] 222 | let a = areas[3]; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/day22/day22.rs:234:25 [INFO] [stdout] | [INFO] [stdout] 234 | let a = areas[0]; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/day22/day22.rs:241:25 [INFO] [stdout] | [INFO] [stdout] 241 | let a = areas[2]; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/day22/day22.rs:253:25 [INFO] [stdout] | [INFO] [stdout] 253 | let a = areas[1]; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/day22/day22.rs:260:25 [INFO] [stdout] | [INFO] [stdout] 260 | let a = areas[5]; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/day22/day22.rs:272:25 [INFO] [stdout] | [INFO] [stdout] 272 | let a = areas[4]; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/day22/day22.rs:279:25 [INFO] [stdout] | [INFO] [stdout] 279 | let a = areas[1]; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/day22/day22.rs:290:25 [INFO] [stdout] | [INFO] [stdout] 290 | let a = areas[0]; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/day15/day15.rs:104:17 [INFO] [stdout] | [INFO] [stdout] 104 | let mut int_vec = &intervals[y as usize]; [INFO] [stdout] | ----^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `x_bound` is never read [INFO] [stdout] --> src/day15/day15.rs:96:31 [INFO] [stdout] | [INFO] [stdout] 96 | let mut x_bound = 0; [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/day16/day16.rs:51:118 [INFO] [stdout] | [INFO] [stdout] 51 | ...ashMap, current: String, time: i32, mut pressure: u32, memo: &mut HashMap<(String, i32), u32>) -> (u32, HashMap src/day23/day23.rs:107:18 [INFO] [stdout] | [INFO] [stdout] 107 | let mut k2 = (elf.x, elf.y); [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `k3` is never read [INFO] [stdout] --> src/day23/day23.rs:108:18 [INFO] [stdout] | [INFO] [stdout] 108 | let mut k3 = (elf.x, elf.y); [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/day16/day16.rs:102:140 [INFO] [stdout] | [INFO] [stdout] 102 | ..., bool>, me: String, elephant: String, time: i32, mut pressure: u32, memo: &mut HashMap<(String, String, i32), u32>) -> u32{ [INFO] [stdout] | ----^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `pressure_increase` is never read [INFO] [stdout] --> src/day16/day16.rs:174:33 [INFO] [stdout] | [INFO] [stdout] 174 | let mut pressure_increase = 0; [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `pressure_increase` is never read [INFO] [stdout] --> src/day16/day16.rs:196:33 [INFO] [stdout] | [INFO] [stdout] 196 | let mut pressure_increase = 0; [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `op` [INFO] [stdout] --> src/day16/day16.rs:233:24 [INFO] [stdout] | [INFO] [stdout] 233 | let (max_pressure, op) = release_pressure(&valves, &mut opened, "AA".to_string(), 30, 0, memo); [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_op` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `coord_adjust` is never read [INFO] [stdout] --> src/day17/day17.rs:83:32 [INFO] [stdout] | [INFO] [stdout] 83 | let mut coord_adjust = 0; [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `coord_adjust` is never read [INFO] [stdout] --> src/day17/day17.rs:103:36 [INFO] [stdout] | [INFO] [stdout] 103 | let mut coord_adjust = 0; [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day1` is never used [INFO] [stdout] --> src/main.rs:78:4 [INFO] [stdout] | [INFO] [stdout] 78 | fn day1() { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/day18/day18.rs:11:15 [INFO] [stdout] | [INFO] [stdout] 11 | if let Ok(mut lines) = read_lines(file_path) { [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day2` is never used [INFO] [stdout] --> src/main.rs:85:4 [INFO] [stdout] | [INFO] [stdout] 85 | fn day2() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day3` is never used [INFO] [stdout] --> src/main.rs:92:4 [INFO] [stdout] | [INFO] [stdout] 92 | fn day3() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day4` is never used [INFO] [stdout] --> src/main.rs:99:4 [INFO] [stdout] | [INFO] [stdout] 99 | fn day4() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day5` is never used [INFO] [stdout] --> src/main.rs:106:4 [INFO] [stdout] | [INFO] [stdout] 106 | fn day5() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day6` is never used [INFO] [stdout] --> src/main.rs:113:4 [INFO] [stdout] | [INFO] [stdout] 113 | fn day6() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day7` is never used [INFO] [stdout] --> src/main.rs:120:4 [INFO] [stdout] | [INFO] [stdout] 120 | fn day7() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day8` is never used [INFO] [stdout] --> src/main.rs:124:4 [INFO] [stdout] | [INFO] [stdout] 124 | fn day8() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day9` is never used [INFO] [stdout] --> src/main.rs:128:4 [INFO] [stdout] | [INFO] [stdout] 128 | fn day9() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day10` is never used [INFO] [stdout] --> src/main.rs:132:4 [INFO] [stdout] | [INFO] [stdout] 132 | fn day10() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day11` is never used [INFO] [stdout] --> src/main.rs:136:4 [INFO] [stdout] | [INFO] [stdout] 136 | fn day11() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day12` is never used [INFO] [stdout] --> src/main.rs:140:4 [INFO] [stdout] | [INFO] [stdout] 140 | fn day12() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day13` is never used [INFO] [stdout] --> src/main.rs:144:4 [INFO] [stdout] | [INFO] [stdout] 144 | fn day13() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day14` is never used [INFO] [stdout] --> src/main.rs:148:4 [INFO] [stdout] | [INFO] [stdout] 148 | fn day14() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day15` is never used [INFO] [stdout] --> src/main.rs:152:4 [INFO] [stdout] | [INFO] [stdout] 152 | fn day15() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day16` is never used [INFO] [stdout] --> src/main.rs:156:4 [INFO] [stdout] | [INFO] [stdout] 156 | fn day16() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day17` is never used [INFO] [stdout] --> src/main.rs:160:4 [INFO] [stdout] | [INFO] [stdout] 160 | fn day17() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day18` is never used [INFO] [stdout] --> src/main.rs:164:4 [INFO] [stdout] | [INFO] [stdout] 164 | fn day18() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day19` is never used [INFO] [stdout] --> src/main.rs:168:4 [INFO] [stdout] | [INFO] [stdout] 168 | fn day19() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day20` is never used [INFO] [stdout] --> src/main.rs:172:4 [INFO] [stdout] | [INFO] [stdout] 172 | fn day20() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day21` is never used [INFO] [stdout] --> src/main.rs:176:4 [INFO] [stdout] | [INFO] [stdout] 176 | fn day21() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day22` is never used [INFO] [stdout] --> src/main.rs:180:4 [INFO] [stdout] | [INFO] [stdout] 180 | fn day22() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day23` is never used [INFO] [stdout] --> src/main.rs:184:4 [INFO] [stdout] | [INFO] [stdout] 184 | fn day23() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day24` is never used [INFO] [stdout] --> src/main.rs:188:4 [INFO] [stdout] | [INFO] [stdout] 188 | fn day24() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part1` is never used [INFO] [stdout] --> src/day1/day1.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn part1() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part2` is never used [INFO] [stdout] --> src/day1/day1.rs:39:8 [INFO] [stdout] | [INFO] [stdout] 39 | pub fn part2() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part1` is never used [INFO] [stdout] --> src/day2/day2.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn part1() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part2` is never used [INFO] [stdout] --> src/day2/day2.rs:52:8 [INFO] [stdout] | [INFO] [stdout] 52 | pub fn part2() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part1` is never used [INFO] [stdout] --> src/day3/day3.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 4 | pub fn part1() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part2` is never used [INFO] [stdout] --> src/day3/day3.rs:41:8 [INFO] [stdout] | [INFO] [stdout] 41 | pub fn part2() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part1` is never used [INFO] [stdout] --> src/day4/day4.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn part1() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part2` is never used [INFO] [stdout] --> src/day4/day4.rs:36:8 [INFO] [stdout] | [INFO] [stdout] 36 | pub fn part2() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_input` is never used [INFO] [stdout] --> src/day5/day5.rs:5:4 [INFO] [stdout] | [INFO] [stdout] 5 | fn parse_input(file_path: String) -> ([VecDeque; 9], Vec<(u32, u32, u32)>) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part1` is never used [INFO] [stdout] --> src/day5/day5.rs:43:8 [INFO] [stdout] | [INFO] [stdout] 43 | pub fn part1() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part2` is never used [INFO] [stdout] --> src/day5/day5.rs:77:8 [INFO] [stdout] | [INFO] [stdout] 77 | pub fn part2() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part1` is never used [INFO] [stdout] --> src/day6/day6.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 4 | pub fn part1() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part2` is never used [INFO] [stdout] --> src/day6/day6.rs:31:8 [INFO] [stdout] | [INFO] [stdout] 31 | pub fn part2() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Directory` is never constructed [INFO] [stdout] --> src/day7/day7.rs:57:8 [INFO] [stdout] | [INFO] [stdout] 57 | struct Directory { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `add_file`, `add_directory2`, and `add_directory` are never used [INFO] [stdout] --> src/day7/day7.rs:67:12 [INFO] [stdout] | [INFO] [stdout] 66 | impl Directory { [INFO] [stdout] | -------------- associated items in this implementation [INFO] [stdout] 67 | pub fn new(name: String, path: String, id: i32, parent: i32) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 79 | pub fn add_file(&mut self, name: String, size: u32) { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 84 | pub fn add_directory2(&mut self, dir: &Directory) { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 93 | pub fn add_directory(&mut self, name: String, id: i32) { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `FileSystem` is never constructed [INFO] [stdout] --> src/day7/day7.rs:103:8 [INFO] [stdout] | [INFO] [stdout] 103 | struct FileSystem { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple associated items are never used [INFO] [stdout] --> src/day7/day7.rs:109:12 [INFO] [stdout] | [INFO] [stdout] 108 | impl FileSystem { [INFO] [stdout] | --------------- associated items in this implementation [INFO] [stdout] 109 | pub fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 117 | pub fn add_directory(&mut self, name: &str) { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 138 | pub fn add_file(&mut self, name: &str, size: u32) { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 146 | pub fn move_to_dir(&mut self, name: &str) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 168 | pub fn move_back(&mut self) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 178 | pub fn print_current_dir(&self) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 182 | pub fn to_root(&mut self) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 187 | pub fn get_directory(&self) -> &Directory { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 191 | pub fn get_directory_mut(&mut self) -> Option<&mut Directory> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 196 | pub fn get_directory_at_index(&self, index: i32) -> &Directory { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_input` is never used [INFO] [stdout] --> src/day7/day7.rs:202:4 [INFO] [stdout] | [INFO] [stdout] 202 | fn parse_input(file_path: &str) -> FileSystem{ [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `calculate_size` is never used [INFO] [stdout] --> src/day7/day7.rs:250:4 [INFO] [stdout] | [INFO] [stdout] 250 | fn calculate_size(dir: &Directory, fs: &FileSystem) -> (u32, u32) { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `calculate_freed_space` is never used [INFO] [stdout] --> src/day7/day7.rs:267:4 [INFO] [stdout] | [INFO] [stdout] 267 | fn calculate_freed_space(FULL_SIZE: u32, dir: &Directory, fs: &FileSystem) -> (u32, u32) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part1and2` is never used [INFO] [stdout] --> src/day7/day7.rs:284:8 [INFO] [stdout] | [INFO] [stdout] 284 | pub fn part1and2() { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_input` is never used [INFO] [stdout] --> src/day8/day8.rs:4:4 [INFO] [stdout] | [INFO] [stdout] 4 | fn parse_input(file_path: &str) -> Vec> { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `tree_visible` is never used [INFO] [stdout] --> src/day8/day8.rs:22:4 [INFO] [stdout] | [INFO] [stdout] 22 | fn tree_visible(grid: &Vec>, i: usize, j: usize) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `tree_score` is never used [INFO] [stdout] --> src/day8/day8.rs:51:4 [INFO] [stdout] | [INFO] [stdout] 51 | fn tree_score(grid: &Vec>, i: usize, j: usize) -> usize { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `solution` is never used [INFO] [stdout] --> src/day8/day8.rs:84:8 [INFO] [stdout] | [INFO] [stdout] 84 | pub fn solution() { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `reposition_tail` is never used [INFO] [stdout] --> src/day9/day9.rs:5:4 [INFO] [stdout] | [INFO] [stdout] 5 | fn reposition_tail(head: (i32, i32), tails: &mut [(i32, i32)], tails_visited: &mut [HashSet<(i32, i32)>], index: usize) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `is_negative_int` is never used [INFO] [stdout] --> src/day9/day9.rs:51:4 [INFO] [stdout] | [INFO] [stdout] 51 | fn is_negative_int(val: i32) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `print_map` is never used [INFO] [stdout] --> src/day9/day9.rs:59:4 [INFO] [stdout] | [INFO] [stdout] 59 | fn print_map(head: (i32, i32), tails: &[(i32, i32)]) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `print_visited` is never used [INFO] [stdout] --> src/day9/day9.rs:93:4 [INFO] [stdout] | [INFO] [stdout] 93 | fn print_visited(visited: &HashSet<(i32, i32)>) { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `solution` is never used [INFO] [stdout] --> src/day9/day9.rs:117:8 [INFO] [stdout] | [INFO] [stdout] 117 | pub fn solution() { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `solution` is never used [INFO] [stdout] --> src/day10/day10.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn solution() { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Operator` is never used [INFO] [stdout] --> src/day11/day11.rs:3:6 [INFO] [stdout] | [INFO] [stdout] 3 | enum Operator { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `OperationValue` is never used [INFO] [stdout] --> src/day11/day11.rs:10:6 [INFO] [stdout] | [INFO] [stdout] 10 | enum OperationValue { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Monkey` is never constructed [INFO] [stdout] --> src/day11/day11.rs:15:8 [INFO] [stdout] | [INFO] [stdout] 15 | struct Monkey { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `do_operation`, `inspect_part1`, `inspect_part2`, and `test` are never used [INFO] [stdout] --> src/day11/day11.rs:26:12 [INFO] [stdout] | [INFO] [stdout] 25 | impl Monkey { [INFO] [stdout] | ----------- associated items in this implementation [INFO] [stdout] 26 | pub fn new(id: u32, items: Vec, operation: (Operator, OperationValue), test_division: u32, test_true: u32, test_false: u32)... [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 38 | fn do_operation(&self, x: u32, lcm: u32) -> u32 { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 60 | pub fn inspect_part1(&mut self, lcm: u32) { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 65 | pub fn inspect_part2(&mut self, lcm: u32) { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 70 | pub fn test(&self, i: u32) -> u32 { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_input` is never used [INFO] [stdout] --> src/day11/day11.rs:79:4 [INFO] [stdout] | [INFO] [stdout] 79 | fn parse_input(file_path: String) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `lcm` is never used [INFO] [stdout] --> src/day11/day11.rs:163:4 [INFO] [stdout] | [INFO] [stdout] 163 | fn lcm(first: usize, second: usize) -> usize { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `gcd` is never used [INFO] [stdout] --> src/day11/day11.rs:167:4 [INFO] [stdout] | [INFO] [stdout] 167 | fn gcd(first: usize, second: usize) -> usize { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `solution` is never used [INFO] [stdout] --> src/day11/day11.rs:188:8 [INFO] [stdout] | [INFO] [stdout] 188 | pub fn solution() { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_input` is never used [INFO] [stdout] --> src/day12/day12.rs:4:4 [INFO] [stdout] | [INFO] [stdout] 4 | fn parse_input(file_path: String) -> ((u32, u32), (u32, u32), Vec>) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part1` is never used [INFO] [stdout] --> src/day12/day12.rs:47:4 [INFO] [stdout] | [INFO] [stdout] 47 | fn part1(start: (u32, u32), end: (u32, u32), grid: &Vec>) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part2` is never used [INFO] [stdout] --> src/day12/day12.rs:91:4 [INFO] [stdout] | [INFO] [stdout] 91 | fn part2(start: (u32, u32), end: (u32, u32), grid: &Vec>) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `solution` is never used [INFO] [stdout] --> src/day12/day12.rs:151:8 [INFO] [stdout] | [INFO] [stdout] 151 | pub fn solution() { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Element` is never used [INFO] [stdout] --> src/day13/day13.rs:3:6 [INFO] [stdout] | [INFO] [stdout] 3 | enum Element { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_input` is never used [INFO] [stdout] --> src/day13/day13.rs:8:4 [INFO] [stdout] | [INFO] [stdout] 8 | fn parse_input(file_path: String) -> Vec<(Vec, Vec)> { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `size` is never read [INFO] [stdout] --> src/day18/day18.rs:124:20 [INFO] [stdout] | [INFO] [stdout] 124 | let mut size = 0; [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `print_list` is never used [INFO] [stdout] --> src/day13/day13.rs:78:4 [INFO] [stdout] | [INFO] [stdout] 78 | fn print_list(list: &Vec) { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `size` is never read [INFO] [stdout] --> src/day18/day18.rs:127:9 [INFO] [stdout] | [INFO] [stdout] 127 | size += 6; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `size` is never read [INFO] [stdout] --> src/day18/day18.rs:149:9 [INFO] [stdout] | [INFO] [stdout] 149 | size += 0; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `check_lists` is never used [INFO] [stdout] --> src/day13/day13.rs:96:4 [INFO] [stdout] | [INFO] [stdout] 96 | fn check_lists(left: &Vec, right: &Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `solution` is never used [INFO] [stdout] --> src/day13/day13.rs:152:8 [INFO] [stdout] | [INFO] [stdout] 152 | pub fn solution() { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_tuple` is never used [INFO] [stdout] --> src/day14/day14.rs:5:4 [INFO] [stdout] | [INFO] [stdout] 5 | fn parse_tuple(s: String) -> (i32, i32) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_input` is never used [INFO] [stdout] --> src/day14/day14.rs:10:4 [INFO] [stdout] | [INFO] [stdout] 10 | fn parse_input(file_path: String) -> (i32, HashSet<(i32, i32)>) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `solution` is never used [INFO] [stdout] --> src/day14/day14.rs:63:8 [INFO] [stdout] | [INFO] [stdout] 63 | pub fn solution() { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Sensor` is never constructed [INFO] [stdout] --> src/day15/day15.rs:5:8 [INFO] [stdout] | [INFO] [stdout] 5 | struct Sensor { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_tuple` is never used [INFO] [stdout] --> src/day15/day15.rs:10:4 [INFO] [stdout] | [INFO] [stdout] 10 | fn parse_tuple(s: String) -> (i32, i32) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `size` is never read [INFO] [stdout] --> src/day18/day18.rs:136:17 [INFO] [stdout] | [INFO] [stdout] 136 | size -= 2; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_input` is never used [INFO] [stdout] --> src/day15/day15.rs:15:4 [INFO] [stdout] | [INFO] [stdout] 15 | fn parse_input(file_path: String) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `solution` is never used [INFO] [stdout] --> src/day15/day15.rs:51:8 [INFO] [stdout] | [INFO] [stdout] 51 | pub fn solution() { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `size` is never read [INFO] [stdout] --> src/day18/day18.rs:141:17 [INFO] [stdout] | [INFO] [stdout] 141 | size -= 2; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Valve` is never constructed [INFO] [stdout] --> src/day16/day16.rs:5:8 [INFO] [stdout] | [INFO] [stdout] 5 | struct Valve { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `size` is never read [INFO] [stdout] --> src/day18/day18.rs:146:17 [INFO] [stdout] | [INFO] [stdout] 146 | size -= 2; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_input` is never used [INFO] [stdout] --> src/day16/day16.rs:11:4 [INFO] [stdout] | [INFO] [stdout] 11 | fn parse_input(file_path: String) -> HashMap { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `release_pressure` is never used [INFO] [stdout] --> src/day16/day16.rs:51:4 [INFO] [stdout] | [INFO] [stdout] 51 | fn release_pressure(valves: &HashMap, opened: &mut HashMap, current: String, time: i32, mut pressure: u... [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `release_pressure_elephant` is never used [INFO] [stdout] --> src/day16/day16.rs:102:4 [INFO] [stdout] | [INFO] [stdout] 102 | fn release_pressure_elephant(valves: &HashMap, opened: &mut HashMap, me: String, elephant: String, tim... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `solution` is never used [INFO] [stdout] --> src/day16/day16.rs:223:8 [INFO] [stdout] | [INFO] [stdout] 223 | pub fn solution() { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Direction` is never used [INFO] [stdout] --> src/day17/day17.rs:5:6 [INFO] [stdout] | [INFO] [stdout] 5 | enum Direction { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `ShapeType` is never used [INFO] [stdout] --> src/day17/day17.rs:11:6 [INFO] [stdout] | [INFO] [stdout] 11 | enum ShapeType { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Shape` is never constructed [INFO] [stdout] --> src/day17/day17.rs:19:8 [INFO] [stdout] | [INFO] [stdout] 19 | struct Shape { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `can_move`, `move_shape`, `fall`, and `print_coords` are never used [INFO] [stdout] --> src/day17/day17.rs:24:12 [INFO] [stdout] | [INFO] [stdout] 23 | impl Shape { [INFO] [stdout] | ---------- associated items in this implementation [INFO] [stdout] 24 | pub fn new(shape_type: ShapeType, bottom_left_coord: (i64, i64)) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 82 | fn can_move(&self, dir: &Direction, board: &[[u32; AREA_HEIGHT]]) -> bool { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 101 | pub fn move_shape(&mut self, dir: &Direction, board: &[[u32; AREA_HEIGHT]]) -> bool { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 117 | pub fn fall(&mut self, board: &mut [[u32; AREA_HEIGHT]]) -> bool { [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 139 | pub fn print_coords(&self) { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_input` is never used [INFO] [stdout] --> src/day17/day17.rs:146:4 [INFO] [stdout] | [INFO] [stdout] 146 | fn parse_input(file_path: String) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `AREA_HEIGHT` is never used [INFO] [stdout] --> src/day17/day17.rs:168:7 [INFO] [stdout] | [INFO] [stdout] 168 | const AREA_HEIGHT: usize = 30000; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `solution` is never used [INFO] [stdout] --> src/day17/day17.rs:169:8 [INFO] [stdout] | [INFO] [stdout] 169 | pub fn solution() { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_input` is never used [INFO] [stdout] --> src/day18/day18.rs:7:4 [INFO] [stdout] | [INFO] [stdout] 7 | fn parse_input(file_path: String) -> Vec<(i32, i32, i32)> { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_surface_area` is never used [INFO] [stdout] --> src/day18/day18.rs:30:4 [INFO] [stdout] | [INFO] [stdout] 30 | fn get_surface_area(points: &Vec<(i32, i32, i32)>) -> (i32, HashSet<(i32, i32, i32)>) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `SEARCH_LIMIT` is never used [INFO] [stdout] --> src/day18/day18.rs:117:7 [INFO] [stdout] | [INFO] [stdout] 117 | const SEARCH_LIMIT: i32 = 20; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `air_bubble_surface` is never used [INFO] [stdout] --> src/day18/day18.rs:118:4 [INFO] [stdout] | [INFO] [stdout] 118 | fn air_bubble_surface(points: &Vec<(i32, i32, i32)>, visited: &mut HashSet<(i32, i32, i32)>, point: (i32, i32, i32)) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `solution` is never used [INFO] [stdout] --> src/day18/day18.rs:162:8 [INFO] [stdout] | [INFO] [stdout] 162 | pub fn solution() { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `RobotType` is never used [INFO] [stdout] --> src/day19/day19.rs:7:6 [INFO] [stdout] | [INFO] [stdout] 7 | enum RobotType { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Blueprint` is never constructed [INFO] [stdout] --> src/day19/day19.rs:13:8 [INFO] [stdout] | [INFO] [stdout] 13 | struct Blueprint { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `State` is never constructed [INFO] [stdout] --> src/day19/day19.rs:21:8 [INFO] [stdout] | [INFO] [stdout] 21 | struct State<'a> { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `advance_time`, `clone`, and `print` are never used [INFO] [stdout] --> src/day19/day19.rs:35:12 [INFO] [stdout] | [INFO] [stdout] 34 | impl<'a> State<'a> { [INFO] [stdout] | ------------------ associated items in this implementation [INFO] [stdout] 35 | pub fn new(blueprint: &'a Blueprint) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 51 | pub fn advance_time(&mut self) { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 68 | pub fn clone(&self) -> Self { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 84 | pub fn print(&self) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `simulate` is never used [INFO] [stdout] --> src/day19/day19.rs:91:4 [INFO] [stdout] | [INFO] [stdout] 91 | fn simulate(bp: &Blueprint, MINUTES: u32) -> u32{ [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_input` is never used [INFO] [stdout] --> src/day19/day19.rs:191:4 [INFO] [stdout] | [INFO] [stdout] 191 | fn parse_input(file_path: String) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `solution` is never used [INFO] [stdout] --> src/day19/day19.rs:243:8 [INFO] [stdout] | [INFO] [stdout] 243 | pub fn solution() { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_input` is never used [INFO] [stdout] --> src/day20/day20.rs:3:4 [INFO] [stdout] | [INFO] [stdout] 3 | fn parse_input(file_path: String) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `find_index` is never used [INFO] [stdout] --> src/day20/day20.rs:19:4 [INFO] [stdout] | [INFO] [stdout] 19 | fn find_index(numbers: &Vec<(usize, i64)>, i: usize) -> usize { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `print` is never used [INFO] [stdout] --> src/day20/day20.rs:30:4 [INFO] [stdout] | [INFO] [stdout] 30 | fn print(numbers: &Vec<(usize, i32)>) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `mix` is never used [INFO] [stdout] --> src/day20/day20.rs:37:4 [INFO] [stdout] | [INFO] [stdout] 37 | fn mix(original_numbers: &Vec, numbers: &mut Vec<(usize, i64)>) { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_coordinates` is never used [INFO] [stdout] --> src/day20/day20.rs:59:4 [INFO] [stdout] | [INFO] [stdout] 59 | fn get_coordinates(numbers: &Vec<(usize, i64)>) -> i64 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `solution` is never used [INFO] [stdout] --> src/day20/day20.rs:74:8 [INFO] [stdout] | [INFO] [stdout] 74 | pub fn solution() { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Op` is never used [INFO] [stdout] --> src/day21/day21.rs:5:6 [INFO] [stdout] | [INFO] [stdout] 5 | enum Op { [INFO] [stdout] | ^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Activity` is never used [INFO] [stdout] --> src/day21/day21.rs:12:6 [INFO] [stdout] | [INFO] [stdout] 12 | enum Activity { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_input` is never used [INFO] [stdout] --> src/day21/day21.rs:17:4 [INFO] [stdout] | [INFO] [stdout] 17 | fn parse_input(file_path: String) -> HashMap { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `solve` is never used [INFO] [stdout] --> src/day21/day21.rs:53:4 [INFO] [stdout] | [INFO] [stdout] 53 | fn solve(current: &String, monkeys: &HashMap) -> i64 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `solution` is never used [INFO] [stdout] --> src/day21/day21.rs:76:8 [INFO] [stdout] | [INFO] [stdout] 76 | pub fn solution() { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Tile` is never used [INFO] [stdout] --> src/day22/day22.rs:5:6 [INFO] [stdout] | [INFO] [stdout] 5 | enum Tile { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_input` is never used [INFO] [stdout] --> src/day22/day22.rs:10:4 [INFO] [stdout] | [INFO] [stdout] 10 | fn parse_input(file_path: String) -> (HashMap<(u32, u32), Tile>, Vec<(u32, i32)>, [(u32, u32, u32, u32); 6]) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `find_start_position` is never used [INFO] [stdout] --> src/day22/day22.rs:108:4 [INFO] [stdout] | [INFO] [stdout] 108 | fn find_start_position(map: &HashMap<(u32, u32), Tile>) -> (u32, u32) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `find_wrap_around` is never used [INFO] [stdout] --> src/day22/day22.rs:119:4 [INFO] [stdout] | [INFO] [stdout] 119 | fn find_wrap_around(map: &HashMap<(u32, u32), Tile>, mut current_position: (u32, u32), direction: u32) -> (u32, u32) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/day19/day19.rs:94:9 [INFO] [stdout] | [INFO] [stdout] 94 | let mut memo2: HashMap = Default::default(); [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/day19/day19.rs:116:21 [INFO] [stdout] | [INFO] [stdout] 116 | if let Some(mut m) = memo3.get_mut(&s.time) { [INFO] [stdout] | ----^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `memo2` [INFO] [stdout] --> src/day19/day19.rs:94:9 [INFO] [stdout] | [INFO] [stdout] 94 | let mut memo2: HashMap = Default::default(); [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_memo2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_area` is never used [INFO] [stdout] --> src/day22/day22.rs:142:4 [INFO] [stdout] | [INFO] [stdout] 142 | fn get_area(areas: [(u32, u32, u32, u32); 6], current_position: (u32, u32)) -> u32 { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `find_wrap_around_cube` is never used [INFO] [stdout] --> src/day22/day22.rs:154:4 [INFO] [stdout] | [INFO] [stdout] 154 | fn find_wrap_around_cube(map: &HashMap<(u32, u32), Tile>, mut current_position: (u32, u32), mut direction: u32, areas: [(u32, u32, ... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `solve` is never used [INFO] [stdout] --> src/day22/day22.rs:307:4 [INFO] [stdout] | [INFO] [stdout] 307 | fn solve(map: &HashMap<(u32, u32), Tile>, directions: &Vec<(u32, i32)>, areas: [(u32, u32, u32, u32); 6], cube_wrapping: bool) -> u... [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `solution` is never used [INFO] [stdout] --> src/day22/day22.rs:361:8 [INFO] [stdout] | [INFO] [stdout] 361 | pub fn solution() { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Elf` is never constructed [INFO] [stdout] --> src/day23/day23.rs:5:8 [INFO] [stdout] | [INFO] [stdout] 5 | struct Elf { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Direction` is never used [INFO] [stdout] --> src/day23/day23.rs:12:6 [INFO] [stdout] | [INFO] [stdout] 12 | enum Direction { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_input` is never used [INFO] [stdout] --> src/day23/day23.rs:19:4 [INFO] [stdout] | [INFO] [stdout] 19 | fn parse_input(file_path: String) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_rectangle_size` is never used [INFO] [stdout] --> src/day23/day23.rs:38:4 [INFO] [stdout] | [INFO] [stdout] 38 | fn get_rectangle_size(elves: &Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `print_map` is never used [INFO] [stdout] --> src/day23/day23.rs:57:4 [INFO] [stdout] | [INFO] [stdout] 57 | fn print_map(elves: &Vec) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `propose` is never used [INFO] [stdout] --> src/day23/day23.rs:87:4 [INFO] [stdout] | [INFO] [stdout] 87 | fn propose(elves_map: &HashMap<(i32, i32), usize>, elf: &Elf, dir: &Direction) -> Option<(i32, i32)> { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `solve` is never used [INFO] [stdout] --> src/day23/day23.rs:138:4 [INFO] [stdout] | [INFO] [stdout] 138 | fn solve(elves: &mut Vec) -> i32 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `solution` is never used [INFO] [stdout] --> src/day23/day23.rs:209:8 [INFO] [stdout] | [INFO] [stdout] 209 | pub fn solution() { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Blizzard` is never constructed [INFO] [stdout] --> src/day24/day24.rs:6:8 [INFO] [stdout] | [INFO] [stdout] 6 | struct Blizzard { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `State` is never constructed [INFO] [stdout] --> src/day24/day24.rs:13:8 [INFO] [stdout] | [INFO] [stdout] 13 | struct State { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_input` is never used [INFO] [stdout] --> src/day24/day24.rs:35:4 [INFO] [stdout] | [INFO] [stdout] 35 | fn parse_input(file_path: String) -> (Vec>, Vec) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `calculate_cost` is never used [INFO] [stdout] --> src/day24/day24.rs:58:4 [INFO] [stdout] | [INFO] [stdout] 58 | fn calculate_cost(position: (u32, u32), goal: (u32, u32), time: u32) -> u32 { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `solve` is never used [INFO] [stdout] --> src/day24/day24.rs:65:4 [INFO] [stdout] | [INFO] [stdout] 65 | fn solve(blizzards_cache: &Vec<(Vec, HashMap<(u32,u32), u32>)>, map: &Vec>, start: (u32, u32), end: (u32, u32), ... [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `solution` is never used [INFO] [stdout] --> src/day24/day24.rs:170:8 [INFO] [stdout] | [INFO] [stdout] 170 | pub fn solution() { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/main.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | pub mod day1; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] = note: `#[warn(clippy::module_inception)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Ok` variant of the iterator element is used [INFO] [stdout] --> src/day1/day1.rs:16:9 [INFO] [stdout] | [INFO] [stdout] 16 | / for line in lines { [INFO] [stdout] 17 | | if let Ok(l) = line { [INFO] [stdout] 18 | | match l.parse::() { [INFO] [stdout] 19 | | Ok(n) => { [INFO] [stdout] ... | [INFO] [stdout] 30 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/day1/day1.rs:17:13 [INFO] [stdout] | [INFO] [stdout] 17 | / if let Ok(l) = line { [INFO] [stdout] 18 | | match l.parse::() { [INFO] [stdout] 19 | | Ok(n) => { [INFO] [stdout] 20 | | curr_calories += n; [INFO] [stdout] ... | [INFO] [stdout] 29 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] = note: `#[warn(clippy::manual_flatten)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 16 ~ for l in lines.flatten() { [INFO] [stdout] 17 + match l.parse::() { [INFO] [stdout] 18 + Ok(n) => { [INFO] [stdout] 19 + curr_calories += n; [INFO] [stdout] 20 + }, [INFO] [stdout] 21 + Err(_) => { [INFO] [stdout] 22 + if max_calories < curr_calories { [INFO] [stdout] 23 + max_calories = curr_calories; [INFO] [stdout] 24 + } [INFO] [stdout] 25 + curr_calories = 0; [INFO] [stdout] 26 + } [INFO] [stdout] 27 + } [INFO] [stdout] 28 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Ok` variant of the iterator element is used [INFO] [stdout] --> src/day1/day1.rs:53:9 [INFO] [stdout] | [INFO] [stdout] 53 | / for line in lines { [INFO] [stdout] 54 | | if let Ok(l) = line { [INFO] [stdout] 55 | | match l.parse::() { [INFO] [stdout] 56 | | Ok(n) => { [INFO] [stdout] ... | [INFO] [stdout] 79 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/day1/day1.rs:54:13 [INFO] [stdout] | [INFO] [stdout] 54 | / if let Ok(l) = line { [INFO] [stdout] 55 | | match l.parse::() { [INFO] [stdout] 56 | | Ok(n) => { [INFO] [stdout] 57 | | curr_calories += n; [INFO] [stdout] ... | [INFO] [stdout] 78 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 53 ~ for l in lines.flatten() { [INFO] [stdout] 54 + match l.parse::() { [INFO] [stdout] 55 + Ok(n) => { [INFO] [stdout] 56 + curr_calories += n; [INFO] [stdout] 57 + }, [INFO] [stdout] 58 + Err(_) => { [INFO] [stdout] 59 + [INFO] [stdout] 60 + if elf3 < curr_calories { [INFO] [stdout] 61 + if elf2 < curr_calories { [INFO] [stdout] 62 + elf3 = elf2; [INFO] [stdout] 63 + if elf1 < curr_calories { [INFO] [stdout] 64 + elf2 = elf1; [INFO] [stdout] 65 + elf1 = curr_calories; [INFO] [stdout] 66 + } else { [INFO] [stdout] 67 + elf2 = curr_calories; [INFO] [stdout] 68 + } [INFO] [stdout] 69 + } else { [INFO] [stdout] 70 + elf3 = curr_calories; [INFO] [stdout] 71 + } [INFO] [stdout] 72 + } [INFO] [stdout] 73 + [INFO] [stdout] 74 + curr_calories = 0; [INFO] [stdout] 75 + } [INFO] [stdout] 76 + } [INFO] [stdout] 77 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/main.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | pub mod day2; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Ok` variant of the iterator element is used [INFO] [stdout] --> src/day2/day2.rs:10:9 [INFO] [stdout] | [INFO] [stdout] 10 | / for line in lines { [INFO] [stdout] 11 | | if let Ok(l) = line { [INFO] [stdout] 12 | | let mut tokens = l.split(' ').fuse(); [INFO] [stdout] 13 | | let opponent = tokens.next().expect("Opponent token empty"); [INFO] [stdout] ... | [INFO] [stdout] 43 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/day2/day2.rs:11:13 [INFO] [stdout] | [INFO] [stdout] 11 | / if let Ok(l) = line { [INFO] [stdout] 12 | | let mut tokens = l.split(' ').fuse(); [INFO] [stdout] 13 | | let opponent = tokens.next().expect("Opponent token empty"); [INFO] [stdout] 14 | | let me = tokens.next().expect("My token empty"); [INFO] [stdout] ... | [INFO] [stdout] 42 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 10 ~ for l in lines.flatten() { [INFO] [stdout] 11 + let mut tokens = l.split(' ').fuse(); [INFO] [stdout] 12 + let opponent = tokens.next().expect("Opponent token empty"); [INFO] [stdout] 13 + let me = tokens.next().expect("My token empty"); [INFO] [stdout] 14 + [INFO] [stdout] 15 + match me { [INFO] [stdout] 16 + "X" => all_points += 1, [INFO] [stdout] 17 + "Y" => all_points += 2, [INFO] [stdout] 18 + "Z" => all_points += 3, [INFO] [stdout] 19 + _ => println!("ERROR") [INFO] [stdout] 20 + } [INFO] [stdout] 21 + [INFO] [stdout] 22 + if opponent == "A" { [INFO] [stdout] 23 + match me { [INFO] [stdout] 24 + "Y" => all_points += 6, [INFO] [stdout] 25 + "X" => all_points += 3, [INFO] [stdout] 26 + _ => () [INFO] [stdout] 27 + } [INFO] [stdout] 28 + } else if opponent == "B" { [INFO] [stdout] 29 + match me { [INFO] [stdout] 30 + "Z" => all_points += 6, [INFO] [stdout] 31 + "Y" => all_points += 3, [INFO] [stdout] 32 + _ => () [INFO] [stdout] 33 + } [INFO] [stdout] 34 + } else { [INFO] [stdout] 35 + match me { [INFO] [stdout] 36 + "X" => all_points += 6, [INFO] [stdout] 37 + "Z" => all_points += 3, [INFO] [stdout] 38 + _ => () [INFO] [stdout] 39 + } [INFO] [stdout] 40 + } [INFO] [stdout] 41 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/day20/day20.rs:63:10 [INFO] [stdout] | [INFO] [stdout] 63 | for (i, n) in numbers.iter() { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Ok` variant of the iterator element is used [INFO] [stdout] --> src/day2/day2.rs:60:9 [INFO] [stdout] | [INFO] [stdout] 60 | / for line in lines { [INFO] [stdout] 61 | | if let Ok(l) = line { [INFO] [stdout] 62 | | let mut tokens = l.split(' ').fuse(); [INFO] [stdout] 63 | | let opponent = tokens.next().expect("Opponent token empty"); [INFO] [stdout] ... | [INFO] [stdout] 97 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/day2/day2.rs:61:13 [INFO] [stdout] | [INFO] [stdout] 61 | / if let Ok(l) = line { [INFO] [stdout] 62 | | let mut tokens = l.split(' ').fuse(); [INFO] [stdout] 63 | | let opponent = tokens.next().expect("Opponent token empty"); [INFO] [stdout] 64 | | let outcome = tokens.next().expect("Outcome token empty"); [INFO] [stdout] ... | [INFO] [stdout] 96 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 60 ~ for l in lines.flatten() { [INFO] [stdout] 61 + let mut tokens = l.split(' ').fuse(); [INFO] [stdout] 62 + let opponent = tokens.next().expect("Opponent token empty"); [INFO] [stdout] 63 + let outcome = tokens.next().expect("Outcome token empty"); [INFO] [stdout] 64 + [INFO] [stdout] 65 + match outcome { [INFO] [stdout] 66 + "X" => { // lose [INFO] [stdout] 67 + match opponent { [INFO] [stdout] 68 + "A" => all_points += 3, [INFO] [stdout] 69 + "B" => all_points += 1, [INFO] [stdout] 70 + "C" => all_points += 2, [INFO] [stdout] 71 + _ => () [INFO] [stdout] 72 + } [INFO] [stdout] 73 + } [INFO] [stdout] 74 + "Y" => { // draw [INFO] [stdout] 75 + all_points += 3; [INFO] [stdout] 76 + match opponent { [INFO] [stdout] 77 + "A" => all_points += 1, [INFO] [stdout] 78 + "B" => all_points += 2, [INFO] [stdout] 79 + "C" => all_points += 3, [INFO] [stdout] 80 + _ => () [INFO] [stdout] 81 + } [INFO] [stdout] 82 + } [INFO] [stdout] 83 + "Z" => { // win [INFO] [stdout] 84 + all_points += 6; [INFO] [stdout] 85 + match opponent { [INFO] [stdout] 86 + "A" => all_points += 2, [INFO] [stdout] 87 + "B" => all_points += 3, [INFO] [stdout] 88 + "C" => all_points += 1, [INFO] [stdout] 89 + _ => () [INFO] [stdout] 90 + } [INFO] [stdout] 91 + } [INFO] [stdout] 92 + _ => println!("ERROR") [INFO] [stdout] 93 + } [INFO] [stdout] 94 + [INFO] [stdout] 95 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/day20/day20.rs:77:9 [INFO] [stdout] | [INFO] [stdout] 77 | let mut original_numbers = parse_input(file_path); [INFO] [stdout] | ----^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/main.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | pub mod day3; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `result` is never read [INFO] [stdout] --> src/day21/day21.rs:60:34 [INFO] [stdout] | [INFO] [stdout] 60 | let mut result = 0; [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Ok` variant of the iterator element is used [INFO] [stdout] --> src/day3/day3.rs:11:9 [INFO] [stdout] | [INFO] [stdout] 11 | / for line in lines { [INFO] [stdout] 12 | | if let Ok(l) = line { [INFO] [stdout] 13 | | let compartment_split = l.len() / 2; [INFO] [stdout] 14 | | let comp1 = &l[..compartment_split]; [INFO] [stdout] ... | [INFO] [stdout] 32 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/day3/day3.rs:12:13 [INFO] [stdout] | [INFO] [stdout] 12 | / if let Ok(l) = line { [INFO] [stdout] 13 | | let compartment_split = l.len() / 2; [INFO] [stdout] 14 | | let comp1 = &l[..compartment_split]; [INFO] [stdout] 15 | | let comp2 = &l[compartment_split..]; [INFO] [stdout] ... | [INFO] [stdout] 31 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 11 ~ for l in lines.flatten() { [INFO] [stdout] 12 + let compartment_split = l.len() / 2; [INFO] [stdout] 13 + let comp1 = &l[..compartment_split]; [INFO] [stdout] 14 + let comp2 = &l[compartment_split..]; [INFO] [stdout] 15 + let mut found_chars = HashSet::new(); [INFO] [stdout] 16 + //println!("{} Comparing {} and {}", compartment_split, comp1, comp2); [INFO] [stdout] 17 + for c in comp1.chars() { [INFO] [stdout] 18 + if !found_chars.contains(&c) && comp2.contains(c) { [INFO] [stdout] 19 + //println!("{}", c); [INFO] [stdout] 20 + found_chars.insert(c); [INFO] [stdout] 21 + if c <= 'Z' { [INFO] [stdout] 22 + priority += (c as u32 - 65 + 27); [INFO] [stdout] 23 + } else { [INFO] [stdout] 24 + priority += (c as u32 - 97 + 1); [INFO] [stdout] 25 + } [INFO] [stdout] 26 + } [INFO] [stdout] 27 + } [INFO] [stdout] 28 + [INFO] [stdout] 29 + [INFO] [stdout] 30 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `op` [INFO] [stdout] --> src/day21/day21.rs:86:39 [INFO] [stdout] | [INFO] [stdout] 86 | if let Activity::Operation(x, op, y) = (*a).clone() { [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_op` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/main.rs:11:5 [INFO] [stdout] | [INFO] [stdout] 11 | pub mod day4; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Ok` variant of the iterator element is used [INFO] [stdout] --> src/day4/day4.rs:10:9 [INFO] [stdout] | [INFO] [stdout] 10 | / for line in lines { [INFO] [stdout] 11 | | if let Ok(l) = line { [INFO] [stdout] 12 | | [INFO] [stdout] 13 | | let s: Vec<&str> = l.split(',').collect(); [INFO] [stdout] ... | [INFO] [stdout] 27 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/day4/day4.rs:11:13 [INFO] [stdout] | [INFO] [stdout] 11 | / if let Ok(l) = line { [INFO] [stdout] 12 | | [INFO] [stdout] 13 | | let s: Vec<&str> = l.split(',').collect(); [INFO] [stdout] 14 | | let s1: Vec<&str> = s[0].split('-').collect(); [INFO] [stdout] ... | [INFO] [stdout] 26 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 10 ~ for l in lines.flatten() { [INFO] [stdout] 11 + [INFO] [stdout] 12 + let s: Vec<&str> = l.split(',').collect(); [INFO] [stdout] 13 + let s1: Vec<&str> = s[0].split('-').collect(); [INFO] [stdout] 14 + let s2: Vec<&str> = s[1].split('-').collect(); [INFO] [stdout] 15 + [INFO] [stdout] 16 + let x1: i32 = s1[0].parse().expect("Error x1"); [INFO] [stdout] 17 + let y1: i32 = s1[1].parse().expect("Error y1"); [INFO] [stdout] 18 + let x2: i32 = s2[0].parse().expect("Error x2"); [INFO] [stdout] 19 + let y2: i32 = s2[1].parse().expect("Error y2"); [INFO] [stdout] 20 + [INFO] [stdout] 21 + if (x1 >= x2 && y1 <= y2) || (x1 <= x2 && y1 >= y2) { [INFO] [stdout] 22 + overlaps += 1; [INFO] [stdout] 23 + } [INFO] [stdout] 24 + [INFO] [stdout] 25 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `tile` is never read [INFO] [stdout] --> src/day22/day22.rs:37:36 [INFO] [stdout] | [INFO] [stdout] 37 | let mut tile = Tile::Open; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Ok` variant of the iterator element is used [INFO] [stdout] --> src/day4/day4.rs:44:9 [INFO] [stdout] | [INFO] [stdout] 44 | / for line in lines { [INFO] [stdout] 45 | | if let Ok(l) = line { [INFO] [stdout] 46 | | [INFO] [stdout] 47 | | let s: Vec<&str> = l.split(',').collect(); [INFO] [stdout] ... | [INFO] [stdout] 61 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/day4/day4.rs:45:13 [INFO] [stdout] | [INFO] [stdout] 45 | / if let Ok(l) = line { [INFO] [stdout] 46 | | [INFO] [stdout] 47 | | let s: Vec<&str> = l.split(',').collect(); [INFO] [stdout] 48 | | let s1: Vec<&str> = s[0].split('-').collect(); [INFO] [stdout] ... | [INFO] [stdout] 60 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 44 ~ for l in lines.flatten() { [INFO] [stdout] 45 + [INFO] [stdout] 46 + let s: Vec<&str> = l.split(',').collect(); [INFO] [stdout] 47 + let s1: Vec<&str> = s[0].split('-').collect(); [INFO] [stdout] 48 + let s2: Vec<&str> = s[1].split('-').collect(); [INFO] [stdout] 49 + [INFO] [stdout] 50 + let x1: i32 = s1[0].parse().expect("Error x1"); [INFO] [stdout] 51 + let y1: i32 = s1[1].parse().expect("Error y1"); [INFO] [stdout] 52 + let x2: i32 = s2[0].parse().expect("Error x2"); [INFO] [stdout] 53 + let y2: i32 = s2[1].parse().expect("Error y2"); [INFO] [stdout] 54 + [INFO] [stdout] 55 + if !(y2 < x1 || x2 > y1) { [INFO] [stdout] 56 + overlaps += 1; [INFO] [stdout] 57 + } [INFO] [stdout] 58 + [INFO] [stdout] 59 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `map` [INFO] [stdout] --> src/day22/day22.rs:154:26 [INFO] [stdout] | [INFO] [stdout] 154 | fn find_wrap_around_cube(map: &HashMap<(u32, u32), Tile>, mut current_position: (u32, u32), mut direction: u32, areas: [(u32, u32, ... [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_map` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/main.rs:14:5 [INFO] [stdout] | [INFO] [stdout] 14 | pub mod day5; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/day5/day5.rs:5:38 [INFO] [stdout] | [INFO] [stdout] 5 | fn parse_input(file_path: String) -> ([VecDeque; 9], Vec<(u32, u32, u32)>) { [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: unused variable: `a` [INFO] [stdout] --> src/day22/day22.rs:162:25 [INFO] [stdout] | [INFO] [stdout] 162 | let a = areas[3]; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/day22/day22.rs:173:25 [INFO] [stdout] | [INFO] [stdout] 173 | let a = areas[5]; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to one [INFO] [stdout] --> src/day5/day5.rs:17:16 [INFO] [stdout] | [INFO] [stdout] 17 | if l.len() >= 1 && l.chars().nth(1).unwrap() == '1' { [INFO] [stdout] | ^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!l.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/day22/day22.rs:185:25 [INFO] [stdout] | [INFO] [stdout] 185 | let a = areas[4]; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/day22/day22.rs:192:25 [INFO] [stdout] | [INFO] [stdout] 192 | let a = areas[2]; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/day22/day22.rs:199:25 [INFO] [stdout] | [INFO] [stdout] 199 | let a = areas[5]; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/day22/day22.rs:215:25 [INFO] [stdout] | [INFO] [stdout] 215 | let a = areas[1]; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/day22/day22.rs:222:25 [INFO] [stdout] | [INFO] [stdout] 222 | let a = areas[3]; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/day22/day22.rs:234:25 [INFO] [stdout] | [INFO] [stdout] 234 | let a = areas[0]; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/day22/day22.rs:241:25 [INFO] [stdout] | [INFO] [stdout] 241 | let a = areas[2]; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/day22/day22.rs:253:25 [INFO] [stdout] | [INFO] [stdout] 253 | let a = areas[1]; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/day22/day22.rs:260:25 [INFO] [stdout] | [INFO] [stdout] 260 | let a = areas[5]; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/day22/day22.rs:272:25 [INFO] [stdout] | [INFO] [stdout] 272 | let a = areas[4]; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/day22/day22.rs:279:25 [INFO] [stdout] | [INFO] [stdout] 279 | let a = areas[1]; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/day22/day22.rs:290:25 [INFO] [stdout] | [INFO] [stdout] 290 | let a = areas[0]; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `stacks` [INFO] [stdout] --> src/day5/day5.rs:20:22 [INFO] [stdout] | [INFO] [stdout] 20 | for i in 0..9 { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 20 - for i in 0..9 { [INFO] [stdout] 20 + for (i, ) in stacks.iter_mut().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/day5/day5.rs:53:13 [INFO] [stdout] | [INFO] [stdout] 53 | / match stacks[from as usize].pop_back() { [INFO] [stdout] 54 | | Some(e) => stacks[to as usize].push_back(e), [INFO] [stdout] 55 | | None => () [INFO] [stdout] 56 | | } [INFO] [stdout] | |_____________^ help: try: `if let Some(e) = stacks[from as usize].pop_back() { stacks[to as usize].push_back(e) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/day5/day5.rs:89:13 [INFO] [stdout] | [INFO] [stdout] 89 | / match stacks[from as usize].pop_back() { [INFO] [stdout] 90 | | Some(e) => tmp.push_front(e), [INFO] [stdout] 91 | | None => () [INFO] [stdout] 92 | | } [INFO] [stdout] | |_____________^ help: try: `if let Some(e) = stacks[from as usize].pop_back() { tmp.push_front(e) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/main.rs:17:5 [INFO] [stdout] | [INFO] [stdout] 17 | pub mod day6; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/main.rs:20:5 [INFO] [stdout] | [INFO] [stdout] 20 | pub mod day7; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `k2` is never read [INFO] [stdout] --> src/day23/day23.rs:107:18 [INFO] [stdout] | [INFO] [stdout] 107 | let mut k2 = (elf.x, elf.y); [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `k3` is never read [INFO] [stdout] --> src/day23/day23.rs:108:18 [INFO] [stdout] | [INFO] [stdout] 108 | let mut k3 = (elf.x, elf.y); [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods with the following characteristics: (`to_*` and `self` type is not `Copy`) usually take `self` by reference [INFO] [stdout] --> src/day7/day7.rs:182:20 [INFO] [stdout] | [INFO] [stdout] 182 | pub fn to_root(&mut self) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] = note: `#[warn(clippy::wrong_self_convention)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/day7/day7.rs:264:5 [INFO] [stdout] | [INFO] [stdout] 264 | return (size, result); [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] 264 - return (size, result); [INFO] [stdout] 264 + (size, result) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/day7/day7.rs:253:8 [INFO] [stdout] | [INFO] [stdout] 253 | if dir.directories.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!dir.directories.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: unneeded `return` statement [INFO] [stdout] --> src/day7/day7.rs:281:5 [INFO] [stdout] | [INFO] [stdout] 281 | return (size, freed_space); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 281 - return (size, freed_space); [INFO] [stdout] 281 + (size, freed_space) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/day7/day7.rs:270:8 [INFO] [stdout] | [INFO] [stdout] 270 | if dir.directories.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!dir.directories.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: module has the same name as its containing module [INFO] [stdout] --> src/main.rs:23:5 [INFO] [stdout] | [INFO] [stdout] 23 | pub mod day8; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day8/day8.rs:22:23 [INFO] [stdout] | [INFO] [stdout] 22 | fn tree_visible(grid: &Vec>, i: usize, j: usize) -> 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] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 22 - fn tree_visible(grid: &Vec>, i: usize, j: usize) -> bool { [INFO] [stdout] 22 + fn tree_visible(grid: &[Vec], i: usize, j: usize) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `grid.get(0)` [INFO] [stdout] --> src/day8/day8.rs:26:13 [INFO] [stdout] | [INFO] [stdout] 26 | let m = grid.get(0).unwrap().len(); [INFO] [stdout] | ^^^^^^^^^^^ help: try: `grid.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day1` is never used [INFO] [stdout] --> src/main.rs:78:4 [INFO] [stdout] | [INFO] [stdout] 78 | fn day1() { [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 `day2` is never used [INFO] [stdout] --> src/main.rs:85:4 [INFO] [stdout] | [INFO] [stdout] 85 | fn day2() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day3` is never used [INFO] [stdout] --> src/main.rs:92:4 [INFO] [stdout] | [INFO] [stdout] 92 | fn day3() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day4` is never used [INFO] [stdout] --> src/main.rs:99:4 [INFO] [stdout] | [INFO] [stdout] 99 | fn day4() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day5` is never used [INFO] [stdout] --> src/main.rs:106:4 [INFO] [stdout] | [INFO] [stdout] 106 | fn day5() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day6` is never used [INFO] [stdout] --> src/main.rs:113:4 [INFO] [stdout] | [INFO] [stdout] 113 | fn day6() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day7` is never used [INFO] [stdout] --> src/main.rs:120:4 [INFO] [stdout] | [INFO] [stdout] 120 | fn day7() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day8` is never used [INFO] [stdout] --> src/main.rs:124:4 [INFO] [stdout] | [INFO] [stdout] 124 | fn day8() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day9` is never used [INFO] [stdout] --> src/main.rs:128:4 [INFO] [stdout] | [INFO] [stdout] 128 | fn day9() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day10` is never used [INFO] [stdout] --> src/main.rs:132:4 [INFO] [stdout] | [INFO] [stdout] 132 | fn day10() { [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/day8/day8.rs:51:21 [INFO] [stdout] | [INFO] [stdout] 51 | fn tree_score(grid: &Vec>, i: usize, j: usize) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 51 - fn tree_score(grid: &Vec>, i: usize, j: usize) -> usize { [INFO] [stdout] 51 + fn tree_score(grid: &[Vec], i: usize, j: usize) -> usize { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day11` is never used [INFO] [stdout] --> src/main.rs:136:4 [INFO] [stdout] | [INFO] [stdout] 136 | fn day11() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day12` is never used [INFO] [stdout] --> src/main.rs:140:4 [INFO] [stdout] | [INFO] [stdout] 140 | fn day12() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day13` is never used [INFO] [stdout] --> src/main.rs:144:4 [INFO] [stdout] | [INFO] [stdout] 144 | fn day13() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day14` is never used [INFO] [stdout] --> src/main.rs:148:4 [INFO] [stdout] | [INFO] [stdout] 148 | fn day14() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `grid.get(0)` [INFO] [stdout] --> src/day8/day8.rs:55:13 [INFO] [stdout] | [INFO] [stdout] 55 | let m = grid.get(0).unwrap().len(); [INFO] [stdout] | ^^^^^^^^^^^ help: try: `grid.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day15` is never used [INFO] [stdout] --> src/main.rs:152:4 [INFO] [stdout] | [INFO] [stdout] 152 | fn day15() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day16` is never used [INFO] [stdout] --> src/main.rs:156:4 [INFO] [stdout] | [INFO] [stdout] 156 | fn day16() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day17` is never used [INFO] [stdout] --> src/main.rs:160:4 [INFO] [stdout] | [INFO] [stdout] 160 | fn day17() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day18` is never used [INFO] [stdout] --> src/main.rs:164:4 [INFO] [stdout] | [INFO] [stdout] 164 | fn day18() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day19` is never used [INFO] [stdout] --> src/main.rs:168:4 [INFO] [stdout] | [INFO] [stdout] 168 | fn day19() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `grid.get(0)` [INFO] [stdout] --> src/day8/day8.rs:87:13 [INFO] [stdout] | [INFO] [stdout] 87 | let m = grid.get(0).unwrap().len(); [INFO] [stdout] | ^^^^^^^^^^^ help: try: `grid.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day20` is never used [INFO] [stdout] --> src/main.rs:172:4 [INFO] [stdout] | [INFO] [stdout] 172 | fn day20() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day21` is never used [INFO] [stdout] --> src/main.rs:176:4 [INFO] [stdout] | [INFO] [stdout] 176 | fn day21() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day22` is never used [INFO] [stdout] --> src/main.rs:180:4 [INFO] [stdout] | [INFO] [stdout] 180 | fn day22() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day23` is never used [INFO] [stdout] --> src/main.rs:184:4 [INFO] [stdout] | [INFO] [stdout] 184 | fn day23() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `day24` is never used [INFO] [stdout] --> src/main.rs:188:4 [INFO] [stdout] | [INFO] [stdout] 188 | fn day24() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part1` is never used [INFO] [stdout] --> src/day1/day1.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn part1() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part2` is never used [INFO] [stdout] --> src/day1/day1.rs:39:8 [INFO] [stdout] | [INFO] [stdout] 39 | pub fn part2() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part1` is never used [INFO] [stdout] --> src/day2/day2.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn part1() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part2` is never used [INFO] [stdout] --> src/day2/day2.rs:52:8 [INFO] [stdout] | [INFO] [stdout] 52 | pub fn part2() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part1` is never used [INFO] [stdout] --> src/day3/day3.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 4 | pub fn part1() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part2` is never used [INFO] [stdout] --> src/day3/day3.rs:41:8 [INFO] [stdout] | [INFO] [stdout] 41 | pub fn part2() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part1` is never used [INFO] [stdout] --> src/day4/day4.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn part1() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part2` is never used [INFO] [stdout] --> src/day4/day4.rs:36:8 [INFO] [stdout] | [INFO] [stdout] 36 | pub fn part2() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_input` is never used [INFO] [stdout] --> src/day5/day5.rs:5:4 [INFO] [stdout] | [INFO] [stdout] 5 | fn parse_input(file_path: String) -> ([VecDeque; 9], Vec<(u32, u32, u32)>) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part1` is never used [INFO] [stdout] --> src/day5/day5.rs:43:8 [INFO] [stdout] | [INFO] [stdout] 43 | pub fn part1() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part2` is never used [INFO] [stdout] --> src/day5/day5.rs:77:8 [INFO] [stdout] | [INFO] [stdout] 77 | pub fn part2() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part1` is never used [INFO] [stdout] --> src/day6/day6.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 4 | pub fn part1() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part2` is never used [INFO] [stdout] --> src/day6/day6.rs:31:8 [INFO] [stdout] | [INFO] [stdout] 31 | pub fn part2() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Directory` is never constructed [INFO] [stdout] --> src/day7/day7.rs:57:8 [INFO] [stdout] | [INFO] [stdout] 57 | struct Directory { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `add_file`, `add_directory2`, and `add_directory` are never used [INFO] [stdout] --> src/day7/day7.rs:67:12 [INFO] [stdout] | [INFO] [stdout] 66 | impl Directory { [INFO] [stdout] | -------------- associated items in this implementation [INFO] [stdout] 67 | pub fn new(name: String, path: String, id: i32, parent: i32) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 79 | pub fn add_file(&mut self, name: String, size: u32) { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 84 | pub fn add_directory2(&mut self, dir: &Directory) { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 93 | pub fn add_directory(&mut self, name: String, id: i32) { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `FileSystem` is never constructed [INFO] [stdout] --> src/day7/day7.rs:103:8 [INFO] [stdout] | [INFO] [stdout] 103 | struct FileSystem { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple associated items are never used [INFO] [stdout] --> src/day7/day7.rs:109:12 [INFO] [stdout] | [INFO] [stdout] 108 | impl FileSystem { [INFO] [stdout] | --------------- associated items in this implementation [INFO] [stdout] 109 | pub fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 117 | pub fn add_directory(&mut self, name: &str) { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 138 | pub fn add_file(&mut self, name: &str, size: u32) { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 146 | pub fn move_to_dir(&mut self, name: &str) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 168 | pub fn move_back(&mut self) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 178 | pub fn print_current_dir(&self) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 182 | pub fn to_root(&mut self) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 187 | pub fn get_directory(&self) -> &Directory { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 191 | pub fn get_directory_mut(&mut self) -> Option<&mut Directory> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 196 | pub fn get_directory_at_index(&self, index: i32) -> &Directory { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_input` is never used [INFO] [stdout] --> src/day7/day7.rs:202:4 [INFO] [stdout] | [INFO] [stdout] 202 | fn parse_input(file_path: &str) -> FileSystem{ [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `calculate_size` is never used [INFO] [stdout] --> src/day7/day7.rs:250:4 [INFO] [stdout] | [INFO] [stdout] 250 | fn calculate_size(dir: &Directory, fs: &FileSystem) -> (u32, u32) { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `calculate_freed_space` is never used [INFO] [stdout] --> src/day7/day7.rs:267:4 [INFO] [stdout] | [INFO] [stdout] 267 | fn calculate_freed_space(FULL_SIZE: u32, dir: &Directory, fs: &FileSystem) -> (u32, u32) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part1and2` is never used [INFO] [stdout] --> src/day7/day7.rs:284:8 [INFO] [stdout] | [INFO] [stdout] 284 | pub fn part1and2() { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_input` is never used [INFO] [stdout] --> src/day8/day8.rs:4:4 [INFO] [stdout] | [INFO] [stdout] 4 | fn parse_input(file_path: &str) -> Vec> { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `tree_visible` is never used [INFO] [stdout] --> src/day8/day8.rs:22:4 [INFO] [stdout] | [INFO] [stdout] 22 | fn tree_visible(grid: &Vec>, i: usize, j: usize) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `tree_score` is never used [INFO] [stdout] --> src/day8/day8.rs:51:4 [INFO] [stdout] | [INFO] [stdout] 51 | fn tree_score(grid: &Vec>, i: usize, j: usize) -> usize { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/main.rs:26:5 [INFO] [stdout] | [INFO] [stdout] 26 | pub mod day9; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `solution` is never used [INFO] [stdout] --> src/day8/day8.rs:84:8 [INFO] [stdout] | [INFO] [stdout] 84 | pub fn solution() { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `reposition_tail` is never used [INFO] [stdout] --> src/day9/day9.rs:5:4 [INFO] [stdout] | [INFO] [stdout] 5 | fn reposition_tail(head: (i32, i32), tails: &mut [(i32, i32)], tails_visited: &mut [HashSet<(i32, i32)>], index: usize) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `is_negative_int` is never used [INFO] [stdout] --> src/day9/day9.rs:51:4 [INFO] [stdout] | [INFO] [stdout] 51 | fn is_negative_int(val: i32) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `print_map` is never used [INFO] [stdout] --> src/day9/day9.rs:59:4 [INFO] [stdout] | [INFO] [stdout] 59 | fn print_map(head: (i32, i32), tails: &[(i32, i32)]) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `print_visited` is never used [INFO] [stdout] --> src/day9/day9.rs:93:4 [INFO] [stdout] | [INFO] [stdout] 93 | fn print_visited(visited: &HashSet<(i32, i32)>) { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `solution` is never used [INFO] [stdout] --> src/day9/day9.rs:117:8 [INFO] [stdout] | [INFO] [stdout] 117 | pub fn solution() { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `solution` is never used [INFO] [stdout] --> src/day10/day10.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn solution() { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Operator` is never used [INFO] [stdout] --> src/day11/day11.rs:3:6 [INFO] [stdout] | [INFO] [stdout] 3 | enum Operator { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `OperationValue` is never used [INFO] [stdout] --> src/day11/day11.rs:10:6 [INFO] [stdout] | [INFO] [stdout] 10 | enum OperationValue { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Monkey` is never constructed [INFO] [stdout] --> src/day11/day11.rs:15:8 [INFO] [stdout] | [INFO] [stdout] 15 | struct Monkey { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `do_operation`, `inspect_part1`, `inspect_part2`, and `test` are never used [INFO] [stdout] --> src/day11/day11.rs:26:12 [INFO] [stdout] | [INFO] [stdout] 25 | impl Monkey { [INFO] [stdout] | ----------- associated items in this implementation [INFO] [stdout] 26 | pub fn new(id: u32, items: Vec, operation: (Operator, OperationValue), test_division: u32, test_true: u32, test_false: u32)... [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 38 | fn do_operation(&self, x: u32, lcm: u32) -> u32 { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 60 | pub fn inspect_part1(&mut self, lcm: u32) { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 65 | pub fn inspect_part2(&mut self, lcm: u32) { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 70 | pub fn test(&self, i: u32) -> u32 { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_input` is never used [INFO] [stdout] --> src/day11/day11.rs:79:4 [INFO] [stdout] | [INFO] [stdout] 79 | fn parse_input(file_path: String) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `lcm` is never used [INFO] [stdout] --> src/day11/day11.rs:163:4 [INFO] [stdout] | [INFO] [stdout] 163 | fn lcm(first: usize, second: usize) -> usize { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `gcd` is never used [INFO] [stdout] --> src/day11/day11.rs:167:4 [INFO] [stdout] | [INFO] [stdout] 167 | fn gcd(first: usize, second: usize) -> usize { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `solution` is never used [INFO] [stdout] --> src/day11/day11.rs:188:8 [INFO] [stdout] | [INFO] [stdout] 188 | pub fn solution() { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_input` is never used [INFO] [stdout] --> src/day12/day12.rs:4:4 [INFO] [stdout] | [INFO] [stdout] 4 | fn parse_input(file_path: String) -> ((u32, u32), (u32, u32), Vec>) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part1` is never used [INFO] [stdout] --> src/day12/day12.rs:47:4 [INFO] [stdout] | [INFO] [stdout] 47 | fn part1(start: (u32, u32), end: (u32, u32), grid: &Vec>) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `part2` is never used [INFO] [stdout] --> src/day12/day12.rs:91:4 [INFO] [stdout] | [INFO] [stdout] 91 | fn part2(start: (u32, u32), end: (u32, u32), grid: &Vec>) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `solution` is never used [INFO] [stdout] --> src/day12/day12.rs:151:8 [INFO] [stdout] | [INFO] [stdout] 151 | pub fn solution() { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Element` is never used [INFO] [stdout] --> src/day13/day13.rs:3:6 [INFO] [stdout] | [INFO] [stdout] 3 | enum Element { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_input` is never used [INFO] [stdout] --> src/day13/day13.rs:8:4 [INFO] [stdout] | [INFO] [stdout] 8 | fn parse_input(file_path: String) -> Vec<(Vec, Vec)> { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `print_list` is never used [INFO] [stdout] --> src/day13/day13.rs:78:4 [INFO] [stdout] | [INFO] [stdout] 78 | fn print_list(list: &Vec) { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `check_lists` is never used [INFO] [stdout] --> src/day13/day13.rs:96:4 [INFO] [stdout] | [INFO] [stdout] 96 | fn check_lists(left: &Vec, right: &Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `(i32, i32)` which implements the `Copy` trait [INFO] [stdout] --> src/day9/day9.rs:25:20 [INFO] [stdout] | [INFO] [stdout] 25 | let old_tail = tail.clone(); [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*tail` [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 `solution` is never used [INFO] [stdout] --> src/day13/day13.rs:152:8 [INFO] [stdout] | [INFO] [stdout] 152 | pub fn solution() { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_tuple` is never used [INFO] [stdout] --> src/day14/day14.rs:5:4 [INFO] [stdout] | [INFO] [stdout] 5 | fn parse_tuple(s: String) -> (i32, i32) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_input` is never used [INFO] [stdout] --> src/day14/day14.rs:10:4 [INFO] [stdout] | [INFO] [stdout] 10 | fn parse_input(file_path: String) -> (i32, HashSet<(i32, i32)>) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `solution` is never used [INFO] [stdout] --> src/day14/day14.rs:63:8 [INFO] [stdout] | [INFO] [stdout] 63 | pub fn solution() { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Sensor` is never constructed [INFO] [stdout] --> src/day15/day15.rs:5:8 [INFO] [stdout] | [INFO] [stdout] 5 | struct Sensor { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_tuple` is never used [INFO] [stdout] --> src/day15/day15.rs:10:4 [INFO] [stdout] | [INFO] [stdout] 10 | fn parse_tuple(s: String) -> (i32, i32) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_input` is never used [INFO] [stdout] --> src/day15/day15.rs:15:4 [INFO] [stdout] | [INFO] [stdout] 15 | fn parse_input(file_path: String) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `solution` is never used [INFO] [stdout] --> src/day15/day15.rs:51:8 [INFO] [stdout] | [INFO] [stdout] 51 | pub fn solution() { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Valve` is never constructed [INFO] [stdout] --> src/day16/day16.rs:5:8 [INFO] [stdout] | [INFO] [stdout] 5 | struct Valve { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_input` is never used [INFO] [stdout] --> src/day16/day16.rs:11:4 [INFO] [stdout] | [INFO] [stdout] 11 | fn parse_input(file_path: String) -> HashMap { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `release_pressure` is never used [INFO] [stdout] --> src/day16/day16.rs:51:4 [INFO] [stdout] | [INFO] [stdout] 51 | fn release_pressure(valves: &HashMap, opened: &mut HashMap, current: String, time: i32, mut pressure: u... [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `k` is used to index `tails` [INFO] [stdout] --> src/day9/day9.rs:81:22 [INFO] [stdout] | [INFO] [stdout] 81 | for k in 0..tails.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] 81 - for k in 0..tails.len() { [INFO] [stdout] 81 + for (k, ) in tails.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `release_pressure_elephant` is never used [INFO] [stdout] --> src/day16/day16.rs:102:4 [INFO] [stdout] | [INFO] [stdout] 102 | fn release_pressure_elephant(valves: &HashMap, opened: &mut HashMap, me: String, elephant: String, tim... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `solution` is never used [INFO] [stdout] --> src/day16/day16.rs:223:8 [INFO] [stdout] | [INFO] [stdout] 223 | pub fn solution() { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Direction` is never used [INFO] [stdout] --> src/day17/day17.rs:5:6 [INFO] [stdout] | [INFO] [stdout] 5 | enum Direction { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `ShapeType` is never used [INFO] [stdout] --> src/day17/day17.rs:11:6 [INFO] [stdout] | [INFO] [stdout] 11 | enum ShapeType { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Shape` is never constructed [INFO] [stdout] --> src/day17/day17.rs:19:8 [INFO] [stdout] | [INFO] [stdout] 19 | struct Shape { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `can_move`, `move_shape`, `fall`, and `print_coords` are never used [INFO] [stdout] --> src/day17/day17.rs:24:12 [INFO] [stdout] | [INFO] [stdout] 23 | impl Shape { [INFO] [stdout] | ---------- associated items in this implementation [INFO] [stdout] 24 | pub fn new(shape_type: ShapeType, bottom_left_coord: (i64, i64)) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 82 | fn can_move(&self, dir: &Direction, board: &[[u32; AREA_HEIGHT]]) -> bool { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 101 | pub fn move_shape(&mut self, dir: &Direction, board: &[[u32; AREA_HEIGHT]]) -> bool { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 117 | pub fn fall(&mut self, board: &mut [[u32; AREA_HEIGHT]]) -> bool { [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 139 | pub fn print_coords(&self) { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_input` is never used [INFO] [stdout] --> src/day17/day17.rs:146:4 [INFO] [stdout] | [INFO] [stdout] 146 | fn parse_input(file_path: String) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `AREA_HEIGHT` is never used [INFO] [stdout] --> src/day17/day17.rs:168:7 [INFO] [stdout] | [INFO] [stdout] 168 | const AREA_HEIGHT: usize = 30000; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `solution` is never used [INFO] [stdout] --> src/day17/day17.rs:169:8 [INFO] [stdout] | [INFO] [stdout] 169 | pub fn solution() { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_input` is never used [INFO] [stdout] --> src/day18/day18.rs:7:4 [INFO] [stdout] | [INFO] [stdout] 7 | fn parse_input(file_path: String) -> Vec<(i32, i32, i32)> { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_surface_area` is never used [INFO] [stdout] --> src/day18/day18.rs:30:4 [INFO] [stdout] | [INFO] [stdout] 30 | fn get_surface_area(points: &Vec<(i32, i32, i32)>) -> (i32, HashSet<(i32, i32, i32)>) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `SEARCH_LIMIT` is never used [INFO] [stdout] --> src/day18/day18.rs:117:7 [INFO] [stdout] | [INFO] [stdout] 117 | const SEARCH_LIMIT: i32 = 20; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `air_bubble_surface` is never used [INFO] [stdout] --> src/day18/day18.rs:118:4 [INFO] [stdout] | [INFO] [stdout] 118 | fn air_bubble_surface(points: &Vec<(i32, i32, i32)>, visited: &mut HashSet<(i32, i32, i32)>, point: (i32, i32, i32)) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `solution` is never used [INFO] [stdout] --> src/day18/day18.rs:162:8 [INFO] [stdout] | [INFO] [stdout] 162 | pub fn solution() { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `RobotType` is never used [INFO] [stdout] --> src/day19/day19.rs:7:6 [INFO] [stdout] | [INFO] [stdout] 7 | enum RobotType { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Blueprint` is never constructed [INFO] [stdout] --> src/day19/day19.rs:13:8 [INFO] [stdout] | [INFO] [stdout] 13 | struct Blueprint { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `State` is never constructed [INFO] [stdout] --> src/day19/day19.rs:21:8 [INFO] [stdout] | [INFO] [stdout] 21 | struct State<'a> { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `advance_time`, `clone`, and `print` are never used [INFO] [stdout] --> src/day19/day19.rs:35:12 [INFO] [stdout] | [INFO] [stdout] 34 | impl<'a> State<'a> { [INFO] [stdout] | ------------------ associated items in this implementation [INFO] [stdout] 35 | pub fn new(blueprint: &'a Blueprint) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 51 | pub fn advance_time(&mut self) { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 68 | pub fn clone(&self) -> Self { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 84 | pub fn print(&self) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `simulate` is never used [INFO] [stdout] --> src/day19/day19.rs:91:4 [INFO] [stdout] | [INFO] [stdout] 91 | fn simulate(bp: &Blueprint, MINUTES: u32) -> u32{ [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_input` is never used [INFO] [stdout] --> src/day19/day19.rs:191:4 [INFO] [stdout] | [INFO] [stdout] 191 | fn parse_input(file_path: String) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `solution` is never used [INFO] [stdout] --> src/day19/day19.rs:243:8 [INFO] [stdout] | [INFO] [stdout] 243 | pub fn solution() { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_input` is never used [INFO] [stdout] --> src/day20/day20.rs:3:4 [INFO] [stdout] | [INFO] [stdout] 3 | fn parse_input(file_path: String) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `find_index` is never used [INFO] [stdout] --> src/day20/day20.rs:19:4 [INFO] [stdout] | [INFO] [stdout] 19 | fn find_index(numbers: &Vec<(usize, i64)>, i: usize) -> usize { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `print` is never used [INFO] [stdout] --> src/day20/day20.rs:30:4 [INFO] [stdout] | [INFO] [stdout] 30 | fn print(numbers: &Vec<(usize, i32)>) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `mix` is never used [INFO] [stdout] --> src/day20/day20.rs:37:4 [INFO] [stdout] | [INFO] [stdout] 37 | fn mix(original_numbers: &Vec, numbers: &mut Vec<(usize, i64)>) { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_coordinates` is never used [INFO] [stdout] --> src/day20/day20.rs:59:4 [INFO] [stdout] | [INFO] [stdout] 59 | fn get_coordinates(numbers: &Vec<(usize, i64)>) -> i64 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `solution` is never used [INFO] [stdout] --> src/day20/day20.rs:74:8 [INFO] [stdout] | [INFO] [stdout] 74 | pub fn solution() { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Op` is never used [INFO] [stdout] --> src/day21/day21.rs:5:6 [INFO] [stdout] | [INFO] [stdout] 5 | enum Op { [INFO] [stdout] | ^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Activity` is never used [INFO] [stdout] --> src/day21/day21.rs:12:6 [INFO] [stdout] | [INFO] [stdout] 12 | enum Activity { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_input` is never used [INFO] [stdout] --> src/day21/day21.rs:17:4 [INFO] [stdout] | [INFO] [stdout] 17 | fn parse_input(file_path: String) -> HashMap { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `solve` is never used [INFO] [stdout] --> src/day21/day21.rs:53:4 [INFO] [stdout] | [INFO] [stdout] 53 | fn solve(current: &String, monkeys: &HashMap) -> i64 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `solution` is never used [INFO] [stdout] --> src/day21/day21.rs:76:8 [INFO] [stdout] | [INFO] [stdout] 76 | pub fn solution() { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Tile` is never used [INFO] [stdout] --> src/day22/day22.rs:5:6 [INFO] [stdout] | [INFO] [stdout] 5 | enum Tile { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_input` is never used [INFO] [stdout] --> src/day22/day22.rs:10:4 [INFO] [stdout] | [INFO] [stdout] 10 | fn parse_input(file_path: String) -> (HashMap<(u32, u32), Tile>, Vec<(u32, i32)>, [(u32, u32, u32, u32); 6]) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `find_start_position` is never used [INFO] [stdout] --> src/day22/day22.rs:108:4 [INFO] [stdout] | [INFO] [stdout] 108 | fn find_start_position(map: &HashMap<(u32, u32), Tile>) -> (u32, u32) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `find_wrap_around` is never used [INFO] [stdout] --> src/day22/day22.rs:119:4 [INFO] [stdout] | [INFO] [stdout] 119 | fn find_wrap_around(map: &HashMap<(u32, u32), Tile>, mut current_position: (u32, u32), direction: u32) -> (u32, u32) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_area` is never used [INFO] [stdout] --> src/day22/day22.rs:142:4 [INFO] [stdout] | [INFO] [stdout] 142 | fn get_area(areas: [(u32, u32, u32, u32); 6], current_position: (u32, u32)) -> u32 { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `find_wrap_around_cube` is never used [INFO] [stdout] --> src/day22/day22.rs:154:4 [INFO] [stdout] | [INFO] [stdout] 154 | fn find_wrap_around_cube(map: &HashMap<(u32, u32), Tile>, mut current_position: (u32, u32), mut direction: u32, areas: [(u32, u32, ... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `solve` is never used [INFO] [stdout] --> src/day22/day22.rs:307:4 [INFO] [stdout] | [INFO] [stdout] 307 | fn solve(map: &HashMap<(u32, u32), Tile>, directions: &Vec<(u32, i32)>, areas: [(u32, u32, u32, u32); 6], cube_wrapping: bool) -> u... [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `solution` is never used [INFO] [stdout] --> src/day22/day22.rs:361:8 [INFO] [stdout] | [INFO] [stdout] 361 | pub fn solution() { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Elf` is never constructed [INFO] [stdout] --> src/day23/day23.rs:5:8 [INFO] [stdout] | [INFO] [stdout] 5 | struct Elf { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Direction` is never used [INFO] [stdout] --> src/day23/day23.rs:12:6 [INFO] [stdout] | [INFO] [stdout] 12 | enum Direction { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_input` is never used [INFO] [stdout] --> src/day23/day23.rs:19:4 [INFO] [stdout] | [INFO] [stdout] 19 | fn parse_input(file_path: String) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_rectangle_size` is never used [INFO] [stdout] --> src/day23/day23.rs:38:4 [INFO] [stdout] | [INFO] [stdout] 38 | fn get_rectangle_size(elves: &Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `print_map` is never used [INFO] [stdout] --> src/day23/day23.rs:57:4 [INFO] [stdout] | [INFO] [stdout] 57 | fn print_map(elves: &Vec) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `propose` is never used [INFO] [stdout] --> src/day23/day23.rs:87:4 [INFO] [stdout] | [INFO] [stdout] 87 | fn propose(elves_map: &HashMap<(i32, i32), usize>, elf: &Elf, dir: &Direction) -> Option<(i32, i32)> { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `solve` is never used [INFO] [stdout] --> src/day23/day23.rs:138:4 [INFO] [stdout] | [INFO] [stdout] 138 | fn solve(elves: &mut Vec) -> i32 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `solution` is never used [INFO] [stdout] --> src/day23/day23.rs:209:8 [INFO] [stdout] | [INFO] [stdout] 209 | pub fn solution() { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Blizzard` is never constructed [INFO] [stdout] --> src/day24/day24.rs:6:8 [INFO] [stdout] | [INFO] [stdout] 6 | struct Blizzard { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `State` is never constructed [INFO] [stdout] --> src/day24/day24.rs:13:8 [INFO] [stdout] | [INFO] [stdout] 13 | struct State { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_input` is never used [INFO] [stdout] --> src/day24/day24.rs:35:4 [INFO] [stdout] | [INFO] [stdout] 35 | fn parse_input(file_path: String) -> (Vec>, Vec) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `calculate_cost` is never used [INFO] [stdout] --> src/day24/day24.rs:58:4 [INFO] [stdout] | [INFO] [stdout] 58 | fn calculate_cost(position: (u32, u32), goal: (u32, u32), time: u32) -> u32 { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `solve` is never used [INFO] [stdout] --> src/day24/day24.rs:65:4 [INFO] [stdout] | [INFO] [stdout] 65 | fn solve(blizzards_cache: &Vec<(Vec, HashMap<(u32,u32), u32>)>, map: &Vec>, start: (u32, u32), end: (u32, u32), ... [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `solution` is never used [INFO] [stdout] --> src/day24/day24.rs:170:8 [INFO] [stdout] | [INFO] [stdout] 170 | pub fn solution() { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/main.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | pub mod day1; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] = note: `#[warn(clippy::module_inception)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `tails_visited` [INFO] [stdout] --> src/day9/day9.rs:176:14 [INFO] [stdout] | [INFO] [stdout] 176 | for i in 0..N { [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] 176 - for i in 0..N { [INFO] [stdout] 176 + for (i, ) in tails_visited.iter().enumerate().take(N) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Ok` variant of the iterator element is used [INFO] [stdout] --> src/day1/day1.rs:16:9 [INFO] [stdout] | [INFO] [stdout] 16 | / for line in lines { [INFO] [stdout] 17 | | if let Ok(l) = line { [INFO] [stdout] 18 | | match l.parse::() { [INFO] [stdout] 19 | | Ok(n) => { [INFO] [stdout] ... | [INFO] [stdout] 30 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/day1/day1.rs:17:13 [INFO] [stdout] | [INFO] [stdout] 17 | / if let Ok(l) = line { [INFO] [stdout] 18 | | match l.parse::() { [INFO] [stdout] 19 | | Ok(n) => { [INFO] [stdout] 20 | | curr_calories += n; [INFO] [stdout] ... | [INFO] [stdout] 29 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] = note: `#[warn(clippy::manual_flatten)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 16 ~ for l in lines.flatten() { [INFO] [stdout] 17 + match l.parse::() { [INFO] [stdout] 18 + Ok(n) => { [INFO] [stdout] 19 + curr_calories += n; [INFO] [stdout] 20 + }, [INFO] [stdout] 21 + Err(_) => { [INFO] [stdout] 22 + if max_calories < curr_calories { [INFO] [stdout] 23 + max_calories = curr_calories; [INFO] [stdout] 24 + } [INFO] [stdout] 25 + curr_calories = 0; [INFO] [stdout] 26 + } [INFO] [stdout] 27 + } [INFO] [stdout] 28 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Ok` variant of the iterator element is used [INFO] [stdout] --> src/day1/day1.rs:53:9 [INFO] [stdout] | [INFO] [stdout] 53 | / for line in lines { [INFO] [stdout] 54 | | if let Ok(l) = line { [INFO] [stdout] 55 | | match l.parse::() { [INFO] [stdout] 56 | | Ok(n) => { [INFO] [stdout] ... | [INFO] [stdout] 79 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/day1/day1.rs:54:13 [INFO] [stdout] | [INFO] [stdout] 54 | / if let Ok(l) = line { [INFO] [stdout] 55 | | match l.parse::() { [INFO] [stdout] 56 | | Ok(n) => { [INFO] [stdout] 57 | | curr_calories += n; [INFO] [stdout] ... | [INFO] [stdout] 78 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 53 ~ for l in lines.flatten() { [INFO] [stdout] 54 + match l.parse::() { [INFO] [stdout] 55 + Ok(n) => { [INFO] [stdout] 56 + curr_calories += n; [INFO] [stdout] 57 + }, [INFO] [stdout] 58 + Err(_) => { [INFO] [stdout] 59 + [INFO] [stdout] 60 + if elf3 < curr_calories { [INFO] [stdout] 61 + if elf2 < curr_calories { [INFO] [stdout] 62 + elf3 = elf2; [INFO] [stdout] 63 + if elf1 < curr_calories { [INFO] [stdout] 64 + elf2 = elf1; [INFO] [stdout] 65 + elf1 = curr_calories; [INFO] [stdout] 66 + } else { [INFO] [stdout] 67 + elf2 = curr_calories; [INFO] [stdout] 68 + } [INFO] [stdout] 69 + } else { [INFO] [stdout] 70 + elf3 = curr_calories; [INFO] [stdout] 71 + } [INFO] [stdout] 72 + } [INFO] [stdout] 73 + [INFO] [stdout] 74 + curr_calories = 0; [INFO] [stdout] 75 + } [INFO] [stdout] 76 + } [INFO] [stdout] 77 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/main.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | pub mod day2; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/main.rs:29:5 [INFO] [stdout] | [INFO] [stdout] 29 | pub mod day10; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Ok` variant of the iterator element is used [INFO] [stdout] --> src/day2/day2.rs:10:9 [INFO] [stdout] | [INFO] [stdout] 10 | / for line in lines { [INFO] [stdout] 11 | | if let Ok(l) = line { [INFO] [stdout] 12 | | let mut tokens = l.split(' ').fuse(); [INFO] [stdout] 13 | | let opponent = tokens.next().expect("Opponent token empty"); [INFO] [stdout] ... | [INFO] [stdout] 43 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/day2/day2.rs:11:13 [INFO] [stdout] | [INFO] [stdout] 11 | / if let Ok(l) = line { [INFO] [stdout] 12 | | let mut tokens = l.split(' ').fuse(); [INFO] [stdout] 13 | | let opponent = tokens.next().expect("Opponent token empty"); [INFO] [stdout] 14 | | let me = tokens.next().expect("My token empty"); [INFO] [stdout] ... | [INFO] [stdout] 42 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 10 ~ for l in lines.flatten() { [INFO] [stdout] 11 + let mut tokens = l.split(' ').fuse(); [INFO] [stdout] 12 + let opponent = tokens.next().expect("Opponent token empty"); [INFO] [stdout] 13 + let me = tokens.next().expect("My token empty"); [INFO] [stdout] 14 + [INFO] [stdout] 15 + match me { [INFO] [stdout] 16 + "X" => all_points += 1, [INFO] [stdout] 17 + "Y" => all_points += 2, [INFO] [stdout] 18 + "Z" => all_points += 3, [INFO] [stdout] 19 + _ => println!("ERROR") [INFO] [stdout] 20 + } [INFO] [stdout] 21 + [INFO] [stdout] 22 + if opponent == "A" { [INFO] [stdout] 23 + match me { [INFO] [stdout] 24 + "Y" => all_points += 6, [INFO] [stdout] 25 + "X" => all_points += 3, [INFO] [stdout] 26 + _ => () [INFO] [stdout] 27 + } [INFO] [stdout] 28 + } else if opponent == "B" { [INFO] [stdout] 29 + match me { [INFO] [stdout] 30 + "Z" => all_points += 6, [INFO] [stdout] 31 + "Y" => all_points += 3, [INFO] [stdout] 32 + _ => () [INFO] [stdout] 33 + } [INFO] [stdout] 34 + } else { [INFO] [stdout] 35 + match me { [INFO] [stdout] 36 + "X" => all_points += 6, [INFO] [stdout] 37 + "Z" => all_points += 3, [INFO] [stdout] 38 + _ => () [INFO] [stdout] 39 + } [INFO] [stdout] 40 + } [INFO] [stdout] 41 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `x` [INFO] [stdout] --> src/day10/day10.rs:49:14 [INFO] [stdout] | [INFO] [stdout] 49 | for i in 0..240 { [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] 49 - for i in 0..240 { [INFO] [stdout] 49 + for (i, ) in x.iter().enumerate().take(240) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/main.rs:32:5 [INFO] [stdout] | [INFO] [stdout] 32 | pub mod day11; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/day11/day11.rs:46:17 [INFO] [stdout] | [INFO] [stdout] 46 | return x + val % lcm; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 46 - return x + val % lcm; [INFO] [stdout] 46 + x + val % lcm [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/day11/day11.rs:49:17 [INFO] [stdout] | [INFO] [stdout] 49 | return x - val; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 49 - return x - val; [INFO] [stdout] 49 + x - val [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/day11/day11.rs:52:17 [INFO] [stdout] | [INFO] [stdout] 52 | return ((x as u64) * (val as u64) % lcm as u64) as u32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 52 - return ((x as u64) * (val as u64) % lcm as u64) as u32; [INFO] [stdout] 52 + ((x as u64) * (val as u64) % lcm as u64) as u32 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/day11/day11.rs:55:17 [INFO] [stdout] | [INFO] [stdout] 55 | return x / val; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 55 - return x / val; [INFO] [stdout] 55 + x / val [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Ok` variant of the iterator element is used [INFO] [stdout] --> src/day2/day2.rs:60:9 [INFO] [stdout] | [INFO] [stdout] 60 | / for line in lines { [INFO] [stdout] 61 | | if let Ok(l) = line { [INFO] [stdout] 62 | | let mut tokens = l.split(' ').fuse(); [INFO] [stdout] 63 | | let opponent = tokens.next().expect("Opponent token empty"); [INFO] [stdout] ... | [INFO] [stdout] 97 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/day2/day2.rs:61:13 [INFO] [stdout] | [INFO] [stdout] 61 | / if let Ok(l) = line { [INFO] [stdout] 62 | | let mut tokens = l.split(' ').fuse(); [INFO] [stdout] 63 | | let opponent = tokens.next().expect("Opponent token empty"); [INFO] [stdout] 64 | | let outcome = tokens.next().expect("Outcome token empty"); [INFO] [stdout] ... | [INFO] [stdout] 96 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 60 ~ for l in lines.flatten() { [INFO] [stdout] 61 + let mut tokens = l.split(' ').fuse(); [INFO] [stdout] 62 + let opponent = tokens.next().expect("Opponent token empty"); [INFO] [stdout] 63 + let outcome = tokens.next().expect("Outcome token empty"); [INFO] [stdout] 64 + [INFO] [stdout] 65 + match outcome { [INFO] [stdout] 66 + "X" => { // lose [INFO] [stdout] 67 + match opponent { [INFO] [stdout] 68 + "A" => all_points += 3, [INFO] [stdout] 69 + "B" => all_points += 1, [INFO] [stdout] 70 + "C" => all_points += 2, [INFO] [stdout] 71 + _ => () [INFO] [stdout] 72 + } [INFO] [stdout] 73 + } [INFO] [stdout] 74 + "Y" => { // draw [INFO] [stdout] 75 + all_points += 3; [INFO] [stdout] 76 + match opponent { [INFO] [stdout] 77 + "A" => all_points += 1, [INFO] [stdout] 78 + "B" => all_points += 2, [INFO] [stdout] 79 + "C" => all_points += 3, [INFO] [stdout] 80 + _ => () [INFO] [stdout] 81 + } [INFO] [stdout] 82 + } [INFO] [stdout] 83 + "Z" => { // win [INFO] [stdout] 84 + all_points += 6; [INFO] [stdout] 85 + match opponent { [INFO] [stdout] 86 + "A" => all_points += 2, [INFO] [stdout] 87 + "B" => all_points += 3, [INFO] [stdout] 88 + "C" => all_points += 1, [INFO] [stdout] 89 + _ => () [INFO] [stdout] 90 + } [INFO] [stdout] 91 + } [INFO] [stdout] 92 + _ => println!("ERROR") [INFO] [stdout] 93 + } [INFO] [stdout] 94 + [INFO] [stdout] 95 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/main.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | pub mod day3; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Ok` variant of the iterator element is used [INFO] [stdout] --> src/day3/day3.rs:11:9 [INFO] [stdout] | [INFO] [stdout] 11 | / for line in lines { [INFO] [stdout] 12 | | if let Ok(l) = line { [INFO] [stdout] 13 | | let compartment_split = l.len() / 2; [INFO] [stdout] 14 | | let comp1 = &l[..compartment_split]; [INFO] [stdout] ... | [INFO] [stdout] 32 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/day3/day3.rs:12:13 [INFO] [stdout] | [INFO] [stdout] 12 | / if let Ok(l) = line { [INFO] [stdout] 13 | | let compartment_split = l.len() / 2; [INFO] [stdout] 14 | | let comp1 = &l[..compartment_split]; [INFO] [stdout] 15 | | let comp2 = &l[compartment_split..]; [INFO] [stdout] ... | [INFO] [stdout] 31 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 11 ~ for l in lines.flatten() { [INFO] [stdout] 12 + let compartment_split = l.len() / 2; [INFO] [stdout] 13 + let comp1 = &l[..compartment_split]; [INFO] [stdout] 14 + let comp2 = &l[compartment_split..]; [INFO] [stdout] 15 + let mut found_chars = HashSet::new(); [INFO] [stdout] 16 + //println!("{} Comparing {} and {}", compartment_split, comp1, comp2); [INFO] [stdout] 17 + for c in comp1.chars() { [INFO] [stdout] 18 + if !found_chars.contains(&c) && comp2.contains(c) { [INFO] [stdout] 19 + //println!("{}", c); [INFO] [stdout] 20 + found_chars.insert(c); [INFO] [stdout] 21 + if c <= 'Z' { [INFO] [stdout] 22 + priority += (c as u32 - 65 + 27); [INFO] [stdout] 23 + } else { [INFO] [stdout] 24 + priority += (c as u32 - 97 + 1); [INFO] [stdout] 25 + } [INFO] [stdout] 26 + } [INFO] [stdout] 27 + } [INFO] [stdout] 28 + [INFO] [stdout] 29 + [INFO] [stdout] 30 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/day11/day11.rs:71:15 [INFO] [stdout] | [INFO] [stdout] 71 | match i % self.test_division == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `i.is_multiple_of(self.test_division)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/main.rs:11:5 [INFO] [stdout] | [INFO] [stdout] 11 | pub mod day4; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Ok` variant of the iterator element is used [INFO] [stdout] --> src/day4/day4.rs:10:9 [INFO] [stdout] | [INFO] [stdout] 10 | / for line in lines { [INFO] [stdout] 11 | | if let Ok(l) = line { [INFO] [stdout] 12 | | [INFO] [stdout] 13 | | let s: Vec<&str> = l.split(',').collect(); [INFO] [stdout] ... | [INFO] [stdout] 27 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/day4/day4.rs:11:13 [INFO] [stdout] | [INFO] [stdout] 11 | / if let Ok(l) = line { [INFO] [stdout] 12 | | [INFO] [stdout] 13 | | let s: Vec<&str> = l.split(',').collect(); [INFO] [stdout] 14 | | let s1: Vec<&str> = s[0].split('-').collect(); [INFO] [stdout] ... | [INFO] [stdout] 26 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 10 ~ for l in lines.flatten() { [INFO] [stdout] 11 + [INFO] [stdout] 12 + let s: Vec<&str> = l.split(',').collect(); [INFO] [stdout] 13 + let s1: Vec<&str> = s[0].split('-').collect(); [INFO] [stdout] 14 + let s2: Vec<&str> = s[1].split('-').collect(); [INFO] [stdout] 15 + [INFO] [stdout] 16 + let x1: i32 = s1[0].parse().expect("Error x1"); [INFO] [stdout] 17 + let y1: i32 = s1[1].parse().expect("Error y1"); [INFO] [stdout] 18 + let x2: i32 = s2[0].parse().expect("Error x2"); [INFO] [stdout] 19 + let y2: i32 = s2[1].parse().expect("Error y2"); [INFO] [stdout] 20 + [INFO] [stdout] 21 + if (x1 >= x2 && y1 <= y2) || (x1 <= x2 && y1 >= y2) { [INFO] [stdout] 22 + overlaps += 1; [INFO] [stdout] 23 + } [INFO] [stdout] 24 + [INFO] [stdout] 25 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Ok` variant of the iterator element is used [INFO] [stdout] --> src/day4/day4.rs:44:9 [INFO] [stdout] | [INFO] [stdout] 44 | / for line in lines { [INFO] [stdout] 45 | | if let Ok(l) = line { [INFO] [stdout] 46 | | [INFO] [stdout] 47 | | let s: Vec<&str> = l.split(',').collect(); [INFO] [stdout] ... | [INFO] [stdout] 61 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/day4/day4.rs:45:13 [INFO] [stdout] | [INFO] [stdout] 45 | / if let Ok(l) = line { [INFO] [stdout] 46 | | [INFO] [stdout] 47 | | let s: Vec<&str> = l.split(',').collect(); [INFO] [stdout] 48 | | let s1: Vec<&str> = s[0].split('-').collect(); [INFO] [stdout] ... | [INFO] [stdout] 60 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 44 ~ for l in lines.flatten() { [INFO] [stdout] 45 + [INFO] [stdout] 46 + let s: Vec<&str> = l.split(',').collect(); [INFO] [stdout] 47 + let s1: Vec<&str> = s[0].split('-').collect(); [INFO] [stdout] 48 + let s2: Vec<&str> = s[1].split('-').collect(); [INFO] [stdout] 49 + [INFO] [stdout] 50 + let x1: i32 = s1[0].parse().expect("Error x1"); [INFO] [stdout] 51 + let y1: i32 = s1[1].parse().expect("Error y1"); [INFO] [stdout] 52 + let x2: i32 = s2[0].parse().expect("Error x2"); [INFO] [stdout] 53 + let y2: i32 = s2[1].parse().expect("Error y2"); [INFO] [stdout] 54 + [INFO] [stdout] 55 + if !(y2 < x1 || x2 > y1) { [INFO] [stdout] 56 + overlaps += 1; [INFO] [stdout] 57 + } [INFO] [stdout] 58 + [INFO] [stdout] 59 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/main.rs:14:5 [INFO] [stdout] | [INFO] [stdout] 14 | pub mod day5; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/day5/day5.rs:5:38 [INFO] [stdout] | [INFO] [stdout] 5 | fn parse_input(file_path: String) -> ([VecDeque; 9], Vec<(u32, u32, u32)>) { [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 loop could be written as a `for` loop [INFO] [stdout] --> src/day11/day11.rs:102:13 [INFO] [stdout] | [INFO] [stdout] 102 | while let Some(s) = items_line_split.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for s in items_line_split` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] = note: `#[warn(clippy::while_let_on_iterator)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to one [INFO] [stdout] --> src/day5/day5.rs:17:16 [INFO] [stdout] | [INFO] [stdout] 17 | if l.len() >= 1 && l.chars().nth(1).unwrap() == '1' { [INFO] [stdout] | ^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!l.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: the loop variable `i` is used to index `stacks` [INFO] [stdout] --> src/day5/day5.rs:20:22 [INFO] [stdout] | [INFO] [stdout] 20 | for i in 0..9 { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 20 - for i in 0..9 { [INFO] [stdout] 20 + for (i, ) in stacks.iter_mut().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this looks like you are swapping `max` and `min` manually [INFO] [stdout] --> src/day11/day11.rs:171:9 [INFO] [stdout] | [INFO] [stdout] 171 | / let val = max; [INFO] [stdout] 172 | | max = min; [INFO] [stdout] 173 | | min = val; [INFO] [stdout] | |__________________^ help: try: `std::mem::swap(&mut max, &mut min);` [INFO] [stdout] | [INFO] [stdout] = note: or maybe you should use `std::mem::replace`? [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_swap [INFO] [stdout] = note: `#[warn(clippy::manual_swap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/day5/day5.rs:53:13 [INFO] [stdout] | [INFO] [stdout] 53 | / match stacks[from as usize].pop_back() { [INFO] [stdout] 54 | | Some(e) => stacks[to as usize].push_back(e), [INFO] [stdout] 55 | | None => () [INFO] [stdout] 56 | | } [INFO] [stdout] | |_____________^ help: try: `if let Some(e) = stacks[from as usize].pop_back() { stacks[to as usize].push_back(e) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/day5/day5.rs:89:13 [INFO] [stdout] | [INFO] [stdout] 89 | / match stacks[from as usize].pop_back() { [INFO] [stdout] 90 | | Some(e) => tmp.push_front(e), [INFO] [stdout] 91 | | None => () [INFO] [stdout] 92 | | } [INFO] [stdout] | |_____________^ help: try: `if let Some(e) = stacks[from as usize].pop_back() { tmp.push_front(e) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/main.rs:17:5 [INFO] [stdout] | [INFO] [stdout] 17 | pub mod day6; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/main.rs:35:5 [INFO] [stdout] | [INFO] [stdout] 35 | pub mod day12; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/day12/day12.rs:4:38 [INFO] [stdout] | [INFO] [stdout] 4 | fn parse_input(file_path: String) -> ((u32, u32), (u32, u32), Vec>) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/day12/day12.rs:16:9 [INFO] [stdout] | [INFO] [stdout] 16 | while let Some(s) = lines.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for s in lines` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/main.rs:20:5 [INFO] [stdout] | [INFO] [stdout] 20 | pub mod day7; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day12/day12.rs:47:52 [INFO] [stdout] | [INFO] [stdout] 47 | fn part1(start: (u32, u32), end: (u32, u32), grid: &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] 47 - fn part1(start: (u32, u32), end: (u32, u32), grid: &Vec>) { [INFO] [stdout] 47 + fn part1(start: (u32, u32), end: (u32, u32), grid: &[Vec]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `grid.get(0)` [INFO] [stdout] --> src/day12/day12.rs:53:13 [INFO] [stdout] | [INFO] [stdout] 53 | let M = grid.get(0).unwrap().len() as u32; [INFO] [stdout] | ^^^^^^^^^^^ help: try: `grid.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/day12/day12.rs:123:17 [INFO] [stdout] | [INFO] [stdout] 123 | if next_val <= val as i32 && val as i32 - next_val <= 1 || next_val > val as i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 123 - if next_val <= val as i32 && val as i32 - next_val <= 1 || next_val > val as i32 { [INFO] [stdout] 123 + if !(next_val <= val as i32 && val as i32 - next_val > 1) { [INFO] [stdout] | [INFO] [stdout] 123 - if next_val <= val as i32 && val as i32 - next_val <= 1 || next_val > val as i32 { [INFO] [stdout] 123 + if next_val > val as i32 || val as i32 - next_val <= 1 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/day12/day12.rs:129:17 [INFO] [stdout] | [INFO] [stdout] 129 | if next_val <= val as i32 && val as i32 - next_val <= 1 || next_val > val as i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 129 - if next_val <= val as i32 && val as i32 - next_val <= 1 || next_val > val as i32 { [INFO] [stdout] 129 + if !(next_val <= val as i32 && val as i32 - next_val > 1) { [INFO] [stdout] | [INFO] [stdout] 129 - if next_val <= val as i32 && val as i32 - next_val <= 1 || next_val > val as i32 { [INFO] [stdout] 129 + if next_val > val as i32 || val as i32 - next_val <= 1 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/day12/day12.rs:135:17 [INFO] [stdout] | [INFO] [stdout] 135 | if next_val <= val as i32 && val as i32 - next_val <= 1 || next_val > val as i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 135 - if next_val <= val as i32 && val as i32 - next_val <= 1 || next_val > val as i32 { [INFO] [stdout] 135 + if !(next_val <= val as i32 && val as i32 - next_val > 1) { [INFO] [stdout] | [INFO] [stdout] 135 - if next_val <= val as i32 && val as i32 - next_val <= 1 || next_val > val as i32 { [INFO] [stdout] 135 + if next_val > val as i32 || val as i32 - next_val <= 1 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/day12/day12.rs:141:17 [INFO] [stdout] | [INFO] [stdout] 141 | if next_val <= val as i32 && val as i32 - next_val <= 1 || next_val > val as i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 141 - if next_val <= val as i32 && val as i32 - next_val <= 1 || next_val > val as i32 { [INFO] [stdout] 141 + if !(next_val <= val as i32 && val as i32 - next_val > 1) { [INFO] [stdout] | [INFO] [stdout] 141 - if next_val <= val as i32 && val as i32 - next_val <= 1 || next_val > val as i32 { [INFO] [stdout] 141 + if next_val > val as i32 || val as i32 - next_val <= 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/day12/day12.rs:91:52 [INFO] [stdout] | [INFO] [stdout] 91 | fn part2(start: (u32, u32), end: (u32, u32), grid: &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] 91 - fn part2(start: (u32, u32), end: (u32, u32), grid: &Vec>) { [INFO] [stdout] 91 + fn part2(start: (u32, u32), end: (u32, u32), grid: &[Vec]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `grid.get(0)` [INFO] [stdout] --> src/day12/day12.rs:97:13 [INFO] [stdout] | [INFO] [stdout] 97 | let M = grid.get(0).unwrap().len() as u32; [INFO] [stdout] | ^^^^^^^^^^^ help: try: `grid.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods with the following characteristics: (`to_*` and `self` type is not `Copy`) usually take `self` by reference [INFO] [stdout] --> src/day7/day7.rs:182:20 [INFO] [stdout] | [INFO] [stdout] 182 | pub fn to_root(&mut self) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] = note: `#[warn(clippy::wrong_self_convention)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/day7/day7.rs:264:5 [INFO] [stdout] | [INFO] [stdout] 264 | return (size, result); [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] 264 - return (size, result); [INFO] [stdout] 264 + (size, result) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/main.rs:38:5 [INFO] [stdout] | [INFO] [stdout] 38 | pub mod day13; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/day7/day7.rs:253:8 [INFO] [stdout] | [INFO] [stdout] 253 | if dir.directories.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!dir.directories.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: this loop could be written as a `for` loop [INFO] [stdout] --> src/day13/day13.rs:18:9 [INFO] [stdout] | [INFO] [stdout] 18 | while let Some(s) = lines.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for s in lines` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/day13/day13.rs:21:16 [INFO] [stdout] | [INFO] [stdout] 21 | if line.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `line.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: length comparison to zero [INFO] [stdout] --> src/day13/day13.rs:45:20 [INFO] [stdout] | [INFO] [stdout] 45 | if spl.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!spl.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: accessing first element with `current_list.get(0)` [INFO] [stdout] --> src/day13/day13.rs:61:39 [INFO] [stdout] | [INFO] [stdout] 61 | if let Element::List(l) = current_list.get(0).unwrap() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `current_list.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day13/day13.rs:96:22 [INFO] [stdout] | [INFO] [stdout] 96 | fn check_lists(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] 96 - fn check_lists(left: &Vec, right: &Vec) -> i32 { [INFO] [stdout] 96 + fn check_lists(left: &[Element], 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/day13/day13.rs:96:44 [INFO] [stdout] | [INFO] [stdout] 96 | fn check_lists(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] 96 - fn check_lists(left: &Vec, right: &Vec) -> i32 { [INFO] [stdout] 96 + fn check_lists(left: &Vec, right: &[Element]) -> i32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `index` is used as a loop counter [INFO] [stdout] --> src/day13/day13.rs:162:5 [INFO] [stdout] | [INFO] [stdout] 162 | for mut l in lists { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: consider using: `for (index, mut l) in (1..).zip(lists.into_iter())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] = note: `#[warn(clippy::explicit_counter_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `all_lists.get(i).unwrap().get(0)` [INFO] [stdout] --> src/day13/day13.rs:206:22 [INFO] [stdout] | [INFO] [stdout] 206 | let el = all_lists.get(i).unwrap().get(0).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `all_lists.get(i).unwrap().first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `l.get(0)` [INFO] [stdout] --> src/day13/day13.rs:209:27 [INFO] [stdout] | [INFO] [stdout] 209 | match l.get(0).unwrap() { [INFO] [stdout] | ^^^^^^^^ help: try: `l.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/main.rs:41:5 [INFO] [stdout] | [INFO] [stdout] 41 | pub mod day14; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/day14/day14.rs:18:9 [INFO] [stdout] | [INFO] [stdout] 18 | while let Some(s) = lines.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for s in lines` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/main.rs:44:5 [INFO] [stdout] | [INFO] [stdout] 44 | pub mod day15; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/day15/day15.rs:22:9 [INFO] [stdout] | [INFO] [stdout] 22 | while let Some(s) = lines.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for s in lines` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `intervals` [INFO] [stdout] --> src/day15/day15.rs:140:14 [INFO] [stdout] | [INFO] [stdout] 140 | for i in 0..intervals.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] 140 - for i in 0..intervals.len() { [INFO] [stdout] 140 + for (i, ) in intervals.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/main.rs:47:5 [INFO] [stdout] | [INFO] [stdout] 47 | pub mod day16; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/day16/day16.rs:18:9 [INFO] [stdout] | [INFO] [stdout] 18 | while let Some(s) = lines.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for s in lines` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a suffix manually [INFO] [stdout] --> src/day16/day16.rs:35:37 [INFO] [stdout] | [INFO] [stdout] 35 | neighbours.push(n[..n.len()-1].to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the suffix was tested here [INFO] [stdout] --> src/day16/day16.rs:34:17 [INFO] [stdout] | [INFO] [stdout] 34 | if n.ends_with(",") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] = note: `#[warn(clippy::manual_strip)]` on by default [INFO] [stdout] help: try using the `strip_suffix` method [INFO] [stdout] | [INFO] [stdout] 34 ~ if let Some() = n.strip_suffix(",") { [INFO] [stdout] 35 ~ neighbours.push(.to_string()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/day16/day16.rs:98:5 [INFO] [stdout] | [INFO] [stdout] 98 | return (max_pressure, final_opened); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 98 - return (max_pressure, final_opened); [INFO] [stdout] 98 + (max_pressure, final_opened) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/day16/day16.rs:219:5 [INFO] [stdout] | [INFO] [stdout] 219 | return max_pressure; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 219 - return max_pressure; [INFO] [stdout] 219 + max_pressure [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/day16/day16.rs:136:5 [INFO] [stdout] | [INFO] [stdout] 136 | / if me != elephant { [INFO] [stdout] 137 | | if !opened.get(&me.to_string()).unwrap() && !opened.get(&elephant.to_string()).unwrap() && my_valve.flow_rate != 0 && ele... [INFO] [stdout] 138 | | opened.insert(me.to_string(), true); [INFO] [stdout] 139 | | opened.insert(elephant.to_string(), true); [INFO] [stdout] ... | [INFO] [stdout] 155 | | } [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] 136 ~ if me != elephant [INFO] [stdout] 137 ~ && !opened.get(&me.to_string()).unwrap() && !opened.get(&elephant.to_string()).unwrap() && my_valve.flow_rate != 0 && elephant_valve.flow_rate != 0 { [INFO] [stdout] 138 | opened.insert(me.to_string(), true); [INFO] [stdout] ... [INFO] [stdout] 153 | opened.insert(me.to_string(), false); [INFO] [stdout] 154 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/main.rs:50:5 [INFO] [stdout] | [INFO] [stdout] 50 | pub mod day17; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!Range::contains` implementation [INFO] [stdout] --> src/day17/day17.rs:90:16 [INFO] [stdout] | [INFO] [stdout] 90 | if x < 0 || x >= 7 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: use: `!(0..7).contains(&x)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/day7/day7.rs:281:5 [INFO] [stdout] | [INFO] [stdout] 281 | return (size, freed_space); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 281 - return (size, freed_space); [INFO] [stdout] 281 + (size, freed_space) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/day7/day7.rs:270:8 [INFO] [stdout] | [INFO] [stdout] 270 | if dir.directories.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!dir.directories.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: module has the same name as its containing module [INFO] [stdout] --> src/main.rs:23:5 [INFO] [stdout] | [INFO] [stdout] 23 | pub mod day8; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day8/day8.rs:22:23 [INFO] [stdout] | [INFO] [stdout] 22 | fn tree_visible(grid: &Vec>, i: usize, j: usize) -> 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] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 22 - fn tree_visible(grid: &Vec>, i: usize, j: usize) -> bool { [INFO] [stdout] 22 + fn tree_visible(grid: &[Vec], i: usize, j: usize) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `grid.get(0)` [INFO] [stdout] --> src/day8/day8.rs:26:13 [INFO] [stdout] | [INFO] [stdout] 26 | let m = grid.get(0).unwrap().len(); [INFO] [stdout] | ^^^^^^^^^^^ help: try: `grid.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day8/day8.rs:51:21 [INFO] [stdout] | [INFO] [stdout] 51 | fn tree_score(grid: &Vec>, i: usize, j: usize) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 51 - fn tree_score(grid: &Vec>, i: usize, j: usize) -> usize { [INFO] [stdout] 51 + fn tree_score(grid: &[Vec], i: usize, j: usize) -> usize { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `grid.get(0)` [INFO] [stdout] --> src/day8/day8.rs:55:13 [INFO] [stdout] | [INFO] [stdout] 55 | let m = grid.get(0).unwrap().len(); [INFO] [stdout] | ^^^^^^^^^^^ help: try: `grid.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `grid.get(0)` [INFO] [stdout] --> src/day8/day8.rs:87:13 [INFO] [stdout] | [INFO] [stdout] 87 | let m = grid.get(0).unwrap().len(); [INFO] [stdout] | ^^^^^^^^^^^ help: try: `grid.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/main.rs:26:5 [INFO] [stdout] | [INFO] [stdout] 26 | pub mod day9; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `(i32, i32)` which implements the `Copy` trait [INFO] [stdout] --> src/day9/day9.rs:25:20 [INFO] [stdout] | [INFO] [stdout] 25 | let old_tail = tail.clone(); [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*tail` [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: the loop variable `k` is used to index `tails` [INFO] [stdout] --> src/day9/day9.rs:81:22 [INFO] [stdout] | [INFO] [stdout] 81 | for k in 0..tails.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] 81 - for k in 0..tails.len() { [INFO] [stdout] 81 + for (k, ) in tails.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `tails_visited` [INFO] [stdout] --> src/day9/day9.rs:176:14 [INFO] [stdout] | [INFO] [stdout] 176 | for i in 0..N { [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] 176 - for i in 0..N { [INFO] [stdout] 176 + for (i, ) in tails_visited.iter().enumerate().take(N) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/main.rs:29:5 [INFO] [stdout] | [INFO] [stdout] 29 | pub mod day10; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `x` [INFO] [stdout] --> src/day10/day10.rs:49:14 [INFO] [stdout] | [INFO] [stdout] 49 | for i in 0..240 { [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] 49 - for i in 0..240 { [INFO] [stdout] 49 + for (i, ) in x.iter().enumerate().take(240) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/main.rs:32:5 [INFO] [stdout] | [INFO] [stdout] 32 | pub mod day11; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/day11/day11.rs:46:17 [INFO] [stdout] | [INFO] [stdout] 46 | return x + val % lcm; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 46 - return x + val % lcm; [INFO] [stdout] 46 + x + val % lcm [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/day11/day11.rs:49:17 [INFO] [stdout] | [INFO] [stdout] 49 | return x - val; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 49 - return x - val; [INFO] [stdout] 49 + x - val [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/day11/day11.rs:52:17 [INFO] [stdout] | [INFO] [stdout] 52 | return ((x as u64) * (val as u64) % lcm as u64) as u32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 52 - return ((x as u64) * (val as u64) % lcm as u64) as u32; [INFO] [stdout] 52 + ((x as u64) * (val as u64) % lcm as u64) as u32 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/day11/day11.rs:55:17 [INFO] [stdout] | [INFO] [stdout] 55 | return x / val; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 55 - return x / val; [INFO] [stdout] 55 + x / val [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/day11/day11.rs:71:15 [INFO] [stdout] | [INFO] [stdout] 71 | match i % self.test_division == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `i.is_multiple_of(self.test_division)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/day11/day11.rs:102:13 [INFO] [stdout] | [INFO] [stdout] 102 | while let Some(s) = items_line_split.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for s in items_line_split` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] = note: `#[warn(clippy::while_let_on_iterator)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this looks like you are swapping `max` and `min` manually [INFO] [stdout] --> src/day11/day11.rs:171:9 [INFO] [stdout] | [INFO] [stdout] 171 | / let val = max; [INFO] [stdout] 172 | | max = min; [INFO] [stdout] 173 | | min = val; [INFO] [stdout] | |__________________^ help: try: `std::mem::swap(&mut max, &mut min);` [INFO] [stdout] | [INFO] [stdout] = note: or maybe you should use `std::mem::replace`? [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_swap [INFO] [stdout] = note: `#[warn(clippy::manual_swap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/day17/day17.rs:93:34 [INFO] [stdout] | [INFO] [stdout] 93 | if board[x as usize][(c.1 as i64) as usize] != 0 { [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `c.1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day17/day17.rs:102:26 [INFO] [stdout] | [INFO] [stdout] 102 | if self.can_move(&dir, board) { [INFO] [stdout] | ^^^^ help: change this to: `dir` [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: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/day17/day17.rs:120:51 [INFO] [stdout] | [INFO] [stdout] 120 | if c.1 - 1 < 0 || board[c.0 as usize][(c.1 as i64) as usize-1] != 0 { [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `c.1` [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: manual implementation of an assign operation [INFO] [stdout] --> src/day17/day17.rs:127:17 [INFO] [stdout] | [INFO] [stdout] 127 | c.1 = c.1 - 1; [INFO] [stdout] | ^^^^^^^^^^^^^ help: replace it with: `c.1 -= 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] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/day17/day17.rs:131:37 [INFO] [stdout] | [INFO] [stdout] 131 | board[c.0 as usize][(c.1 as i64) as usize] = 1; [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `c.1` [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: module has the same name as its containing module [INFO] [stdout] --> src/main.rs:35:5 [INFO] [stdout] | [INFO] [stdout] 35 | pub mod day12; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/day12/day12.rs:4:38 [INFO] [stdout] | [INFO] [stdout] 4 | fn parse_input(file_path: String) -> ((u32, u32), (u32, u32), Vec>) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/day12/day12.rs:16:9 [INFO] [stdout] | [INFO] [stdout] 16 | while let Some(s) = lines.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for s in lines` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day12/day12.rs:47:52 [INFO] [stdout] | [INFO] [stdout] 47 | fn part1(start: (u32, u32), end: (u32, u32), grid: &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] 47 - fn part1(start: (u32, u32), end: (u32, u32), grid: &Vec>) { [INFO] [stdout] 47 + fn part1(start: (u32, u32), end: (u32, u32), grid: &[Vec]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `grid.get(0)` [INFO] [stdout] --> src/day12/day12.rs:53:13 [INFO] [stdout] | [INFO] [stdout] 53 | let M = grid.get(0).unwrap().len() as u32; [INFO] [stdout] | ^^^^^^^^^^^ help: try: `grid.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/day17/day17.rs:187:19 [INFO] [stdout] | [INFO] [stdout] 187 | let mut memo: HashMap<(u32, u32), (Vec>, i64, u64)> = Default::default(); [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: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/day17/day17.rs:195:71 [INFO] [stdout] | [INFO] [stdout] 195 | let mut shape = Shape::new(SHAPE_TYPE_ARRAY[shape_index], (2, top_y as i64)); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `top_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: this boolean expression can be simplified [INFO] [stdout] --> src/day12/day12.rs:123:17 [INFO] [stdout] | [INFO] [stdout] 123 | if next_val <= val as i32 && val as i32 - next_val <= 1 || next_val > val as i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 123 - if next_val <= val as i32 && val as i32 - next_val <= 1 || next_val > val as i32 { [INFO] [stdout] 123 + if !(next_val <= val as i32 && val as i32 - next_val > 1) { [INFO] [stdout] | [INFO] [stdout] 123 - if next_val <= val as i32 && val as i32 - next_val <= 1 || next_val > val as i32 { [INFO] [stdout] 123 + if next_val > val as i32 || val as i32 - next_val <= 1 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/day12/day12.rs:129:17 [INFO] [stdout] | [INFO] [stdout] 129 | if next_val <= val as i32 && val as i32 - next_val <= 1 || next_val > val as i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 129 - if next_val <= val as i32 && val as i32 - next_val <= 1 || next_val > val as i32 { [INFO] [stdout] 129 + if !(next_val <= val as i32 && val as i32 - next_val > 1) { [INFO] [stdout] | [INFO] [stdout] 129 - if next_val <= val as i32 && val as i32 - next_val <= 1 || next_val > val as i32 { [INFO] [stdout] 129 + if next_val > val as i32 || val as i32 - next_val <= 1 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/day12/day12.rs:135:17 [INFO] [stdout] | [INFO] [stdout] 135 | if next_val <= val as i32 && val as i32 - next_val <= 1 || next_val > val as i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 135 - if next_val <= val as i32 && val as i32 - next_val <= 1 || next_val > val as i32 { [INFO] [stdout] 135 + if !(next_val <= val as i32 && val as i32 - next_val > 1) { [INFO] [stdout] | [INFO] [stdout] 135 - if next_val <= val as i32 && val as i32 - next_val <= 1 || next_val > val as i32 { [INFO] [stdout] 135 + if next_val > val as i32 || val as i32 - next_val <= 1 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/day12/day12.rs:141:17 [INFO] [stdout] | [INFO] [stdout] 141 | if next_val <= val as i32 && val as i32 - next_val <= 1 || next_val > val as i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 141 - if next_val <= val as i32 && val as i32 - next_val <= 1 || next_val > val as i32 { [INFO] [stdout] 141 + if !(next_val <= val as i32 && val as i32 - next_val > 1) { [INFO] [stdout] | [INFO] [stdout] 141 - if next_val <= val as i32 && val as i32 - next_val <= 1 || next_val > val as i32 { [INFO] [stdout] 141 + if next_val > val as i32 || val as i32 - next_val <= 1 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `rows_j` is only used to index `top_rows` [INFO] [stdout] --> src/day17/day17.rs:229:27 [INFO] [stdout] | [INFO] [stdout] 229 | for rows_j in 0..top_rows[0].len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 229 - for rows_j in 0..top_rows[0].len() { [INFO] [stdout] 229 + for in top_rows.iter().take(top_rows[0].len()) { [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/day12.rs:91:52 [INFO] [stdout] | [INFO] [stdout] 91 | fn part2(start: (u32, u32), end: (u32, u32), grid: &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] 91 - fn part2(start: (u32, u32), end: (u32, u32), grid: &Vec>) { [INFO] [stdout] 91 + fn part2(start: (u32, u32), end: (u32, u32), grid: &[Vec]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `grid.get(0)` [INFO] [stdout] --> src/day12/day12.rs:97:13 [INFO] [stdout] | [INFO] [stdout] 97 | let M = grid.get(0).unwrap().len() as u32; [INFO] [stdout] | ^^^^^^^^^^^ help: try: `grid.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/day17/day17.rs:249:16 [INFO] [stdout] | [INFO] [stdout] 249 | if (top[c.0 as usize] as i64) < c.1 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `top[c.0 as usize]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/day17/day17.rs:250:37 [INFO] [stdout] | [INFO] [stdout] 250 | top[c.0 as usize] = c.1 as i64; [INFO] [stdout] | ^^^^^^^^^^ help: try: `c.1` [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: the loop variable `x` is only used to index `board` [INFO] [stdout] --> src/day17/day17.rs:264:26 [INFO] [stdout] | [INFO] [stdout] 264 | for x in 0..AREA_WIDTH { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 264 - for x in 0..AREA_WIDTH { [INFO] [stdout] 264 + for in board.iter().take(AREA_WIDTH) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/main.rs:38:5 [INFO] [stdout] | [INFO] [stdout] 38 | pub mod day13; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/day13/day13.rs:18:9 [INFO] [stdout] | [INFO] [stdout] 18 | while let Some(s) = lines.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for s in lines` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/day13/day13.rs:21:16 [INFO] [stdout] | [INFO] [stdout] 21 | if line.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `line.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 to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/day17/day17.rs:290:28 [INFO] [stdout] | [INFO] [stdout] 290 | y_shift += clean_y as i64; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `clean_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: length comparison to zero [INFO] [stdout] --> src/day13/day13.rs:45:20 [INFO] [stdout] | [INFO] [stdout] 45 | if spl.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!spl.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 to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/day17/day17.rs:312:29 [INFO] [stdout] | [INFO] [stdout] 312 | let tower_height: i64 = (top.iter().max_by(|x,y| x.cmp(y)).unwrap() + 1) as i64 + y_shift; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(top.iter().max_by(|x,y| x.cmp(y)).unwrap() + 1)` [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: module has the same name as its containing module [INFO] [stdout] --> src/main.rs:53:5 [INFO] [stdout] | [INFO] [stdout] 53 | pub mod day18; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `current_list.get(0)` [INFO] [stdout] --> src/day13/day13.rs:61:39 [INFO] [stdout] | [INFO] [stdout] 61 | if let Element::List(l) = current_list.get(0).unwrap() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `current_list.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day13/day13.rs:96:22 [INFO] [stdout] | [INFO] [stdout] 96 | fn check_lists(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] 96 - fn check_lists(left: &Vec, right: &Vec) -> i32 { [INFO] [stdout] 96 + fn check_lists(left: &[Element], 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/day13/day13.rs:96:44 [INFO] [stdout] | [INFO] [stdout] 96 | fn check_lists(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] 96 - fn check_lists(left: &Vec, right: &Vec) -> i32 { [INFO] [stdout] 96 + fn check_lists(left: &Vec, right: &[Element]) -> i32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `index` is used as a loop counter [INFO] [stdout] --> src/day13/day13.rs:162:5 [INFO] [stdout] | [INFO] [stdout] 162 | for mut l in lists { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: consider using: `for (index, mut l) in (1..).zip(lists.into_iter())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] = note: `#[warn(clippy::explicit_counter_loop)]` 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/day18.rs:118:31 [INFO] [stdout] | [INFO] [stdout] 118 | fn air_bubble_surface(points: &Vec<(i32, i32, i32)>, visited: &mut HashSet<(i32, i32, i32)>, point: (i32, i32, i32)) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 118 - fn air_bubble_surface(points: &Vec<(i32, i32, i32)>, visited: &mut HashSet<(i32, i32, i32)>, point: (i32, i32, i32)) -> i32 { [INFO] [stdout] 118 + fn air_bubble_surface(points: &[(i32, i32, i32)], visited: &mut HashSet<(i32, i32, i32)>, point: (i32, i32, i32)) -> i32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `all_lists.get(i).unwrap().get(0)` [INFO] [stdout] --> src/day13/day13.rs:206:22 [INFO] [stdout] | [INFO] [stdout] 206 | let el = all_lists.get(i).unwrap().get(0).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `all_lists.get(i).unwrap().first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `l.get(0)` [INFO] [stdout] --> src/day13/day13.rs:209:27 [INFO] [stdout] | [INFO] [stdout] 209 | match l.get(0).unwrap() { [INFO] [stdout] | ^^^^^^^^ help: try: `l.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/main.rs:41:5 [INFO] [stdout] | [INFO] [stdout] 41 | pub mod day14; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/day14/day14.rs:18:9 [INFO] [stdout] | [INFO] [stdout] 18 | while let Some(s) = lines.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for s in lines` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/main.rs:56:5 [INFO] [stdout] | [INFO] [stdout] 56 | pub mod day19; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/main.rs:44:5 [INFO] [stdout] | [INFO] [stdout] 44 | pub mod day15; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/day15/day15.rs:22:9 [INFO] [stdout] | [INFO] [stdout] 22 | while let Some(s) = lines.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for s in lines` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `intervals` [INFO] [stdout] --> src/day15/day15.rs:140:14 [INFO] [stdout] | [INFO] [stdout] 140 | for i in 0..intervals.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] 140 - for i in 0..intervals.len() { [INFO] [stdout] 140 + for (i, ) in intervals.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/main.rs:47:5 [INFO] [stdout] | [INFO] [stdout] 47 | pub mod day16; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/day16/day16.rs:18:9 [INFO] [stdout] | [INFO] [stdout] 18 | while let Some(s) = lines.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for s in lines` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a suffix manually [INFO] [stdout] --> src/day16/day16.rs:35:37 [INFO] [stdout] | [INFO] [stdout] 35 | neighbours.push(n[..n.len()-1].to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the suffix was tested here [INFO] [stdout] --> src/day16/day16.rs:34:17 [INFO] [stdout] | [INFO] [stdout] 34 | if n.ends_with(",") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] = note: `#[warn(clippy::manual_strip)]` on by default [INFO] [stdout] help: try using the `strip_suffix` method [INFO] [stdout] | [INFO] [stdout] 34 ~ if let Some() = n.strip_suffix(",") { [INFO] [stdout] 35 ~ neighbours.push(.to_string()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/day16/day16.rs:98:5 [INFO] [stdout] | [INFO] [stdout] 98 | return (max_pressure, final_opened); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 98 - return (max_pressure, final_opened); [INFO] [stdout] 98 + (max_pressure, final_opened) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/day16/day16.rs:219:5 [INFO] [stdout] | [INFO] [stdout] 219 | return max_pressure; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 219 - return max_pressure; [INFO] [stdout] 219 + max_pressure [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/day16/day16.rs:136:5 [INFO] [stdout] | [INFO] [stdout] 136 | / if me != elephant { [INFO] [stdout] 137 | | if !opened.get(&me.to_string()).unwrap() && !opened.get(&elephant.to_string()).unwrap() && my_valve.flow_rate != 0 && ele... [INFO] [stdout] 138 | | opened.insert(me.to_string(), true); [INFO] [stdout] 139 | | opened.insert(elephant.to_string(), true); [INFO] [stdout] ... | [INFO] [stdout] 155 | | } [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] 136 ~ if me != elephant [INFO] [stdout] 137 ~ && !opened.get(&me.to_string()).unwrap() && !opened.get(&elephant.to_string()).unwrap() && my_valve.flow_rate != 0 && elephant_valve.flow_rate != 0 { [INFO] [stdout] 138 | opened.insert(me.to_string(), true); [INFO] [stdout] ... [INFO] [stdout] 153 | opened.insert(me.to_string(), false); [INFO] [stdout] 154 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/day19/day19.rs:93:19 [INFO] [stdout] | [INFO] [stdout] 93 | let mut memo: HashMap<(u32, u32, u32, u32, u32, u32, u32, u32), u32> = Default::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/day19/day19.rs:95:20 [INFO] [stdout] | [INFO] [stdout] 95 | let mut memo3: HashMap> = Default::default(); [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: module has the same name as its containing module [INFO] [stdout] --> src/main.rs:50:5 [INFO] [stdout] | [INFO] [stdout] 50 | pub mod day17; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!Range::contains` implementation [INFO] [stdout] --> src/day17/day17.rs:90:16 [INFO] [stdout] | [INFO] [stdout] 90 | if x < 0 || x >= 7 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: use: `!(0..7).contains(&x)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/day17/day17.rs:93:34 [INFO] [stdout] | [INFO] [stdout] 93 | if board[x as usize][(c.1 as i64) as usize] != 0 { [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `c.1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day17/day17.rs:102:26 [INFO] [stdout] | [INFO] [stdout] 102 | if self.can_move(&dir, board) { [INFO] [stdout] | ^^^^ help: change this to: `dir` [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: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/day17/day17.rs:120:51 [INFO] [stdout] | [INFO] [stdout] 120 | if c.1 - 1 < 0 || board[c.0 as usize][(c.1 as i64) as usize-1] != 0 { [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `c.1` [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: manual implementation of an assign operation [INFO] [stdout] --> src/day17/day17.rs:127:17 [INFO] [stdout] | [INFO] [stdout] 127 | c.1 = c.1 - 1; [INFO] [stdout] | ^^^^^^^^^^^^^ help: replace it with: `c.1 -= 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] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/day17/day17.rs:131:37 [INFO] [stdout] | [INFO] [stdout] 131 | board[c.0 as usize][(c.1 as i64) as usize] = 1; [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `c.1` [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: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/day17/day17.rs:187:19 [INFO] [stdout] | [INFO] [stdout] 187 | let mut memo: HashMap<(u32, u32), (Vec>, i64, u64)> = Default::default(); [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: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/day17/day17.rs:195:71 [INFO] [stdout] | [INFO] [stdout] 195 | let mut shape = Shape::new(SHAPE_TYPE_ARRAY[shape_index], (2, top_y as i64)); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `top_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: the loop variable `rows_j` is only used to index `top_rows` [INFO] [stdout] --> src/day17/day17.rs:229:27 [INFO] [stdout] | [INFO] [stdout] 229 | for rows_j in 0..top_rows[0].len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 229 - for rows_j in 0..top_rows[0].len() { [INFO] [stdout] 229 + for in top_rows.iter().take(top_rows[0].len()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/day17/day17.rs:249:16 [INFO] [stdout] | [INFO] [stdout] 249 | if (top[c.0 as usize] as i64) < c.1 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `top[c.0 as usize]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/day17/day17.rs:250:37 [INFO] [stdout] | [INFO] [stdout] 250 | top[c.0 as usize] = c.1 as i64; [INFO] [stdout] | ^^^^^^^^^^ help: try: `c.1` [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: the loop variable `x` is only used to index `board` [INFO] [stdout] --> src/day17/day17.rs:264:26 [INFO] [stdout] | [INFO] [stdout] 264 | for x in 0..AREA_WIDTH { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 264 - for x in 0..AREA_WIDTH { [INFO] [stdout] 264 + for in board.iter().take(AREA_WIDTH) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/day17/day17.rs:290:28 [INFO] [stdout] | [INFO] [stdout] 290 | y_shift += clean_y as i64; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `clean_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 to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/day17/day17.rs:312:29 [INFO] [stdout] | [INFO] [stdout] 312 | let tower_height: i64 = (top.iter().max_by(|x,y| x.cmp(y)).unwrap() + 1) as i64 + y_shift; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(top.iter().max_by(|x,y| x.cmp(y)).unwrap() + 1)` [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: module has the same name as its containing module [INFO] [stdout] --> src/main.rs:53:5 [INFO] [stdout] | [INFO] [stdout] 53 | pub mod day18; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day18/day18.rs:118:31 [INFO] [stdout] | [INFO] [stdout] 118 | fn air_bubble_surface(points: &Vec<(i32, i32, i32)>, visited: &mut HashSet<(i32, i32, i32)>, point: (i32, i32, i32)) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 118 - fn air_bubble_surface(points: &Vec<(i32, i32, i32)>, visited: &mut HashSet<(i32, i32, i32)>, point: (i32, i32, i32)) -> i32 { [INFO] [stdout] 118 + fn air_bubble_surface(points: &[(i32, i32, i32)], visited: &mut HashSet<(i32, i32, i32)>, point: (i32, i32, i32)) -> i32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/main.rs:56:5 [INFO] [stdout] | [INFO] [stdout] 56 | pub mod day19; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day19/day19.rs:253:35 [INFO] [stdout] | [INFO] [stdout] 253 | let max_geodes = simulate(&blueprint, 24); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `blueprint` [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/day19.rs:266:35 [INFO] [stdout] | [INFO] [stdout] 266 | let max_geodes = simulate(&blueprint, 32); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `blueprint` [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: module has the same name as its containing module [INFO] [stdout] --> src/main.rs:59:5 [INFO] [stdout] | [INFO] [stdout] 59 | pub mod day20; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/day20/day20.rs:27:5 [INFO] [stdout] | [INFO] [stdout] 27 | return 0; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 27 - return 0; [INFO] [stdout] 27 + 0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day20/day20.rs:19:24 [INFO] [stdout] | [INFO] [stdout] 19 | fn find_index(numbers: &Vec<(usize, i64)>, i: usize) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 19 - fn find_index(numbers: &Vec<(usize, i64)>, i: usize) -> usize { [INFO] [stdout] 19 + fn find_index(numbers: &[(usize, i64)], i: usize) -> usize { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is used to index `numbers` [INFO] [stdout] --> src/day20/day20.rs:20:14 [INFO] [stdout] | [INFO] [stdout] 20 | for j in 0..numbers.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] 20 - for j in 0..numbers.len() { [INFO] [stdout] 20 + for (j, ) in numbers.iter().enumerate() { [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/day20.rs:37:26 [INFO] [stdout] | [INFO] [stdout] 37 | fn mix(original_numbers: &Vec, numbers: &mut Vec<(usize, 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] 37 - fn mix(original_numbers: &Vec, numbers: &mut Vec<(usize, i64)>) { [INFO] [stdout] 37 + fn mix(original_numbers: &[i64], numbers: &mut Vec<(usize, i64)>) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `original_numbers` [INFO] [stdout] --> src/day20/day20.rs:39:14 [INFO] [stdout] | [INFO] [stdout] 39 | for i in 0..len { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 39 - for i in 0..len { [INFO] [stdout] 39 + for (i, ) in original_numbers.iter().enumerate().take(len) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day20/day20.rs:44:40 [INFO] [stdout] | [INFO] [stdout] 44 | let numbers_index = find_index(&numbers, i); [INFO] [stdout] | ^^^^^^^^ help: change this to: `numbers` [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/day20/day20.rs:59:29 [INFO] [stdout] | [INFO] [stdout] 59 | fn get_coordinates(numbers: &Vec<(usize, i64)>) -> 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] 59 - fn get_coordinates(numbers: &Vec<(usize, i64)>) -> i64 { [INFO] [stdout] 59 + fn get_coordinates(numbers: &[(usize, i64)]) -> i64 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `x` is used as a loop counter [INFO] [stdout] --> src/day20/day20.rs:63:5 [INFO] [stdout] | [INFO] [stdout] 63 | for (i, n) in numbers.iter() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (x, (i, n)) in numbers.iter().enumerate()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `original_numbers` [INFO] [stdout] --> src/day20/day20.rs:82:14 [INFO] [stdout] | [INFO] [stdout] 82 | for i in 0..len { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 82 - for i in 0..len { [INFO] [stdout] 82 + for (i, ) in original_numbers.iter().enumerate().take(len) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/day20/day20.rs:83:26 [INFO] [stdout] | [INFO] [stdout] 83 | numbers.push((i, original_numbers[i] as i64)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `original_numbers[i]` [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: the loop variable `i` is used to index `decrypted_numbers` [INFO] [stdout] --> src/day20/day20.rs:94:14 [INFO] [stdout] | [INFO] [stdout] 94 | for i in 0..len { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 94 - for i in 0..len { [INFO] [stdout] 94 + for (i, ) in decrypted_numbers.iter().enumerate().take(len) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/day20/day20.rs:95:26 [INFO] [stdout] | [INFO] [stdout] 95 | numbers.push((i, decrypted_numbers[i] as i64)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `decrypted_numbers[i]` [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: module has the same name as its containing module [INFO] [stdout] --> src/main.rs:62:5 [INFO] [stdout] | [INFO] [stdout] 62 | pub mod day21; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option<&Activity>` which implements the `Copy` trait [INFO] [stdout] --> src/day21/day21.rs:85:22 [INFO] [stdout] | [INFO] [stdout] 85 | if let Some(a) = monkeys.get("root").clone() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `monkeys.get("root")` [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: usage of a legacy numeric constant [INFO] [stdout] --> src/day21/day21.rs:88:34 [INFO] [stdout] | [INFO] [stdout] 88 | let mut right: i64 = std::i64::MAX / 100; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 88 - let mut right: i64 = std::i64::MAX / 100; [INFO] [stdout] 88 + let mut right: i64 = i64::MAX / 100; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/main.rs:65:5 [INFO] [stdout] | [INFO] [stdout] 65 | pub mod day22; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/day22/day22.rs:10:38 [INFO] [stdout] | [INFO] [stdout] 10 | fn parse_input(file_path: String) -> (HashMap<(u32, u32), Tile>, Vec<(u32, i32)>, [(u32, u32, u32, u32); 6]) { [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: unneeded `return` statement [INFO] [stdout] --> src/day22/day22.rs:116:5 [INFO] [stdout] | [INFO] [stdout] 116 | return (0, 0) [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 116 - return (0, 0) [INFO] [stdout] 116 + (0, 0) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/day22/day22.rs:111:20 [INFO] [stdout] | [INFO] [stdout] 111 | if let Some(_) = map.get(&(i, j)) { [INFO] [stdout] | -------^^^^^^^------------------- help: try: `if map.get(&(i, j)).is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/day22/day22.rs:139:5 [INFO] [stdout] | [INFO] [stdout] 139 | return current_position; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 139 - return current_position; [INFO] [stdout] 139 + current_position [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/day22/day22.rs:121:15 [INFO] [stdout] | [INFO] [stdout] 121 | while let Some(_) = map.get(¤t_position) { [INFO] [stdout] | ----------^^^^^^^----------------------------- help: try: `while map.get(¤t_position).is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/day22/day22.rs:151:5 [INFO] [stdout] | [INFO] [stdout] 151 | return 10; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 151 - return 10; [INFO] [stdout] 151 + 10 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `i` is used as a loop counter [INFO] [stdout] --> src/day22/day22.rs:145:5 [INFO] [stdout] | [INFO] [stdout] 145 | for (x1, y1, x2, y2) in areas { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (i, (x1, y1, x2, y2)) in areas.into_iter().enumerate()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/day22/day22.rs:304:5 [INFO] [stdout] | [INFO] [stdout] 304 | return (current_position.0, current_position.1, direction); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 304 - return (current_position.0, current_position.1, direction); [INFO] [stdout] 304 + (current_position.0, current_position.1, direction) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/day22/day22.rs:358:5 [INFO] [stdout] | [INFO] [stdout] 358 | return final_password [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 358 - return final_password [INFO] [stdout] 358 + final_password [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day22/day22.rs:308:52 [INFO] [stdout] | [INFO] [stdout] 308 | let mut current_position = find_start_position(&map); [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: redundant pattern matching, consider using `is_none()` [INFO] [stdout] --> src/day22/day22.rs:327:20 [INFO] [stdout] | [INFO] [stdout] 327 | if let None = map.get(&next_position) { [INFO] [stdout] | -------^^^^-------------------------- help: try: `if map.get(&next_position).is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day22/day22.rs:330:96 [INFO] [stdout] | [INFO] [stdout] 330 | ... (next_position.0, next_position.1, next_direction) = find_wrap_around_cube(&map, current_position, current_direction as u32, ... [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/day22/day22.rs:332:54 [INFO] [stdout] | [INFO] [stdout] 332 | next_position = find_wrap_around(&map, current_position, (current_direction + 2) as u32 % 4); [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: module has the same name as its containing module [INFO] [stdout] --> src/main.rs:68:5 [INFO] [stdout] | [INFO] [stdout] 68 | pub mod day23; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `y` is used as a loop counter [INFO] [stdout] --> src/day23/day23.rs:23:9 [INFO] [stdout] | [INFO] [stdout] 23 | for line in lines { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: consider using: `for (y, line) in lines.enumerate()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `x` is used as a loop counter [INFO] [stdout] --> src/day23/day23.rs:26:13 [INFO] [stdout] | [INFO] [stdout] 26 | for c in l.chars() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: consider using: `for (x, c) in l.chars().enumerate()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/day23/day23.rs:39:18 [INFO] [stdout] | [INFO] [stdout] 39 | let mut x1 = std::i32::MAX; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 39 - let mut x1 = std::i32::MAX; [INFO] [stdout] 39 + let mut x1 = i32::MAX; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/day23/day23.rs:40:18 [INFO] [stdout] | [INFO] [stdout] 40 | let mut y1 = std::i32::MAX; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 40 - let mut y1 = std::i32::MAX; [INFO] [stdout] 40 + let mut y1 = i32::MAX; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/day23/day23.rs:41:18 [INFO] [stdout] | [INFO] [stdout] 41 | let mut x2 = std::i32::MIN; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 41 - let mut x2 = std::i32::MIN; [INFO] [stdout] 41 + let mut x2 = i32::MIN; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/day23/day23.rs:42:18 [INFO] [stdout] | [INFO] [stdout] 42 | let mut y2 = std::i32::MIN; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 42 - let mut y2 = std::i32::MIN; [INFO] [stdout] 42 + let mut y2 = i32::MIN; [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/day23/day23.rs:57:21 [INFO] [stdout] | [INFO] [stdout] 57 | fn print_map(elves: &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] 57 - fn print_map(elves: &Vec) { [INFO] [stdout] 57 + fn print_map(elves: &[Elf]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/day23/day23.rs:60:18 [INFO] [stdout] | [INFO] [stdout] 60 | let mut x1 = std::i32::MAX; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 60 - let mut x1 = std::i32::MAX; [INFO] [stdout] 60 + let mut x1 = i32::MAX; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/day23/day23.rs:61:18 [INFO] [stdout] | [INFO] [stdout] 61 | let mut y1 = std::i32::MAX; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 61 - let mut y1 = std::i32::MAX; [INFO] [stdout] 61 + let mut y1 = i32::MAX; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/day23/day23.rs:62:18 [INFO] [stdout] | [INFO] [stdout] 62 | let mut x2 = std::i32::MIN; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 62 - let mut x2 = std::i32::MIN; [INFO] [stdout] 62 + let mut x2 = i32::MIN; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/day23/day23.rs:63:18 [INFO] [stdout] | [INFO] [stdout] 63 | let mut y2 = std::i32::MIN; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 63 - let mut y2 = std::i32::MIN; [INFO] [stdout] 63 + let mut y2 = i32::MIN; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/day19/day19.rs:93:19 [INFO] [stdout] | [INFO] [stdout] 93 | let mut memo: HashMap<(u32, u32, u32, u32, u32, u32, u32, u32), u32> = Default::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/day19/day19.rs:95:20 [INFO] [stdout] | [INFO] [stdout] 95 | let mut memo3: HashMap> = Default::default(); [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: module has the same name as its containing module [INFO] [stdout] --> src/main.rs:71:5 [INFO] [stdout] | [INFO] [stdout] 71 | pub mod day24; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `y` is used as a loop counter [INFO] [stdout] --> src/day24/day24.rs:40:9 [INFO] [stdout] | [INFO] [stdout] 40 | for line in lines { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: consider using: `for (y, line) in lines.enumerate()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day19/day19.rs:253:35 [INFO] [stdout] | [INFO] [stdout] 253 | let max_geodes = simulate(&blueprint, 24); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `blueprint` [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: the variable `x` is used as a loop counter [INFO] [stdout] --> src/day24/day24.rs:44:13 [INFO] [stdout] | [INFO] [stdout] 44 | for c in l.chars() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: consider using: `for (x, c) in l.chars().enumerate()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/day24/day24.rs:61:5 [INFO] [stdout] | [INFO] [stdout] 61 | ((goal.0 as i32 - position.0 as i32).abs() + (goal.1 as i32 - position.1 as i32).abs()) as u32 * 1 + time * 1 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `(((goal.0 as i32 - position.0 as i32).abs() + (goal.1 as i32 - position.1 as i32).abs()) as u32)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] = note: `#[warn(clippy::identity_op)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/day24/day24.rs:61:106 [INFO] [stdout] | [INFO] [stdout] 61 | ((goal.0 as i32 - position.0 as i32).abs() + (goal.1 as i32 - position.1 as i32).abs()) as u32 * 1 + time * 1 [INFO] [stdout] | ^^^^^^^^ help: consider reducing it to: `time` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/day24/day24.rs:65:27 [INFO] [stdout] | [INFO] [stdout] 65 | fn solve(blizzards_cache: &Vec<(Vec, HashMap<(u32,u32), u32>)>, map: &Vec>, start: (u32, u32), end: (u32, u32), ... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day24/day24.rs:65:27 [INFO] [stdout] | [INFO] [stdout] 65 | fn solve(blizzards_cache: &Vec<(Vec, HashMap<(u32,u32), u32>)>, map: &Vec>, start: (u32, u32), end: (u32, u32), ... [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] 65 - fn solve(blizzards_cache: &Vec<(Vec, HashMap<(u32,u32), u32>)>, map: &Vec>, start: (u32, u32), end: (u32, u32), initial_time: u32) -> u32 { [INFO] [stdout] 65 + fn solve(blizzards_cache: &[(Vec, HashMap<(u32,u32), u32>)], map: &Vec>, start: (u32, u32), end: (u32, u32), initial_time: u32) -> u32 { [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/day24/day24.rs:65:80 [INFO] [stdout] | [INFO] [stdout] 65 | fn solve(blizzards_cache: &Vec<(Vec, HashMap<(u32,u32), u32>)>, map: &Vec>, start: (u32, u32), end: (u32, u32), ... [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] 65 - fn solve(blizzards_cache: &Vec<(Vec, HashMap<(u32,u32), u32>)>, map: &Vec>, start: (u32, u32), end: (u32, u32), initial_time: u32) -> u32 { [INFO] [stdout] 65 + fn solve(blizzards_cache: &Vec<(Vec, HashMap<(u32,u32), u32>)>, map: &[Vec], start: (u32, u32), end: (u32, u32), initial_time: u32) -> u32 { [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/day19.rs:266:35 [INFO] [stdout] | [INFO] [stdout] 266 | let max_geodes = simulate(&blueprint, 32); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `blueprint` [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: module has the same name as its containing module [INFO] [stdout] --> src/main.rs:59:5 [INFO] [stdout] | [INFO] [stdout] 59 | pub mod day20; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/day24/day24.rs:95:9 [INFO] [stdout] | [INFO] [stdout] 95 | / if s.expedition == end { [INFO] [stdout] 96 | | if solution == -1 { [INFO] [stdout] 97 | | solution = s.time as i32; [INFO] [stdout] 98 | | println!("NEW SOLUTION: {}", solution); [INFO] [stdout] ... | [INFO] [stdout] 101 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 95 ~ if s.expedition == end [INFO] [stdout] 96 ~ && solution == -1 { [INFO] [stdout] 97 | solution = s.time as i32; [INFO] [stdout] 98 | println!("NEW SOLUTION: {}", solution); [INFO] [stdout] 99 | } [INFO] [stdout] 100 ~ //return s.time; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/day20/day20.rs:27:5 [INFO] [stdout] | [INFO] [stdout] 27 | return 0; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 27 - return 0; [INFO] [stdout] 27 + 0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day20/day20.rs:19:24 [INFO] [stdout] | [INFO] [stdout] 19 | fn find_index(numbers: &Vec<(usize, i64)>, i: usize) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 19 - fn find_index(numbers: &Vec<(usize, i64)>, i: usize) -> usize { [INFO] [stdout] 19 + fn find_index(numbers: &[(usize, i64)], i: usize) -> usize { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is used to index `numbers` [INFO] [stdout] --> src/day20/day20.rs:20:14 [INFO] [stdout] | [INFO] [stdout] 20 | for j in 0..numbers.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] 20 - for j in 0..numbers.len() { [INFO] [stdout] 20 + for (j, ) in numbers.iter().enumerate() { [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/day20.rs:37:26 [INFO] [stdout] | [INFO] [stdout] 37 | fn mix(original_numbers: &Vec, numbers: &mut Vec<(usize, 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] 37 - fn mix(original_numbers: &Vec, numbers: &mut Vec<(usize, i64)>) { [INFO] [stdout] 37 + fn mix(original_numbers: &[i64], numbers: &mut Vec<(usize, i64)>) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `original_numbers` [INFO] [stdout] --> src/day20/day20.rs:39:14 [INFO] [stdout] | [INFO] [stdout] 39 | for i in 0..len { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 39 - for i in 0..len { [INFO] [stdout] 39 + for (i, ) in original_numbers.iter().enumerate().take(len) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day20/day20.rs:44:40 [INFO] [stdout] | [INFO] [stdout] 44 | let numbers_index = find_index(&numbers, i); [INFO] [stdout] | ^^^^^^^^ help: change this to: `numbers` [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/day20/day20.rs:59:29 [INFO] [stdout] | [INFO] [stdout] 59 | fn get_coordinates(numbers: &Vec<(usize, i64)>) -> 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] 59 - fn get_coordinates(numbers: &Vec<(usize, i64)>) -> i64 { [INFO] [stdout] 59 + fn get_coordinates(numbers: &[(usize, i64)]) -> i64 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/day24/day24.rs:180:30 [INFO] [stdout] | [INFO] [stdout] 180 | let mut blizzards_cache: Vec<(Vec, HashMap<(u32, u32), u32>)> = Default::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `x` is used as a loop counter [INFO] [stdout] --> src/day20/day20.rs:63:5 [INFO] [stdout] | [INFO] [stdout] 63 | for (i, n) in numbers.iter() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (x, (i, n)) in numbers.iter().enumerate()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `original_numbers` [INFO] [stdout] --> src/day20/day20.rs:82:14 [INFO] [stdout] | [INFO] [stdout] 82 | for i in 0..len { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 82 - for i in 0..len { [INFO] [stdout] 82 + for (i, ) in original_numbers.iter().enumerate().take(len) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/day20/day20.rs:83:26 [INFO] [stdout] | [INFO] [stdout] 83 | numbers.push((i, original_numbers[i] as i64)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `original_numbers[i]` [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: the loop variable `i` is used to index `decrypted_numbers` [INFO] [stdout] --> src/day20/day20.rs:94:14 [INFO] [stdout] | [INFO] [stdout] 94 | for i in 0..len { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 94 - for i in 0..len { [INFO] [stdout] 94 + for (i, ) in decrypted_numbers.iter().enumerate().take(len) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/main.rs:74:5 [INFO] [stdout] | [INFO] [stdout] 74 | pub mod day25; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/day20/day20.rs:95:26 [INFO] [stdout] | [INFO] [stdout] 95 | numbers.push((i, decrypted_numbers[i] as i64)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `decrypted_numbers[i]` [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: module has the same name as its containing module [INFO] [stdout] --> src/main.rs:62:5 [INFO] [stdout] | [INFO] [stdout] 62 | pub mod day21; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/day25/day25.rs:19:38 [INFO] [stdout] | [INFO] [stdout] 19 | '1' => decimal_number += 1*power, [INFO] [stdout] | ^^^^^^^ help: consider reducing it to: `power` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/day25/day25.rs:20:38 [INFO] [stdout] | [INFO] [stdout] 20 | '-' => decimal_number -= 1*power, [INFO] [stdout] | ^^^^^^^ help: consider reducing it to: `power` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/day25/day25.rs:54:30 [INFO] [stdout] | [INFO] [stdout] 54 | let d = (value - number as i64).abs(); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `number` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option<&Activity>` which implements the `Copy` trait [INFO] [stdout] --> src/day21/day21.rs:85:22 [INFO] [stdout] | [INFO] [stdout] 85 | if let Some(a) = monkeys.get("root").clone() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `monkeys.get("root")` [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: usage of a legacy numeric constant [INFO] [stdout] --> src/day21/day21.rs:88:34 [INFO] [stdout] | [INFO] [stdout] 88 | let mut right: i64 = std::i64::MAX / 100; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 88 - let mut right: i64 = std::i64::MAX / 100; [INFO] [stdout] 88 + let mut right: i64 = i64::MAX / 100; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/main.rs:65:5 [INFO] [stdout] | [INFO] [stdout] 65 | pub mod day22; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/day22/day22.rs:10:38 [INFO] [stdout] | [INFO] [stdout] 10 | fn parse_input(file_path: String) -> (HashMap<(u32, u32), Tile>, Vec<(u32, i32)>, [(u32, u32, u32, u32); 6]) { [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: variable `FULL_SIZE` should have a snake case name [INFO] [stdout] --> src/day7/day7.rs:267:26 [INFO] [stdout] | [INFO] [stdout] 267 | fn calculate_freed_space(FULL_SIZE: u32, dir: &Directory, fs: &FileSystem) -> (u32, u32) { [INFO] [stdout] | ^^^^^^^^^ help: convert the identifier to snake case: `full_size` [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 `N` should have a snake case name [INFO] [stdout] --> src/day12/day12.rs:52:9 [INFO] [stdout] | [INFO] [stdout] 52 | let N = grid.len() as u32; [INFO] [stdout] | ^ help: convert the identifier to snake case: `n` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `M` should have a snake case name [INFO] [stdout] --> src/day12/day12.rs:53:9 [INFO] [stdout] | [INFO] [stdout] 53 | let M = grid.get(0).unwrap().len() as u32; [INFO] [stdout] | ^ help: convert the identifier to snake case: `m` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `N` should have a snake case name [INFO] [stdout] --> src/day12/day12.rs:96:9 [INFO] [stdout] | [INFO] [stdout] 96 | let N = grid.len() as u32; [INFO] [stdout] | ^ help: convert the identifier to snake case: `n` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `M` should have a snake case name [INFO] [stdout] --> src/day12/day12.rs:97:9 [INFO] [stdout] | [INFO] [stdout] 97 | let M = grid.get(0).unwrap().len() as u32; [INFO] [stdout] | ^ help: convert the identifier to snake case: `m` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `MINUTES` should have a snake case name [INFO] [stdout] --> src/day19/day19.rs:91:29 [INFO] [stdout] | [INFO] [stdout] 91 | fn simulate(bp: &Blueprint, MINUTES: u32) -> u32{ [INFO] [stdout] | ^^^^^^^ help: convert the identifier to snake case: `minutes` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/day22/day22.rs:116:5 [INFO] [stdout] | [INFO] [stdout] 116 | return (0, 0) [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 116 - return (0, 0) [INFO] [stdout] 116 + (0, 0) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/day22/day22.rs:111:20 [INFO] [stdout] | [INFO] [stdout] 111 | if let Some(_) = map.get(&(i, j)) { [INFO] [stdout] | -------^^^^^^^------------------- help: try: `if map.get(&(i, j)).is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/day22/day22.rs:139:5 [INFO] [stdout] | [INFO] [stdout] 139 | return current_position; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 139 - return current_position; [INFO] [stdout] 139 + current_position [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/day22/day22.rs:121:15 [INFO] [stdout] | [INFO] [stdout] 121 | while let Some(_) = map.get(¤t_position) { [INFO] [stdout] | ----------^^^^^^^----------------------------- help: try: `while map.get(¤t_position).is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/day22/day22.rs:151:5 [INFO] [stdout] | [INFO] [stdout] 151 | return 10; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 151 - return 10; [INFO] [stdout] 151 + 10 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `i` is used as a loop counter [INFO] [stdout] --> src/day22/day22.rs:145:5 [INFO] [stdout] | [INFO] [stdout] 145 | for (x1, y1, x2, y2) in areas { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (i, (x1, y1, x2, y2)) in areas.into_iter().enumerate()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/day22/day22.rs:304:5 [INFO] [stdout] | [INFO] [stdout] 304 | return (current_position.0, current_position.1, direction); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 304 - return (current_position.0, current_position.1, direction); [INFO] [stdout] 304 + (current_position.0, current_position.1, direction) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/day22/day22.rs:358:5 [INFO] [stdout] | [INFO] [stdout] 358 | return final_password [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 358 - return final_password [INFO] [stdout] 358 + final_password [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day22/day22.rs:308:52 [INFO] [stdout] | [INFO] [stdout] 308 | let mut current_position = find_start_position(&map); [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: redundant pattern matching, consider using `is_none()` [INFO] [stdout] --> src/day22/day22.rs:327:20 [INFO] [stdout] | [INFO] [stdout] 327 | if let None = map.get(&next_position) { [INFO] [stdout] | -------^^^^-------------------------- help: try: `if map.get(&next_position).is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/day22/day22.rs:330:96 [INFO] [stdout] | [INFO] [stdout] 330 | ... (next_position.0, next_position.1, next_direction) = find_wrap_around_cube(&map, current_position, current_direction as u32, ... [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/day22/day22.rs:332:54 [INFO] [stdout] | [INFO] [stdout] 332 | next_position = find_wrap_around(&map, current_position, (current_direction + 2) as u32 % 4); [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: module has the same name as its containing module [INFO] [stdout] --> src/main.rs:68:5 [INFO] [stdout] | [INFO] [stdout] 68 | pub mod day23; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `y` is used as a loop counter [INFO] [stdout] --> src/day23/day23.rs:23:9 [INFO] [stdout] | [INFO] [stdout] 23 | for line in lines { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: consider using: `for (y, line) in lines.enumerate()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `x` is used as a loop counter [INFO] [stdout] --> src/day23/day23.rs:26:13 [INFO] [stdout] | [INFO] [stdout] 26 | for c in l.chars() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: consider using: `for (x, c) in l.chars().enumerate()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/day23/day23.rs:39:18 [INFO] [stdout] | [INFO] [stdout] 39 | let mut x1 = std::i32::MAX; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 39 - let mut x1 = std::i32::MAX; [INFO] [stdout] 39 + let mut x1 = i32::MAX; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/day23/day23.rs:40:18 [INFO] [stdout] | [INFO] [stdout] 40 | let mut y1 = std::i32::MAX; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 40 - let mut y1 = std::i32::MAX; [INFO] [stdout] 40 + let mut y1 = i32::MAX; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/day23/day23.rs:41:18 [INFO] [stdout] | [INFO] [stdout] 41 | let mut x2 = std::i32::MIN; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 41 - let mut x2 = std::i32::MIN; [INFO] [stdout] 41 + let mut x2 = i32::MIN; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/day23/day23.rs:42:18 [INFO] [stdout] | [INFO] [stdout] 42 | let mut y2 = std::i32::MIN; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 42 - let mut y2 = std::i32::MIN; [INFO] [stdout] 42 + let mut y2 = i32::MIN; [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/day23/day23.rs:57:21 [INFO] [stdout] | [INFO] [stdout] 57 | fn print_map(elves: &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] 57 - fn print_map(elves: &Vec) { [INFO] [stdout] 57 + fn print_map(elves: &[Elf]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/day23/day23.rs:60:18 [INFO] [stdout] | [INFO] [stdout] 60 | let mut x1 = std::i32::MAX; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 60 - let mut x1 = std::i32::MAX; [INFO] [stdout] 60 + let mut x1 = i32::MAX; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/day23/day23.rs:61:18 [INFO] [stdout] | [INFO] [stdout] 61 | let mut y1 = std::i32::MAX; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 61 - let mut y1 = std::i32::MAX; [INFO] [stdout] 61 + let mut y1 = i32::MAX; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/day23/day23.rs:62:18 [INFO] [stdout] | [INFO] [stdout] 62 | let mut x2 = std::i32::MIN; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 62 - let mut x2 = std::i32::MIN; [INFO] [stdout] 62 + let mut x2 = i32::MIN; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/day23/day23.rs:63:18 [INFO] [stdout] | [INFO] [stdout] 63 | let mut y2 = std::i32::MIN; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 63 - let mut y2 = std::i32::MIN; [INFO] [stdout] 63 + let mut y2 = i32::MIN; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/main.rs:71:5 [INFO] [stdout] | [INFO] [stdout] 71 | pub mod day24; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `y` is used as a loop counter [INFO] [stdout] --> src/day24/day24.rs:40:9 [INFO] [stdout] | [INFO] [stdout] 40 | for line in lines { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: consider using: `for (y, line) in lines.enumerate()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `x` is used as a loop counter [INFO] [stdout] --> src/day24/day24.rs:44:13 [INFO] [stdout] | [INFO] [stdout] 44 | for c in l.chars() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: consider using: `for (x, c) in l.chars().enumerate()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/day24/day24.rs:61:5 [INFO] [stdout] | [INFO] [stdout] 61 | ((goal.0 as i32 - position.0 as i32).abs() + (goal.1 as i32 - position.1 as i32).abs()) as u32 * 1 + time * 1 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `(((goal.0 as i32 - position.0 as i32).abs() + (goal.1 as i32 - position.1 as i32).abs()) as u32)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] = note: `#[warn(clippy::identity_op)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/day24/day24.rs:61:106 [INFO] [stdout] | [INFO] [stdout] 61 | ((goal.0 as i32 - position.0 as i32).abs() + (goal.1 as i32 - position.1 as i32).abs()) as u32 * 1 + time * 1 [INFO] [stdout] | ^^^^^^^^ help: consider reducing it to: `time` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/day24/day24.rs:65:27 [INFO] [stdout] | [INFO] [stdout] 65 | fn solve(blizzards_cache: &Vec<(Vec, HashMap<(u32,u32), u32>)>, map: &Vec>, start: (u32, u32), end: (u32, u32), ... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/day24/day24.rs:65:27 [INFO] [stdout] | [INFO] [stdout] 65 | fn solve(blizzards_cache: &Vec<(Vec, HashMap<(u32,u32), u32>)>, map: &Vec>, start: (u32, u32), end: (u32, u32), ... [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] 65 - fn solve(blizzards_cache: &Vec<(Vec, HashMap<(u32,u32), u32>)>, map: &Vec>, start: (u32, u32), end: (u32, u32), initial_time: u32) -> u32 { [INFO] [stdout] 65 + fn solve(blizzards_cache: &[(Vec, HashMap<(u32,u32), u32>)], map: &Vec>, start: (u32, u32), end: (u32, u32), initial_time: u32) -> u32 { [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/day24/day24.rs:65:80 [INFO] [stdout] | [INFO] [stdout] 65 | fn solve(blizzards_cache: &Vec<(Vec, HashMap<(u32,u32), u32>)>, map: &Vec>, start: (u32, u32), end: (u32, u32), ... [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] 65 - fn solve(blizzards_cache: &Vec<(Vec, HashMap<(u32,u32), u32>)>, map: &Vec>, start: (u32, u32), end: (u32, u32), initial_time: u32) -> u32 { [INFO] [stdout] 65 + fn solve(blizzards_cache: &Vec<(Vec, HashMap<(u32,u32), u32>)>, map: &[Vec], start: (u32, u32), end: (u32, u32), initial_time: u32) -> u32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/day24/day24.rs:95:9 [INFO] [stdout] | [INFO] [stdout] 95 | / if s.expedition == end { [INFO] [stdout] 96 | | if solution == -1 { [INFO] [stdout] 97 | | solution = s.time as i32; [INFO] [stdout] 98 | | println!("NEW SOLUTION: {}", solution); [INFO] [stdout] ... | [INFO] [stdout] 101 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 95 ~ if s.expedition == end [INFO] [stdout] 96 ~ && solution == -1 { [INFO] [stdout] 97 | solution = s.time as i32; [INFO] [stdout] 98 | println!("NEW SOLUTION: {}", solution); [INFO] [stdout] 99 | } [INFO] [stdout] 100 ~ //return s.time; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/day24/day24.rs:180:30 [INFO] [stdout] | [INFO] [stdout] 180 | let mut blizzards_cache: Vec<(Vec, HashMap<(u32, u32), u32>)> = Default::default(); [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: module has the same name as its containing module [INFO] [stdout] --> src/main.rs:74:5 [INFO] [stdout] | [INFO] [stdout] 74 | pub mod day25; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/day25/day25.rs:19:38 [INFO] [stdout] | [INFO] [stdout] 19 | '1' => decimal_number += 1*power, [INFO] [stdout] | ^^^^^^^ help: consider reducing it to: `power` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/day25/day25.rs:20:38 [INFO] [stdout] | [INFO] [stdout] 20 | '-' => decimal_number -= 1*power, [INFO] [stdout] | ^^^^^^^ help: consider reducing it to: `power` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/day25/day25.rs:54:30 [INFO] [stdout] | [INFO] [stdout] 54 | let d = (value - number as i64).abs(); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `number` [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: variable `FULL_SIZE` should have a snake case name [INFO] [stdout] --> src/day7/day7.rs:267:26 [INFO] [stdout] | [INFO] [stdout] 267 | fn calculate_freed_space(FULL_SIZE: u32, dir: &Directory, fs: &FileSystem) -> (u32, u32) { [INFO] [stdout] | ^^^^^^^^^ help: convert the identifier to snake case: `full_size` [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 `N` should have a snake case name [INFO] [stdout] --> src/day12/day12.rs:52:9 [INFO] [stdout] | [INFO] [stdout] 52 | let N = grid.len() as u32; [INFO] [stdout] | ^ help: convert the identifier to snake case: `n` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `M` should have a snake case name [INFO] [stdout] --> src/day12/day12.rs:53:9 [INFO] [stdout] | [INFO] [stdout] 53 | let M = grid.get(0).unwrap().len() as u32; [INFO] [stdout] | ^ help: convert the identifier to snake case: `m` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `N` should have a snake case name [INFO] [stdout] --> src/day12/day12.rs:96:9 [INFO] [stdout] | [INFO] [stdout] 96 | let N = grid.len() as u32; [INFO] [stdout] | ^ help: convert the identifier to snake case: `n` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `M` should have a snake case name [INFO] [stdout] --> src/day12/day12.rs:97:9 [INFO] [stdout] | [INFO] [stdout] 97 | let M = grid.get(0).unwrap().len() as u32; [INFO] [stdout] | ^ help: convert the identifier to snake case: `m` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `MINUTES` should have a snake case name [INFO] [stdout] --> src/day19/day19.rs:91:29 [INFO] [stdout] | [INFO] [stdout] 91 | fn simulate(bp: &Blueprint, MINUTES: u32) -> u32{ [INFO] [stdout] | ^^^^^^^ help: convert the identifier to snake case: `minutes` [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 1.36s [INFO] running `Command { std: "docker" "inspect" "bbebb856920ed63f0f09fb5bf9ed78530ce4e010db2585cf1c89abbc4c2797b7", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "bbebb856920ed63f0f09fb5bf9ed78530ce4e010db2585cf1c89abbc4c2797b7", kill_on_drop: false }` [INFO] [stdout] bbebb856920ed63f0f09fb5bf9ed78530ce4e010db2585cf1c89abbc4c2797b7