[INFO] cloning repository https://github.com/bromeara/advent_of_code_2025 [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/bromeara/advent_of_code_2025" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fbromeara%2Fadvent_of_code_2025", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fbromeara%2Fadvent_of_code_2025'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] b2e8c0af3c6c2d5d1a3aed470ad925b44141de1f [INFO] linting bromeara/advent_of_code_2025 against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fbromeara%2Fadvent_of_code_2025" "/workspace/builds/worker-5-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-5-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/bromeara/advent_of_code_2025 [INFO] finished tweaking git repo https://github.com/bromeara/advent_of_code_2025 [INFO] tweaked toml for git repo https://github.com/bromeara/advent_of_code_2025 written to /workspace/builds/worker-5-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/bromeara/advent_of_code_2025 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/bromeara/advent_of_code_2025 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-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-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] 189fb780ef2088bf2b87487f79044464124aee227ede727f731cf1b13102ced1 [INFO] running `Command { std: "docker" "start" "-a" "189fb780ef2088bf2b87487f79044464124aee227ede727f731cf1b13102ced1", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "189fb780ef2088bf2b87487f79044464124aee227ede727f731cf1b13102ced1", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "189fb780ef2088bf2b87487f79044464124aee227ede727f731cf1b13102ced1", kill_on_drop: false }` [INFO] [stdout] 189fb780ef2088bf2b87487f79044464124aee227ede727f731cf1b13102ced1 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-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] b6805cb5420a9f04b93cca9d5ca94c3e57ae00be8dc028b33eaa7e8c5e082a4b [INFO] running `Command { std: "docker" "start" "-a" "b6805cb5420a9f04b93cca9d5ca94c3e57ae00be8dc028b33eaa7e8c5e082a4b", kill_on_drop: false }` [INFO] [stderr] Checking advent_of_code v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/bin/day8.rs:186:24 [INFO] [stdout] | [INFO] [stdout] 186 | JunctionPlan { weights: weights } [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `weights` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/bin/day8.rs:38:12 [INFO] [stdout] | [INFO] [stdout] 38 | if possible_nets.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `possible_nets.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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day8.rs:178:21 [INFO] [stdout] | [INFO] [stdout] 178 | fn build(boxes: &Vec) -> JunctionPlan { [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] 178 - fn build(boxes: &Vec) -> JunctionPlan { [INFO] [stdout] 178 + fn build(boxes: &[JunctionBox]) -> JunctionPlan { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/bin/day8.rs:202:21 [INFO] [stdout] | [INFO] [stdout] 202 | / if *v < global_min || global_min == 0.0 { [INFO] [stdout] 203 | | global_min = *v; [INFO] [stdout] 204 | | global_col = j; [INFO] [stdout] 205 | | global_row = i; [INFO] [stdout] 206 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 201 ~ Some((j, v)) [INFO] [stdout] 202 ~ if (*v < global_min || global_min == 0.0) => { [INFO] [stdout] 203 | global_min = *v; [INFO] [stdout] 204 | global_col = j; [INFO] [stdout] 205 | global_row = i; [INFO] [stdout] 206 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/bin/day8.rs:200:13 [INFO] [stdout] | [INFO] [stdout] 200 | / match res { [INFO] [stdout] 201 | | Some((j, v)) => { [INFO] [stdout] 202 | | if *v < global_min || global_min == 0.0 { [INFO] [stdout] 203 | | global_min = *v; [INFO] [stdout] ... | [INFO] [stdout] 208 | | None => {} [INFO] [stdout] 209 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 200 ~ if let Some((j, v)) = res { [INFO] [stdout] 201 + if *v < global_min || global_min == 0.0 { [INFO] [stdout] 202 + global_min = *v; [INFO] [stdout] 203 + global_col = j; [INFO] [stdout] 204 + global_row = i; [INFO] [stdout] 205 + } [INFO] [stdout] 206 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/bin/day8.rs:186:24 [INFO] [stdout] | [INFO] [stdout] 186 | JunctionPlan { weights: weights } [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `weights` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::str::Chars` [INFO] [stdout] --> src/bin/day6.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use std::str::Chars; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/bin/day6.rs:117:13 [INFO] [stdout] | [INFO] [stdout] 117 | terms: terms, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `terms` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/bin/day6.rs:118:13 [INFO] [stdout] | [INFO] [stdout] 118 | operator: operator, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `operator` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/bin/day5.rs:45:9 [INFO] [stdout] | [INFO] [stdout] 45 | let mut fresh_items: HashSet = HashSet::new(); [INFO] [stdout] | ----^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `stock` [INFO] [stdout] --> src/bin/day5.rs:43:22 [INFO] [stdout] | [INFO] [stdout] 43 | let (mut ranges, stock) = process_input(file_path); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_stock` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `fresh_items` [INFO] [stdout] --> src/bin/day5.rs:45:9 [INFO] [stdout] | [INFO] [stdout] 45 | let mut fresh_items: HashSet = HashSet::new(); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_fresh_items` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `splitters` is assigned to, but never used [INFO] [stdout] --> src/bin/day7.rs:21:9 [INFO] [stdout] | [INFO] [stdout] 21 | let mut splitters = 0; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: consider using `_splitters` instead [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day5.rs:60:37 [INFO] [stdout] | [INFO] [stdout] 60 | changed = c.consolidate(&r); [INFO] [stdout] | ^^ help: change this to: `r` [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: value assigned to `splitters` is never read [INFO] [stdout] --> src/bin/day7.rs:27:21 [INFO] [stdout] | [INFO] [stdout] 27 | splitters += s [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::str::Chars` [INFO] [stdout] --> src/bin/day6.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use std::str::Chars; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/bin/day6.rs:117:13 [INFO] [stdout] | [INFO] [stdout] 117 | terms: terms, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `terms` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/bin/day6.rs:118:13 [INFO] [stdout] | [INFO] [stdout] 118 | operator: operator, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `operator` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/bin/day4.rs:104:46 [INFO] [stdout] | [INFO] [stdout] 104 | ... if r >= 0 && r < self.height as i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `self.height` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/bin/day4.rs:106:54 [INFO] [stdout] | [INFO] [stdout] 106 | ... if c >= 0 && c < self.width as i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `self.width` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/bin/day4.rs:141:9 [INFO] [stdout] | [INFO] [stdout] 141 | write!(f, "Warehouse: [\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] = note: `#[warn(clippy::write_with_newline)]` on by default [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 141 - write!(f, "Warehouse: [\n")?; [INFO] [stdout] 141 + writeln!(f, "Warehouse: [")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/bin/day4.rs:151:13 [INFO] [stdout] | [INFO] [stdout] 151 | write!(f, "{:?}\n", c_line)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 151 - write!(f, "{:?}\n", c_line)?; [INFO] [stdout] 151 + writeln!(f, "{:?}", c_line)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `u64` [INFO] [stdout] --> src/bin/day3.rs:30:26 [INFO] [stdout] | [INFO] [stdout] 30 | total_joltage += u64::from(j); [INFO] [stdout] | ^^^^^^^^^^^^ help: consider removing `u64::from()`: `j` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/bin/day7.rs:39:9 [INFO] [stdout] | [INFO] [stdout] 39 | / match cell { [INFO] [stdout] 40 | | CellContents::Beam(n) => paths += n, [INFO] [stdout] 41 | | _ => {} [INFO] [stdout] 42 | | } [INFO] [stdout] | |_________^ help: try: `if let CellContents::Beam(n) = cell { paths += n }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `low_id` and `high_id` are never read [INFO] [stdout] --> src/bin/day2.rs:71:5 [INFO] [stdout] | [INFO] [stdout] 70 | struct IDRange { [INFO] [stdout] | ------- fields in this struct [INFO] [stdout] 71 | low_id: String, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 72 | high_id: String, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `IDRange` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `is_valid` is never used [INFO] [stdout] --> src/bin/day2.rs:117:8 [INFO] [stdout] | [INFO] [stdout] 77 | impl IDRange { [INFO] [stdout] | ------------ method in this implementation [INFO] [stdout] ... [INFO] [stdout] 117 | fn is_valid(&self, id: &str) -> bool { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/bin/day4.rs:104:46 [INFO] [stdout] | [INFO] [stdout] 104 | ... if r >= 0 && r < self.height as i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `self.height` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/bin/day4.rs:106:54 [INFO] [stdout] | [INFO] [stdout] 106 | ... if c >= 0 && c < self.width as i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `self.width` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/bin/day4.rs:141:9 [INFO] [stdout] | [INFO] [stdout] 141 | write!(f, "Warehouse: [\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] = note: `#[warn(clippy::write_with_newline)]` on by default [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 141 - write!(f, "Warehouse: [\n")?; [INFO] [stdout] 141 + writeln!(f, "Warehouse: [")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/bin/day2.rs:85:9 [INFO] [stdout] | [INFO] [stdout] 85 | let low_value: i64; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] = note: `#[warn(clippy::needless_late_init)]` on by default [INFO] [stdout] help: move the declaration `low_value` here and remove the assignments from the `match` arms [INFO] [stdout] | [INFO] [stdout] 85 ~ [INFO] [stdout] 86 | let high_value: i64; [INFO] [stdout] 87 | let low_value_result = low_id.parse::(); [INFO] [stdout] 88 ~ let low_value: i64 = match low_value_result { [INFO] [stdout] 89 | Ok(i) => { [INFO] [stdout] 90 ~ i [INFO] [stdout] 91 | } [INFO] [stdout] ... [INFO] [stdout] 94 | } [INFO] [stdout] 95 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/bin/day7.rs:110:25 [INFO] [stdout] | [INFO] [stdout] 110 | / if i < self.width + 1 { [INFO] [stdout] 111 | | if result_row[i + 1] == CellContents::Empty { [INFO] [stdout] 112 | | result_row[i + 1] = CellContents::Beam(1); [INFO] [stdout] 113 | | splitters += 1; [INFO] [stdout] 114 | | } [INFO] [stdout] 115 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 110 ~ if i < self.width + 1 [INFO] [stdout] 111 ~ && result_row[i + 1] == CellContents::Empty { [INFO] [stdout] 112 | result_row[i + 1] = CellContents::Beam(1); [INFO] [stdout] 113 | splitters += 1; [INFO] [stdout] 114 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/bin/day5.rs:45:9 [INFO] [stdout] | [INFO] [stdout] 45 | let mut fresh_items: HashSet = HashSet::new(); [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: this `if` statement can be collapsed [INFO] [stdout] --> src/bin/day7.rs:116:25 [INFO] [stdout] | [INFO] [stdout] 116 | / if i > 0 { [INFO] [stdout] 117 | | if result_row[i - 1] == CellContents::Empty { [INFO] [stdout] 118 | | result_row[i - 1] = CellContents::Beam(1); [INFO] [stdout] 119 | | splitters += 1; [INFO] [stdout] 120 | | } [INFO] [stdout] 121 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 116 ~ if i > 0 [INFO] [stdout] 117 ~ && result_row[i - 1] == CellContents::Empty { [INFO] [stdout] 118 | result_row[i - 1] = CellContents::Beam(1); [INFO] [stdout] 119 | splitters += 1; [INFO] [stdout] 120 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `stock` [INFO] [stdout] --> src/bin/day5.rs:43:22 [INFO] [stdout] | [INFO] [stdout] 43 | let (mut ranges, stock) = process_input(file_path); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_stock` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `fresh_items` [INFO] [stdout] --> src/bin/day5.rs:45:9 [INFO] [stdout] | [INFO] [stdout] 45 | let mut fresh_items: HashSet = HashSet::new(); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_fresh_items` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `low_id` and `high_id` are never read [INFO] [stdout] --> src/bin/day2.rs:71:5 [INFO] [stdout] | [INFO] [stdout] 70 | struct IDRange { [INFO] [stdout] | ------- fields in this struct [INFO] [stdout] 71 | low_id: String, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 72 | high_id: String, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `IDRange` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `is_valid` is never used [INFO] [stdout] --> src/bin/day2.rs:117:8 [INFO] [stdout] | [INFO] [stdout] 77 | impl IDRange { [INFO] [stdout] | ------------ method in this implementation [INFO] [stdout] ... [INFO] [stdout] 117 | fn is_valid(&self, id: &str) -> bool { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/bin/day2.rs:86:9 [INFO] [stdout] | [INFO] [stdout] 86 | let high_value: i64; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `high_value` here and remove the assignments from the `match` arms [INFO] [stdout] | [INFO] [stdout] 86 ~ [INFO] [stdout] 87 | let low_value_result = low_id.parse::(); [INFO] [stdout] ... [INFO] [stdout] 96 | let high_value_result = high_id.parse::(); [INFO] [stdout] 97 ~ let high_value: i64 = match high_value_result { [INFO] [stdout] 98 | Ok(i) => { [INFO] [stdout] 99 ~ i [INFO] [stdout] 100 | } [INFO] [stdout] ... [INFO] [stdout] 103 | } [INFO] [stdout] 104 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/bin/day2.rs:131:16 [INFO] [stdout] | [INFO] [stdout] 131 | if !comparisons.peek().is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `comparisons.peek().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: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/bin/day4.rs:151:13 [INFO] [stdout] | [INFO] [stdout] 151 | write!(f, "{:?}\n", c_line)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 151 - write!(f, "{:?}\n", c_line)?; [INFO] [stdout] 151 + writeln!(f, "{:?}", c_line)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/bin/day7.rs:168:9 [INFO] [stdout] | [INFO] [stdout] 168 | write!(f, "Manifold: [\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] = note: `#[warn(clippy::write_with_newline)]` on by default [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 168 - write!(f, "Manifold: [\n")?; [INFO] [stdout] 168 + writeln!(f, "Manifold: [")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/bin/day7.rs:182:13 [INFO] [stdout] | [INFO] [stdout] 182 | write!(f, "{}\n", c_line)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 182 - write!(f, "{}\n", c_line)?; [INFO] [stdout] 182 + writeln!(f, "{}", c_line)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/bin/day6.rs:38:9 [INFO] [stdout] | [INFO] [stdout] 38 | for i in 0..lines[0].len() { [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: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/bin/day2.rs:153:16 [INFO] [stdout] | [INFO] [stdout] 153 | fn split_every<'a>(value: &'a str, n: usize) -> Vec<&'a str> { [INFO] [stdout] | ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 153 - fn split_every<'a>(value: &'a str, n: usize) -> Vec<&'a str> { [INFO] [stdout] 153 + fn split_every(value: &str, n: usize) -> Vec<&str> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/bin/day2.rs:167:12 [INFO] [stdout] | [INFO] [stdout] 167 | if number % n == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: replace with: `number.is_multiple_of(n)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `process_input_part1` is never used [INFO] [stdout] --> src/bin/day6.rs:64:4 [INFO] [stdout] | [INFO] [stdout] 64 | fn process_input_part1(file_path: &str) -> 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: function `process_line_to_u64` is never used [INFO] [stdout] --> src/bin/day6.rs:93:4 [INFO] [stdout] | [INFO] [stdout] 93 | fn process_line_to_u64(line: &str) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/bin/day2.rs:85:9 [INFO] [stdout] | [INFO] [stdout] 85 | let low_value: i64; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] = note: `#[warn(clippy::needless_late_init)]` on by default [INFO] [stdout] help: move the declaration `low_value` here and remove the assignments from the `match` arms [INFO] [stdout] | [INFO] [stdout] 85 ~ [INFO] [stdout] 86 | let high_value: i64; [INFO] [stdout] 87 | let low_value_result = low_id.parse::(); [INFO] [stdout] 88 ~ let low_value: i64 = match low_value_result { [INFO] [stdout] 89 | Ok(i) => { [INFO] [stdout] 90 ~ i [INFO] [stdout] 91 | } [INFO] [stdout] ... [INFO] [stdout] 94 | } [INFO] [stdout] 95 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/bin/day2.rs:86:9 [INFO] [stdout] | [INFO] [stdout] 86 | let high_value: i64; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `high_value` here and remove the assignments from the `match` arms [INFO] [stdout] | [INFO] [stdout] 86 ~ [INFO] [stdout] 87 | let low_value_result = low_id.parse::(); [INFO] [stdout] ... [INFO] [stdout] 96 | let high_value_result = high_id.parse::(); [INFO] [stdout] 97 ~ let high_value: i64 = match high_value_result { [INFO] [stdout] 98 | Ok(i) => { [INFO] [stdout] 99 ~ i [INFO] [stdout] 100 | } [INFO] [stdout] ... [INFO] [stdout] 103 | } [INFO] [stdout] 104 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `splitters` is assigned to, but never used [INFO] [stdout] --> src/bin/day7.rs:21:9 [INFO] [stdout] | [INFO] [stdout] 21 | let mut splitters = 0; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: consider using `_splitters` instead [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `splitters` is never read [INFO] [stdout] --> src/bin/day7.rs:27:21 [INFO] [stdout] | [INFO] [stdout] 27 | splitters += s [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day5.rs:60:37 [INFO] [stdout] | [INFO] [stdout] 60 | changed = c.consolidate(&r); [INFO] [stdout] | ^^ help: change this to: `r` [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 boolean expression can be simplified [INFO] [stdout] --> src/bin/day2.rs:131:16 [INFO] [stdout] | [INFO] [stdout] 131 | if !comparisons.peek().is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `comparisons.peek().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: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/bin/day2.rs:153:16 [INFO] [stdout] | [INFO] [stdout] 153 | fn split_every<'a>(value: &'a str, n: usize) -> Vec<&'a str> { [INFO] [stdout] | ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 153 - fn split_every<'a>(value: &'a str, n: usize) -> Vec<&'a str> { [INFO] [stdout] 153 + fn split_every(value: &str, n: usize) -> Vec<&str> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/bin/day6.rs:38:9 [INFO] [stdout] | [INFO] [stdout] 38 | for i in 0..lines[0].len() { [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day6.rs:67:56 [INFO] [stdout] | [INFO] [stdout] 67 | let first_term_raw: Vec = process_line_to_u64(&lines[0]); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `lines[0]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day6.rs:68:44 [INFO] [stdout] | [INFO] [stdout] 68 | let sec_term_raw = process_line_to_u64(&lines[1]); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `lines[1]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day6.rs:69:46 [INFO] [stdout] | [INFO] [stdout] 69 | let third_term_raw = process_line_to_u64(&lines[2]); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `lines[2]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day6.rs:70:47 [INFO] [stdout] | [INFO] [stdout] 70 | let fourth_term_raw = process_line_to_u64(&lines[3]); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `lines[3]` [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: comparison to empty slice [INFO] [stdout] --> src/bin/day6.rs:71:63 [INFO] [stdout] | [INFO] [stdout] 71 | let operator: Vec<&str> = lines[4].split(' ').filter(|&c| c != "").collect(); [INFO] [stdout] | ^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!c.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] = note: `#[warn(clippy::comparison_to_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/bin/day6.rs:95:22 [INFO] [stdout] | [INFO] [stdout] 95 | .filter(|&c| c != "") [INFO] [stdout] | ^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!c.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/bin/day2.rs:167:12 [INFO] [stdout] | [INFO] [stdout] 167 | if number % n == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: replace with: `number.is_multiple_of(n)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day6.rs:107:19 [INFO] [stdout] | [INFO] [stdout] 107 | fn build(raw: &Vec) -> Equation { [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] 107 - fn build(raw: &Vec) -> Equation { [INFO] [stdout] 107 + fn build(raw: &[String]) -> Equation { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `process_input_part1` is never used [INFO] [stdout] --> src/bin/day6.rs:64:4 [INFO] [stdout] | [INFO] [stdout] 64 | fn process_input_part1(file_path: &str) -> 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: function `process_line_to_u64` is never used [INFO] [stdout] --> src/bin/day6.rs:93:4 [INFO] [stdout] | [INFO] [stdout] 93 | fn process_line_to_u64(line: &str) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/bin/day7.rs:39:9 [INFO] [stdout] | [INFO] [stdout] 39 | / match cell { [INFO] [stdout] 40 | | CellContents::Beam(n) => paths += n, [INFO] [stdout] 41 | | _ => {} [INFO] [stdout] 42 | | } [INFO] [stdout] | |_________^ help: try: `if let CellContents::Beam(n) = cell { paths += n }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day6.rs:67:56 [INFO] [stdout] | [INFO] [stdout] 67 | let first_term_raw: Vec = process_line_to_u64(&lines[0]); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `lines[0]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day6.rs:68:44 [INFO] [stdout] | [INFO] [stdout] 68 | let sec_term_raw = process_line_to_u64(&lines[1]); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `lines[1]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day6.rs:69:46 [INFO] [stdout] | [INFO] [stdout] 69 | let third_term_raw = process_line_to_u64(&lines[2]); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `lines[2]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day6.rs:70:47 [INFO] [stdout] | [INFO] [stdout] 70 | let fourth_term_raw = process_line_to_u64(&lines[3]); [INFO] [stdout] | ^^^^^^^^^ help: change this to: `lines[3]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/bin/day7.rs:110:25 [INFO] [stdout] | [INFO] [stdout] 110 | / if i < self.width + 1 { [INFO] [stdout] 111 | | if result_row[i + 1] == CellContents::Empty { [INFO] [stdout] 112 | | result_row[i + 1] = CellContents::Beam(1); [INFO] [stdout] 113 | | splitters += 1; [INFO] [stdout] 114 | | } [INFO] [stdout] 115 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 110 ~ if i < self.width + 1 [INFO] [stdout] 111 ~ && result_row[i + 1] == CellContents::Empty { [INFO] [stdout] 112 | result_row[i + 1] = CellContents::Beam(1); [INFO] [stdout] 113 | splitters += 1; [INFO] [stdout] 114 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/bin/day7.rs:116:25 [INFO] [stdout] | [INFO] [stdout] 116 | / if i > 0 { [INFO] [stdout] 117 | | if result_row[i - 1] == CellContents::Empty { [INFO] [stdout] 118 | | result_row[i - 1] = CellContents::Beam(1); [INFO] [stdout] 119 | | splitters += 1; [INFO] [stdout] 120 | | } [INFO] [stdout] 121 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 116 ~ if i > 0 [INFO] [stdout] 117 ~ && result_row[i - 1] == CellContents::Empty { [INFO] [stdout] 118 | result_row[i - 1] = CellContents::Beam(1); [INFO] [stdout] 119 | splitters += 1; [INFO] [stdout] 120 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `u64` [INFO] [stdout] --> src/bin/day3.rs:30:26 [INFO] [stdout] | [INFO] [stdout] 30 | total_joltage += u64::from(j); [INFO] [stdout] | ^^^^^^^^^^^^ help: consider removing `u64::from()`: `j` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/bin/day6.rs:71:63 [INFO] [stdout] | [INFO] [stdout] 71 | let operator: Vec<&str> = lines[4].split(' ').filter(|&c| c != "").collect(); [INFO] [stdout] | ^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!c.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] = note: `#[warn(clippy::comparison_to_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/bin/day6.rs:95:22 [INFO] [stdout] | [INFO] [stdout] 95 | .filter(|&c| c != "") [INFO] [stdout] | ^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!c.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/bin/day7.rs:168:9 [INFO] [stdout] | [INFO] [stdout] 168 | write!(f, "Manifold: [\n")?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] = note: `#[warn(clippy::write_with_newline)]` on by default [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 168 - write!(f, "Manifold: [\n")?; [INFO] [stdout] 168 + writeln!(f, "Manifold: [")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/bin/day7.rs:182:13 [INFO] [stdout] | [INFO] [stdout] 182 | write!(f, "{}\n", c_line)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 182 - write!(f, "{}\n", c_line)?; [INFO] [stdout] 182 + writeln!(f, "{}", c_line)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day6.rs:107:19 [INFO] [stdout] | [INFO] [stdout] 107 | fn build(raw: &Vec) -> Equation { [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] 107 - fn build(raw: &Vec) -> Equation { [INFO] [stdout] 107 + fn build(raw: &[String]) -> Equation { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/bin/day8.rs:38:12 [INFO] [stdout] | [INFO] [stdout] 38 | if possible_nets.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `possible_nets.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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day8.rs:178:21 [INFO] [stdout] | [INFO] [stdout] 178 | fn build(boxes: &Vec) -> JunctionPlan { [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] 178 - fn build(boxes: &Vec) -> JunctionPlan { [INFO] [stdout] 178 + fn build(boxes: &[JunctionBox]) -> JunctionPlan { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/bin/day8.rs:202:21 [INFO] [stdout] | [INFO] [stdout] 202 | / if *v < global_min || global_min == 0.0 { [INFO] [stdout] 203 | | global_min = *v; [INFO] [stdout] 204 | | global_col = j; [INFO] [stdout] 205 | | global_row = i; [INFO] [stdout] 206 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 201 ~ Some((j, v)) [INFO] [stdout] 202 ~ if (*v < global_min || global_min == 0.0) => { [INFO] [stdout] 203 | global_min = *v; [INFO] [stdout] 204 | global_col = j; [INFO] [stdout] 205 | global_row = i; [INFO] [stdout] 206 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/bin/day8.rs:200:13 [INFO] [stdout] | [INFO] [stdout] 200 | / match res { [INFO] [stdout] 201 | | Some((j, v)) => { [INFO] [stdout] 202 | | if *v < global_min || global_min == 0.0 { [INFO] [stdout] 203 | | global_min = *v; [INFO] [stdout] ... | [INFO] [stdout] 208 | | None => {} [INFO] [stdout] 209 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 200 ~ if let Some((j, v)) = res { [INFO] [stdout] 201 + if *v < global_min || global_min == 0.0 { [INFO] [stdout] 202 + global_min = *v; [INFO] [stdout] 203 + global_col = j; [INFO] [stdout] 204 + global_row = i; [INFO] [stdout] 205 + } [INFO] [stdout] 206 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.98s [INFO] running `Command { std: "docker" "inspect" "b6805cb5420a9f04b93cca9d5ca94c3e57ae00be8dc028b33eaa7e8c5e082a4b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "b6805cb5420a9f04b93cca9d5ca94c3e57ae00be8dc028b33eaa7e8c5e082a4b", kill_on_drop: false }` [INFO] [stdout] b6805cb5420a9f04b93cca9d5ca94c3e57ae00be8dc028b33eaa7e8c5e082a4b