[INFO] cloning repository https://github.com/PercyJax/aoc-2024 [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/PercyJax/aoc-2024" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FPercyJax%2Faoc-2024", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FPercyJax%2Faoc-2024'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 4f27c1f9945cc8114e2423222523933cecaba59b [INFO] linting PercyJax/aoc-2024 against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FPercyJax%2Faoc-2024" "/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/PercyJax/aoc-2024 [INFO] finished tweaking git repo https://github.com/PercyJax/aoc-2024 [INFO] tweaked toml for git repo https://github.com/PercyJax/aoc-2024 written to /workspace/builds/worker-4-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/PercyJax/aoc-2024 on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/PercyJax/aoc-2024 already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Downloading crates ... [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] 4f0fe143e53bedb645ed0ebe3157cd79544cb90cf42cceb326872bb824132765 [INFO] running `Command { std: "docker" "start" "-a" "4f0fe143e53bedb645ed0ebe3157cd79544cb90cf42cceb326872bb824132765", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "4f0fe143e53bedb645ed0ebe3157cd79544cb90cf42cceb326872bb824132765", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "4f0fe143e53bedb645ed0ebe3157cd79544cb90cf42cceb326872bb824132765", kill_on_drop: false }` [INFO] [stdout] 4f0fe143e53bedb645ed0ebe3157cd79544cb90cf42cceb326872bb824132765 [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] ddc15a2143eb6541b5350a1579c9fd2e3f089f6bd9ac268a6bffdaa27f66f939 [INFO] running `Command { std: "docker" "start" "-a" "ddc15a2143eb6541b5350a1579c9fd2e3f089f6bd9ac268a6bffdaa27f66f939", kill_on_drop: false }` [INFO] [stderr] Checking memchr v2.6.4 [INFO] [stderr] Checking pico-args v0.5.0 [INFO] [stderr] Checking tinyjson v2.5.1 [INFO] [stderr] Checking aho-corasick v1.1.3 [INFO] [stderr] Checking regex-automata v0.4.9 [INFO] [stderr] Checking regex v1.11.1 [INFO] [stderr] Checking advent_of_code v0.11.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: called `Iterator::last` on a `DoubleEndedIterator`; this will needlessly iterate the entire iterator [INFO] [stdout] --> src/template/run_multi.rs:173:26 [INFO] [stdout] | [INFO] [stdout] 173 | let str_timing = line [INFO] [stdout] | __________________________^ [INFO] [stdout] 174 | | .split(" samples)") [INFO] [stdout] 175 | | .next()? [INFO] [stdout] 176 | | .split('(') [INFO] [stdout] 177 | | .last()? [INFO] [stdout] | |___________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_ended_iterator_last [INFO] [stdout] = note: `#[warn(clippy::double_ended_iterator_last)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 177 - .last()? [INFO] [stdout] 177 + .next_back()? [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: called `Iterator::last` on a `DoubleEndedIterator`; this will needlessly iterate the entire iterator [INFO] [stdout] --> src/template/run_multi.rs:173:26 [INFO] [stdout] | [INFO] [stdout] 173 | let str_timing = line [INFO] [stdout] | __________________________^ [INFO] [stdout] 174 | | .split(" samples)") [INFO] [stdout] 175 | | .next()? [INFO] [stdout] 176 | | .split('(') [INFO] [stdout] 177 | | .last()? [INFO] [stdout] | |___________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_ended_iterator_last [INFO] [stdout] = note: `#[warn(clippy::double_ended_iterator_last)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 177 - .last()? [INFO] [stdout] 177 + .next_back()? [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: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/bin/11.rs:32:15 [INFO] [stdout] | [INFO] [stdout] 32 | } else if number.to_string().len() % 2 == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `number.to_string().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: this loop could be written as a `while let` loop [INFO] [stdout] --> src/bin/10.rs:87:5 [INFO] [stdout] | [INFO] [stdout] 87 | / loop { [INFO] [stdout] 88 | | let Some(next) = moves.pop() else { break }; [INFO] [stdout] 89 | | moves.extend(compute_valid_moves(next, map, Some(summits), None)); [INFO] [stdout] 90 | | } [INFO] [stdout] | |_____^ help: try: `while let Some(next) = moves.pop() { .. }` [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/10.rs:96:5 [INFO] [stdout] | [INFO] [stdout] 96 | / loop { [INFO] [stdout] 97 | | let Some(next) = moves.pop() else { [INFO] [stdout] 98 | | break; [INFO] [stdout] 99 | | }; [INFO] [stdout] 100 | | moves.extend(compute_valid_moves(next, map, None, Some(paths))); [INFO] [stdout] 101 | | } [INFO] [stdout] | |_____^ help: try: `while let Some(next) = moves.pop() { .. }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> src/bin/10.rs:87:5 [INFO] [stdout] | [INFO] [stdout] 87 | / loop { [INFO] [stdout] 88 | | let Some(next) = moves.pop() else { break }; [INFO] [stdout] 89 | | moves.extend(compute_valid_moves(next, map, Some(summits), None)); [INFO] [stdout] 90 | | } [INFO] [stdout] | |_____^ help: try: `while let Some(next) = moves.pop() { .. }` [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/10.rs:96:5 [INFO] [stdout] | [INFO] [stdout] 96 | / loop { [INFO] [stdout] 97 | | let Some(next) = moves.pop() else { [INFO] [stdout] 98 | | break; [INFO] [stdout] 99 | | }; [INFO] [stdout] 100 | | moves.extend(compute_valid_moves(next, map, None, Some(paths))); [INFO] [stdout] 101 | | } [INFO] [stdout] | |_____^ help: try: `while let Some(next) = moves.pop() { .. }` [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: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/bin/12.rs:29:36 [INFO] [stdout] | [INFO] [stdout] 29 | fn tag_regions(map: &Map) -> (Vec<(usize, (usize, usize))>, Map>) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/12.rs:40:66 [INFO] [stdout] | [INFO] [stdout] 40 | let same_region = explore_region((r_idx, c_idx), &map); [INFO] [stdout] | ^^^^ help: change this to: `map` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/bin/12.rs:164:8 [INFO] [stdout] | [INFO] [stdout] 164 | if !map_lookup(coordinates, Some(UP), map).is_some_and(|n| n.2 == plot) [INFO] [stdout] | ________^ [INFO] [stdout] 165 | | && !(map_lookup(coordinates, Some(LEFT), map).is_some_and(|n| n.2 == plot) [INFO] [stdout] 166 | | && !map_lookup(coordinates, Some(LEFT_UP), map).is_some_and(|n| n.2 == plot)) [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] 164 - if !map_lookup(coordinates, Some(UP), map).is_some_and(|n| n.2 == plot) [INFO] [stdout] 165 - && !(map_lookup(coordinates, Some(LEFT), map).is_some_and(|n| n.2 == plot) [INFO] [stdout] 166 - && !map_lookup(coordinates, Some(LEFT_UP), map).is_some_and(|n| n.2 == plot)) [INFO] [stdout] 164 + if !(map_lookup(coordinates, Some(UP), map).is_some_and(|n| n.2 == plot) || map_lookup(coordinates, Some(LEFT), map).is_some_and(|n| n.2 == plot) && map_lookup(coordinates, Some(LEFT_UP), map).is_none_or(|n| n.2 != plot)) [INFO] [stdout] | [INFO] [stdout] 164 - if !map_lookup(coordinates, Some(UP), map).is_some_and(|n| n.2 == plot) [INFO] [stdout] 165 - && !(map_lookup(coordinates, Some(LEFT), map).is_some_and(|n| n.2 == plot) [INFO] [stdout] 166 - && !map_lookup(coordinates, Some(LEFT_UP), map).is_some_and(|n| n.2 == plot)) [INFO] [stdout] 164 + if (map_lookup(coordinates, Some(LEFT_UP), map).is_some_and(|n| n.2 == plot) || map_lookup(coordinates, Some(LEFT), map).is_none_or(|n| n.2 != plot)) && map_lookup(coordinates, Some(UP), map).is_none_or(|n| n.2 != plot) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/bin/12.rs:164:8 [INFO] [stdout] | [INFO] [stdout] 164 | if !map_lookup(coordinates, Some(UP), map).is_some_and(|n| n.2 == plot) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map_lookup(coordinates, Some(UP), map).is_none_or(|n| n.2 != plot)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/bin/12.rs:165:12 [INFO] [stdout] | [INFO] [stdout] 165 | && !(map_lookup(coordinates, Some(LEFT), map).is_some_and(|n| n.2 == plot) [INFO] [stdout] | ____________^ [INFO] [stdout] 166 | | && !map_lookup(coordinates, Some(LEFT_UP), map).is_some_and(|n| n.2 == plot)) [INFO] [stdout] | |_________________________________________________________________________________________^ help: try: `map_lookup(coordinates, Some(LEFT), map).is_none_or(|n| n.2 != plot) || map_lookup(coordinates, Some(LEFT_UP), map).is_some_and(|n| n.2 == plot)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/bin/12.rs:166:16 [INFO] [stdout] | [INFO] [stdout] 166 | && !map_lookup(coordinates, Some(LEFT_UP), map).is_some_and(|n| n.2 == plot)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map_lookup(coordinates, Some(LEFT_UP), map).is_none_or(|n| n.2 != plot)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/bin/12.rs:172:8 [INFO] [stdout] | [INFO] [stdout] 172 | if !map_lookup(coordinates, Some(RIGHT), map).is_some_and(|n| n.2 == plot) [INFO] [stdout] | ________^ [INFO] [stdout] 173 | | && !(map_lookup(coordinates, Some(UP), map).is_some_and(|n| n.2 == plot) [INFO] [stdout] 174 | | && !map_lookup(coordinates, Some(UP_RIGHT), map).is_some_and(|n| n.2 == plot)) [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] 172 - if !map_lookup(coordinates, Some(RIGHT), map).is_some_and(|n| n.2 == plot) [INFO] [stdout] 173 - && !(map_lookup(coordinates, Some(UP), map).is_some_and(|n| n.2 == plot) [INFO] [stdout] 174 - && !map_lookup(coordinates, Some(UP_RIGHT), map).is_some_and(|n| n.2 == plot)) [INFO] [stdout] 172 + if !(map_lookup(coordinates, Some(RIGHT), map).is_some_and(|n| n.2 == plot) || map_lookup(coordinates, Some(UP), map).is_some_and(|n| n.2 == plot) && map_lookup(coordinates, Some(UP_RIGHT), map).is_none_or(|n| n.2 != plot)) [INFO] [stdout] | [INFO] [stdout] 172 - if !map_lookup(coordinates, Some(RIGHT), map).is_some_and(|n| n.2 == plot) [INFO] [stdout] 173 - && !(map_lookup(coordinates, Some(UP), map).is_some_and(|n| n.2 == plot) [INFO] [stdout] 174 - && !map_lookup(coordinates, Some(UP_RIGHT), map).is_some_and(|n| n.2 == plot)) [INFO] [stdout] 172 + if (map_lookup(coordinates, Some(UP_RIGHT), map).is_some_and(|n| n.2 == plot) || map_lookup(coordinates, Some(UP), map).is_none_or(|n| n.2 != plot)) && map_lookup(coordinates, Some(RIGHT), map).is_none_or(|n| n.2 != plot) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/bin/12.rs:172:8 [INFO] [stdout] | [INFO] [stdout] 172 | if !map_lookup(coordinates, Some(RIGHT), map).is_some_and(|n| n.2 == plot) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map_lookup(coordinates, Some(RIGHT), map).is_none_or(|n| n.2 != plot)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/bin/12.rs:173:12 [INFO] [stdout] | [INFO] [stdout] 173 | && !(map_lookup(coordinates, Some(UP), map).is_some_and(|n| n.2 == plot) [INFO] [stdout] | ____________^ [INFO] [stdout] 174 | | && !map_lookup(coordinates, Some(UP_RIGHT), map).is_some_and(|n| n.2 == plot)) [INFO] [stdout] | |__________________________________________________________________________________________^ help: try: `map_lookup(coordinates, Some(UP), map).is_none_or(|n| n.2 != plot) || map_lookup(coordinates, Some(UP_RIGHT), map).is_some_and(|n| n.2 == plot)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/bin/12.rs:174:16 [INFO] [stdout] | [INFO] [stdout] 174 | && !map_lookup(coordinates, Some(UP_RIGHT), map).is_some_and(|n| n.2 == plot)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map_lookup(coordinates, Some(UP_RIGHT), map).is_none_or(|n| n.2 != plot)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/bin/12.rs:180:8 [INFO] [stdout] | [INFO] [stdout] 180 | if !map_lookup(coordinates, Some(DOWN), map).is_some_and(|n| n.2 == plot) [INFO] [stdout] | ________^ [INFO] [stdout] 181 | | && !(map_lookup(coordinates, Some(LEFT), map).is_some_and(|n| n.2 == plot) [INFO] [stdout] 182 | | && !map_lookup(coordinates, Some(LEFT_DOWN), map).is_some_and(|n| n.2 == plot)) [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] 180 - if !map_lookup(coordinates, Some(DOWN), map).is_some_and(|n| n.2 == plot) [INFO] [stdout] 181 - && !(map_lookup(coordinates, Some(LEFT), map).is_some_and(|n| n.2 == plot) [INFO] [stdout] 182 - && !map_lookup(coordinates, Some(LEFT_DOWN), map).is_some_and(|n| n.2 == plot)) [INFO] [stdout] 180 + if !(map_lookup(coordinates, Some(DOWN), map).is_some_and(|n| n.2 == plot) || map_lookup(coordinates, Some(LEFT), map).is_some_and(|n| n.2 == plot) && map_lookup(coordinates, Some(LEFT_DOWN), map).is_none_or(|n| n.2 != plot)) [INFO] [stdout] | [INFO] [stdout] 180 - if !map_lookup(coordinates, Some(DOWN), map).is_some_and(|n| n.2 == plot) [INFO] [stdout] 181 - && !(map_lookup(coordinates, Some(LEFT), map).is_some_and(|n| n.2 == plot) [INFO] [stdout] 182 - && !map_lookup(coordinates, Some(LEFT_DOWN), map).is_some_and(|n| n.2 == plot)) [INFO] [stdout] 180 + if (map_lookup(coordinates, Some(LEFT_DOWN), map).is_some_and(|n| n.2 == plot) || map_lookup(coordinates, Some(LEFT), map).is_none_or(|n| n.2 != plot)) && map_lookup(coordinates, Some(DOWN), map).is_none_or(|n| n.2 != plot) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/bin/12.rs:180:8 [INFO] [stdout] | [INFO] [stdout] 180 | if !map_lookup(coordinates, Some(DOWN), map).is_some_and(|n| n.2 == plot) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map_lookup(coordinates, Some(DOWN), map).is_none_or(|n| n.2 != plot)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/bin/12.rs:181:12 [INFO] [stdout] | [INFO] [stdout] 181 | && !(map_lookup(coordinates, Some(LEFT), map).is_some_and(|n| n.2 == plot) [INFO] [stdout] | ____________^ [INFO] [stdout] 182 | | && !map_lookup(coordinates, Some(LEFT_DOWN), map).is_some_and(|n| n.2 == plot)) [INFO] [stdout] | |___________________________________________________________________________________________^ help: try: `map_lookup(coordinates, Some(LEFT), map).is_none_or(|n| n.2 != plot) || map_lookup(coordinates, Some(LEFT_DOWN), map).is_some_and(|n| n.2 == plot)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/bin/12.rs:182:16 [INFO] [stdout] | [INFO] [stdout] 182 | && !map_lookup(coordinates, Some(LEFT_DOWN), map).is_some_and(|n| n.2 == plot)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map_lookup(coordinates, Some(LEFT_DOWN), map).is_none_or(|n| n.2 != plot)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/bin/12.rs:188:8 [INFO] [stdout] | [INFO] [stdout] 188 | if !map_lookup(coordinates, Some(LEFT), map).is_some_and(|n| n.2 == plot) [INFO] [stdout] | ________^ [INFO] [stdout] 189 | | && !(map_lookup(coordinates, Some(UP), map).is_some_and(|n| n.2 == plot) [INFO] [stdout] 190 | | && !map_lookup(coordinates, Some(UP_LEFT), map).is_some_and(|n| n.2 == plot)) [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] 188 - if !map_lookup(coordinates, Some(LEFT), map).is_some_and(|n| n.2 == plot) [INFO] [stdout] 189 - && !(map_lookup(coordinates, Some(UP), map).is_some_and(|n| n.2 == plot) [INFO] [stdout] 190 - && !map_lookup(coordinates, Some(UP_LEFT), map).is_some_and(|n| n.2 == plot)) [INFO] [stdout] 188 + if !(map_lookup(coordinates, Some(LEFT), map).is_some_and(|n| n.2 == plot) || map_lookup(coordinates, Some(UP), map).is_some_and(|n| n.2 == plot) && map_lookup(coordinates, Some(UP_LEFT), map).is_none_or(|n| n.2 != plot)) [INFO] [stdout] | [INFO] [stdout] 188 - if !map_lookup(coordinates, Some(LEFT), map).is_some_and(|n| n.2 == plot) [INFO] [stdout] 189 - && !(map_lookup(coordinates, Some(UP), map).is_some_and(|n| n.2 == plot) [INFO] [stdout] 190 - && !map_lookup(coordinates, Some(UP_LEFT), map).is_some_and(|n| n.2 == plot)) [INFO] [stdout] 188 + if (map_lookup(coordinates, Some(UP_LEFT), map).is_some_and(|n| n.2 == plot) || map_lookup(coordinates, Some(UP), map).is_none_or(|n| n.2 != plot)) && map_lookup(coordinates, Some(LEFT), map).is_none_or(|n| n.2 != plot) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/bin/12.rs:188:8 [INFO] [stdout] | [INFO] [stdout] 188 | if !map_lookup(coordinates, Some(LEFT), map).is_some_and(|n| n.2 == plot) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map_lookup(coordinates, Some(LEFT), map).is_none_or(|n| n.2 != plot)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/bin/12.rs:189:12 [INFO] [stdout] | [INFO] [stdout] 189 | && !(map_lookup(coordinates, Some(UP), map).is_some_and(|n| n.2 == plot) [INFO] [stdout] | ____________^ [INFO] [stdout] 190 | | && !map_lookup(coordinates, Some(UP_LEFT), map).is_some_and(|n| n.2 == plot)) [INFO] [stdout] | |_________________________________________________________________________________________^ help: try: `map_lookup(coordinates, Some(UP), map).is_none_or(|n| n.2 != plot) || map_lookup(coordinates, Some(UP_LEFT), map).is_some_and(|n| n.2 == plot)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/bin/12.rs:190:16 [INFO] [stdout] | [INFO] [stdout] 190 | && !map_lookup(coordinates, Some(UP_LEFT), map).is_some_and(|n| n.2 == plot)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map_lookup(coordinates, Some(UP_LEFT), map).is_none_or(|n| n.2 != plot)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/bin/12.rs:29:36 [INFO] [stdout] | [INFO] [stdout] 29 | fn tag_regions(map: &Map) -> (Vec<(usize, (usize, usize))>, Map>) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/12.rs:40:66 [INFO] [stdout] | [INFO] [stdout] 40 | let same_region = explore_region((r_idx, c_idx), &map); [INFO] [stdout] | ^^^^ help: change this to: `map` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/bin/12.rs:164:8 [INFO] [stdout] | [INFO] [stdout] 164 | if !map_lookup(coordinates, Some(UP), map).is_some_and(|n| n.2 == plot) [INFO] [stdout] | ________^ [INFO] [stdout] 165 | | && !(map_lookup(coordinates, Some(LEFT), map).is_some_and(|n| n.2 == plot) [INFO] [stdout] 166 | | && !map_lookup(coordinates, Some(LEFT_UP), map).is_some_and(|n| n.2 == plot)) [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] 164 - if !map_lookup(coordinates, Some(UP), map).is_some_and(|n| n.2 == plot) [INFO] [stdout] 165 - && !(map_lookup(coordinates, Some(LEFT), map).is_some_and(|n| n.2 == plot) [INFO] [stdout] 166 - && !map_lookup(coordinates, Some(LEFT_UP), map).is_some_and(|n| n.2 == plot)) [INFO] [stdout] 164 + if !(map_lookup(coordinates, Some(UP), map).is_some_and(|n| n.2 == plot) || map_lookup(coordinates, Some(LEFT), map).is_some_and(|n| n.2 == plot) && map_lookup(coordinates, Some(LEFT_UP), map).is_none_or(|n| n.2 != plot)) [INFO] [stdout] | [INFO] [stdout] 164 - if !map_lookup(coordinates, Some(UP), map).is_some_and(|n| n.2 == plot) [INFO] [stdout] 165 - && !(map_lookup(coordinates, Some(LEFT), map).is_some_and(|n| n.2 == plot) [INFO] [stdout] 166 - && !map_lookup(coordinates, Some(LEFT_UP), map).is_some_and(|n| n.2 == plot)) [INFO] [stdout] 164 + if (map_lookup(coordinates, Some(LEFT_UP), map).is_some_and(|n| n.2 == plot) || map_lookup(coordinates, Some(LEFT), map).is_none_or(|n| n.2 != plot)) && map_lookup(coordinates, Some(UP), map).is_none_or(|n| n.2 != plot) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/bin/12.rs:164:8 [INFO] [stdout] | [INFO] [stdout] 164 | if !map_lookup(coordinates, Some(UP), map).is_some_and(|n| n.2 == plot) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map_lookup(coordinates, Some(UP), map).is_none_or(|n| n.2 != plot)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/bin/12.rs:165:12 [INFO] [stdout] | [INFO] [stdout] 165 | && !(map_lookup(coordinates, Some(LEFT), map).is_some_and(|n| n.2 == plot) [INFO] [stdout] | ____________^ [INFO] [stdout] 166 | | && !map_lookup(coordinates, Some(LEFT_UP), map).is_some_and(|n| n.2 == plot)) [INFO] [stdout] | |_________________________________________________________________________________________^ help: try: `map_lookup(coordinates, Some(LEFT), map).is_none_or(|n| n.2 != plot) || map_lookup(coordinates, Some(LEFT_UP), map).is_some_and(|n| n.2 == plot)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/bin/12.rs:166:16 [INFO] [stdout] | [INFO] [stdout] 166 | && !map_lookup(coordinates, Some(LEFT_UP), map).is_some_and(|n| n.2 == plot)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map_lookup(coordinates, Some(LEFT_UP), map).is_none_or(|n| n.2 != plot)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/bin/12.rs:172:8 [INFO] [stdout] | [INFO] [stdout] 172 | if !map_lookup(coordinates, Some(RIGHT), map).is_some_and(|n| n.2 == plot) [INFO] [stdout] | ________^ [INFO] [stdout] 173 | | && !(map_lookup(coordinates, Some(UP), map).is_some_and(|n| n.2 == plot) [INFO] [stdout] 174 | | && !map_lookup(coordinates, Some(UP_RIGHT), map).is_some_and(|n| n.2 == plot)) [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] 172 - if !map_lookup(coordinates, Some(RIGHT), map).is_some_and(|n| n.2 == plot) [INFO] [stdout] 173 - && !(map_lookup(coordinates, Some(UP), map).is_some_and(|n| n.2 == plot) [INFO] [stdout] 174 - && !map_lookup(coordinates, Some(UP_RIGHT), map).is_some_and(|n| n.2 == plot)) [INFO] [stdout] 172 + if !(map_lookup(coordinates, Some(RIGHT), map).is_some_and(|n| n.2 == plot) || map_lookup(coordinates, Some(UP), map).is_some_and(|n| n.2 == plot) && map_lookup(coordinates, Some(UP_RIGHT), map).is_none_or(|n| n.2 != plot)) [INFO] [stdout] | [INFO] [stdout] 172 - if !map_lookup(coordinates, Some(RIGHT), map).is_some_and(|n| n.2 == plot) [INFO] [stdout] 173 - && !(map_lookup(coordinates, Some(UP), map).is_some_and(|n| n.2 == plot) [INFO] [stdout] 174 - && !map_lookup(coordinates, Some(UP_RIGHT), map).is_some_and(|n| n.2 == plot)) [INFO] [stdout] 172 + if (map_lookup(coordinates, Some(UP_RIGHT), map).is_some_and(|n| n.2 == plot) || map_lookup(coordinates, Some(UP), map).is_none_or(|n| n.2 != plot)) && map_lookup(coordinates, Some(RIGHT), map).is_none_or(|n| n.2 != plot) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/bin/12.rs:172:8 [INFO] [stdout] | [INFO] [stdout] 172 | if !map_lookup(coordinates, Some(RIGHT), map).is_some_and(|n| n.2 == plot) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map_lookup(coordinates, Some(RIGHT), map).is_none_or(|n| n.2 != plot)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/bin/12.rs:173:12 [INFO] [stdout] | [INFO] [stdout] 173 | && !(map_lookup(coordinates, Some(UP), map).is_some_and(|n| n.2 == plot) [INFO] [stdout] | ____________^ [INFO] [stdout] 174 | | && !map_lookup(coordinates, Some(UP_RIGHT), map).is_some_and(|n| n.2 == plot)) [INFO] [stdout] | |__________________________________________________________________________________________^ help: try: `map_lookup(coordinates, Some(UP), map).is_none_or(|n| n.2 != plot) || map_lookup(coordinates, Some(UP_RIGHT), map).is_some_and(|n| n.2 == plot)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/bin/12.rs:174:16 [INFO] [stdout] | [INFO] [stdout] 174 | && !map_lookup(coordinates, Some(UP_RIGHT), map).is_some_and(|n| n.2 == plot)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map_lookup(coordinates, Some(UP_RIGHT), map).is_none_or(|n| n.2 != plot)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/bin/12.rs:180:8 [INFO] [stdout] | [INFO] [stdout] 180 | if !map_lookup(coordinates, Some(DOWN), map).is_some_and(|n| n.2 == plot) [INFO] [stdout] | ________^ [INFO] [stdout] 181 | | && !(map_lookup(coordinates, Some(LEFT), map).is_some_and(|n| n.2 == plot) [INFO] [stdout] 182 | | && !map_lookup(coordinates, Some(LEFT_DOWN), map).is_some_and(|n| n.2 == plot)) [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] 180 - if !map_lookup(coordinates, Some(DOWN), map).is_some_and(|n| n.2 == plot) [INFO] [stdout] 181 - && !(map_lookup(coordinates, Some(LEFT), map).is_some_and(|n| n.2 == plot) [INFO] [stdout] 182 - && !map_lookup(coordinates, Some(LEFT_DOWN), map).is_some_and(|n| n.2 == plot)) [INFO] [stdout] 180 + if !(map_lookup(coordinates, Some(DOWN), map).is_some_and(|n| n.2 == plot) || map_lookup(coordinates, Some(LEFT), map).is_some_and(|n| n.2 == plot) && map_lookup(coordinates, Some(LEFT_DOWN), map).is_none_or(|n| n.2 != plot)) [INFO] [stdout] | [INFO] [stdout] 180 - if !map_lookup(coordinates, Some(DOWN), map).is_some_and(|n| n.2 == plot) [INFO] [stdout] 181 - && !(map_lookup(coordinates, Some(LEFT), map).is_some_and(|n| n.2 == plot) [INFO] [stdout] 182 - && !map_lookup(coordinates, Some(LEFT_DOWN), map).is_some_and(|n| n.2 == plot)) [INFO] [stdout] 180 + if (map_lookup(coordinates, Some(LEFT_DOWN), map).is_some_and(|n| n.2 == plot) || map_lookup(coordinates, Some(LEFT), map).is_none_or(|n| n.2 != plot)) && map_lookup(coordinates, Some(DOWN), map).is_none_or(|n| n.2 != plot) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/bin/12.rs:180:8 [INFO] [stdout] | [INFO] [stdout] 180 | if !map_lookup(coordinates, Some(DOWN), map).is_some_and(|n| n.2 == plot) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map_lookup(coordinates, Some(DOWN), map).is_none_or(|n| n.2 != plot)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/bin/12.rs:181:12 [INFO] [stdout] | [INFO] [stdout] 181 | && !(map_lookup(coordinates, Some(LEFT), map).is_some_and(|n| n.2 == plot) [INFO] [stdout] | ____________^ [INFO] [stdout] 182 | | && !map_lookup(coordinates, Some(LEFT_DOWN), map).is_some_and(|n| n.2 == plot)) [INFO] [stdout] | |___________________________________________________________________________________________^ help: try: `map_lookup(coordinates, Some(LEFT), map).is_none_or(|n| n.2 != plot) || map_lookup(coordinates, Some(LEFT_DOWN), map).is_some_and(|n| n.2 == plot)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/bin/12.rs:182:16 [INFO] [stdout] | [INFO] [stdout] 182 | && !map_lookup(coordinates, Some(LEFT_DOWN), map).is_some_and(|n| n.2 == plot)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map_lookup(coordinates, Some(LEFT_DOWN), map).is_none_or(|n| n.2 != plot)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/bin/12.rs:188:8 [INFO] [stdout] | [INFO] [stdout] 188 | if !map_lookup(coordinates, Some(LEFT), map).is_some_and(|n| n.2 == plot) [INFO] [stdout] | ________^ [INFO] [stdout] 189 | | && !(map_lookup(coordinates, Some(UP), map).is_some_and(|n| n.2 == plot) [INFO] [stdout] 190 | | && !map_lookup(coordinates, Some(UP_LEFT), map).is_some_and(|n| n.2 == plot)) [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] 188 - if !map_lookup(coordinates, Some(LEFT), map).is_some_and(|n| n.2 == plot) [INFO] [stdout] 189 - && !(map_lookup(coordinates, Some(UP), map).is_some_and(|n| n.2 == plot) [INFO] [stdout] 190 - && !map_lookup(coordinates, Some(UP_LEFT), map).is_some_and(|n| n.2 == plot)) [INFO] [stdout] 188 + if !(map_lookup(coordinates, Some(LEFT), map).is_some_and(|n| n.2 == plot) || map_lookup(coordinates, Some(UP), map).is_some_and(|n| n.2 == plot) && map_lookup(coordinates, Some(UP_LEFT), map).is_none_or(|n| n.2 != plot)) [INFO] [stdout] | [INFO] [stdout] 188 - if !map_lookup(coordinates, Some(LEFT), map).is_some_and(|n| n.2 == plot) [INFO] [stdout] 189 - && !(map_lookup(coordinates, Some(UP), map).is_some_and(|n| n.2 == plot) [INFO] [stdout] 190 - && !map_lookup(coordinates, Some(UP_LEFT), map).is_some_and(|n| n.2 == plot)) [INFO] [stdout] 188 + if (map_lookup(coordinates, Some(UP_LEFT), map).is_some_and(|n| n.2 == plot) || map_lookup(coordinates, Some(UP), map).is_none_or(|n| n.2 != plot)) && map_lookup(coordinates, Some(LEFT), map).is_none_or(|n| n.2 != plot) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/bin/12.rs:188:8 [INFO] [stdout] | [INFO] [stdout] 188 | if !map_lookup(coordinates, Some(LEFT), map).is_some_and(|n| n.2 == plot) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map_lookup(coordinates, Some(LEFT), map).is_none_or(|n| n.2 != plot)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/bin/12.rs:189:12 [INFO] [stdout] | [INFO] [stdout] 189 | && !(map_lookup(coordinates, Some(UP), map).is_some_and(|n| n.2 == plot) [INFO] [stdout] | ____________^ [INFO] [stdout] 190 | | && !map_lookup(coordinates, Some(UP_LEFT), map).is_some_and(|n| n.2 == plot)) [INFO] [stdout] | |_________________________________________________________________________________________^ help: try: `map_lookup(coordinates, Some(UP), map).is_none_or(|n| n.2 != plot) || map_lookup(coordinates, Some(UP_LEFT), map).is_some_and(|n| n.2 == plot)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/bin/12.rs:190:16 [INFO] [stdout] | [INFO] [stdout] 190 | && !map_lookup(coordinates, Some(UP_LEFT), map).is_some_and(|n| n.2 == plot)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map_lookup(coordinates, Some(UP_LEFT), map).is_none_or(|n| n.2 != plot)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/bin/11.rs:32:15 [INFO] [stdout] | [INFO] [stdout] 32 | } else if number.to_string().len() % 2 == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `number.to_string().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] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 6.20s [INFO] running `Command { std: "docker" "inspect" "ddc15a2143eb6541b5350a1579c9fd2e3f089f6bd9ac268a6bffdaa27f66f939", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "ddc15a2143eb6541b5350a1579c9fd2e3f089f6bd9ac268a6bffdaa27f66f939", kill_on_drop: false }` [INFO] [stdout] ddc15a2143eb6541b5350a1579c9fd2e3f089f6bd9ac268a6bffdaa27f66f939