[INFO] cloning repository https://github.com/quentin/aoc25-rust [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/quentin/aoc25-rust" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fquentin%2Faoc25-rust", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fquentin%2Faoc25-rust'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 26582ab7a44849aa165d8bdaf0c3e28e6d0b0714 [INFO] linting quentin/aoc25-rust against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fquentin%2Faoc25-rust" "/workspace/builds/worker-7-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-7-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/quentin/aoc25-rust [INFO] finished tweaking git repo https://github.com/quentin/aoc25-rust [INFO] tweaked toml for git repo https://github.com/quentin/aoc25-rust written to /workspace/builds/worker-7-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/quentin/aoc25-rust 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/quentin/aoc25-rust already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded partitions v0.2.4 [INFO] [stderr] Downloaded bit-vec v0.5.1 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-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] 337964abb34970fb2f70079dcf85af54d67f71a308a1a8b9201a1c28f9380e1c [INFO] running `Command { std: "docker" "start" "-a" "337964abb34970fb2f70079dcf85af54d67f71a308a1a8b9201a1c28f9380e1c", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "337964abb34970fb2f70079dcf85af54d67f71a308a1a8b9201a1c28f9380e1c", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "337964abb34970fb2f70079dcf85af54d67f71a308a1a8b9201a1c28f9380e1c", kill_on_drop: false }` [INFO] [stdout] 337964abb34970fb2f70079dcf85af54d67f71a308a1a8b9201a1c28f9380e1c [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-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] 47c2b42e448caa2cbd9fc879ee74ee614149ec884108bd048db0ecbbc5c2b894 [INFO] running `Command { std: "docker" "start" "-a" "47c2b42e448caa2cbd9fc879ee74ee614149ec884108bd048db0ecbbc5c2b894", kill_on_drop: false }` [INFO] [stderr] Checking bit-vec v0.5.1 [INFO] [stderr] Checking fixedbitset v0.5.7 [INFO] [stderr] Checking aho-corasick v1.1.4 [INFO] [stderr] Checking hashbrown v0.15.5 [INFO] [stderr] Checking indexmap v2.12.1 [INFO] [stderr] Checking num-integer v0.1.46 [INFO] [stderr] Checking num-complex v0.4.6 [INFO] [stderr] Checking partitions v0.2.4 [INFO] [stderr] Checking num-bigint v0.4.6 [INFO] [stderr] Checking num-iter v0.1.45 [INFO] [stderr] Checking petgraph v0.8.3 [INFO] [stderr] Checking regex-automata v0.4.13 [INFO] [stderr] Checking num-rational v0.4.2 [INFO] [stderr] Checking num v0.4.3 [INFO] [stderr] Checking regex v1.12.2 [INFO] [stderr] Checking aoc25-rust v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/etc/grid.rs:331:13 [INFO] [stdout] | [INFO] [stdout] 331 | lines: lines, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `lines` [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/etc/grid.rs:332:13 [INFO] [stdout] | [INFO] [stdout] 332 | columns: columns, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `columns` [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: redundant field names in struct initialization [INFO] [stdout] --> src/etc/grid.rs:331:13 [INFO] [stdout] | [INFO] [stdout] 331 | lines: lines, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `lines` [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/etc/grid.rs:332:13 [INFO] [stdout] | [INFO] [stdout] 332 | columns: columns, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `columns` [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: unneeded `return` statement [INFO] [stdout] --> src/days/day02.rs:22:5 [INFO] [stdout] | [INFO] [stdout] 22 | return (len % 2 == 0) && n.rem_euclid(1 + 10u64.pow(half_len)) == 0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 22 - return (len % 2 == 0) && n.rem_euclid(1 + 10u64.pow(half_len)) == 0; [INFO] [stdout] 22 + (len % 2 == 0) && n.rem_euclid(1 + 10u64.pow(half_len)) == 0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/days/day02.rs:22:12 [INFO] [stdout] | [INFO] [stdout] 22 | return (len % 2 == 0) && n.rem_euclid(1 + 10u64.pow(half_len)) == 0; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace with: `len.is_multiple_of(2)` [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: unneeded `return` statement [INFO] [stdout] --> src/days/day02.rs:52:5 [INFO] [stdout] | [INFO] [stdout] 52 | return n.rem_euclid(p) == 0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 52 - return n.rem_euclid(p) == 0; [INFO] [stdout] 52 + n.rem_euclid(p) == 0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/days/day02.rs:65:5 [INFO] [stdout] | [INFO] [stdout] 65 | return false; [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] 65 - return false; [INFO] [stdout] 65 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/days/day05.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | while let Some(line) = lines.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for line in lines.by_ref()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] = note: `#[warn(clippy::while_let_on_iterator)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/days/day05.rs:23:5 [INFO] [stdout] | [INFO] [stdout] 23 | while let Some(line) = lines.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for line in lines` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/days/day05.rs:53:5 [INFO] [stdout] | [INFO] [stdout] 53 | while let Some(i) = ingredient.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for i in ingredient` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/days/day05.rs:78:13 [INFO] [stdout] | [INFO] [stdout] 78 | i = i + 1; [INFO] [stdout] | ^^^^^^^^^ help: replace it with: `i += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.fold` can be written more succinctly using another method [INFO] [stdout] --> src/days/day06.rs:18:54 [INFO] [stdout] | [INFO] [stdout] 18 | Op::Add => self.operands.iter().copied().fold(0, |a, b| a + b), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `sum()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fold [INFO] [stdout] = note: `#[warn(clippy::unnecessary_fold)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.fold` can be written more succinctly using another method [INFO] [stdout] --> src/days/day06.rs:19:54 [INFO] [stdout] | [INFO] [stdout] 19 | Op::Mul => self.operands.iter().copied().fold(1, |a, b| a * b), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `product()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fold [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/days/day07.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | while let Some(line) = lines.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for line in lines` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Point` which implements the `Copy` trait [INFO] [stdout] --> src/days/day08.rs:34:51 [INFO] [stdout] | [INFO] [stdout] 34 | jboxes.iter().for_each(|jbox| partitions.push(jbox.clone())); [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*jbox` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is used to index `jboxes` [INFO] [stdout] --> src/days/day08.rs:39:18 [INFO] [stdout] | [INFO] [stdout] 39 | for j in (i + 1)..jboxes.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 and enumerate() [INFO] [stdout] | [INFO] [stdout] 39 - for j in (i + 1)..jboxes.len() { [INFO] [stdout] 39 + for (j, ) in jboxes.iter().enumerate().skip((i + 1)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Point` which implements the `Copy` trait [INFO] [stdout] --> src/days/day08.rs:62:51 [INFO] [stdout] | [INFO] [stdout] 62 | jboxes.iter().for_each(|jbox| partitions.push(jbox.clone())); [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*jbox` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is used to index `jboxes` [INFO] [stdout] --> src/days/day08.rs:67:18 [INFO] [stdout] | [INFO] [stdout] 67 | for j in (i + 1)..jboxes.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 67 - for j in (i + 1)..jboxes.len() { [INFO] [stdout] 67 + for (j, ) in jboxes.iter().enumerate().skip((i + 1)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/days/day09.rs:87:5 [INFO] [stdout] | [INFO] [stdout] 87 | return false; [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] 87 - return false; [INFO] [stdout] 87 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/days/day10.rs:24:22 [INFO] [stdout] | [INFO] [stdout] 24 | for c in (&line[1..rbrk]).chars().rev() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `line[1..rbrk]` [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: manual implementation of an assign operation [INFO] [stdout] --> src/days/day10.rs:26:28 [INFO] [stdout] | [INFO] [stdout] 26 | '.' => required_indicator_lights = required_indicator_lights << 1, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `required_indicator_lights <<= 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/days/day10.rs:117:13 [INFO] [stdout] | [INFO] [stdout] 117 | assert!(!environ[var].is_some()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `environ[var].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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/days/day10.rs:113:16 [INFO] [stdout] | [INFO] [stdout] 113 | equations: &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] 113 - equations: &Vec, [INFO] [stdout] 113 + equations: &[Equation], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/days/day10.rs:122:9 [INFO] [stdout] | [INFO] [stdout] 122 | / if eq.buttons.contains(&var) { [INFO] [stdout] 123 | | if let Some(local_max) = eq [INFO] [stdout] 124 | | .joltage [INFO] [stdout] 125 | | .checked_sub(eq.buttons.iter().map(|b| environ[*b].unwrap_or(0)).sum()) [INFO] [stdout] ... | [INFO] [stdout] 138 | | } [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] 122 ~ if eq.buttons.contains(&var) [INFO] [stdout] 123 ~ && let Some(local_max) = eq [INFO] [stdout] 124 | .joltage [INFO] [stdout] ... [INFO] [stdout] 136 | } [INFO] [stdout] 137 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/days/day10.rs:180:9 [INFO] [stdout] | [INFO] [stdout] 180 | return local_least; [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] 180 - return local_least; [INFO] [stdout] 180 + local_least [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/days/day10.rs:184:9 [INFO] [stdout] | [INFO] [stdout] 184 | return Some(score); [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] 184 - return Some(score); [INFO] [stdout] 184 + Some(score) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric method [INFO] [stdout] --> src/days/day10.rs:176:58 [INFO] [stdout] | [INFO] [stdout] 176 | local_least = Some(local_least.unwrap_or(u64::max_value()).min(other_local_least)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 176 - local_least = Some(local_least.unwrap_or(u64::max_value()).min(other_local_least)); [INFO] [stdout] 176 + local_least = Some(local_least.unwrap_or(u64::MAX).min(other_local_least)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `equations` [INFO] [stdout] --> src/days/day10.rs:202:22 [INFO] [stdout] | [INFO] [stdout] 202 | for i in 0..init.specified_joltage_levels.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 202 - for i in 0..init.specified_joltage_levels.len() { [INFO] [stdout] 202 + for (i, ) in equations.iter_mut().enumerate().take(init.specified_joltage_levels.len()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/days/day10.rs:215:22 [INFO] [stdout] | [INFO] [stdout] 215 | inits.iter().map(|init| solve_joltages(init)).sum() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `solve_joltages` [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: found call to `str::trim` before `str::split_whitespace` [INFO] [stdout] --> src/days/day12.rs:57:18 [INFO] [stdout] | [INFO] [stdout] 57 | .trim() [INFO] [stdout] | __________________^ [INFO] [stdout] 58 | | .split_whitespace() [INFO] [stdout] | |_________________^ help: remove `trim()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trim_split_whitespace [INFO] [stdout] = note: `#[warn(clippy::trim_split_whitespace)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `items` [INFO] [stdout] --> src/etc/grid.rs:343:18 [INFO] [stdout] | [INFO] [stdout] 343 | for i in 0..N { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 343 - for i in 0..N { [INFO] [stdout] 343 + for (i, ) in items.iter_mut().enumerate().take(N) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/days/day02.rs:22:5 [INFO] [stdout] | [INFO] [stdout] 22 | return (len % 2 == 0) && n.rem_euclid(1 + 10u64.pow(half_len)) == 0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 22 - return (len % 2 == 0) && n.rem_euclid(1 + 10u64.pow(half_len)) == 0; [INFO] [stdout] 22 + (len % 2 == 0) && n.rem_euclid(1 + 10u64.pow(half_len)) == 0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/days/day02.rs:22:12 [INFO] [stdout] | [INFO] [stdout] 22 | return (len % 2 == 0) && n.rem_euclid(1 + 10u64.pow(half_len)) == 0; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace with: `len.is_multiple_of(2)` [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: unneeded `return` statement [INFO] [stdout] --> src/days/day02.rs:52:5 [INFO] [stdout] | [INFO] [stdout] 52 | return n.rem_euclid(p) == 0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 52 - return n.rem_euclid(p) == 0; [INFO] [stdout] 52 + n.rem_euclid(p) == 0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/days/day02.rs:65:5 [INFO] [stdout] | [INFO] [stdout] 65 | return false; [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] 65 - return false; [INFO] [stdout] 65 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/days/day02.rs:102:9 [INFO] [stdout] | [INFO] [stdout] 102 | assert_eq!(pattern_repeats_twice(0), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_assert_comparison)]` on by default [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 102 - assert_eq!(pattern_repeats_twice(0), false); [INFO] [stdout] 102 + assert!(!pattern_repeats_twice(0)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/days/day02.rs:103:9 [INFO] [stdout] | [INFO] [stdout] 103 | assert_eq!(pattern_repeats_twice(1), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 103 - assert_eq!(pattern_repeats_twice(1), false); [INFO] [stdout] 103 + assert!(!pattern_repeats_twice(1)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/days/day02.rs:104:9 [INFO] [stdout] | [INFO] [stdout] 104 | assert_eq!(pattern_repeats_twice(10), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 104 - assert_eq!(pattern_repeats_twice(10), false); [INFO] [stdout] 104 + assert!(!pattern_repeats_twice(10)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/days/day02.rs:105:9 [INFO] [stdout] | [INFO] [stdout] 105 | assert_eq!(pattern_repeats_twice(11), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 105 - assert_eq!(pattern_repeats_twice(11), true); [INFO] [stdout] 105 + assert!(pattern_repeats_twice(11)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/days/day02.rs:106:9 [INFO] [stdout] | [INFO] [stdout] 106 | assert_eq!(pattern_repeats_twice(99), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 106 - assert_eq!(pattern_repeats_twice(99), true); [INFO] [stdout] 106 + assert!(pattern_repeats_twice(99)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/days/day02.rs:107:9 [INFO] [stdout] | [INFO] [stdout] 107 | assert_eq!(pattern_repeats_twice(101), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 107 - assert_eq!(pattern_repeats_twice(101), false); [INFO] [stdout] 107 + assert!(!pattern_repeats_twice(101)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/days/day02.rs:108:9 [INFO] [stdout] | [INFO] [stdout] 108 | assert_eq!(pattern_repeats_twice(110), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 108 - assert_eq!(pattern_repeats_twice(110), false); [INFO] [stdout] 108 + assert!(!pattern_repeats_twice(110)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/days/day02.rs:109:9 [INFO] [stdout] | [INFO] [stdout] 109 | assert_eq!(pattern_repeats_twice(1010), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 109 - assert_eq!(pattern_repeats_twice(1010), true); [INFO] [stdout] 109 + assert!(pattern_repeats_twice(1010)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/days/day02.rs:110:9 [INFO] [stdout] | [INFO] [stdout] 110 | assert_eq!(pattern_repeats_twice(1210), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 110 - assert_eq!(pattern_repeats_twice(1210), false); [INFO] [stdout] 110 + assert!(!pattern_repeats_twice(1210)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/days/day02.rs:111:9 [INFO] [stdout] | [INFO] [stdout] 111 | assert_eq!(pattern_repeats_twice(12991299), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 111 - assert_eq!(pattern_repeats_twice(12991299), true); [INFO] [stdout] 111 + assert!(pattern_repeats_twice(12991299)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/days/day02.rs:121:9 [INFO] [stdout] | [INFO] [stdout] 121 | assert_eq!(pattern_repeats_k(2, 0), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 121 - assert_eq!(pattern_repeats_k(2, 0), false); [INFO] [stdout] 121 + assert!(!pattern_repeats_k(2, 0)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/days/day02.rs:122:9 [INFO] [stdout] | [INFO] [stdout] 122 | assert_eq!(pattern_repeats_k(2, 1), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 122 - assert_eq!(pattern_repeats_k(2, 1), false); [INFO] [stdout] 122 + assert!(!pattern_repeats_k(2, 1)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/days/day02.rs:123:9 [INFO] [stdout] | [INFO] [stdout] 123 | assert_eq!(pattern_repeats_k(2, 10), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 123 - assert_eq!(pattern_repeats_k(2, 10), false); [INFO] [stdout] 123 + assert!(!pattern_repeats_k(2, 10)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/days/day02.rs:124:9 [INFO] [stdout] | [INFO] [stdout] 124 | assert_eq!(pattern_repeats_k(2, 11), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 124 - assert_eq!(pattern_repeats_k(2, 11), true); [INFO] [stdout] 124 + assert!(pattern_repeats_k(2, 11)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/days/day02.rs:125:9 [INFO] [stdout] | [INFO] [stdout] 125 | assert_eq!(pattern_repeats_k(2, 99), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 125 - assert_eq!(pattern_repeats_k(2, 99), true); [INFO] [stdout] 125 + assert!(pattern_repeats_k(2, 99)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/days/day02.rs:126:9 [INFO] [stdout] | [INFO] [stdout] 126 | assert_eq!(pattern_repeats_k(2, 101), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 126 - assert_eq!(pattern_repeats_k(2, 101), false); [INFO] [stdout] 126 + assert!(!pattern_repeats_k(2, 101)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/days/day02.rs:127:9 [INFO] [stdout] | [INFO] [stdout] 127 | assert_eq!(pattern_repeats_k(2, 110), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 127 - assert_eq!(pattern_repeats_k(2, 110), false); [INFO] [stdout] 127 + assert!(!pattern_repeats_k(2, 110)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/days/day02.rs:128:9 [INFO] [stdout] | [INFO] [stdout] 128 | assert_eq!(pattern_repeats_k(2, 1010), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 128 - assert_eq!(pattern_repeats_k(2, 1010), true); [INFO] [stdout] 128 + assert!(pattern_repeats_k(2, 1010)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/days/day02.rs:129:9 [INFO] [stdout] | [INFO] [stdout] 129 | assert_eq!(pattern_repeats_k(2, 1210), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 129 - assert_eq!(pattern_repeats_k(2, 1210), false); [INFO] [stdout] 129 + assert!(!pattern_repeats_k(2, 1210)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/days/day02.rs:130:9 [INFO] [stdout] | [INFO] [stdout] 130 | assert_eq!(pattern_repeats_k(2, 12991299), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 130 - assert_eq!(pattern_repeats_k(2, 12991299), true); [INFO] [stdout] 130 + assert!(pattern_repeats_k(2, 12991299)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/days/day05.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | while let Some(line) = lines.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for line in lines.by_ref()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] = note: `#[warn(clippy::while_let_on_iterator)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/days/day05.rs:23:5 [INFO] [stdout] | [INFO] [stdout] 23 | while let Some(line) = lines.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for line in lines` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/days/day05.rs:53:5 [INFO] [stdout] | [INFO] [stdout] 53 | while let Some(i) = ingredient.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for i in ingredient` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/days/day05.rs:78:13 [INFO] [stdout] | [INFO] [stdout] 78 | i = i + 1; [INFO] [stdout] | ^^^^^^^^^ help: replace it with: `i += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.fold` can be written more succinctly using another method [INFO] [stdout] --> src/days/day06.rs:18:54 [INFO] [stdout] | [INFO] [stdout] 18 | Op::Add => self.operands.iter().copied().fold(0, |a, b| a + b), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `sum()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fold [INFO] [stdout] = note: `#[warn(clippy::unnecessary_fold)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.fold` can be written more succinctly using another method [INFO] [stdout] --> src/days/day06.rs:19:54 [INFO] [stdout] | [INFO] [stdout] 19 | Op::Mul => self.operands.iter().copied().fold(1, |a, b| a * b), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `product()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fold [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/days/day07.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | while let Some(line) = lines.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for line in lines` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Point` which implements the `Copy` trait [INFO] [stdout] --> src/days/day08.rs:34:51 [INFO] [stdout] | [INFO] [stdout] 34 | jboxes.iter().for_each(|jbox| partitions.push(jbox.clone())); [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*jbox` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is used to index `jboxes` [INFO] [stdout] --> src/days/day08.rs:39:18 [INFO] [stdout] | [INFO] [stdout] 39 | for j in (i + 1)..jboxes.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 and enumerate() [INFO] [stdout] | [INFO] [stdout] 39 - for j in (i + 1)..jboxes.len() { [INFO] [stdout] 39 + for (j, ) in jboxes.iter().enumerate().skip((i + 1)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Point` which implements the `Copy` trait [INFO] [stdout] --> src/days/day08.rs:62:51 [INFO] [stdout] | [INFO] [stdout] 62 | jboxes.iter().for_each(|jbox| partitions.push(jbox.clone())); [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*jbox` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is used to index `jboxes` [INFO] [stdout] --> src/days/day08.rs:67:18 [INFO] [stdout] | [INFO] [stdout] 67 | for j in (i + 1)..jboxes.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 67 - for j in (i + 1)..jboxes.len() { [INFO] [stdout] 67 + for (j, ) in jboxes.iter().enumerate().skip((i + 1)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/days/day09.rs:87:5 [INFO] [stdout] | [INFO] [stdout] 87 | return false; [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] 87 - return false; [INFO] [stdout] 87 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/days/day10.rs:24:22 [INFO] [stdout] | [INFO] [stdout] 24 | for c in (&line[1..rbrk]).chars().rev() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `line[1..rbrk]` [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: manual implementation of an assign operation [INFO] [stdout] --> src/days/day10.rs:26:28 [INFO] [stdout] | [INFO] [stdout] 26 | '.' => required_indicator_lights = required_indicator_lights << 1, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `required_indicator_lights <<= 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/days/day10.rs:117:13 [INFO] [stdout] | [INFO] [stdout] 117 | assert!(!environ[var].is_some()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `environ[var].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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/days/day10.rs:113:16 [INFO] [stdout] | [INFO] [stdout] 113 | equations: &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] 113 - equations: &Vec, [INFO] [stdout] 113 + equations: &[Equation], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/days/day10.rs:122:9 [INFO] [stdout] | [INFO] [stdout] 122 | / if eq.buttons.contains(&var) { [INFO] [stdout] 123 | | if let Some(local_max) = eq [INFO] [stdout] 124 | | .joltage [INFO] [stdout] 125 | | .checked_sub(eq.buttons.iter().map(|b| environ[*b].unwrap_or(0)).sum()) [INFO] [stdout] ... | [INFO] [stdout] 138 | | } [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] 122 ~ if eq.buttons.contains(&var) [INFO] [stdout] 123 ~ && let Some(local_max) = eq [INFO] [stdout] 124 | .joltage [INFO] [stdout] ... [INFO] [stdout] 136 | } [INFO] [stdout] 137 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/days/day10.rs:180:9 [INFO] [stdout] | [INFO] [stdout] 180 | return local_least; [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] 180 - return local_least; [INFO] [stdout] 180 + local_least [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/days/day10.rs:184:9 [INFO] [stdout] | [INFO] [stdout] 184 | return Some(score); [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] 184 - return Some(score); [INFO] [stdout] 184 + Some(score) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric method [INFO] [stdout] --> src/days/day10.rs:176:58 [INFO] [stdout] | [INFO] [stdout] 176 | local_least = Some(local_least.unwrap_or(u64::max_value()).min(other_local_least)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 176 - local_least = Some(local_least.unwrap_or(u64::max_value()).min(other_local_least)); [INFO] [stdout] 176 + local_least = Some(local_least.unwrap_or(u64::MAX).min(other_local_least)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `equations` [INFO] [stdout] --> src/days/day10.rs:202:22 [INFO] [stdout] | [INFO] [stdout] 202 | for i in 0..init.specified_joltage_levels.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 202 - for i in 0..init.specified_joltage_levels.len() { [INFO] [stdout] 202 + for (i, ) in equations.iter_mut().enumerate().take(init.specified_joltage_levels.len()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/days/day10.rs:215:22 [INFO] [stdout] | [INFO] [stdout] 215 | inits.iter().map(|init| solve_joltages(init)).sum() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `solve_joltages` [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: found call to `str::trim` before `str::split_whitespace` [INFO] [stdout] --> src/days/day12.rs:57:18 [INFO] [stdout] | [INFO] [stdout] 57 | .trim() [INFO] [stdout] | __________________^ [INFO] [stdout] 58 | | .split_whitespace() [INFO] [stdout] | |_________________^ help: remove `trim()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trim_split_whitespace [INFO] [stdout] = note: `#[warn(clippy::trim_split_whitespace)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `items` [INFO] [stdout] --> src/etc/grid.rs:343:18 [INFO] [stdout] | [INFO] [stdout] 343 | for i in 0..N { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 343 - for i in 0..N { [INFO] [stdout] 343 + for (i, ) in items.iter_mut().enumerate().take(N) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 5.51s [INFO] [stderr] warning: the following packages contain code that will be rejected by a future version of Rust: partitions v0.2.4 [INFO] [stderr] note: to see what the problems were, use the option `--future-incompat-report`, or run `cargo report future-incompatibilities --id 5` [INFO] running `Command { std: "docker" "inspect" "47c2b42e448caa2cbd9fc879ee74ee614149ec884108bd048db0ecbbc5c2b894", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "47c2b42e448caa2cbd9fc879ee74ee614149ec884108bd048db0ecbbc5c2b894", kill_on_drop: false }` [INFO] [stdout] 47c2b42e448caa2cbd9fc879ee74ee614149ec884108bd048db0ecbbc5c2b894