[INFO] cloning repository https://github.com/samsonjj/advent_of_code_2024 [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/samsonjj/advent_of_code_2024" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fsamsonjj%2Fadvent_of_code_2024", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fsamsonjj%2Fadvent_of_code_2024'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] c8d16962b87f807b709a74539e6a243c8d30818f [INFO] linting samsonjj/advent_of_code_2024 against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fsamsonjj%2Fadvent_of_code_2024" "/workspace/builds/worker-6-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-6-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/samsonjj/advent_of_code_2024 [INFO] finished tweaking git repo https://github.com/samsonjj/advent_of_code_2024 [INFO] tweaked toml for git repo https://github.com/samsonjj/advent_of_code_2024 written to /workspace/builds/worker-6-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/samsonjj/advent_of_code_2024 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/samsonjj/advent_of_code_2024 already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] fa69e975619edbab509c99fa422dce620780c92a7fe061b2c55a9ff13d2354b2 [INFO] running `Command { std: "docker" "start" "-a" "fa69e975619edbab509c99fa422dce620780c92a7fe061b2c55a9ff13d2354b2", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "fa69e975619edbab509c99fa422dce620780c92a7fe061b2c55a9ff13d2354b2", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "fa69e975619edbab509c99fa422dce620780c92a7fe061b2c55a9ff13d2354b2", kill_on_drop: false }` [INFO] [stdout] fa69e975619edbab509c99fa422dce620780c92a7fe061b2c55a9ff13d2354b2 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] b6f6c593bb183970091a2bb5d96de07904f3fe1828a88615687cde378b984304 [INFO] running `Command { std: "docker" "start" "-a" "b6f6c593bb183970091a2bb5d96de07904f3fe1828a88615687cde378b984304", kill_on_drop: false }` [INFO] [stderr] Checking advent_of_code_2024 v0.1.0 (/opt/rustwide/workdir) [INFO] [stderr] Checking memchr v2.7.5 [INFO] [stderr] Checking regex-syntax v0.8.5 [INFO] [stderr] Checking day_10 v0.1.0 (/opt/rustwide/workdir/crates/day_10) [INFO] [stderr] Checking day_2 v0.1.0 (/opt/rustwide/workdir/crates/day_2) [INFO] [stderr] Checking day_11 v0.1.0 (/opt/rustwide/workdir/crates/day_11) [INFO] [stderr] Checking day_16 v0.1.0 (/opt/rustwide/workdir/crates/day_16) [INFO] [stderr] Checking day_1 v0.1.0 (/opt/rustwide/workdir/crates/day_1) [INFO] [stderr] Checking day_4 v0.1.0 (/opt/rustwide/workdir/crates/day_4) [INFO] [stderr] Checking day_8 v0.1.0 (/opt/rustwide/workdir/crates/day_8) [INFO] [stderr] Checking day_12 v0.1.0 (/opt/rustwide/workdir/crates/day_12) [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> crates/day_1/src/main.rs:7:15 [INFO] [stdout] | [INFO] [stdout] 7 | const INPUT: &'static str = include_str!("input.txt"); [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] = note: `#[warn(clippy::redundant_static_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> crates/day_1/src/main.rs:9:17 [INFO] [stdout] | [INFO] [stdout] 9 | const EXAMPLE: &'static str = include_str!("example.txt"); [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `itertools::Itertools` [INFO] [stdout] --> crates/day_1/src/main.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use itertools::Itertools; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) 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] --> crates/day_1/src/main.rs:32:21 [INFO] [stdout] | [INFO] [stdout] 32 | fn get_counts(list: &Vec) -> HashMap { [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] 32 - fn get_counts(list: &Vec) -> HashMap { [INFO] [stdout] 32 + fn get_counts(list: &[i32]) -> HashMap { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> crates/day_2/src/main.rs:4:15 [INFO] [stdout] | [INFO] [stdout] 4 | const INPUT: &'static str = include_str!("input.txt"); [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] = note: `#[warn(clippy::redundant_static_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> crates/day_2/src/main.rs:5:17 [INFO] [stdout] | [INFO] [stdout] 5 | const EXAMPLE: &'static str = include_str!("example.txt"); [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking day_6 v0.1.0 (/opt/rustwide/workdir/crates/day_6) [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> crates/day_2/src/main.rs:4:15 [INFO] [stdout] | [INFO] [stdout] 4 | const INPUT: &'static str = include_str!("input.txt"); [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] = note: `#[warn(clippy::redundant_static_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> crates/day_2/src/main.rs:5:17 [INFO] [stdout] | [INFO] [stdout] 5 | const EXAMPLE: &'static str = include_str!("example.txt"); [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> crates/day_1/src/main.rs:7:15 [INFO] [stdout] | [INFO] [stdout] 7 | const INPUT: &'static str = include_str!("input.txt"); [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] = note: `#[warn(clippy::redundant_static_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> crates/day_1/src/main.rs:9:17 [INFO] [stdout] | [INFO] [stdout] 9 | const EXAMPLE: &'static str = include_str!("example.txt"); [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `itertools::Itertools` [INFO] [stdout] --> crates/day_8/src/main.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use itertools::Itertools; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking day_9 v0.1.0 (/opt/rustwide/workdir/crates/day_9) [INFO] [stdout] warning: unused variable: `prev` [INFO] [stdout] --> crates/day_16/src/main.rs:205:41 [INFO] [stdout] | [INFO] [stdout] 205 | let EdgeCost { edge: Edge { prev, next }, cost } = edge_cost; [INFO] [stdout] | ^^^^ help: try ignoring the field: `prev: _` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `state` [INFO] [stdout] --> crates/day_16/src/main.rs:341:10 [INFO] [stdout] | [INFO] [stdout] 341 | for (state, edge_costs) in paths2.iter() { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_state` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `result` [INFO] [stdout] --> crates/day_16/src/main.rs:373:10 [INFO] [stdout] | [INFO] [stdout] 373 | let (result, paths) = maze.search2(); [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_result` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type `State` is more private than the item `state_cost::StateCost::state` [INFO] [stdout] --> crates/day_16/src/main.rs:87:9 [INFO] [stdout] | [INFO] [stdout] 87 | pub state: State, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ field `state_cost::StateCost::state` is reachable at visibility `pub` [INFO] [stdout] | [INFO] [stdout] note: but type `State` is only usable at visibility `pub(crate)` [INFO] [stdout] --> crates/day_16/src/main.rs:72:1 [INFO] [stdout] | [INFO] [stdout] 72 | struct State { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] = note: `#[warn(private_interfaces)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type `Direction` is more private than the item `state_cost::StateCost::new` [INFO] [stdout] --> crates/day_16/src/main.rs:92:9 [INFO] [stdout] | [INFO] [stdout] 92 | pub fn new(pos: (usize, usize), dir: Direction, cost: i64) -> Self { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ associated function `state_cost::StateCost::new` is reachable at visibility `pub` [INFO] [stdout] | [INFO] [stdout] note: but type `Direction` is only usable at visibility `pub(crate)` [INFO] [stdout] --> crates/day_16/src/main.rs:9:1 [INFO] [stdout] | [INFO] [stdout] 9 | enum Direction { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> crates/day_10/src/main.rs:54:9 [INFO] [stdout] | [INFO] [stdout] 54 | let mut data = parse_input(input); [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: function call inside of `expect` [INFO] [stdout] --> crates/day_10/src/main.rs:5:81 [INFO] [stdout] | [INFO] [stdout] 5 | ...ars().map(|c| c.to_digit(10).expect(format!("failed to parse '{c}' to digit").as_str()) as i32).collect_vec()).collect_vec(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|| panic!("failed to parse '{c}' to digit"))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] = note: `#[warn(clippy::expect_fun_call)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> crates/day_16/src/main.rs:203:13 [INFO] [stdout] | [INFO] [stdout] 203 | queue.sort_by(|a, b| b.cost.cmp(&a.cost)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] = note: `#[warn(clippy::unnecessary_sort_by)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 203 - queue.sort_by(|a, b| b.cost.cmp(&a.cost)); [INFO] [stdout] 203 + queue.sort_by_key(|b| std::cmp::Reverse(b.cost)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `EXAMPLE` is never used [INFO] [stdout] --> crates/day_2/src/main.rs:5:7 [INFO] [stdout] | [INFO] [stdout] 5 | const EXAMPLE: &'static str = include_str!("example.txt"); [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> crates/day_16/src/main.rs:240:10 [INFO] [stdout] | [INFO] [stdout] 240 | ) -> (i64, HashMap<(usize, usize), Direction>, HashMap<(usize, usize), Vec<(usize, usize)>>, (usize, usize)) { [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: parameter is only used in recursion [INFO] [stdout] --> crates/day_16/src/main.rs:290:101 [INFO] [stdout] | [INFO] [stdout] 290 | fn count_seats(&self, state: State, paths: &EdgeCostStore, seats: &mut HashSet<(usize, usize)>, i: i64) { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] | [INFO] [stdout] note: parameter used here [INFO] [stdout] --> crates/day_16/src/main.rs:298:65 [INFO] [stdout] | [INFO] [stdout] 298 | self.count_seats(edge_cost.edge.prev, paths, seats, i + 1); [INFO] [stdout] | ^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#only_used_in_recursion [INFO] [stdout] = note: `#[warn(clippy::only_used_in_recursion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> crates/day_2/src/main.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | return true; [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] 21 - return true; [INFO] [stdout] 21 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> crates/day_2/src/main.rs:12:21 [INFO] [stdout] | [INFO] [stdout] 12 | fn increasing(data: &Vec) -> bool { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 12 - fn increasing(data: &Vec) -> bool { [INFO] [stdout] 12 + fn increasing(data: &[i32]) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `turnC` should have a snake case name [INFO] [stdout] --> crates/day_16/src/main.rs:34:8 [INFO] [stdout] | [INFO] [stdout] 34 | fn turnC(&mut self) { [INFO] [stdout] | ^^^^^ help: convert the identifier to snake case: `turn_c` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` (part of `#[warn(nonstandard_style)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `turnCC` should have a snake case name [INFO] [stdout] --> crates/day_16/src/main.rs:42:8 [INFO] [stdout] | [INFO] [stdout] 42 | fn turnCC(&mut self) { [INFO] [stdout] | ^^^^^^ help: convert the identifier to snake case: `turn_cc` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `turnC` should have a snake case name [INFO] [stdout] --> crates/day_16/src/main.rs:162:12 [INFO] [stdout] | [INFO] [stdout] 162 | pub fn turnC(&self) -> Self { [INFO] [stdout] | ^^^^^ help: convert the identifier to snake case: `turn_c` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `turnCC` should have a snake case name [INFO] [stdout] --> crates/day_16/src/main.rs:169:12 [INFO] [stdout] | [INFO] [stdout] 169 | pub fn turnCC(&self) -> Self { [INFO] [stdout] | ^^^^^^ help: convert the identifier to snake case: `turn_cc` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `turnC` should have a snake case name [INFO] [stdout] --> crates/day_16/src/main.rs:101:16 [INFO] [stdout] | [INFO] [stdout] 101 | pub fn turnC(&self) -> Self { [INFO] [stdout] | ^^^^^ help: convert the identifier to snake case: `turn_c` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `turnCC` should have a snake case name [INFO] [stdout] --> crates/day_16/src/main.rs:107:16 [INFO] [stdout] | [INFO] [stdout] 107 | pub fn turnCC(&self) -> Self { [INFO] [stdout] | ^^^^^^ help: convert the identifier to snake case: `turn_cc` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `position` [INFO] [stdout] --> crates/day_4/src/main.rs:128:17 [INFO] [stdout] | [INFO] [stdout] 128 | let position = (i, j); [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_position` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `position` [INFO] [stdout] --> crates/day_4/src/main.rs:145:17 [INFO] [stdout] | [INFO] [stdout] 145 | let position = (i, j); [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_position` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `iteration` [INFO] [stdout] --> crates/day_11/src/main.rs:32:9 [INFO] [stdout] | [INFO] [stdout] 32 | for iteration in 0..25 { [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_iteration` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `print_nodes` is never used [INFO] [stdout] --> crates/day_8/src/main.rs:29:4 [INFO] [stdout] | [INFO] [stdout] 29 | fn print_nodes(width: i32, height: i32, set: &HashSet<(i32, i32)>) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `iteration` [INFO] [stdout] --> crates/day_11/src/main.rs:52:9 [INFO] [stdout] | [INFO] [stdout] 52 | for iteration in 0..75 { [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_iteration` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> crates/day_4/src/main.rs:99:94 [INFO] [stdout] | [INFO] [stdout] 99 | fn match_pattern_item_at_position(pattern_item: PatternItem, position: (usize, usize), data: &Vec>) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 99 - fn match_pattern_item_at_position(pattern_item: PatternItem, position: (usize, usize), data: &Vec>) -> bool { [INFO] [stdout] 99 + fn match_pattern_item_at_position(pattern_item: PatternItem, position: (usize, usize), data: &[Vec]) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> crates/day_2/src/main.rs:33:5 [INFO] [stdout] | [INFO] [stdout] 33 | return true; [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] 33 - return true; [INFO] [stdout] 33 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> crates/day_11/src/main.rs:12:20 [INFO] [stdout] | [INFO] [stdout] 12 | let left = (&stone_string[0..stone_string.len()/2]).parse::().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `stone_string[0..stone_string.len()/2]` [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: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> crates/day_8/src/main.rs:12:32 [INFO] [stdout] | [INFO] [stdout] 12 | fn parse_input(input: &str) -> (i32, i32, HashMap>) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> crates/day_11/src/main.rs:13:21 [INFO] [stdout] | [INFO] [stdout] 13 | let right = (&stone_string[stone_string.len()/2..stone_string.len()]).parse::().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `stone_string[stone_string.len()/2..stone_string.len()]` [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] --> crates/day_2/src/main.rs:24:21 [INFO] [stdout] | [INFO] [stdout] 24 | fn decreasing(data: &Vec) -> bool { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 24 - fn decreasing(data: &Vec) -> bool { [INFO] [stdout] 24 + fn decreasing(data: &[i32]) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> crates/day_2/src/main.rs:37:18 [INFO] [stdout] | [INFO] [stdout] 37 | fn bounded(data: &Vec) -> bool { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 37 - fn bounded(data: &Vec) -> bool { [INFO] [stdout] 37 + fn bounded(data: &[i32]) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> crates/day_2/src/main.rs:55:29 [INFO] [stdout] | [INFO] [stdout] 55 | data.into_iter().filter(|row| is_safe(row)).count() as i32 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `is_safe` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/day_2/src/main.rs:59:17 [INFO] [stdout] | [INFO] [stdout] 59 | (increasing(&row) || decreasing(&row)) && bounded(&row) [INFO] [stdout] | ^^^^ help: change this to: `row` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/day_2/src/main.rs:59:37 [INFO] [stdout] | [INFO] [stdout] 59 | (increasing(&row) || decreasing(&row)) && bounded(&row) [INFO] [stdout] | ^^^^ help: change this to: `row` [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] --> crates/day_2/src/main.rs:59:55 [INFO] [stdout] | [INFO] [stdout] 59 | (increasing(&row) || decreasing(&row)) && bounded(&row) [INFO] [stdout] | ^^^^ help: change this to: `row` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> crates/day_2/src/main.rs:81:29 [INFO] [stdout] | [INFO] [stdout] 81 | data.into_iter().filter(|row| is_close_to_safe(row)).count() as i32 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `is_close_to_safe` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> crates/day_8/src/main.rs:91:39 [INFO] [stdout] | [INFO] [stdout] 91 | let node = (a.0 + -1 * mult * diff.0, a.1 + -1 * mult * diff.1); [INFO] [stdout] | ^^^^^^^^^ help: consider using: `-mult` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] = note: `#[warn(clippy::neg_multiply)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> crates/day_8/src/main.rs:91:65 [INFO] [stdout] | [INFO] [stdout] 91 | let node = (a.0 + -1 * mult * diff.0, a.1 + -1 * mult * diff.1); [INFO] [stdout] | ^^^^^^^^^ help: consider using: `-mult` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> crates/day_12/src/main.rs:73:9 [INFO] [stdout] | [INFO] [stdout] 73 | let mut area = 1; [INFO] [stdout] | ----^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `print` is never used [INFO] [stdout] --> crates/day_12/src/main.rs:35:4 [INFO] [stdout] | [INFO] [stdout] 35 | fn print(garden: &Vec>) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) 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] --> crates/day_12/src/main.rs:35:18 [INFO] [stdout] | [INFO] [stdout] 35 | fn print(garden: &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] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 35 - fn print(garden: &Vec>) { [INFO] [stdout] 35 + fn print(garden: &[Vec]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `col` is only used to index `garden` [INFO] [stdout] --> crates/day_12/src/main.rs:37:20 [INFO] [stdout] | [INFO] [stdout] 37 | for col in 0..garden.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 37 - for col in 0..garden.len() { [INFO] [stdout] 37 + for in &garden { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> crates/day_12/src/main.rs:49:6 [INFO] [stdout] | [INFO] [stdout] 49 | (direction.0 * -1, direction.1 * -1) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: consider using: `-direction.0` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] = note: `#[warn(clippy::neg_multiply)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> crates/day_12/src/main.rs:49:24 [INFO] [stdout] | [INFO] [stdout] 49 | (direction.0 * -1, direction.1 * -1) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: consider using: `-direction.1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> crates/day_12/src/main.rs:56:40 [INFO] [stdout] | [INFO] [stdout] 56 | fn bfs(row: usize, col: usize, garden: &mut Vec>, queue: &mut VecDeque<(usize, usize)>) -> Specs { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 56 - fn bfs(row: usize, col: usize, garden: &mut Vec>, queue: &mut VecDeque<(usize, usize)>) -> Specs { [INFO] [stdout] 56 + fn bfs(row: usize, col: usize, garden: &mut [Vec], queue: &mut VecDeque<(usize, usize)>) -> Specs { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> crates/day_12/src/main.rs:150:19 [INFO] [stdout] | [INFO] [stdout] 150 | while queue.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!queue.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: you are using an explicit closure for copying elements [INFO] [stdout] --> crates/day_6/src/main.rs:38:26 [INFO] [stdout] | [INFO] [stdout] 38 | let candidates = self.visited.iter().map(|item| item.clone()).collect::>(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `self.visited.iter().copied()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] = note: `#[warn(clippy::map_clone)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `(i32, i32)` which implements the `Copy` trait [INFO] [stdout] --> crates/day_6/src/main.rs:38:57 [INFO] [stdout] | [INFO] [stdout] 38 | let candidates = self.visited.iter().map(|item| item.clone()).collect::>(); [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*item` [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: unused import: `itertools::Itertools` [INFO] [stdout] --> crates/day_1/src/main.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use itertools::Itertools; [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 label [INFO] [stdout] --> crates/day_9/src/mem.rs:67:13 [INFO] [stdout] | [INFO] [stdout] 67 | 'freespace: loop { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_labels)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `itertools::Itertools` [INFO] [stdout] --> crates/day_9/src/main.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use itertools::Itertools; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::HashMap` [INFO] [stdout] --> crates/day_9/src/main.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use std::collections::HashMap; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> crates/day_1/src/main.rs:32:21 [INFO] [stdout] | [INFO] [stdout] 32 | fn get_counts(list: &Vec) -> HashMap { [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] 32 - fn get_counts(list: &Vec) -> HashMap { [INFO] [stdout] 32 + fn get_counts(list: &[i32]) -> HashMap { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `iteration` [INFO] [stdout] --> crates/day_11/src/main.rs:32:9 [INFO] [stdout] | [INFO] [stdout] 32 | for iteration in 0..25 { [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_iteration` [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] --> crates/day_10/src/main.rs:54:9 [INFO] [stdout] | [INFO] [stdout] 54 | let mut data = parse_input(input); [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: function call inside of `expect` [INFO] [stdout] --> crates/day_10/src/main.rs:5:81 [INFO] [stdout] | [INFO] [stdout] 5 | ...ars().map(|c| c.to_digit(10).expect(format!("failed to parse '{c}' to digit").as_str()) as i32).collect_vec()).collect_vec(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|| panic!("failed to parse '{c}' to digit"))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] = note: `#[warn(clippy::expect_fun_call)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> crates/day_9/src/mem.rs:20:17 [INFO] [stdout] | [INFO] [stdout] 20 | for i in 0..length { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> crates/day_12/src/main.rs:73:9 [INFO] [stdout] | [INFO] [stdout] 73 | let mut area = 1; [INFO] [stdout] | ----^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> crates/day_2/src/main.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | return true; [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] 21 - return true; [INFO] [stdout] 21 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> crates/day_2/src/main.rs:12:21 [INFO] [stdout] | [INFO] [stdout] 12 | fn increasing(data: &Vec) -> bool { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 12 - fn increasing(data: &Vec) -> bool { [INFO] [stdout] 12 + fn increasing(data: &[i32]) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> crates/day_2/src/main.rs:33:5 [INFO] [stdout] | [INFO] [stdout] 33 | return true; [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] 33 - return true; [INFO] [stdout] 33 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> crates/day_2/src/main.rs:24:21 [INFO] [stdout] | [INFO] [stdout] 24 | fn decreasing(data: &Vec) -> bool { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 24 - fn decreasing(data: &Vec) -> bool { [INFO] [stdout] 24 + fn decreasing(data: &[i32]) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `iteration` [INFO] [stdout] --> crates/day_11/src/main.rs:52:9 [INFO] [stdout] | [INFO] [stdout] 52 | for iteration in 0..75 { [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_iteration` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `print` is never used [INFO] [stdout] --> crates/day_12/src/main.rs:35:4 [INFO] [stdout] | [INFO] [stdout] 35 | fn print(garden: &Vec>) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `memory` [INFO] [stdout] --> crates/day_9/src/mem.rs:180:12 [INFO] [stdout] | [INFO] [stdout] 180 | fn new(memory: & BlockMemory) -> Self { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_memory` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> crates/day_2/src/main.rs:37:18 [INFO] [stdout] | [INFO] [stdout] 37 | fn bounded(data: &Vec) -> bool { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 37 - fn bounded(data: &Vec) -> bool { [INFO] [stdout] 37 + fn bounded(data: &[i32]) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> crates/day_2/src/main.rs:55:29 [INFO] [stdout] | [INFO] [stdout] 55 | data.into_iter().filter(|row| is_safe(row)).count() as i32 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `is_safe` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/day_2/src/main.rs:59:17 [INFO] [stdout] | [INFO] [stdout] 59 | (increasing(&row) || decreasing(&row)) && bounded(&row) [INFO] [stdout] | ^^^^ help: change this to: `row` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/day_2/src/main.rs:59:37 [INFO] [stdout] | [INFO] [stdout] 59 | (increasing(&row) || decreasing(&row)) && bounded(&row) [INFO] [stdout] | ^^^^ help: change this to: `row` [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] --> crates/day_2/src/main.rs:59:55 [INFO] [stdout] | [INFO] [stdout] 59 | (increasing(&row) || decreasing(&row)) && bounded(&row) [INFO] [stdout] | ^^^^ help: change this to: `row` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> crates/day_2/src/main.rs:81:29 [INFO] [stdout] | [INFO] [stdout] 81 | data.into_iter().filter(|row| is_close_to_safe(row)).count() as i32 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `is_close_to_safe` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> crates/day_12/src/main.rs:35:18 [INFO] [stdout] | [INFO] [stdout] 35 | fn print(garden: &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] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 35 - fn print(garden: &Vec>) { [INFO] [stdout] 35 + fn print(garden: &[Vec]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `col` is only used to index `garden` [INFO] [stdout] --> crates/day_12/src/main.rs:37:20 [INFO] [stdout] | [INFO] [stdout] 37 | for col in 0..garden.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 37 - for col in 0..garden.len() { [INFO] [stdout] 37 + for in &garden { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> crates/day_9/src/main.rs:37:13 [INFO] [stdout] | [INFO] [stdout] 37 | for i in 0..num { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `to_string` and `print` are never used [INFO] [stdout] --> crates/day_9/src/mem.rs:29:8 [INFO] [stdout] | [INFO] [stdout] 7 | impl BlockMemory { [INFO] [stdout] | ---------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 29 | fn to_string(&self) -> String { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 41 | fn print(&self) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `diff` is never used [INFO] [stdout] --> crates/day_9/src/mem.rs:165:8 [INFO] [stdout] | [INFO] [stdout] 118 | impl Scanner { [INFO] [stdout] | ------------ method in this implementation [INFO] [stdout] ... [INFO] [stdout] 165 | fn diff(&mut self) -> usize { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> crates/day_12/src/main.rs:49:6 [INFO] [stdout] | [INFO] [stdout] 49 | (direction.0 * -1, direction.1 * -1) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: consider using: `-direction.0` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] = note: `#[warn(clippy::neg_multiply)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> crates/day_12/src/main.rs:49:24 [INFO] [stdout] | [INFO] [stdout] 49 | (direction.0 * -1, direction.1 * -1) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: consider using: `-direction.1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> crates/day_11/src/main.rs:12:20 [INFO] [stdout] | [INFO] [stdout] 12 | let left = (&stone_string[0..stone_string.len()/2]).parse::().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `stone_string[0..stone_string.len()/2]` [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: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> crates/day_12/src/main.rs:56:40 [INFO] [stdout] | [INFO] [stdout] 56 | fn bfs(row: usize, col: usize, garden: &mut Vec>, queue: &mut VecDeque<(usize, usize)>) -> Specs { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 56 - fn bfs(row: usize, col: usize, garden: &mut Vec>, queue: &mut VecDeque<(usize, usize)>) -> Specs { [INFO] [stdout] 56 + fn bfs(row: usize, col: usize, garden: &mut [Vec], queue: &mut VecDeque<(usize, usize)>) -> Specs { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused label [INFO] [stdout] --> crates/day_9/src/mem.rs:67:13 [INFO] [stdout] | [INFO] [stdout] 67 | 'freespace: loop { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_labels)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> crates/day_9/src/mem.rs:19:41 [INFO] [stdout] | [INFO] [stdout] 19 | let length = c.to_digit(10).expect(format!("failed to parse digit from '{c}'").as_str()); // radix = 10 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|| panic!("failed to parse digit from '{c}'"))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] = note: `#[warn(clippy::expect_fun_call)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: implementation of inherent method `to_string(&self) -> String` for type `mem::BlockMemory` [INFO] [stdout] --> crates/day_9/src/mem.rs:29:5 [INFO] [stdout] | [INFO] [stdout] 29 | / fn to_string(&self) -> String { [INFO] [stdout] 30 | | let mut s = String::new(); [INFO] [stdout] 31 | | for item in self.blocks.iter() { [INFO] [stdout] 32 | | let c = match item { [INFO] [stdout] ... | [INFO] [stdout] 38 | | s [INFO] [stdout] 39 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: implement trait `Display` for type `mem::BlockMemory` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inherent_to_string [INFO] [stdout] = note: `#[warn(clippy::inherent_to_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> crates/day_11/src/main.rs:13:21 [INFO] [stdout] | [INFO] [stdout] 13 | let right = (&stone_string[stone_string.len()/2..stone_string.len()]).parse::().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `stone_string[stone_string.len()/2..stone_string.len()]` [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: unused variable: `prev` [INFO] [stdout] --> crates/day_16/src/main.rs:205:41 [INFO] [stdout] | [INFO] [stdout] 205 | let EdgeCost { edge: Edge { prev, next }, cost } = edge_cost; [INFO] [stdout] | ^^^^ help: try ignoring the field: `prev: _` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> crates/day_9/src/mem.rs:33:35 [INFO] [stdout] | [INFO] [stdout] 33 | Some(file_id) => ('0' as u8 + *file_id as u8) as char, [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'0'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] = note: `#[warn(clippy::char_lit_as_u8)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> crates/day_9/src/mem.rs:67:13 [INFO] [stdout] | [INFO] [stdout] 67 | / 'freespace: loop { [INFO] [stdout] 68 | | let Some(freespace) = freespace_scanner.next(self) else { break; }; [INFO] [stdout] 69 | | [INFO] [stdout] 70 | | let file_len = file.1.1 - file.1.0; [INFO] [stdout] ... | [INFO] [stdout] 92 | | continue 'file; // we swapped the file! go to the outer loop [INFO] [stdout] 93 | | } [INFO] [stdout] | |_____________^ help: try: `while let Some(freespace) = freespace_scanner.next(self) { .. }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] = note: `#[warn(clippy::while_let_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `itertools::Itertools` [INFO] [stdout] --> crates/day_9/src/main.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use itertools::Itertools; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::HashMap` [INFO] [stdout] --> crates/day_9/src/main.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use std::collections::HashMap; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `i32::abs()` to usize [INFO] [stdout] --> crates/day_9/src/mem.rs:166:9 [INFO] [stdout] | [INFO] [stdout] 166 | (self.marker as i32 - self.pointer as i32).abs() as usize [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `(self.marker as i32 - self.pointer as i32).unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] = note: `#[warn(clippy::cast_abs_to_unsigned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> crates/day_9/src/mem.rs:196:9 [INFO] [stdout] | [INFO] [stdout] 196 | / loop { [INFO] [stdout] 197 | | match self.scanner.inc(memory) { [INFO] [stdout] 198 | | ScannerValue::Free => continue, [INFO] [stdout] 199 | | _ => break, [INFO] [stdout] 200 | | }; [INFO] [stdout] 201 | | } [INFO] [stdout] | |_________^ help: try: `while let ScannerValue::Free = self.scanner.inc(memory) { .. }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> crates/day_9/src/main.rs:13:25 [INFO] [stdout] | [INFO] [stdout] 13 | fn print_blocks(blocks: &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] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 13 - fn print_blocks(blocks: &Vec>) { [INFO] [stdout] 13 + fn print_blocks(blocks: &[Option]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> crates/day_9/src/main.rs:15:52 [INFO] [stdout] | [INFO] [stdout] 15 | print!("{}", item.map(|x| (x % 10) as u8 + '0' as u8).unwrap_or('.' as u8) as char); [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'0'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> crates/day_9/src/main.rs:15:73 [INFO] [stdout] | [INFO] [stdout] 15 | print!("{}", item.map(|x| (x % 10) as u8 + '0' as u8).unwrap_or('.' as u8) as char); [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'.'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> crates/day_9/src/main.rs:20:21 [INFO] [stdout] | [INFO] [stdout] 20 | fn checksum(blocks: &Vec>) -> i64 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 20 - fn checksum(blocks: &Vec>) -> i64 { [INFO] [stdout] 20 + fn checksum(blocks: &[Option]) -> i64 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> crates/day_12/src/main.rs:150:19 [INFO] [stdout] | [INFO] [stdout] 150 | while queue.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!queue.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: `state` [INFO] [stdout] --> crates/day_16/src/main.rs:341:10 [INFO] [stdout] | [INFO] [stdout] 341 | for (state, edge_costs) in paths2.iter() { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_state` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `result` [INFO] [stdout] --> crates/day_16/src/main.rs:373:10 [INFO] [stdout] | [INFO] [stdout] 373 | let (result, paths) = maze.search2(); [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_result` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type `State` is more private than the item `state_cost::StateCost::state` [INFO] [stdout] --> crates/day_16/src/main.rs:87:9 [INFO] [stdout] | [INFO] [stdout] 87 | pub state: State, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ field `state_cost::StateCost::state` is reachable at visibility `pub` [INFO] [stdout] | [INFO] [stdout] note: but type `State` is only usable at visibility `pub(crate)` [INFO] [stdout] --> crates/day_16/src/main.rs:72:1 [INFO] [stdout] | [INFO] [stdout] 72 | struct State { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] = note: `#[warn(private_interfaces)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type `Direction` is more private than the item `state_cost::StateCost::new` [INFO] [stdout] --> crates/day_16/src/main.rs:92:9 [INFO] [stdout] | [INFO] [stdout] 92 | pub fn new(pos: (usize, usize), dir: Direction, cost: i64) -> Self { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ associated function `state_cost::StateCost::new` is reachable at visibility `pub` [INFO] [stdout] | [INFO] [stdout] note: but type `Direction` is only usable at visibility `pub(crate)` [INFO] [stdout] --> crates/day_16/src/main.rs:9:1 [INFO] [stdout] | [INFO] [stdout] 9 | enum Direction { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> crates/day_16/src/main.rs:203:13 [INFO] [stdout] | [INFO] [stdout] 203 | queue.sort_by(|a, b| b.cost.cmp(&a.cost)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] = note: `#[warn(clippy::unnecessary_sort_by)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 203 - queue.sort_by(|a, b| b.cost.cmp(&a.cost)); [INFO] [stdout] 203 + queue.sort_by_key(|b| std::cmp::Reverse(b.cost)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> crates/day_16/src/main.rs:240:10 [INFO] [stdout] | [INFO] [stdout] 240 | ) -> (i64, HashMap<(usize, usize), Direction>, HashMap<(usize, usize), Vec<(usize, usize)>>, (usize, usize)) { [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: parameter is only used in recursion [INFO] [stdout] --> crates/day_16/src/main.rs:290:101 [INFO] [stdout] | [INFO] [stdout] 290 | fn count_seats(&self, state: State, paths: &EdgeCostStore, seats: &mut HashSet<(usize, usize)>, i: i64) { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] | [INFO] [stdout] note: parameter used here [INFO] [stdout] --> crates/day_16/src/main.rs:298:65 [INFO] [stdout] | [INFO] [stdout] 298 | self.count_seats(edge_cost.edge.prev, paths, seats, i + 1); [INFO] [stdout] | ^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#only_used_in_recursion [INFO] [stdout] = note: `#[warn(clippy::only_used_in_recursion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `turnC` should have a snake case name [INFO] [stdout] --> crates/day_16/src/main.rs:34:8 [INFO] [stdout] | [INFO] [stdout] 34 | fn turnC(&mut self) { [INFO] [stdout] | ^^^^^ help: convert the identifier to snake case: `turn_c` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` (part of `#[warn(nonstandard_style)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `turnCC` should have a snake case name [INFO] [stdout] --> crates/day_16/src/main.rs:42:8 [INFO] [stdout] | [INFO] [stdout] 42 | fn turnCC(&mut self) { [INFO] [stdout] | ^^^^^^ help: convert the identifier to snake case: `turn_cc` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `turnC` should have a snake case name [INFO] [stdout] --> crates/day_16/src/main.rs:162:12 [INFO] [stdout] | [INFO] [stdout] 162 | pub fn turnC(&self) -> Self { [INFO] [stdout] | ^^^^^ help: convert the identifier to snake case: `turn_c` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `turnCC` should have a snake case name [INFO] [stdout] --> crates/day_16/src/main.rs:169:12 [INFO] [stdout] | [INFO] [stdout] 169 | pub fn turnCC(&self) -> Self { [INFO] [stdout] | ^^^^^^ help: convert the identifier to snake case: `turn_cc` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `turnC` should have a snake case name [INFO] [stdout] --> crates/day_16/src/main.rs:101:16 [INFO] [stdout] | [INFO] [stdout] 101 | pub fn turnC(&self) -> Self { [INFO] [stdout] | ^^^^^ help: convert the identifier to snake case: `turn_c` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `turnCC` should have a snake case name [INFO] [stdout] --> crates/day_16/src/main.rs:107:16 [INFO] [stdout] | [INFO] [stdout] 107 | pub fn turnCC(&self) -> Self { [INFO] [stdout] | ^^^^^^ help: convert the identifier to snake case: `turn_cc` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> crates/day_9/src/mem.rs:20:17 [INFO] [stdout] | [INFO] [stdout] 20 | for i in 0..length { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `memory` [INFO] [stdout] --> crates/day_9/src/mem.rs:180:12 [INFO] [stdout] | [INFO] [stdout] 180 | fn new(memory: & BlockMemory) -> Self { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_memory` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `itertools::Itertools` [INFO] [stdout] --> crates/day_8/src/main.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use itertools::Itertools; [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 variable: `i` [INFO] [stdout] --> crates/day_9/src/main.rs:37:13 [INFO] [stdout] | [INFO] [stdout] 37 | for i in 0..num { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `expected` [INFO] [stdout] --> crates/day_9/src/main.rs:90:13 [INFO] [stdout] | [INFO] [stdout] 90 | let expected = 137; [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_expected` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `result` [INFO] [stdout] --> crates/day_9/src/main.rs:92:13 [INFO] [stdout] | [INFO] [stdout] 92 | let result = part_2("12345"); [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_result` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `diff` is never used [INFO] [stdout] --> crates/day_9/src/mem.rs:165:8 [INFO] [stdout] | [INFO] [stdout] 118 | impl Scanner { [INFO] [stdout] | ------------ method in this implementation [INFO] [stdout] ... [INFO] [stdout] 165 | fn diff(&mut self) -> usize { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> crates/day_9/src/mem.rs:19:41 [INFO] [stdout] | [INFO] [stdout] 19 | let length = c.to_digit(10).expect(format!("failed to parse digit from '{c}'").as_str()); // radix = 10 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|| panic!("failed to parse digit from '{c}'"))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] = note: `#[warn(clippy::expect_fun_call)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: implementation of inherent method `to_string(&self) -> String` for type `mem::BlockMemory` [INFO] [stdout] --> crates/day_9/src/mem.rs:29:5 [INFO] [stdout] | [INFO] [stdout] 29 | / fn to_string(&self) -> String { [INFO] [stdout] 30 | | let mut s = String::new(); [INFO] [stdout] 31 | | for item in self.blocks.iter() { [INFO] [stdout] 32 | | let c = match item { [INFO] [stdout] ... | [INFO] [stdout] 38 | | s [INFO] [stdout] 39 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: implement trait `Display` for type `mem::BlockMemory` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inherent_to_string [INFO] [stdout] = note: `#[warn(clippy::inherent_to_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `print_nodes` is never used [INFO] [stdout] --> crates/day_8/src/main.rs:29:4 [INFO] [stdout] | [INFO] [stdout] 29 | fn print_nodes(width: i32, height: i32, set: &HashSet<(i32, i32)>) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> crates/day_9/src/mem.rs:33:35 [INFO] [stdout] | [INFO] [stdout] 33 | Some(file_id) => ('0' as u8 + *file_id as u8) as char, [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'0'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] = note: `#[warn(clippy::char_lit_as_u8)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> crates/day_8/src/main.rs:12:32 [INFO] [stdout] | [INFO] [stdout] 12 | fn parse_input(input: &str) -> (i32, i32, HashMap>) { [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 `while let` loop [INFO] [stdout] --> crates/day_9/src/mem.rs:67:13 [INFO] [stdout] | [INFO] [stdout] 67 | / 'freespace: loop { [INFO] [stdout] 68 | | let Some(freespace) = freespace_scanner.next(self) else { break; }; [INFO] [stdout] 69 | | [INFO] [stdout] 70 | | let file_len = file.1.1 - file.1.0; [INFO] [stdout] ... | [INFO] [stdout] 92 | | continue 'file; // we swapped the file! go to the outer loop [INFO] [stdout] 93 | | } [INFO] [stdout] | |_____________^ help: try: `while let Some(freespace) = freespace_scanner.next(self) { .. }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] = note: `#[warn(clippy::while_let_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `i32::abs()` to usize [INFO] [stdout] --> crates/day_9/src/mem.rs:166:9 [INFO] [stdout] | [INFO] [stdout] 166 | (self.marker as i32 - self.pointer as i32).abs() as usize [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `(self.marker as i32 - self.pointer as i32).unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] = note: `#[warn(clippy::cast_abs_to_unsigned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> crates/day_8/src/main.rs:91:39 [INFO] [stdout] | [INFO] [stdout] 91 | let node = (a.0 + -1 * mult * diff.0, a.1 + -1 * mult * diff.1); [INFO] [stdout] | ^^^^^^^^^ help: consider using: `-mult` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] = note: `#[warn(clippy::neg_multiply)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> crates/day_8/src/main.rs:91:65 [INFO] [stdout] | [INFO] [stdout] 91 | let node = (a.0 + -1 * mult * diff.0, a.1 + -1 * mult * diff.1); [INFO] [stdout] | ^^^^^^^^^ help: consider using: `-mult` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> crates/day_9/src/mem.rs:196:9 [INFO] [stdout] | [INFO] [stdout] 196 | / loop { [INFO] [stdout] 197 | | match self.scanner.inc(memory) { [INFO] [stdout] 198 | | ScannerValue::Free => continue, [INFO] [stdout] 199 | | _ => break, [INFO] [stdout] 200 | | }; [INFO] [stdout] 201 | | } [INFO] [stdout] | |_________^ help: try: `while let ScannerValue::Free = self.scanner.inc(memory) { .. }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> crates/day_9/src/mem.rs:296:39 [INFO] [stdout] | [INFO] [stdout] 296 | assert_eq!(memory.checksum(), 1 * (3 + 4 + 5) + 2 * (10 + 11 + 12 + 13 + 14)); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: consider reducing it to: `((3 + 4 + 5))` [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: you are using an explicit closure for copying elements [INFO] [stdout] --> crates/day_6/src/main.rs:38:26 [INFO] [stdout] | [INFO] [stdout] 38 | let candidates = self.visited.iter().map(|item| item.clone()).collect::>(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `self.visited.iter().copied()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] = note: `#[warn(clippy::map_clone)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `(i32, i32)` which implements the `Copy` trait [INFO] [stdout] --> crates/day_6/src/main.rs:38:57 [INFO] [stdout] | [INFO] [stdout] 38 | let candidates = self.visited.iter().map(|item| item.clone()).collect::>(); [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*item` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> crates/day_9/src/main.rs:13:25 [INFO] [stdout] | [INFO] [stdout] 13 | fn print_blocks(blocks: &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] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 13 - fn print_blocks(blocks: &Vec>) { [INFO] [stdout] 13 + fn print_blocks(blocks: &[Option]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> crates/day_9/src/main.rs:15:52 [INFO] [stdout] | [INFO] [stdout] 15 | print!("{}", item.map(|x| (x % 10) as u8 + '0' as u8).unwrap_or('.' as u8) as char); [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'0'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> crates/day_9/src/main.rs:15:73 [INFO] [stdout] | [INFO] [stdout] 15 | print!("{}", item.map(|x| (x % 10) as u8 + '0' as u8).unwrap_or('.' as u8) as char); [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'.'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> crates/day_9/src/main.rs:20:21 [INFO] [stdout] | [INFO] [stdout] 20 | fn checksum(blocks: &Vec>) -> i64 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 20 - fn checksum(blocks: &Vec>) -> i64 { [INFO] [stdout] 20 + fn checksum(blocks: &[Option]) -> i64 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `position` [INFO] [stdout] --> crates/day_4/src/main.rs:128:17 [INFO] [stdout] | [INFO] [stdout] 128 | let position = (i, j); [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_position` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `position` [INFO] [stdout] --> crates/day_4/src/main.rs:145:17 [INFO] [stdout] | [INFO] [stdout] 145 | let position = (i, j); [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_position` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `test_match_pattern_at_position` is never used [INFO] [stdout] --> crates/day_4/src/main.rs:178:8 [INFO] [stdout] | [INFO] [stdout] 178 | fn test_match_pattern_at_position() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) 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] --> crates/day_4/src/main.rs:99:94 [INFO] [stdout] | [INFO] [stdout] 99 | fn match_pattern_item_at_position(pattern_item: PatternItem, position: (usize, usize), data: &Vec>) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 99 - fn match_pattern_item_at_position(pattern_item: PatternItem, position: (usize, usize), data: &Vec>) -> bool { [INFO] [stdout] 99 + fn match_pattern_item_at_position(pattern_item: PatternItem, position: (usize, usize), data: &[Vec]) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/day_4/src/main.rs:187:61 [INFO] [stdout] | [INFO] [stdout] 187 | assert!(match_pattern_at_position(&pattern, (0, 0), &data)); [INFO] [stdout] | ^^^^^ help: change this to: `data` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/day_4/src/main.rs:192:62 [INFO] [stdout] | [INFO] [stdout] 192 | assert!(!match_pattern_at_position(&pattern, (0, 0), &data)); [INFO] [stdout] | ^^^^^ help: change this to: `data` [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] [stderr] Checking aho-corasick v1.1.3 [INFO] [stderr] Checking regex-automata v0.4.9 [INFO] [stderr] Checking regex v1.11.1 [INFO] [stderr] Checking day_7 v0.1.0 (/opt/rustwide/workdir/crates/day_7) [INFO] [stderr] Checking day_15 v0.1.0 (/opt/rustwide/workdir/crates/day_15) [INFO] [stderr] Checking day_5 v0.1.0 (/opt/rustwide/workdir/crates/day_5) [INFO] [stderr] Checking day_13 v0.1.0 (/opt/rustwide/workdir/crates/day_13) [INFO] [stderr] Checking day_14 v0.1.0 (/opt/rustwide/workdir/crates/day_14) [INFO] [stderr] Checking day_3 v0.1.0 (/opt/rustwide/workdir/crates/day_3) [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> crates/day_7/src/main.rs:32:12 [INFO] [stdout] | [INFO] [stdout] 32 | if (allow_concat) { [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] 32 - if (allow_concat) { [INFO] [stdout] 32 + if allow_concat { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `super::*` [INFO] [stdout] --> crates/day_7/src/main.rs:68:9 [INFO] [stdout] | [INFO] [stdout] 68 | use super::*; [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 label [INFO] [stdout] --> crates/day_5/src/main.rs:89:5 [INFO] [stdout] | [INFO] [stdout] 89 | 'outer: for mut update in updates.into_iter() { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_labels)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `super::*` [INFO] [stdout] --> crates/day_5/src/main.rs:100:9 [INFO] [stdout] | [INFO] [stdout] 100 | use super::*; [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 label [INFO] [stdout] --> crates/day_5/src/main.rs:89:5 [INFO] [stdout] | [INFO] [stdout] 89 | 'outer: for mut update in updates.into_iter() { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_labels)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> crates/day_3/src/main.rs:4:15 [INFO] [stdout] | [INFO] [stdout] 4 | const INPUT: &'static str = include_str!("input.txt"); [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] = note: `#[warn(clippy::redundant_static_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> crates/day_3/src/main.rs:5:17 [INFO] [stdout] | [INFO] [stdout] 5 | const EXAMPLE: &'static str = include_str!("example.txt"); [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `super::*` [INFO] [stdout] --> crates/day_3/src/main.rs:53:9 [INFO] [stdout] | [INFO] [stdout] 53 | use super::*; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> crates/day_7/src/main.rs:22:12 [INFO] [stdout] | [INFO] [stdout] 22 | if slice.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `slice.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: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> crates/day_7/src/main.rs:58:5 [INFO] [stdout] | [INFO] [stdout] 58 | equations.into_iter().filter(|eq| eq.is_valid(false)).map(|eq| eq.result).sum::() as i64 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `equations.into_iter().filter(|eq| eq.is_valid(false)).map(|eq| eq.result).sum::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> crates/day_7/src/main.rs:63:5 [INFO] [stdout] | [INFO] [stdout] 63 | equations.into_iter().filter(|eq| eq.is_valid(true)).map(|eq| eq.result).sum::() as i64 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `equations.into_iter().filter(|eq| eq.is_valid(true)).map(|eq| eq.result).sum::()` [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: unused variable: `q` [INFO] [stdout] --> crates/day_13/src/main.rs:53:9 [INFO] [stdout] | [INFO] [stdout] 53 | let q = a / b; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_q` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `b2` is never read [INFO] [stdout] --> crates/day_13/src/main.rs:86:5 [INFO] [stdout] | [INFO] [stdout] 86 | b2 *= m2; [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: function `min_tokens_for` is never used [INFO] [stdout] --> crates/day_13/src/main.rs:34:4 [INFO] [stdout] | [INFO] [stdout] 34 | fn min_tokens_for(game: Game) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `EXAMPLE` is never used [INFO] [stdout] --> crates/day_3/src/main.rs:5:7 [INFO] [stdout] | [INFO] [stdout] 5 | const EXAMPLE: &'static str = include_str!("example.txt"); [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) 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] --> crates/day_5/src/main.rs:35:27 [INFO] [stdout] | [INFO] [stdout] 35 | fn aggregate_rules(rules: &Vec) -> HashSet { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 35 - fn aggregate_rules(rules: &Vec) -> HashSet { [INFO] [stdout] 35 + fn aggregate_rules(rules: &[Rule]) -> HashSet { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> crates/day_5/src/main.rs:57:16 [INFO] [stdout] | [INFO] [stdout] 57 | if !rules_set.get(&rule).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `rules_set.get(&rule).is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `print` is never used [INFO] [stdout] --> crates/day_15/src/main.rs:21:8 [INFO] [stdout] | [INFO] [stdout] 20 | impl Game { [INFO] [stdout] | --------- method in this implementation [INFO] [stdout] 21 | fn print(&self) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `get(&rule).is_some()` [INFO] [stdout] --> crates/day_5/src/main.rs:57:27 [INFO] [stdout] | [INFO] [stdout] 57 | if !rules_set.get(&rule).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `contains(&rule)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_get_then_check [INFO] [stdout] = note: `#[warn(clippy::unnecessary_get_then_check)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> crates/day_5/src/main.rs:68:20 [INFO] [stdout] | [INFO] [stdout] 68 | fn reorder(update: &mut Vec, rule_set: &HashSet) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 68 - fn reorder(update: &mut Vec, rule_set: &HashSet) -> bool { [INFO] [stdout] 68 + fn reorder(update: &mut [i32], rule_set: &HashSet) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `q` [INFO] [stdout] --> crates/day_13/src/main.rs:53:9 [INFO] [stdout] | [INFO] [stdout] 53 | let q = a / b; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_q` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `b2` is never read [INFO] [stdout] --> crates/day_13/src/main.rs:86:5 [INFO] [stdout] | [INFO] [stdout] 86 | b2 *= m2; [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: function `min_tokens_for` is never used [INFO] [stdout] --> crates/day_13/src/main.rs:34:4 [INFO] [stdout] | [INFO] [stdout] 34 | fn min_tokens_for(game: Game) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> crates/day_3/src/main.rs:4:15 [INFO] [stdout] | [INFO] [stdout] 4 | const INPUT: &'static str = include_str!("input.txt"); [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] = note: `#[warn(clippy::redundant_static_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> crates/day_3/src/main.rs:5:17 [INFO] [stdout] | [INFO] [stdout] 5 | const EXAMPLE: &'static str = include_str!("example.txt"); [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `print` is never used [INFO] [stdout] --> crates/day_15/src/main.rs:21:8 [INFO] [stdout] | [INFO] [stdout] 20 | impl Game { [INFO] [stdout] | --------- method in this implementation [INFO] [stdout] 21 | fn print(&self) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> crates/day_7/src/main.rs:32:12 [INFO] [stdout] | [INFO] [stdout] 32 | if (allow_concat) { [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] 32 - if (allow_concat) { [INFO] [stdout] 32 + if allow_concat { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> crates/day_5/src/main.rs:35:27 [INFO] [stdout] | [INFO] [stdout] 35 | fn aggregate_rules(rules: &Vec) -> HashSet { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 35 - fn aggregate_rules(rules: &Vec) -> HashSet { [INFO] [stdout] 35 + fn aggregate_rules(rules: &[Rule]) -> HashSet { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> crates/day_5/src/main.rs:57:16 [INFO] [stdout] | [INFO] [stdout] 57 | if !rules_set.get(&rule).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `rules_set.get(&rule).is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `get(&rule).is_some()` [INFO] [stdout] --> crates/day_5/src/main.rs:57:27 [INFO] [stdout] | [INFO] [stdout] 57 | if !rules_set.get(&rule).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `contains(&rule)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_get_then_check [INFO] [stdout] = note: `#[warn(clippy::unnecessary_get_then_check)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> crates/day_5/src/main.rs:68:20 [INFO] [stdout] | [INFO] [stdout] 68 | fn reorder(update: &mut Vec, rule_set: &HashSet) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 68 - fn reorder(update: &mut Vec, rule_set: &HashSet) -> bool { [INFO] [stdout] 68 + fn reorder(update: &mut [i32], rule_set: &HashSet) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> crates/day_14/src/main.rs:91:9 [INFO] [stdout] | [INFO] [stdout] 91 | std::io::stdin().read_line(&mut a); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 91 | let _ = std::io::stdin().read_line(&mut a); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> crates/day_14/src/main.rs:91:9 [INFO] [stdout] | [INFO] [stdout] 91 | std::io::stdin().read_line(&mut a); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 91 | let _ = std::io::stdin().read_line(&mut a); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> crates/day_7/src/main.rs:22:12 [INFO] [stdout] | [INFO] [stdout] 22 | if slice.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `slice.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: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> crates/day_7/src/main.rs:58:5 [INFO] [stdout] | [INFO] [stdout] 58 | equations.into_iter().filter(|eq| eq.is_valid(false)).map(|eq| eq.result).sum::() as i64 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `equations.into_iter().filter(|eq| eq.is_valid(false)).map(|eq| eq.result).sum::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> crates/day_7/src/main.rs:63:5 [INFO] [stdout] | [INFO] [stdout] 63 | equations.into_iter().filter(|eq| eq.is_valid(true)).map(|eq| eq.result).sum::() as i64 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `equations.into_iter().filter(|eq| eq.is_valid(true)).map(|eq| eq.result).sum::()` [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: constant `EXAMPLE` is never used [INFO] [stdout] --> crates/day_3/src/main.rs:5:7 [INFO] [stdout] | [INFO] [stdout] 5 | const EXAMPLE: &'static str = include_str!("example.txt"); [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 5.80s [INFO] running `Command { std: "docker" "inspect" "b6f6c593bb183970091a2bb5d96de07904f3fe1828a88615687cde378b984304", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "b6f6c593bb183970091a2bb5d96de07904f3fe1828a88615687cde378b984304", kill_on_drop: false }` [INFO] [stdout] b6f6c593bb183970091a2bb5d96de07904f3fe1828a88615687cde378b984304