[INFO] cloning repository https://github.com/jkrannich/AoC2025 [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/jkrannich/AoC2025" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fjkrannich%2FAoC2025", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fjkrannich%2FAoC2025'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 2310ff666dd0a512e37b3eb7ea72a24c09f6a77e [INFO] linting jkrannich/AoC2025 against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fjkrannich%2FAoC2025" "/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/jkrannich/AoC2025 [INFO] finished tweaking git repo https://github.com/jkrannich/AoC2025 [INFO] tweaked toml for git repo https://github.com/jkrannich/AoC2025 written to /workspace/builds/worker-5-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/jkrannich/AoC2025 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/jkrannich/AoC2025 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] ddbebc51d866c68b68dd4e9ca7c9e94191e7eaf2a0470e6c8c45089c0d6900c7 [INFO] running `Command { std: "docker" "start" "-a" "ddbebc51d866c68b68dd4e9ca7c9e94191e7eaf2a0470e6c8c45089c0d6900c7", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "ddbebc51d866c68b68dd4e9ca7c9e94191e7eaf2a0470e6c8c45089c0d6900c7", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "ddbebc51d866c68b68dd4e9ca7c9e94191e7eaf2a0470e6c8c45089c0d6900c7", kill_on_drop: false }` [INFO] [stdout] ddbebc51d866c68b68dd4e9ca7c9e94191e7eaf2a0470e6c8c45089c0d6900c7 [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] adf01457ac571f675604a388ebdc1404d403286162c59d88b2a15e10462e7ceb [INFO] running `Command { std: "docker" "start" "-a" "adf01457ac571f675604a388ebdc1404d403286162c59d88b2a15e10462e7ceb", kill_on_drop: false }` [INFO] [stderr] Checking untitled v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused variable: `last_start` [INFO] [stdout] --> src/day5_part2.rs:33:22 [INFO] [stdout] | [INFO] [stdout] 33 | if let Some((last_start, last_end)) = merged.last_mut() { [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_last_start` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `last_start` [INFO] [stdout] --> src/day5_part2.rs:33:22 [INFO] [stdout] | [INFO] [stdout] 33 | if let Some((last_start, last_end)) = merged.last_mut() { [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_last_start` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/day2_part2.rs:78:12 [INFO] [stdout] | [INFO] [stdout] 78 | if n % d == 0 { [INFO] [stdout] | ^^^^^^^^^^ help: replace with: `n.is_multiple_of(d)` [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: the loop variable `j` is only used to index `points` [INFO] [stdout] --> src/day9_part1.rs:19:18 [INFO] [stdout] | [INFO] [stdout] 19 | for j in i + 1..points.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] 19 - for j in i + 1..points.len() { [INFO] [stdout] 19 + for in points.iter().skip(i + 1) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/day6_part1.rs:18:16 [INFO] [stdout] | [INFO] [stdout] 18 | if !sums.get(j).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `sums.get(j).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 borrowed expression implements the required traits [INFO] [stdout] --> src/day6_part1.rs:5:15 [INFO] [stdout] | [INFO] [stdout] 5 | .find(&['+', '*']) [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `['+', '*']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `r` is only used to index `rows` [INFO] [stdout] --> src/day6_part2.rs:24:18 [INFO] [stdout] | [INFO] [stdout] 24 | for r in 0..rows.len() { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 24 - for r in 0..rows.len() { [INFO] [stdout] 24 + for in &rows { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `r` is only used to index `rows` [INFO] [stdout] --> src/day6_part2.rs:52:18 [INFO] [stdout] | [INFO] [stdout] 52 | for r in 0..op_row { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 52 - for r in 0..op_row { [INFO] [stdout] 52 + for in rows.iter().take(op_row) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `c` is only used to index `rows` [INFO] [stdout] --> src/day6_part2.rs:66:18 [INFO] [stdout] | [INFO] [stdout] 66 | for c in start..end { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 66 - for c in start..end { [INFO] [stdout] 66 + for in rows.iter().take(end).skip(start) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `y` is used to index `grid` [INFO] [stdout] --> src/day7_part1.rs:11:22 [INFO] [stdout] | [INFO] [stdout] 11 | 'outer: for y in 0..h { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 11 - 'outer: for y in 0..h { [INFO] [stdout] 11 + 'outer: for (y, ) in grid.iter().enumerate().take(h) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `x` is used to index `grid` [INFO] [stdout] --> src/day7_part1.rs:12:18 [INFO] [stdout] | [INFO] [stdout] 12 | for x in 0..w { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 12 - for x in 0..w { [INFO] [stdout] 12 + for (x, ) in grid.iter().enumerate().take(w) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `y` is only used to index `grid` [INFO] [stdout] --> src/day7_part1.rs:27:14 [INFO] [stdout] | [INFO] [stdout] 27 | for y in (sy + 1)..h { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 27 - for y in (sy + 1)..h { [INFO] [stdout] 27 + for in grid.iter().take(h).skip((sy + 1)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/day7_part1.rs:44:13 [INFO] [stdout] | [INFO] [stdout] 44 | / if x > 0 { [INFO] [stdout] 45 | | if !active[x - 1] { [INFO] [stdout] 46 | | active[x - 1] = true; [INFO] [stdout] 47 | | if grid[y][x - 1] == '^' { [INFO] [stdout] ... | [INFO] [stdout] 51 | | } [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] 44 ~ if x > 0 [INFO] [stdout] 45 ~ && !active[x - 1] { [INFO] [stdout] 46 | active[x - 1] = true; [INFO] [stdout] ... [INFO] [stdout] 49 | } [INFO] [stdout] 50 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/day7_part1.rs:52:13 [INFO] [stdout] | [INFO] [stdout] 52 | / if x + 1 < w { [INFO] [stdout] 53 | | if !active[x + 1] { [INFO] [stdout] 54 | | active[x + 1] = true; [INFO] [stdout] 55 | | if grid[y][x + 1] == '^' { [INFO] [stdout] ... | [INFO] [stdout] 59 | | } [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] 52 ~ if x + 1 < w [INFO] [stdout] 53 ~ && !active[x + 1] { [INFO] [stdout] 54 | active[x + 1] = true; [INFO] [stdout] ... [INFO] [stdout] 57 | } [INFO] [stdout] 58 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `y` is used to index `grid` [INFO] [stdout] --> src/day7_part2.rs:13:22 [INFO] [stdout] | [INFO] [stdout] 13 | 'outer: for y in 0..h { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 13 - 'outer: for y in 0..h { [INFO] [stdout] 13 + 'outer: for (y, ) in grid.iter().enumerate().take(h) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `x` is used to index `grid` [INFO] [stdout] --> src/day7_part2.rs:14:18 [INFO] [stdout] | [INFO] [stdout] 14 | for x in 0..w { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 14 - for x in 0..w { [INFO] [stdout] 14 + for (x, ) in grid.iter().enumerate().take(w) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `y` is used to index `grid` [INFO] [stdout] --> src/day7_part2.rs:29:14 [INFO] [stdout] | [INFO] [stdout] 29 | for y in sy..h { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 29 - for y in sy..h { [INFO] [stdout] 29 + for (y, ) in grid.iter().enumerate().take(h).skip(sy) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `DSU` contains a capitalized acronym [INFO] [stdout] --> src/day8_part1.rs:45:8 [INFO] [stdout] | [INFO] [stdout] 45 | struct DSU { [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter (notice the capitalization): `Dsu` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/day2_part2.rs:78:12 [INFO] [stdout] | [INFO] [stdout] 78 | if n % d == 0 { [INFO] [stdout] | ^^^^^^^^^^ help: replace with: `n.is_multiple_of(d)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/day8_part1.rs:123:20 [INFO] [stdout] | [INFO] [stdout] 123 | } else if let Some(top) = heap.peek() { [INFO] [stdout] | ____________________^ [INFO] [stdout] 124 | | if e.d2 < top.d2 { [INFO] [stdout] 125 | | heap.pop(); [INFO] [stdout] 126 | | heap.push(e); [INFO] [stdout] 127 | | } [INFO] [stdout] 128 | | } [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] 123 ~ } else if let Some(top) = heap.peek() [INFO] [stdout] 124 ~ && e.d2 < top.d2 { [INFO] [stdout] 125 | heap.pop(); [INFO] [stdout] 126 | heap.push(e); [INFO] [stdout] 127 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `sizes.get(0)` [INFO] [stdout] --> src/day8_part1.rs:140:26 [INFO] [stdout] | [INFO] [stdout] 140 | let product: u128 = (sizes.get(0).copied().unwrap_or(1) as u128) [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `sizes.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `reserve` immediately after creation [INFO] [stdout] --> src/day8_part2.rs:63:5 [INFO] [stdout] | [INFO] [stdout] 63 | / let mut edges: Vec<(i64, usize, usize)> = Vec::new(); [INFO] [stdout] 64 | | edges.reserve(n * (n - 1) / 2); [INFO] [stdout] | |___________________________________^ help: consider using `Vec::with_capacity(/* Space hint */)`: `let mut edges: Vec<(i64, usize, usize)> = Vec::with_capacity(n * (n - 1) / 2);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#reserve_after_initialization [INFO] [stdout] = note: `#[warn(clippy::reserve_after_initialization)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is used to index `pts` [INFO] [stdout] --> src/day8_part2.rs:68:18 [INFO] [stdout] | [INFO] [stdout] 68 | for j in (i + 1)..n { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 68 - for j in (i + 1)..n { [INFO] [stdout] 68 + for (j, ) in pts.iter().enumerate().take(n).skip((i + 1)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_unstable_by_key` [INFO] [stdout] --> src/day8_part2.rs:78:5 [INFO] [stdout] | [INFO] [stdout] 78 | edges.sort_unstable_by(|a, b| a.0.cmp(&b.0)); [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] 78 - edges.sort_unstable_by(|a, b| a.0.cmp(&b.0)); [INFO] [stdout] 78 + edges.sort_unstable_by_key(|a| a.0); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/day8_part2.rs:83:9 [INFO] [stdout] | [INFO] [stdout] 83 | / if dsu.union(i, j) { [INFO] [stdout] 84 | | if dsu.components == 1 { [INFO] [stdout] 85 | | let ans = pts[i].0 * pts[j].0; [INFO] [stdout] 86 | | println!("{ans}"); [INFO] [stdout] ... | [INFO] [stdout] 89 | | } [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] 83 ~ if dsu.union(i, j) [INFO] [stdout] 84 ~ && dsu.components == 1 { [INFO] [stdout] 85 | let ans = pts[i].0 * pts[j].0; [INFO] [stdout] 86 | println!("{ans}"); [INFO] [stdout] 87 | return; [INFO] [stdout] 88 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is only used to index `points` [INFO] [stdout] --> src/day9_part1.rs:19:18 [INFO] [stdout] | [INFO] [stdout] 19 | for j in i + 1..points.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] 19 - for j in i + 1..points.len() { [INFO] [stdout] 19 + for in points.iter().skip(i + 1) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/day6_part1.rs:18:16 [INFO] [stdout] | [INFO] [stdout] 18 | if !sums.get(j).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `sums.get(j).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 borrowed expression implements the required traits [INFO] [stdout] --> src/day6_part1.rs:5:15 [INFO] [stdout] | [INFO] [stdout] 5 | .find(&['+', '*']) [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `['+', '*']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `r` is only used to index `rows` [INFO] [stdout] --> src/day6_part2.rs:24:18 [INFO] [stdout] | [INFO] [stdout] 24 | for r in 0..rows.len() { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 24 - for r in 0..rows.len() { [INFO] [stdout] 24 + for in &rows { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `r` is only used to index `rows` [INFO] [stdout] --> src/day6_part2.rs:52:18 [INFO] [stdout] | [INFO] [stdout] 52 | for r in 0..op_row { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 52 - for r in 0..op_row { [INFO] [stdout] 52 + for in rows.iter().take(op_row) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `c` is only used to index `rows` [INFO] [stdout] --> src/day6_part2.rs:66:18 [INFO] [stdout] | [INFO] [stdout] 66 | for c in start..end { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 66 - for c in start..end { [INFO] [stdout] 66 + for in rows.iter().take(end).skip(start) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `y` is used to index `grid` [INFO] [stdout] --> src/day7_part1.rs:11:22 [INFO] [stdout] | [INFO] [stdout] 11 | 'outer: for y in 0..h { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 11 - 'outer: for y in 0..h { [INFO] [stdout] 11 + 'outer: for (y, ) in grid.iter().enumerate().take(h) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `x` is used to index `grid` [INFO] [stdout] --> src/day7_part1.rs:12:18 [INFO] [stdout] | [INFO] [stdout] 12 | for x in 0..w { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 12 - for x in 0..w { [INFO] [stdout] 12 + for (x, ) in grid.iter().enumerate().take(w) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `y` is only used to index `grid` [INFO] [stdout] --> src/day7_part1.rs:27:14 [INFO] [stdout] | [INFO] [stdout] 27 | for y in (sy + 1)..h { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 27 - for y in (sy + 1)..h { [INFO] [stdout] 27 + for in grid.iter().take(h).skip((sy + 1)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/day7_part1.rs:44:13 [INFO] [stdout] | [INFO] [stdout] 44 | / if x > 0 { [INFO] [stdout] 45 | | if !active[x - 1] { [INFO] [stdout] 46 | | active[x - 1] = true; [INFO] [stdout] 47 | | if grid[y][x - 1] == '^' { [INFO] [stdout] ... | [INFO] [stdout] 51 | | } [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] 44 ~ if x > 0 [INFO] [stdout] 45 ~ && !active[x - 1] { [INFO] [stdout] 46 | active[x - 1] = true; [INFO] [stdout] ... [INFO] [stdout] 49 | } [INFO] [stdout] 50 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/day7_part1.rs:52:13 [INFO] [stdout] | [INFO] [stdout] 52 | / if x + 1 < w { [INFO] [stdout] 53 | | if !active[x + 1] { [INFO] [stdout] 54 | | active[x + 1] = true; [INFO] [stdout] 55 | | if grid[y][x + 1] == '^' { [INFO] [stdout] ... | [INFO] [stdout] 59 | | } [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] 52 ~ if x + 1 < w [INFO] [stdout] 53 ~ && !active[x + 1] { [INFO] [stdout] 54 | active[x + 1] = true; [INFO] [stdout] ... [INFO] [stdout] 57 | } [INFO] [stdout] 58 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `y` is used to index `grid` [INFO] [stdout] --> src/day7_part2.rs:13:22 [INFO] [stdout] | [INFO] [stdout] 13 | 'outer: for y in 0..h { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 13 - 'outer: for y in 0..h { [INFO] [stdout] 13 + 'outer: for (y, ) in grid.iter().enumerate().take(h) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `x` is used to index `grid` [INFO] [stdout] --> src/day7_part2.rs:14:18 [INFO] [stdout] | [INFO] [stdout] 14 | for x in 0..w { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 14 - for x in 0..w { [INFO] [stdout] 14 + for (x, ) in grid.iter().enumerate().take(w) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `y` is used to index `grid` [INFO] [stdout] --> src/day7_part2.rs:29:14 [INFO] [stdout] | [INFO] [stdout] 29 | for y in sy..h { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 29 - for y in sy..h { [INFO] [stdout] 29 + for (y, ) in grid.iter().enumerate().take(h).skip(sy) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `DSU` contains a capitalized acronym [INFO] [stdout] --> src/day8_part1.rs:45:8 [INFO] [stdout] | [INFO] [stdout] 45 | struct DSU { [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter (notice the capitalization): `Dsu` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/day8_part1.rs:123:20 [INFO] [stdout] | [INFO] [stdout] 123 | } else if let Some(top) = heap.peek() { [INFO] [stdout] | ____________________^ [INFO] [stdout] 124 | | if e.d2 < top.d2 { [INFO] [stdout] 125 | | heap.pop(); [INFO] [stdout] 126 | | heap.push(e); [INFO] [stdout] 127 | | } [INFO] [stdout] 128 | | } [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] 123 ~ } else if let Some(top) = heap.peek() [INFO] [stdout] 124 ~ && e.d2 < top.d2 { [INFO] [stdout] 125 | heap.pop(); [INFO] [stdout] 126 | heap.push(e); [INFO] [stdout] 127 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `sizes.get(0)` [INFO] [stdout] --> src/day8_part1.rs:140:26 [INFO] [stdout] | [INFO] [stdout] 140 | let product: u128 = (sizes.get(0).copied().unwrap_or(1) as u128) [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `sizes.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `reserve` immediately after creation [INFO] [stdout] --> src/day8_part2.rs:63:5 [INFO] [stdout] | [INFO] [stdout] 63 | / let mut edges: Vec<(i64, usize, usize)> = Vec::new(); [INFO] [stdout] 64 | | edges.reserve(n * (n - 1) / 2); [INFO] [stdout] | |___________________________________^ help: consider using `Vec::with_capacity(/* Space hint */)`: `let mut edges: Vec<(i64, usize, usize)> = Vec::with_capacity(n * (n - 1) / 2);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#reserve_after_initialization [INFO] [stdout] = note: `#[warn(clippy::reserve_after_initialization)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is used to index `pts` [INFO] [stdout] --> src/day8_part2.rs:68:18 [INFO] [stdout] | [INFO] [stdout] 68 | for j in (i + 1)..n { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 68 - for j in (i + 1)..n { [INFO] [stdout] 68 + for (j, ) in pts.iter().enumerate().take(n).skip((i + 1)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_unstable_by_key` [INFO] [stdout] --> src/day8_part2.rs:78:5 [INFO] [stdout] | [INFO] [stdout] 78 | edges.sort_unstable_by(|a, b| a.0.cmp(&b.0)); [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] 78 - edges.sort_unstable_by(|a, b| a.0.cmp(&b.0)); [INFO] [stdout] 78 + edges.sort_unstable_by_key(|a| a.0); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/day8_part2.rs:83:9 [INFO] [stdout] | [INFO] [stdout] 83 | / if dsu.union(i, j) { [INFO] [stdout] 84 | | if dsu.components == 1 { [INFO] [stdout] 85 | | let ans = pts[i].0 * pts[j].0; [INFO] [stdout] 86 | | println!("{ans}"); [INFO] [stdout] ... | [INFO] [stdout] 89 | | } [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] 83 ~ if dsu.union(i, j) [INFO] [stdout] 84 ~ && dsu.components == 1 { [INFO] [stdout] 85 | let ans = pts[i].0 * pts[j].0; [INFO] [stdout] 86 | println!("{ans}"); [INFO] [stdout] 87 | return; [INFO] [stdout] 88 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.41s [INFO] running `Command { std: "docker" "inspect" "adf01457ac571f675604a388ebdc1404d403286162c59d88b2a15e10462e7ceb", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "adf01457ac571f675604a388ebdc1404d403286162c59d88b2a15e10462e7ceb", kill_on_drop: false }` [INFO] [stdout] adf01457ac571f675604a388ebdc1404d403286162c59d88b2a15e10462e7ceb