[INFO] cloning repository https://github.com/samollari/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/samollari/advent-of-code-2025" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fsamollari%2Fadvent-of-code-2025", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fsamollari%2Fadvent-of-code-2025'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 0cd25c2e9e1a71f0bb5bac611ed50280898e912c [INFO] linting samollari/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%2Fsamollari%2Fadvent-of-code-2025" "/workspace/builds/worker-4-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-4-tc1/source'... [INFO] [stderr] done. [INFO] removed /workspace/builds/worker-4-tc1/source/.cargo/config.toml [INFO] started tweaking git repo https://github.com/samollari/advent-of-code-2025 [INFO] finished tweaking git repo https://github.com/samollari/advent-of-code-2025 [INFO] tweaked toml for git repo https://github.com/samollari/advent-of-code-2025 written to /workspace/builds/worker-4-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/samollari/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/samollari/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] [stderr] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded thousands v0.2.0 [INFO] [stderr] Downloaded dhat v0.3.3 [INFO] [stderr] Downloaded mintex v0.1.2 [INFO] [stderr] Downloaded tinyjson v2.5.1 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] e2e566312e8eb0463876ddb3852ff990e073a6201fcf0abb7c9a13b5603ba51c [INFO] running `Command { std: "docker" "start" "-a" "e2e566312e8eb0463876ddb3852ff990e073a6201fcf0abb7c9a13b5603ba51c", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "e2e566312e8eb0463876ddb3852ff990e073a6201fcf0abb7c9a13b5603ba51c", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "e2e566312e8eb0463876ddb3852ff990e073a6201fcf0abb7c9a13b5603ba51c", kill_on_drop: false }` [INFO] [stdout] e2e566312e8eb0463876ddb3852ff990e073a6201fcf0abb7c9a13b5603ba51c [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 74a2a7b26f3ec1b6f4429430dfc84bfda4c4a9f1d8754edb8c7646d3b267e917 [INFO] running `Command { std: "docker" "start" "-a" "74a2a7b26f3ec1b6f4429430dfc84bfda4c4a9f1d8754edb8c7646d3b267e917", kill_on_drop: false }` [INFO] [stderr] Checking itertools v0.14.0 [INFO] [stderr] Checking tinyjson v2.5.1 [INFO] [stderr] Checking pico-args v0.5.0 [INFO] [stderr] Checking advent_of_code v0.12.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: consider using `sort_unstable_by_key` [INFO] [stdout] --> src/template/timings.rs:54:9 [INFO] [stdout] | [INFO] [stdout] 54 | data.sort_unstable_by(|a, b| a.day.cmp(&b.day)); [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] 54 - data.sort_unstable_by(|a, b| a.day.cmp(&b.day)); [INFO] [stdout] 54 + data.sort_unstable_by_key(|a| a.day); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_unstable_by_key` [INFO] [stdout] --> src/template/timings.rs:54:9 [INFO] [stdout] | [INFO] [stdout] 54 | data.sort_unstable_by(|a, b| a.day.cmp(&b.day)); [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] 54 - data.sort_unstable_by(|a, b| a.day.cmp(&b.day)); [INFO] [stdout] 54 + data.sort_unstable_by_key(|a| a.day); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/bin/09.rs:115:18 [INFO] [stdout] | [INFO] [stdout] 115 | fn get_range(self: &Self) -> RangeInclusive { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] = note: `#[warn(clippy::needless_arbitrary_self_type)]` on by default [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 115 - fn get_range(self: &Self) -> RangeInclusive { [INFO] [stdout] 115 + fn get_range(&self) -> RangeInclusive { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/bin/09.rs:124:27 [INFO] [stdout] | [INFO] [stdout] 124 | fn get_interior_range(self: &Self) -> Option> { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 124 - fn get_interior_range(self: &Self) -> Option> { [INFO] [stdout] 124 + fn get_interior_range(&self) -> Option> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/bin/09.rs:136:25 [INFO] [stdout] | [INFO] [stdout] 136 | fn perpendicular_to(self: &Self, other: &Self) -> bool { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 136 - fn perpendicular_to(self: &Self, other: &Self) -> bool { [INFO] [stdout] 136 + fn perpendicular_to(&self, other: &Self) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/bin/09.rs:146:21 [INFO] [stdout] | [INFO] [stdout] 146 | fn _inline_with(self: &Self, other: &Self) -> bool { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 146 - fn _inline_with(self: &Self, other: &Self) -> bool { [INFO] [stdout] 146 + fn _inline_with(&self, other: &Self) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/bin/09.rs:150:19 [INFO] [stdout] | [INFO] [stdout] 150 | fn intersects(self: &Self, other: &Self) -> bool { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 150 - fn intersects(self: &Self, other: &Self) -> bool { [INFO] [stdout] 150 + fn intersects(&self, other: &Self) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/bin/09.rs:160:18 [INFO] [stdout] | [INFO] [stdout] 160 | fn _overlaps(self: &Self, other: &Self) -> bool { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 160 - fn _overlaps(self: &Self, other: &Self) -> bool { [INFO] [stdout] 160 + fn _overlaps(&self, other: &Self) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/bin/09.rs:170:23 [INFO] [stdout] | [INFO] [stdout] 170 | fn _get_repr_at_y(self: &Self, y: usize) -> Vec<(usize, char)> { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 170 - fn _get_repr_at_y(self: &Self, y: usize) -> Vec<(usize, char)> { [INFO] [stdout] 170 + fn _get_repr_at_y(&self, y: usize) -> Vec<(usize, char)> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/bin/09.rs:212:31 [INFO] [stdout] | [INFO] [stdout] 212 | fn iter_coords_except_end(self: &Self) -> impl Iterator { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 212 - fn iter_coords_except_end(self: &Self) -> impl Iterator { [INFO] [stdout] 212 + fn iter_coords_except_end(&self) -> impl Iterator { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/bin/10.rs:58:38 [INFO] [stdout] | [INFO] [stdout] 58 | fn find_min_presses_to_configure(self: &Self) -> Option { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] = note: `#[warn(clippy::needless_arbitrary_self_type)]` on by default [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 58 - fn find_min_presses_to_configure(self: &Self) -> Option { [INFO] [stdout] 58 + fn find_min_presses_to_configure(&self) -> Option { [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/03.rs:28:9 [INFO] [stdout] | [INFO] [stdout] 28 | / match found { [INFO] [stdout] 29 | | Some((drop_index, _)) => { [INFO] [stdout] 30 | | digits.remove(drop_index); [INFO] [stdout] 31 | | digits.push(*digit); [INFO] [stdout] 32 | | } [INFO] [stdout] 33 | | None => {} [INFO] [stdout] 34 | | } [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] 28 ~ if let Some((drop_index, _)) = found { [INFO] [stdout] 29 + digits.remove(drop_index); [INFO] [stdout] 30 + digits.push(*digit); [INFO] [stdout] 31 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/bin/10.rs:65:31 [INFO] [stdout] | [INFO] [stdout] 65 | fn buttons_satisfy_lights(self: &Self, buttons_to_press: &Vec) -> bool { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 65 - fn buttons_satisfy_lights(self: &Self, buttons_to_press: &Vec) -> bool { [INFO] [stdout] 65 + fn buttons_satisfy_lights(&self, buttons_to_press: &Vec) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> src/bin/04.rs:77:5 [INFO] [stdout] | [INFO] [stdout] 77 | / rolls [INFO] [stdout] 78 | | .iter() [INFO] [stdout] 79 | | .filter(move |coord| roll_accessible(**coord, rolls, dimensions)) [INFO] [stdout] 80 | | .map(|coord| *coord) [INFO] [stdout] | |____________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] = note: `#[warn(clippy::map_clone)]` on by default [INFO] [stdout] help: consider calling the dedicated `copied` method [INFO] [stdout] | [INFO] [stdout] 77 ~ rolls [INFO] [stdout] 78 + .iter() [INFO] [stdout] 79 + .filter(move |coord| roll_accessible(**coord, rolls, dimensions)).copied() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/bin/10.rs:92:17 [INFO] [stdout] | [INFO] [stdout] 92 | pub fn part_two(input: &str) -> Option { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `joltage_requirements` is never read [INFO] [stdout] --> src/bin/10.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 7 | struct Machine { [INFO] [stdout] | ------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 10 | joltage_requirements: 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: you are using an explicit closure for copying elements [INFO] [stdout] --> src/bin/04.rs:77:5 [INFO] [stdout] | [INFO] [stdout] 77 | / rolls [INFO] [stdout] 78 | | .iter() [INFO] [stdout] 79 | | .filter(move |coord| roll_accessible(**coord, rolls, dimensions)) [INFO] [stdout] 80 | | .map(|coord| *coord) [INFO] [stdout] | |____________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] = note: `#[warn(clippy::map_clone)]` on by default [INFO] [stdout] help: consider calling the dedicated `copied` method [INFO] [stdout] | [INFO] [stdout] 77 ~ rolls [INFO] [stdout] 78 + .iter() [INFO] [stdout] 79 + .filter(move |coord| roll_accessible(**coord, rolls, dimensions)).copied() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: found call to `str::trim` before `str::split_whitespace` [INFO] [stdout] --> src/bin/06.rs:26:26 [INFO] [stdout] | [INFO] [stdout] 26 | .map(|line| line.trim().split_whitespace().collect_vec()) [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: length comparison to zero [INFO] [stdout] --> src/bin/10.rs:21:17 [INFO] [stdout] | [INFO] [stdout] 21 | assert!(button_parts.len() > 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!button_parts.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> src/bin/04.rs:97:13 [INFO] [stdout] | [INFO] [stdout] 97 | / neighbors_to_check [INFO] [stdout] 98 | | .iter() [INFO] [stdout] 99 | | .filter(|coord| roll_accessible(**coord, rolls, dimensions)) [INFO] [stdout] 100 | | .map(|coord| *coord) [INFO] [stdout] | |____________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] help: consider calling the dedicated `copied` method [INFO] [stdout] | [INFO] [stdout] 97 ~ neighbors_to_check [INFO] [stdout] 98 + .iter() [INFO] [stdout] 99 + .filter(|coord| roll_accessible(**coord, rolls, dimensions)).copied() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> src/bin/04.rs:97:13 [INFO] [stdout] | [INFO] [stdout] 97 | / neighbors_to_check [INFO] [stdout] 98 | | .iter() [INFO] [stdout] 99 | | .filter(|coord| roll_accessible(**coord, rolls, dimensions)) [INFO] [stdout] 100 | | .map(|coord| *coord) [INFO] [stdout] | |____________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] help: consider calling the dedicated `copied` method [INFO] [stdout] | [INFO] [stdout] 97 ~ neighbors_to_check [INFO] [stdout] 98 + .iter() [INFO] [stdout] 99 + .filter(|coord| roll_accessible(**coord, rolls, dimensions)).copied() [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/08.rs:29:13 [INFO] [stdout] | [INFO] [stdout] 29 | coords: &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] 29 - coords: &Vec, [INFO] [stdout] 29 + coords: &[Coord3D], [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/08.rs:29:13 [INFO] [stdout] | [INFO] [stdout] 29 | coords: &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] 29 - coords: &Vec, [INFO] [stdout] 29 + coords: &[Coord3D], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/bin/11.rs:50:21 [INFO] [stdout] | [INFO] [stdout] 50 | fn get_graph_routes<'a>( [INFO] [stdout] | ^^ [INFO] [stdout] 51 | graph: &'a Graph, [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] 50 ~ fn get_graph_routes( [INFO] [stdout] 51 ~ graph: &Graph, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/bin/11.rs:73:49 [INFO] [stdout] | [INFO] [stdout] 73 | let this_node_has_multiple_inputs = graph [INFO] [stdout] | _________________________________________________^ [INFO] [stdout] 74 | | .inputs [INFO] [stdout] 75 | | .get(start_node) [INFO] [stdout] 76 | | .map_or(false, |inputs| inputs.len() > 1); [INFO] [stdout] | |_________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 76 - .map_or(false, |inputs| inputs.len() > 1); [INFO] [stdout] 76 + .is_some_and(|inputs| inputs.len() > 1); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> src/bin/11.rs:100:5 [INFO] [stdout] | [INFO] [stdout] 100 | / loop { [INFO] [stdout] 101 | | match process_queue.pop_front() { [INFO] [stdout] 102 | | Some(node_to_process) => { [INFO] [stdout] 103 | | let node_is_new = found_going_down.insert(node_to_process.clone()); [INFO] [stdout] ... | [INFO] [stdout] 118 | | } [INFO] [stdout] | |_____^ help: try: `while let Some(node_to_process) = process_queue.pop_front() { .. }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] = note: `#[warn(clippy::while_let_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> src/bin/11.rs:127:5 [INFO] [stdout] | [INFO] [stdout] 127 | / loop { [INFO] [stdout] 128 | | match process_queue.pop_front() { [INFO] [stdout] 129 | | Some(node_to_process) => { [INFO] [stdout] 130 | | let node_is_new = found_going_up.insert(node_to_process.clone()); [INFO] [stdout] ... | [INFO] [stdout] 145 | | } [INFO] [stdout] | |_____^ help: try: `while let Some(node_to_process) = process_queue.pop_front() { .. }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `bool::then` in `filter_map` [INFO] [stdout] --> src/bin/11.rs:163:49 [INFO] [stdout] | [INFO] [stdout] 163 | HashMap::from_iter(graph.outputs.keys().filter_map(|node| { [INFO] [stdout] | _________________________________________________^ [INFO] [stdout] 164 | | restrict_to_nodes [INFO] [stdout] 165 | | .contains(node) [INFO] [stdout] 166 | | .then(|| (node.clone(), ProcessingState::NotStarted)) [INFO] [stdout] 167 | | })); [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_map_bool_then [INFO] [stdout] = note: `#[warn(clippy::filter_map_bool_then)]` on by default [INFO] [stdout] help: use `filter` then `map` instead [INFO] [stdout] | [INFO] [stdout] 163 ~ HashMap::from_iter(graph.outputs.keys().filter(|&node| restrict_to_nodes [INFO] [stdout] 164 ~ .contains(node)).map(|node| (node.clone(), ProcessingState::NotStarted))); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> src/bin/11.rs:173:5 [INFO] [stdout] | [INFO] [stdout] 173 | / loop { [INFO] [stdout] 174 | | // println!("{:?}, {:?}", process_queue, processing_states); [INFO] [stdout] 175 | | match process_queue.pop_front() { [INFO] [stdout] 176 | | Some(node_to_process) => match processing_states.get(&node_to_process) { [INFO] [stdout] ... | [INFO] [stdout] 226 | | } [INFO] [stdout] | |_____^ help: try: `while let Some(node_to_process) = process_queue.pop_front() { .. }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/bin/11.rs:176:38 [INFO] [stdout] | [INFO] [stdout] 176 | Some(node_to_process) => match processing_states.get(&node_to_process) { [INFO] [stdout] | ______________________________________^ [INFO] [stdout] 177 | | Some(state) => match state { [INFO] [stdout] 178 | | ProcessingState::NotStarted | ProcessingState::InProgress => { [INFO] [stdout] 179 | | let node_children = graph.outputs.get(&node_to_process).unwrap(); [INFO] [stdout] ... | [INFO] [stdout] 222 | | None => {} [INFO] [stdout] 223 | | }, [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] 176 ~ Some(node_to_process) => if let Some(state) = processing_states.get(&node_to_process) { match state { [INFO] [stdout] 177 + ProcessingState::NotStarted | ProcessingState::InProgress => { [INFO] [stdout] 178 + let node_children = graph.outputs.get(&node_to_process).unwrap(); [INFO] [stdout] 179 + [INFO] [stdout] 180 + let all_done_result = [INFO] [stdout] 181 + node_children.iter().fold(Some(0), |acc, child| { [INFO] [stdout] 182 + match (acc, processing_states.get(child)) { [INFO] [stdout] 183 + (Some(acc), Some(ProcessingState::Done(x))) => Some(acc + x), [INFO] [stdout] 184 + (Some(acc), None) => Some(acc), [INFO] [stdout] 185 + _ => None, [INFO] [stdout] 186 + } [INFO] [stdout] 187 + }); [INFO] [stdout] 188 + [INFO] [stdout] 189 + let my_new_state = match all_done_result { [INFO] [stdout] 190 + Some(paths) => { [INFO] [stdout] 191 + let mut new_process_queue = VecDeque::from( [INFO] [stdout] 192 + graph [INFO] [stdout] 193 + .inputs [INFO] [stdout] 194 + .get(&node_to_process) [INFO] [stdout] 195 + .unwrap_or(&vec![]) [INFO] [stdout] 196 + .clone(), [INFO] [stdout] 197 + ); [INFO] [stdout] 198 + new_process_queue.append(&mut process_queue); [INFO] [stdout] 199 + process_queue = new_process_queue; [INFO] [stdout] 200 + ProcessingState::Done(paths) [INFO] [stdout] 201 + } [INFO] [stdout] 202 + None => { [INFO] [stdout] 203 + process_queue.append(&mut VecDeque::from(node_children.clone())); [INFO] [stdout] 204 + ProcessingState::InProgress [INFO] [stdout] 205 + } [INFO] [stdout] 206 + }; [INFO] [stdout] 207 + [INFO] [stdout] 208 + processing_states.insert(node_to_process.clone(), my_new_state.clone()); [INFO] [stdout] 209 + [INFO] [stdout] 210 + match (node_to_process == end_node.to_owned(), my_new_state) { [INFO] [stdout] 211 + (true, ProcessingState::Done(_)) => break, [INFO] [stdout] 212 + _ => {} [INFO] [stdout] 213 + }; [INFO] [stdout] 214 + } [INFO] [stdout] 215 + ProcessingState::Done(_) => { [INFO] [stdout] 216 + if node_to_process == end_node.to_owned() { [INFO] [stdout] 217 + break; [INFO] [stdout] 218 + } [INFO] [stdout] 219 + } [INFO] [stdout] 220 ~ } }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `Iterator::fold` on a type that implements `Try` [INFO] [stdout] --> src/bin/11.rs:182:50 [INFO] [stdout] | [INFO] [stdout] 182 | ... node_children.iter().fold(Some(0), |acc, child| { [INFO] [stdout] | ____________________________________________^ [INFO] [stdout] 183 | | ... match (acc, processing_states.get(child)) { [INFO] [stdout] 184 | | ... (Some(acc), Some(ProcessingState::Done(x))) => Some(acc + x), [INFO] [stdout] 185 | | ... (Some(acc), None) => Some(acc), [INFO] [stdout] ... | [INFO] [stdout] 188 | | ... }); [INFO] [stdout] | |________________________^ help: use `try_fold` instead: `try_fold(0, |acc, child| ...)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_try_fold [INFO] [stdout] = note: `#[warn(clippy::manual_try_fold)]` 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/11.rs:211:25 [INFO] [stdout] | [INFO] [stdout] 211 | / match (node_to_process == end_node.to_owned(), my_new_state) { [INFO] [stdout] 212 | | (true, ProcessingState::Done(_)) => break, [INFO] [stdout] 213 | | _ => {} [INFO] [stdout] 214 | | }; [INFO] [stdout] | |_________________________^ help: try: `if let (true, ProcessingState::Done(_)) = (node_to_process == end_node.to_owned(), my_new_state) { break }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/bin/11.rs:211:51 [INFO] [stdout] | [INFO] [stdout] 211 | match (node_to_process == end_node.to_owned(), my_new_state) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `end_node` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] = note: `#[warn(clippy::cmp_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/bin/11.rs:217:47 [INFO] [stdout] | [INFO] [stdout] 217 | if node_to_process == end_node.to_owned() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `end_node` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: found call to `str::trim` before `str::split_whitespace` [INFO] [stdout] --> src/bin/06.rs:26:26 [INFO] [stdout] | [INFO] [stdout] 26 | .map(|line| line.trim().split_whitespace().collect_vec()) [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 type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/bin/10.rs:58:38 [INFO] [stdout] | [INFO] [stdout] 58 | fn find_min_presses_to_configure(self: &Self) -> Option { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] = note: `#[warn(clippy::needless_arbitrary_self_type)]` on by default [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 58 - fn find_min_presses_to_configure(self: &Self) -> Option { [INFO] [stdout] 58 + fn find_min_presses_to_configure(&self) -> Option { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/bin/10.rs:65:31 [INFO] [stdout] | [INFO] [stdout] 65 | fn buttons_satisfy_lights(self: &Self, buttons_to_press: &Vec) -> bool { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 65 - fn buttons_satisfy_lights(self: &Self, buttons_to_press: &Vec) -> bool { [INFO] [stdout] 65 + fn buttons_satisfy_lights(&self, buttons_to_press: &Vec) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/05.rs:38:13 [INFO] [stdout] | [INFO] [stdout] 38 | ranges: &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] 38 - ranges: &Vec>, [INFO] [stdout] 38 + ranges: &[RangeInclusive], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/bin/05.rs:47:16 [INFO] [stdout] | [INFO] [stdout] 47 | if (lower_above_min && upper_below_max) // range fully covered by cmp_range [INFO] [stdout] | ________________^ [INFO] [stdout] 48 | | || (!lower_above_min && !upper_below_max) // cmp_range fully covered by range [INFO] [stdout] 49 | | || (lower_above_min && range.start() <= cmp_range.end()) // range extends upper end of cmp_range [INFO] [stdout] 50 | | || (upper_below_max && range.end() >= cmp_range.start()) [INFO] [stdout] | |________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 47 - if (lower_above_min && upper_below_max) // range fully covered by cmp_range [INFO] [stdout] 48 - || (!lower_above_min && !upper_below_max) // cmp_range fully covered by range [INFO] [stdout] 49 - || (lower_above_min && range.start() <= cmp_range.end()) // range extends upper end of cmp_range [INFO] [stdout] 50 - || (upper_below_max && range.end() >= cmp_range.start()) [INFO] [stdout] 47 + if !(lower_above_min && !upper_below_max && range.start() > cmp_range.end() || !lower_above_min && upper_below_max && range.end() < cmp_range.start()) [INFO] [stdout] | [INFO] [stdout] 47 - if (lower_above_min && upper_below_max) // range fully covered by cmp_range [INFO] [stdout] 48 - || (!lower_above_min && !upper_below_max) // cmp_range fully covered by range [INFO] [stdout] 49 - || (lower_above_min && range.start() <= cmp_range.end()) // range extends upper end of cmp_range [INFO] [stdout] 50 - || (upper_below_max && range.end() >= cmp_range.start()) [INFO] [stdout] 47 + if (range.end() >= cmp_range.start() || !upper_below_max || lower_above_min) && (range.start() <= cmp_range.end() || upper_below_max || !lower_above_min) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/bin/05.rs:47:16 [INFO] [stdout] | [INFO] [stdout] 47 | if (lower_above_min && upper_below_max) // range fully covered by cmp_range [INFO] [stdout] | ________________^ [INFO] [stdout] 48 | | || (!lower_above_min && !upper_below_max) // cmp_range fully covered by range [INFO] [stdout] 49 | | || (lower_above_min && range.start() <= cmp_range.end()) // range extends upper end of cmp_range [INFO] [stdout] | |________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 47 - if (lower_above_min && upper_below_max) // range fully covered by cmp_range [INFO] [stdout] 48 - || (!lower_above_min && !upper_below_max) // cmp_range fully covered by range [INFO] [stdout] 49 - || (lower_above_min && range.start() <= cmp_range.end()) // range extends upper end of cmp_range [INFO] [stdout] 47 + if !(!lower_above_min && upper_below_max || lower_above_min && !upper_below_max && range.start() > cmp_range.end()) // range extends upper end of cmp_range [INFO] [stdout] | [INFO] [stdout] 47 - if (lower_above_min && upper_below_max) // range fully covered by cmp_range [INFO] [stdout] 48 - || (!lower_above_min && !upper_below_max) // cmp_range fully covered by range [INFO] [stdout] 49 - || (lower_above_min && range.start() <= cmp_range.end()) // range extends upper end of cmp_range [INFO] [stdout] 47 + if (range.start() <= cmp_range.end() || upper_below_max || !lower_above_min) && (!upper_below_max || lower_above_min) // range extends upper end of cmp_range [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/bin/11.rs:50:21 [INFO] [stdout] | [INFO] [stdout] 50 | fn get_graph_routes<'a>( [INFO] [stdout] | ^^ [INFO] [stdout] 51 | graph: &'a Graph, [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] 50 ~ fn get_graph_routes( [INFO] [stdout] 51 ~ graph: &Graph, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/bin/11.rs:73:49 [INFO] [stdout] | [INFO] [stdout] 73 | let this_node_has_multiple_inputs = graph [INFO] [stdout] | _________________________________________________^ [INFO] [stdout] 74 | | .inputs [INFO] [stdout] 75 | | .get(start_node) [INFO] [stdout] 76 | | .map_or(false, |inputs| inputs.len() > 1); [INFO] [stdout] | |_________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 76 - .map_or(false, |inputs| inputs.len() > 1); [INFO] [stdout] 76 + .is_some_and(|inputs| inputs.len() > 1); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> src/bin/11.rs:100:5 [INFO] [stdout] | [INFO] [stdout] 100 | / loop { [INFO] [stdout] 101 | | match process_queue.pop_front() { [INFO] [stdout] 102 | | Some(node_to_process) => { [INFO] [stdout] 103 | | let node_is_new = found_going_down.insert(node_to_process.clone()); [INFO] [stdout] ... | [INFO] [stdout] 118 | | } [INFO] [stdout] | |_____^ help: try: `while let Some(node_to_process) = process_queue.pop_front() { .. }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] = note: `#[warn(clippy::while_let_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> src/bin/11.rs:127:5 [INFO] [stdout] | [INFO] [stdout] 127 | / loop { [INFO] [stdout] 128 | | match process_queue.pop_front() { [INFO] [stdout] 129 | | Some(node_to_process) => { [INFO] [stdout] 130 | | let node_is_new = found_going_up.insert(node_to_process.clone()); [INFO] [stdout] ... | [INFO] [stdout] 145 | | } [INFO] [stdout] | |_____^ help: try: `while let Some(node_to_process) = process_queue.pop_front() { .. }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `bool::then` in `filter_map` [INFO] [stdout] --> src/bin/11.rs:163:49 [INFO] [stdout] | [INFO] [stdout] 163 | HashMap::from_iter(graph.outputs.keys().filter_map(|node| { [INFO] [stdout] | _________________________________________________^ [INFO] [stdout] 164 | | restrict_to_nodes [INFO] [stdout] 165 | | .contains(node) [INFO] [stdout] 166 | | .then(|| (node.clone(), ProcessingState::NotStarted)) [INFO] [stdout] 167 | | })); [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_map_bool_then [INFO] [stdout] = note: `#[warn(clippy::filter_map_bool_then)]` on by default [INFO] [stdout] help: use `filter` then `map` instead [INFO] [stdout] | [INFO] [stdout] 163 ~ HashMap::from_iter(graph.outputs.keys().filter(|&node| restrict_to_nodes [INFO] [stdout] 164 ~ .contains(node)).map(|node| (node.clone(), ProcessingState::NotStarted))); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> src/bin/11.rs:173:5 [INFO] [stdout] | [INFO] [stdout] 173 | / loop { [INFO] [stdout] 174 | | // println!("{:?}, {:?}", process_queue, processing_states); [INFO] [stdout] 175 | | match process_queue.pop_front() { [INFO] [stdout] 176 | | Some(node_to_process) => match processing_states.get(&node_to_process) { [INFO] [stdout] ... | [INFO] [stdout] 226 | | } [INFO] [stdout] | |_____^ help: try: `while let Some(node_to_process) = process_queue.pop_front() { .. }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/bin/11.rs:176:38 [INFO] [stdout] | [INFO] [stdout] 176 | Some(node_to_process) => match processing_states.get(&node_to_process) { [INFO] [stdout] | ______________________________________^ [INFO] [stdout] 177 | | Some(state) => match state { [INFO] [stdout] 178 | | ProcessingState::NotStarted | ProcessingState::InProgress => { [INFO] [stdout] 179 | | let node_children = graph.outputs.get(&node_to_process).unwrap(); [INFO] [stdout] ... | [INFO] [stdout] 222 | | None => {} [INFO] [stdout] 223 | | }, [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] 176 ~ Some(node_to_process) => if let Some(state) = processing_states.get(&node_to_process) { match state { [INFO] [stdout] 177 + ProcessingState::NotStarted | ProcessingState::InProgress => { [INFO] [stdout] 178 + let node_children = graph.outputs.get(&node_to_process).unwrap(); [INFO] [stdout] 179 + [INFO] [stdout] 180 + let all_done_result = [INFO] [stdout] 181 + node_children.iter().fold(Some(0), |acc, child| { [INFO] [stdout] 182 + match (acc, processing_states.get(child)) { [INFO] [stdout] 183 + (Some(acc), Some(ProcessingState::Done(x))) => Some(acc + x), [INFO] [stdout] 184 + (Some(acc), None) => Some(acc), [INFO] [stdout] 185 + _ => None, [INFO] [stdout] 186 + } [INFO] [stdout] 187 + }); [INFO] [stdout] 188 + [INFO] [stdout] 189 + let my_new_state = match all_done_result { [INFO] [stdout] 190 + Some(paths) => { [INFO] [stdout] 191 + let mut new_process_queue = VecDeque::from( [INFO] [stdout] 192 + graph [INFO] [stdout] 193 + .inputs [INFO] [stdout] 194 + .get(&node_to_process) [INFO] [stdout] 195 + .unwrap_or(&vec![]) [INFO] [stdout] 196 + .clone(), [INFO] [stdout] 197 + ); [INFO] [stdout] 198 + new_process_queue.append(&mut process_queue); [INFO] [stdout] 199 + process_queue = new_process_queue; [INFO] [stdout] 200 + ProcessingState::Done(paths) [INFO] [stdout] 201 + } [INFO] [stdout] 202 + None => { [INFO] [stdout] 203 + process_queue.append(&mut VecDeque::from(node_children.clone())); [INFO] [stdout] 204 + ProcessingState::InProgress [INFO] [stdout] 205 + } [INFO] [stdout] 206 + }; [INFO] [stdout] 207 + [INFO] [stdout] 208 + processing_states.insert(node_to_process.clone(), my_new_state.clone()); [INFO] [stdout] 209 + [INFO] [stdout] 210 + match (node_to_process == end_node.to_owned(), my_new_state) { [INFO] [stdout] 211 + (true, ProcessingState::Done(_)) => break, [INFO] [stdout] 212 + _ => {} [INFO] [stdout] 213 + }; [INFO] [stdout] 214 + } [INFO] [stdout] 215 + ProcessingState::Done(_) => { [INFO] [stdout] 216 + if node_to_process == end_node.to_owned() { [INFO] [stdout] 217 + break; [INFO] [stdout] 218 + } [INFO] [stdout] 219 + } [INFO] [stdout] 220 ~ } }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `Iterator::fold` on a type that implements `Try` [INFO] [stdout] --> src/bin/11.rs:182:50 [INFO] [stdout] | [INFO] [stdout] 182 | ... node_children.iter().fold(Some(0), |acc, child| { [INFO] [stdout] | ____________________________________________^ [INFO] [stdout] 183 | | ... match (acc, processing_states.get(child)) { [INFO] [stdout] 184 | | ... (Some(acc), Some(ProcessingState::Done(x))) => Some(acc + x), [INFO] [stdout] 185 | | ... (Some(acc), None) => Some(acc), [INFO] [stdout] ... | [INFO] [stdout] 188 | | ... }); [INFO] [stdout] | |________________________^ help: use `try_fold` instead: `try_fold(0, |acc, child| ...)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_try_fold [INFO] [stdout] = note: `#[warn(clippy::manual_try_fold)]` 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/11.rs:211:25 [INFO] [stdout] | [INFO] [stdout] 211 | / match (node_to_process == end_node.to_owned(), my_new_state) { [INFO] [stdout] 212 | | (true, ProcessingState::Done(_)) => break, [INFO] [stdout] 213 | | _ => {} [INFO] [stdout] 214 | | }; [INFO] [stdout] | |_________________________^ help: try: `if let (true, ProcessingState::Done(_)) = (node_to_process == end_node.to_owned(), my_new_state) { break }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/bin/11.rs:211:51 [INFO] [stdout] | [INFO] [stdout] 211 | match (node_to_process == end_node.to_owned(), my_new_state) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `end_node` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] = note: `#[warn(clippy::cmp_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/bin/11.rs:217:47 [INFO] [stdout] | [INFO] [stdout] 217 | if node_to_process == end_node.to_owned() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `end_node` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/bin/10.rs:92:17 [INFO] [stdout] | [INFO] [stdout] 92 | pub fn part_two(input: &str) -> Option { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `joltage_requirements` is never read [INFO] [stdout] --> src/bin/10.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 7 | struct Machine { [INFO] [stdout] | ------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 10 | joltage_requirements: 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: this `map_or` can be simplified [INFO] [stdout] --> src/bin/09.rs:152:16 [INFO] [stdout] | [INFO] [stdout] 152 | && self [INFO] [stdout] | ________________^ [INFO] [stdout] 153 | | .get_interior_range() [INFO] [stdout] 154 | | .map_or(false, |range| range.contains(&other.cross_pos)) [INFO] [stdout] | |________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 154 - .map_or(false, |range| range.contains(&other.cross_pos)) [INFO] [stdout] 154 + .is_some_and(|range| range.contains(&other.cross_pos)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/bin/09.rs:155:16 [INFO] [stdout] | [INFO] [stdout] 155 | && other [INFO] [stdout] | ________________^ [INFO] [stdout] 156 | | .get_interior_range() [INFO] [stdout] 157 | | .map_or(false, |range| range.contains(&self.cross_pos)) [INFO] [stdout] | |_______________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 157 - .map_or(false, |range| range.contains(&self.cross_pos)) [INFO] [stdout] 157 + .is_some_and(|range| range.contains(&self.cross_pos)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/bin/10.rs:21:17 [INFO] [stdout] | [INFO] [stdout] 21 | assert!(button_parts.len() > 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!button_parts.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/09.rs:293:14 [INFO] [stdout] | [INFO] [stdout] 293 | outline: &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] 293 - outline: &Vec, [INFO] [stdout] 293 + outline: &[Line], [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/09.rs:298:5 [INFO] [stdout] | [INFO] [stdout] 298 | / match memo { [INFO] [stdout] 299 | | Some(memo_val) => return *memo_val, [INFO] [stdout] 300 | | None => {} [INFO] [stdout] 301 | | } [INFO] [stdout] | |_____^ help: try: `if let Some(memo_val) = memo { return *memo_val }` [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: unnecessary use of `to_owned` [INFO] [stdout] --> src/bin/09.rs:330:49 [INFO] [stdout] | [INFO] [stdout] 330 | let (tile_xs, _tile_ys): (Vec<_>, Vec<_>) = red_tiles.to_owned().into_iter().unzip(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `red_tiles.iter().copied()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] = note: `#[warn(clippy::unnecessary_to_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/bin/09.rs:115:18 [INFO] [stdout] | [INFO] [stdout] 115 | fn get_range(self: &Self) -> RangeInclusive { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] = note: `#[warn(clippy::needless_arbitrary_self_type)]` on by default [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 115 - fn get_range(self: &Self) -> RangeInclusive { [INFO] [stdout] 115 + fn get_range(&self) -> RangeInclusive { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/bin/09.rs:124:27 [INFO] [stdout] | [INFO] [stdout] 124 | fn get_interior_range(self: &Self) -> Option> { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 124 - fn get_interior_range(self: &Self) -> Option> { [INFO] [stdout] 124 + fn get_interior_range(&self) -> Option> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/bin/09.rs:136:25 [INFO] [stdout] | [INFO] [stdout] 136 | fn perpendicular_to(self: &Self, other: &Self) -> bool { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 136 - fn perpendicular_to(self: &Self, other: &Self) -> bool { [INFO] [stdout] 136 + fn perpendicular_to(&self, other: &Self) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/bin/09.rs:146:21 [INFO] [stdout] | [INFO] [stdout] 146 | fn _inline_with(self: &Self, other: &Self) -> bool { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 146 - fn _inline_with(self: &Self, other: &Self) -> bool { [INFO] [stdout] 146 + fn _inline_with(&self, other: &Self) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/bin/09.rs:150:19 [INFO] [stdout] | [INFO] [stdout] 150 | fn intersects(self: &Self, other: &Self) -> bool { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 150 - fn intersects(self: &Self, other: &Self) -> bool { [INFO] [stdout] 150 + fn intersects(&self, other: &Self) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/bin/09.rs:160:18 [INFO] [stdout] | [INFO] [stdout] 160 | fn _overlaps(self: &Self, other: &Self) -> bool { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 160 - fn _overlaps(self: &Self, other: &Self) -> bool { [INFO] [stdout] 160 + fn _overlaps(&self, other: &Self) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/bin/09.rs:170:23 [INFO] [stdout] | [INFO] [stdout] 170 | fn _get_repr_at_y(self: &Self, y: usize) -> Vec<(usize, char)> { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 170 - fn _get_repr_at_y(self: &Self, y: usize) -> Vec<(usize, char)> { [INFO] [stdout] 170 + fn _get_repr_at_y(&self, y: usize) -> Vec<(usize, char)> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the type of the `self` parameter does not need to be arbitrary [INFO] [stdout] --> src/bin/09.rs:212:31 [INFO] [stdout] | [INFO] [stdout] 212 | fn iter_coords_except_end(self: &Self) -> impl Iterator { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_arbitrary_self_type [INFO] [stdout] help: remove the type [INFO] [stdout] | [INFO] [stdout] 212 - fn iter_coords_except_end(self: &Self) -> impl Iterator { [INFO] [stdout] 212 + fn iter_coords_except_end(&self) -> impl Iterator { [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/05.rs:38:13 [INFO] [stdout] | [INFO] [stdout] 38 | ranges: &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] 38 - ranges: &Vec>, [INFO] [stdout] 38 + ranges: &[RangeInclusive], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/bin/05.rs:47:16 [INFO] [stdout] | [INFO] [stdout] 47 | if (lower_above_min && upper_below_max) // range fully covered by cmp_range [INFO] [stdout] | ________________^ [INFO] [stdout] 48 | | || (!lower_above_min && !upper_below_max) // cmp_range fully covered by range [INFO] [stdout] 49 | | || (lower_above_min && range.start() <= cmp_range.end()) // range extends upper end of cmp_range [INFO] [stdout] 50 | | || (upper_below_max && range.end() >= cmp_range.start()) [INFO] [stdout] | |________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 47 - if (lower_above_min && upper_below_max) // range fully covered by cmp_range [INFO] [stdout] 48 - || (!lower_above_min && !upper_below_max) // cmp_range fully covered by range [INFO] [stdout] 49 - || (lower_above_min && range.start() <= cmp_range.end()) // range extends upper end of cmp_range [INFO] [stdout] 50 - || (upper_below_max && range.end() >= cmp_range.start()) [INFO] [stdout] 47 + if !(lower_above_min && !upper_below_max && range.start() > cmp_range.end() || !lower_above_min && upper_below_max && range.end() < cmp_range.start()) [INFO] [stdout] | [INFO] [stdout] 47 - if (lower_above_min && upper_below_max) // range fully covered by cmp_range [INFO] [stdout] 48 - || (!lower_above_min && !upper_below_max) // cmp_range fully covered by range [INFO] [stdout] 49 - || (lower_above_min && range.start() <= cmp_range.end()) // range extends upper end of cmp_range [INFO] [stdout] 50 - || (upper_below_max && range.end() >= cmp_range.start()) [INFO] [stdout] 47 + if (range.end() >= cmp_range.start() || !upper_below_max || lower_above_min) && (range.start() <= cmp_range.end() || upper_below_max || !lower_above_min) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/bin/05.rs:47:16 [INFO] [stdout] | [INFO] [stdout] 47 | if (lower_above_min && upper_below_max) // range fully covered by cmp_range [INFO] [stdout] | ________________^ [INFO] [stdout] 48 | | || (!lower_above_min && !upper_below_max) // cmp_range fully covered by range [INFO] [stdout] 49 | | || (lower_above_min && range.start() <= cmp_range.end()) // range extends upper end of cmp_range [INFO] [stdout] | |________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 47 - if (lower_above_min && upper_below_max) // range fully covered by cmp_range [INFO] [stdout] 48 - || (!lower_above_min && !upper_below_max) // cmp_range fully covered by range [INFO] [stdout] 49 - || (lower_above_min && range.start() <= cmp_range.end()) // range extends upper end of cmp_range [INFO] [stdout] 47 + if !(!lower_above_min && upper_below_max || lower_above_min && !upper_below_max && range.start() > cmp_range.end()) // range extends upper end of cmp_range [INFO] [stdout] | [INFO] [stdout] 47 - if (lower_above_min && upper_below_max) // range fully covered by cmp_range [INFO] [stdout] 48 - || (!lower_above_min && !upper_below_max) // cmp_range fully covered by range [INFO] [stdout] 49 - || (lower_above_min && range.start() <= cmp_range.end()) // range extends upper end of cmp_range [INFO] [stdout] 47 + if (range.start() <= cmp_range.end() || upper_below_max || !lower_above_min) && (!upper_below_max || lower_above_min) // range extends upper end of cmp_range [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/03.rs:28:9 [INFO] [stdout] | [INFO] [stdout] 28 | / match found { [INFO] [stdout] 29 | | Some((drop_index, _)) => { [INFO] [stdout] 30 | | digits.remove(drop_index); [INFO] [stdout] 31 | | digits.push(*digit); [INFO] [stdout] 32 | | } [INFO] [stdout] 33 | | None => {} [INFO] [stdout] 34 | | } [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] 28 ~ if let Some((drop_index, _)) = found { [INFO] [stdout] 29 + digits.remove(drop_index); [INFO] [stdout] 30 + digits.push(*digit); [INFO] [stdout] 31 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/bin/09.rs:152:16 [INFO] [stdout] | [INFO] [stdout] 152 | && self [INFO] [stdout] | ________________^ [INFO] [stdout] 153 | | .get_interior_range() [INFO] [stdout] 154 | | .map_or(false, |range| range.contains(&other.cross_pos)) [INFO] [stdout] | |________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 154 - .map_or(false, |range| range.contains(&other.cross_pos)) [INFO] [stdout] 154 + .is_some_and(|range| range.contains(&other.cross_pos)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/bin/09.rs:155:16 [INFO] [stdout] | [INFO] [stdout] 155 | && other [INFO] [stdout] | ________________^ [INFO] [stdout] 156 | | .get_interior_range() [INFO] [stdout] 157 | | .map_or(false, |range| range.contains(&self.cross_pos)) [INFO] [stdout] | |_______________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 157 - .map_or(false, |range| range.contains(&self.cross_pos)) [INFO] [stdout] 157 + .is_some_and(|range| range.contains(&self.cross_pos)) [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/09.rs:293:14 [INFO] [stdout] | [INFO] [stdout] 293 | outline: &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] 293 - outline: &Vec, [INFO] [stdout] 293 + outline: &[Line], [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/09.rs:298:5 [INFO] [stdout] | [INFO] [stdout] 298 | / match memo { [INFO] [stdout] 299 | | Some(memo_val) => return *memo_val, [INFO] [stdout] 300 | | None => {} [INFO] [stdout] 301 | | } [INFO] [stdout] | |_____^ help: try: `if let Some(memo_val) = memo { return *memo_val }` [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: unnecessary use of `to_owned` [INFO] [stdout] --> src/bin/09.rs:330:49 [INFO] [stdout] | [INFO] [stdout] 330 | let (tile_xs, _tile_ys): (Vec<_>, Vec<_>) = red_tiles.to_owned().into_iter().unzip(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `red_tiles.iter().copied()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] = note: `#[warn(clippy::unnecessary_to_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 3.13s [INFO] running `Command { std: "docker" "inspect" "74a2a7b26f3ec1b6f4429430dfc84bfda4c4a9f1d8754edb8c7646d3b267e917", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "74a2a7b26f3ec1b6f4429430dfc84bfda4c4a9f1d8754edb8c7646d3b267e917", kill_on_drop: false }` [INFO] [stdout] 74a2a7b26f3ec1b6f4429430dfc84bfda4c4a9f1d8754edb8c7646d3b267e917