[INFO] cloning repository https://github.com/runcom/adventofcode2021-rs [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/runcom/adventofcode2021-rs" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fruncom%2Fadventofcode2021-rs", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fruncom%2Fadventofcode2021-rs'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 33c0e27d61d7696050312432ff36b5ceb67b017d [INFO] linting runcom/adventofcode2021-rs against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fruncom%2Fadventofcode2021-rs" "/workspace/builds/worker-4-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-4-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/runcom/adventofcode2021-rs [INFO] finished tweaking git repo https://github.com/runcom/adventofcode2021-rs [INFO] tweaked toml for git repo https://github.com/runcom/adventofcode2021-rs written to /workspace/builds/worker-4-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/runcom/adventofcode2021-rs 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/runcom/adventofcode2021-rs 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] warning: virtual workspace defaulting to `resolver = "1"` despite one or more workspace members being on edition 2021 which implies `resolver = "2"` [INFO] [stderr] | [INFO] [stderr] = note: to keep the current resolver, specify `workspace.resolver = "1"` in the workspace root's manifest [INFO] [stderr] = note: to use the edition 2021 resolver, specify `workspace.resolver = "2"` in the workspace root's manifest [INFO] [stderr] = note: for more details see https://doc.rust-lang.org/cargo/reference/resolver.html#resolver-versions [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] b47dd474ce8ce4fb2f4b1db817caa66a07502749a609f3a7e0ed176c3791b9f6 [INFO] running `Command { std: "docker" "start" "-a" "b47dd474ce8ce4fb2f4b1db817caa66a07502749a609f3a7e0ed176c3791b9f6", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "b47dd474ce8ce4fb2f4b1db817caa66a07502749a609f3a7e0ed176c3791b9f6", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "b47dd474ce8ce4fb2f4b1db817caa66a07502749a609f3a7e0ed176c3791b9f6", kill_on_drop: false }` [INFO] [stdout] b47dd474ce8ce4fb2f4b1db817caa66a07502749a609f3a7e0ed176c3791b9f6 [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] 255999310beb6d14dc41ad85c2f80088d071608be9735f910d6c39b2f6e84fc3 [INFO] running `Command { std: "docker" "start" "-a" "255999310beb6d14dc41ad85c2f80088d071608be9735f910d6c39b2f6e84fc3", kill_on_drop: false }` [INFO] [stderr] warning: virtual workspace defaulting to `resolver = "1"` despite one or more workspace members being on edition 2021 which implies `resolver = "2"` [INFO] [stderr] | [INFO] [stderr] = note: to keep the current resolver, specify `workspace.resolver = "1"` in the workspace root's manifest [INFO] [stderr] = note: to use the edition 2021 resolver, specify `workspace.resolver = "2"` in the workspace root's manifest [INFO] [stderr] = note: for more details see https://doc.rust-lang.org/cargo/reference/resolver.html#resolver-versions [INFO] [stderr] Checking day3 v0.1.0 (/opt/rustwide/workdir/day3) [INFO] [stderr] Checking day5 v0.1.0 (/opt/rustwide/workdir/day5) [INFO] [stderr] Checking day1 v0.1.0 (/opt/rustwide/workdir/day1) [INFO] [stderr] Checking day4 v0.1.0 (/opt/rustwide/workdir/day4) [INFO] [stderr] Checking day2 v0.1.0 (/opt/rustwide/workdir/day2) [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> day4/src/main.rs:17:21 [INFO] [stdout] | [INFO] [stdout] 17 | let mut boards: Vec<(Vec>, bool)> = Vec::new(); [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: comparison to empty slice [INFO] [stdout] --> day4/src/main.rs:20:12 [INFO] [stdout] | [INFO] [stdout] 20 | if card != "" { [INFO] [stdout] | ^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!card.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] = note: `#[warn(clippy::comparison_to_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> day4/src/main.rs:28:16 [INFO] [stdout] | [INFO] [stdout] 28 | if board.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `board.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: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> day4/src/main.rs:75:20 [INFO] [stdout] | [INFO] [stdout] 75 | let r = hm.into_iter().filter(|(_, v)| *v == true).count(); [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] = note: `#[warn(clippy::into_iter_on_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> day4/src/main.rs:75:48 [INFO] [stdout] | [INFO] [stdout] 75 | let r = hm.into_iter().filter(|(_, v)| *v == true).count(); [INFO] [stdout] | ^^^^^^^^^^ help: try: `*v` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> day4/src/main.rs:82:18 [INFO] [stdout] | [INFO] [stdout] 82 | .into_iter() [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against false can be replaced by a negation [INFO] [stdout] --> day4/src/main.rs:83:34 [INFO] [stdout] | [INFO] [stdout] 83 | .filter(|(_, v)| *v == false) [INFO] [stdout] | ^^^^^^^^^^^ help: try: `!*v` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> day4/src/main.rs:86:13 [INFO] [stdout] | [INFO] [stdout] 86 | sum = sum + s; [INFO] [stdout] | ^^^^^^^^^^^^^ help: replace it with: `sum += s` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> day4/src/main.rs:94:19 [INFO] [stdout] | [INFO] [stdout] 94 | let r = check(&hmv, n); [INFO] [stdout] | ^^^^ help: change this to: `hmv` [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: the loop variable `j` is used to index `t` [INFO] [stdout] --> day4/src/main.rs:103:14 [INFO] [stdout] | [INFO] [stdout] 103 | for j in 0..hmv.len() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 103 - for j in 0..hmv.len() { [INFO] [stdout] 103 + for (j, ) in t.iter_mut().enumerate().take(hmv.len()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> day4/src/main.rs:105:58 [INFO] [stdout] | [INFO] [stdout] 105 | let (k, v) = hmv.into_iter().nth(i).unwrap().into_iter().nth(j).unwrap(); [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> day4/src/main.rs:105:30 [INFO] [stdout] | [INFO] [stdout] 105 | let (k, v) = hmv.into_iter().nth(i).unwrap().into_iter().nth(j).unwrap(); [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around closure body [INFO] [stdout] --> day3/src/main.rs:29:64 [INFO] [stdout] | [INFO] [stdout] 29 | let epsilon_rate_v: Vec = gamma_rate_v.iter().map(|v| (1 - v)).collect(); [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 29 - let epsilon_rate_v: Vec = gamma_rate_v.iter().map(|v| (1 - v)).collect(); [INFO] [stdout] 29 + let epsilon_rate_v: Vec = gamma_rate_v.iter().map(|v| 1 - v ).collect(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around closure body [INFO] [stdout] --> day3/src/main.rs:29:64 [INFO] [stdout] | [INFO] [stdout] 29 | let epsilon_rate_v: Vec = gamma_rate_v.iter().map(|v| (1 - v)).collect(); [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 29 - let epsilon_rate_v: Vec = gamma_rate_v.iter().map(|v| (1 - v)).collect(); [INFO] [stdout] 29 + let epsilon_rate_v: Vec = gamma_rate_v.iter().map(|v| 1 - v ).collect(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> day2/src/main.rs:16:26 [INFO] [stdout] | [INFO] [stdout] 16 | "forward" => h = h + x, [INFO] [stdout] | ^^^^^^^^^ help: replace it with: `h += x` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> day2/src/main.rs:17:23 [INFO] [stdout] | [INFO] [stdout] 17 | "down" => d = d + x, [INFO] [stdout] | ^^^^^^^^^ help: replace it with: `d += x` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> day2/src/main.rs:18:21 [INFO] [stdout] | [INFO] [stdout] 18 | "up" => d = d - x, [INFO] [stdout] | ^^^^^^^^^ help: replace it with: `d -= x` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> day3/src/main.rs:22:12 [INFO] [stdout] | [INFO] [stdout] 22 | if tmp.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `tmp.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: length comparison to zero [INFO] [stdout] --> day3/src/main.rs:33:12 [INFO] [stdout] | [INFO] [stdout] 33 | if tmp.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `tmp.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> day3/src/main.rs:22:12 [INFO] [stdout] | [INFO] [stdout] 22 | if tmp.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `tmp.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: length comparison to zero [INFO] [stdout] --> day3/src/main.rs:33:12 [INFO] [stdout] | [INFO] [stdout] 33 | if tmp.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `tmp.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] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> day5/src/main.rs:29:26 [INFO] [stdout] | [INFO] [stdout] 29 | let equal_x_entries: Vec<&((i32, i32), (i32, i32))> = [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: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> day5/src/main.rs:45:13 [INFO] [stdout] | [INFO] [stdout] 45 | / if coordinates.contains_key(&c) { [INFO] [stdout] 46 | | let count = coordinates.entry(c).or_default(); [INFO] [stdout] 47 | | if *count == 2 { [INFO] [stdout] 48 | | continue; [INFO] [stdout] ... | [INFO] [stdout] 53 | | coordinates.insert(c, 1); [INFO] [stdout] 54 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry [INFO] [stdout] = note: `#[warn(clippy::map_entry)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 45 ~ if let std::collections::hash_map::Entry::Vacant(e) = coordinates.entry(c) { [INFO] [stdout] 46 + e.insert(1); [INFO] [stdout] 47 + } else { [INFO] [stdout] 48 + let count = coordinates.entry(c).or_default(); [INFO] [stdout] 49 + if *count == 2 { [INFO] [stdout] 50 + continue; [INFO] [stdout] 51 + } [INFO] [stdout] 52 + *count += 1; [INFO] [stdout] 53 + overlapping_coordinates += 1; [INFO] [stdout] 54 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> day5/src/main.rs:57:26 [INFO] [stdout] | [INFO] [stdout] 57 | let equal_y_entries: Vec<&((i32, i32), (i32, i32))> = [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] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> day2/src/main.rs:16:26 [INFO] [stdout] | [INFO] [stdout] 16 | "forward" => h = h + x, [INFO] [stdout] | ^^^^^^^^^ help: replace it with: `h += x` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> day2/src/main.rs:17:23 [INFO] [stdout] | [INFO] [stdout] 17 | "down" => d = d + x, [INFO] [stdout] | ^^^^^^^^^ help: replace it with: `d += x` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> day5/src/main.rs:73:13 [INFO] [stdout] | [INFO] [stdout] 73 | / if coordinates.contains_key(&c) { [INFO] [stdout] 74 | | let count = coordinates.entry(c).or_default(); [INFO] [stdout] 75 | | if *count == 2 { [INFO] [stdout] 76 | | continue; [INFO] [stdout] ... | [INFO] [stdout] 81 | | coordinates.insert(c, 1); [INFO] [stdout] 82 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 73 ~ if let std::collections::hash_map::Entry::Vacant(e) = coordinates.entry(c) { [INFO] [stdout] 74 + e.insert(1); [INFO] [stdout] 75 + } else { [INFO] [stdout] 76 + let count = coordinates.entry(c).or_default(); [INFO] [stdout] 77 + if *count == 2 { [INFO] [stdout] 78 + continue; [INFO] [stdout] 79 + } [INFO] [stdout] 80 + *count += 1; [INFO] [stdout] 81 + overlapping_coordinates += 1; [INFO] [stdout] 82 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> day2/src/main.rs:18:21 [INFO] [stdout] | [INFO] [stdout] 18 | "up" => d = d - x, [INFO] [stdout] | ^^^^^^^^^ help: replace it with: `d -= x` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> day5/src/main.rs:86:20 [INFO] [stdout] | [INFO] [stdout] 86 | let diagonals: Vec<&((i32, i32), (i32, i32))> = entries [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] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> day5/src/main.rs:88:21 [INFO] [stdout] | [INFO] [stdout] 88 | .filter(|e| !(e.0 .1 == e.1 .1) && !(e.0 .0 == e.1 .0)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `(e.0 .1 != e.1 .1)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> day5/src/main.rs:88:44 [INFO] [stdout] | [INFO] [stdout] 88 | .filter(|e| !(e.0 .1 == e.1 .1) && !(e.0 .0 == e.1 .0)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `(e.0 .0 != e.1 .0)` [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] --> day5/src/main.rs:29:26 [INFO] [stdout] | [INFO] [stdout] 29 | let equal_x_entries: Vec<&((i32, i32), (i32, i32))> = [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: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> day5/src/main.rs:93:13 [INFO] [stdout] | [INFO] [stdout] 93 | / if coordinates.contains_key(&c) { [INFO] [stdout] 94 | | let count = coordinates.entry(c).or_default(); [INFO] [stdout] 95 | | if *count != 2 { [INFO] [stdout] 96 | | *count += 1; [INFO] [stdout] ... | [INFO] [stdout] 100 | | coordinates.insert(c, 1); [INFO] [stdout] 101 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 93 ~ if let std::collections::hash_map::Entry::Vacant(e) = coordinates.entry(c) { [INFO] [stdout] 94 + e.insert(1); [INFO] [stdout] 95 + } else { [INFO] [stdout] 96 + let count = coordinates.entry(c).or_default(); [INFO] [stdout] 97 + if *count != 2 { [INFO] [stdout] 98 + *count += 1; [INFO] [stdout] 99 + overlapping_coordinates += 1; [INFO] [stdout] 100 + } [INFO] [stdout] 101 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> day5/src/main.rs:106:17 [INFO] [stdout] | [INFO] [stdout] 106 | / if coordinates.contains_key(&c) { [INFO] [stdout] 107 | | let count = coordinates.entry(c).or_default(); [INFO] [stdout] 108 | | if *count == 2 { [INFO] [stdout] 109 | | continue; [INFO] [stdout] ... | [INFO] [stdout] 114 | | coordinates.insert(c, 1); [INFO] [stdout] 115 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 106 ~ if let std::collections::hash_map::Entry::Vacant(e) = coordinates.entry(c) { [INFO] [stdout] 107 + e.insert(1); [INFO] [stdout] 108 + } else { [INFO] [stdout] 109 + let count = coordinates.entry(c).or_default(); [INFO] [stdout] 110 + if *count == 2 { [INFO] [stdout] 111 + continue; [INFO] [stdout] 112 + } [INFO] [stdout] 113 + *count += 1; [INFO] [stdout] 114 + overlapping_coordinates += 1; [INFO] [stdout] 115 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> day5/src/main.rs:120:13 [INFO] [stdout] | [INFO] [stdout] 120 | / if coordinates.contains_key(&c) { [INFO] [stdout] 121 | | let count = coordinates.entry(c).or_default(); [INFO] [stdout] 122 | | if *count != 2 { [INFO] [stdout] 123 | | *count += 1; [INFO] [stdout] ... | [INFO] [stdout] 127 | | coordinates.insert(c, 1); [INFO] [stdout] 128 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 120 ~ if let std::collections::hash_map::Entry::Vacant(e) = coordinates.entry(c) { [INFO] [stdout] 121 + e.insert(1); [INFO] [stdout] 122 + } else { [INFO] [stdout] 123 + let count = coordinates.entry(c).or_default(); [INFO] [stdout] 124 + if *count != 2 { [INFO] [stdout] 125 + *count += 1; [INFO] [stdout] 126 + overlapping_coordinates += 1; [INFO] [stdout] 127 + } [INFO] [stdout] 128 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> day5/src/main.rs:133:17 [INFO] [stdout] | [INFO] [stdout] 133 | / if coordinates.contains_key(&c) { [INFO] [stdout] 134 | | let count = coordinates.entry(c).or_default(); [INFO] [stdout] 135 | | if *count == 2 { [INFO] [stdout] 136 | | continue; [INFO] [stdout] ... | [INFO] [stdout] 141 | | coordinates.insert(c, 1); [INFO] [stdout] 142 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 133 ~ if let std::collections::hash_map::Entry::Vacant(e) = coordinates.entry(c) { [INFO] [stdout] 134 + e.insert(1); [INFO] [stdout] 135 + } else { [INFO] [stdout] 136 + let count = coordinates.entry(c).or_default(); [INFO] [stdout] 137 + if *count == 2 { [INFO] [stdout] 138 + continue; [INFO] [stdout] 139 + } [INFO] [stdout] 140 + *count += 1; [INFO] [stdout] 141 + overlapping_coordinates += 1; [INFO] [stdout] 142 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> day4/src/main.rs:17:21 [INFO] [stdout] | [INFO] [stdout] 17 | let mut boards: Vec<(Vec>, bool)> = Vec::new(); [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: comparison to empty slice [INFO] [stdout] --> day4/src/main.rs:20:12 [INFO] [stdout] | [INFO] [stdout] 20 | if card != "" { [INFO] [stdout] | ^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!card.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] = note: `#[warn(clippy::comparison_to_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> day4/src/main.rs:28:16 [INFO] [stdout] | [INFO] [stdout] 28 | if board.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `board.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: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> day5/src/main.rs:147:13 [INFO] [stdout] | [INFO] [stdout] 147 | / if coordinates.contains_key(&c) { [INFO] [stdout] 148 | | let count = coordinates.entry(c).or_default(); [INFO] [stdout] 149 | | if *count != 2 { [INFO] [stdout] 150 | | *count += 1; [INFO] [stdout] ... | [INFO] [stdout] 154 | | coordinates.insert(c, 1); [INFO] [stdout] 155 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 147 ~ if let std::collections::hash_map::Entry::Vacant(e) = coordinates.entry(c) { [INFO] [stdout] 148 + e.insert(1); [INFO] [stdout] 149 + } else { [INFO] [stdout] 150 + let count = coordinates.entry(c).or_default(); [INFO] [stdout] 151 + if *count != 2 { [INFO] [stdout] 152 + *count += 1; [INFO] [stdout] 153 + overlapping_coordinates += 1; [INFO] [stdout] 154 + } [INFO] [stdout] 155 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> day5/src/main.rs:161:17 [INFO] [stdout] | [INFO] [stdout] 161 | / if coordinates.contains_key(&c) { [INFO] [stdout] 162 | | let count = coordinates.entry(c).or_default(); [INFO] [stdout] 163 | | if *count == 2 { [INFO] [stdout] 164 | | continue; [INFO] [stdout] ... | [INFO] [stdout] 169 | | coordinates.insert(c, 1); [INFO] [stdout] 170 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 161 ~ if let std::collections::hash_map::Entry::Vacant(e) = coordinates.entry(c) { [INFO] [stdout] 162 + e.insert(1); [INFO] [stdout] 163 + } else { [INFO] [stdout] 164 + let count = coordinates.entry(c).or_default(); [INFO] [stdout] 165 + if *count == 2 { [INFO] [stdout] 166 + continue; [INFO] [stdout] 167 + } [INFO] [stdout] 168 + *count += 1; [INFO] [stdout] 169 + overlapping_coordinates += 1; [INFO] [stdout] 170 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> day5/src/main.rs:175:13 [INFO] [stdout] | [INFO] [stdout] 175 | / if coordinates.contains_key(&c) { [INFO] [stdout] 176 | | let count = coordinates.entry(c).or_default(); [INFO] [stdout] 177 | | if *count != 2 { [INFO] [stdout] 178 | | *count += 1; [INFO] [stdout] ... | [INFO] [stdout] 182 | | coordinates.insert(c, 1); [INFO] [stdout] 183 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 175 ~ if let std::collections::hash_map::Entry::Vacant(e) = coordinates.entry(c) { [INFO] [stdout] 176 + e.insert(1); [INFO] [stdout] 177 + } else { [INFO] [stdout] 178 + let count = coordinates.entry(c).or_default(); [INFO] [stdout] 179 + if *count != 2 { [INFO] [stdout] 180 + *count += 1; [INFO] [stdout] 181 + overlapping_coordinates += 1; [INFO] [stdout] 182 + } [INFO] [stdout] 183 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> day5/src/main.rs:189:17 [INFO] [stdout] | [INFO] [stdout] 189 | / if coordinates.contains_key(&c) { [INFO] [stdout] 190 | | let count = coordinates.entry(c).or_default(); [INFO] [stdout] 191 | | if *count == 2 { [INFO] [stdout] 192 | | continue; [INFO] [stdout] ... | [INFO] [stdout] 197 | | coordinates.insert(c, 1); [INFO] [stdout] 198 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 189 ~ if let std::collections::hash_map::Entry::Vacant(e) = coordinates.entry(c) { [INFO] [stdout] 190 + e.insert(1); [INFO] [stdout] 191 + } else { [INFO] [stdout] 192 + let count = coordinates.entry(c).or_default(); [INFO] [stdout] 193 + if *count == 2 { [INFO] [stdout] 194 + continue; [INFO] [stdout] 195 + } [INFO] [stdout] 196 + *count += 1; [INFO] [stdout] 197 + overlapping_coordinates += 1; [INFO] [stdout] 198 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> day4/src/main.rs:75:20 [INFO] [stdout] | [INFO] [stdout] 75 | let r = hm.into_iter().filter(|(_, v)| *v == true).count(); [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] = note: `#[warn(clippy::into_iter_on_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> day4/src/main.rs:75:48 [INFO] [stdout] | [INFO] [stdout] 75 | let r = hm.into_iter().filter(|(_, v)| *v == true).count(); [INFO] [stdout] | ^^^^^^^^^^ help: try: `*v` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> day4/src/main.rs:82:18 [INFO] [stdout] | [INFO] [stdout] 82 | .into_iter() [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against false can be replaced by a negation [INFO] [stdout] --> day4/src/main.rs:83:34 [INFO] [stdout] | [INFO] [stdout] 83 | .filter(|(_, v)| *v == false) [INFO] [stdout] | ^^^^^^^^^^^ help: try: `!*v` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> day4/src/main.rs:86:13 [INFO] [stdout] | [INFO] [stdout] 86 | sum = sum + s; [INFO] [stdout] | ^^^^^^^^^^^^^ help: replace it with: `sum += s` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> day4/src/main.rs:94:19 [INFO] [stdout] | [INFO] [stdout] 94 | let r = check(&hmv, n); [INFO] [stdout] | ^^^^ help: change this to: `hmv` [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: the loop variable `j` is used to index `t` [INFO] [stdout] --> day4/src/main.rs:103:14 [INFO] [stdout] | [INFO] [stdout] 103 | for j in 0..hmv.len() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 103 - for j in 0..hmv.len() { [INFO] [stdout] 103 + for (j, ) in t.iter_mut().enumerate().take(hmv.len()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> day4/src/main.rs:105:58 [INFO] [stdout] | [INFO] [stdout] 105 | let (k, v) = hmv.into_iter().nth(i).unwrap().into_iter().nth(j).unwrap(); [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> day5/src/main.rs:45:13 [INFO] [stdout] | [INFO] [stdout] 45 | / if coordinates.contains_key(&c) { [INFO] [stdout] 46 | | let count = coordinates.entry(c).or_default(); [INFO] [stdout] 47 | | if *count == 2 { [INFO] [stdout] 48 | | continue; [INFO] [stdout] ... | [INFO] [stdout] 53 | | coordinates.insert(c, 1); [INFO] [stdout] 54 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry [INFO] [stdout] = note: `#[warn(clippy::map_entry)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 45 ~ if let std::collections::hash_map::Entry::Vacant(e) = coordinates.entry(c) { [INFO] [stdout] 46 + e.insert(1); [INFO] [stdout] 47 + } else { [INFO] [stdout] 48 + let count = coordinates.entry(c).or_default(); [INFO] [stdout] 49 + if *count == 2 { [INFO] [stdout] 50 + continue; [INFO] [stdout] 51 + } [INFO] [stdout] 52 + *count += 1; [INFO] [stdout] 53 + overlapping_coordinates += 1; [INFO] [stdout] 54 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> day4/src/main.rs:105:30 [INFO] [stdout] | [INFO] [stdout] 105 | let (k, v) = hmv.into_iter().nth(i).unwrap().into_iter().nth(j).unwrap(); [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> day5/src/main.rs:57:26 [INFO] [stdout] | [INFO] [stdout] 57 | let equal_y_entries: Vec<&((i32, i32), (i32, i32))> = [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] [INFO] [stdout] [INFO] [stdout] warning: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> day5/src/main.rs:73:13 [INFO] [stdout] | [INFO] [stdout] 73 | / if coordinates.contains_key(&c) { [INFO] [stdout] 74 | | let count = coordinates.entry(c).or_default(); [INFO] [stdout] 75 | | if *count == 2 { [INFO] [stdout] 76 | | continue; [INFO] [stdout] ... | [INFO] [stdout] 81 | | coordinates.insert(c, 1); [INFO] [stdout] 82 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 73 ~ if let std::collections::hash_map::Entry::Vacant(e) = coordinates.entry(c) { [INFO] [stdout] 74 + e.insert(1); [INFO] [stdout] 75 + } else { [INFO] [stdout] 76 + let count = coordinates.entry(c).or_default(); [INFO] [stdout] 77 + if *count == 2 { [INFO] [stdout] 78 + continue; [INFO] [stdout] 79 + } [INFO] [stdout] 80 + *count += 1; [INFO] [stdout] 81 + overlapping_coordinates += 1; [INFO] [stdout] 82 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> day5/src/main.rs:86:20 [INFO] [stdout] | [INFO] [stdout] 86 | let diagonals: Vec<&((i32, i32), (i32, i32))> = entries [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] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> day5/src/main.rs:88:21 [INFO] [stdout] | [INFO] [stdout] 88 | .filter(|e| !(e.0 .1 == e.1 .1) && !(e.0 .0 == e.1 .0)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `(e.0 .1 != e.1 .1)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> day5/src/main.rs:88:44 [INFO] [stdout] | [INFO] [stdout] 88 | .filter(|e| !(e.0 .1 == e.1 .1) && !(e.0 .0 == e.1 .0)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `(e.0 .0 != e.1 .0)` [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: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> day5/src/main.rs:93:13 [INFO] [stdout] | [INFO] [stdout] 93 | / if coordinates.contains_key(&c) { [INFO] [stdout] 94 | | let count = coordinates.entry(c).or_default(); [INFO] [stdout] 95 | | if *count != 2 { [INFO] [stdout] 96 | | *count += 1; [INFO] [stdout] ... | [INFO] [stdout] 100 | | coordinates.insert(c, 1); [INFO] [stdout] 101 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 93 ~ if let std::collections::hash_map::Entry::Vacant(e) = coordinates.entry(c) { [INFO] [stdout] 94 + e.insert(1); [INFO] [stdout] 95 + } else { [INFO] [stdout] 96 + let count = coordinates.entry(c).or_default(); [INFO] [stdout] 97 + if *count != 2 { [INFO] [stdout] 98 + *count += 1; [INFO] [stdout] 99 + overlapping_coordinates += 1; [INFO] [stdout] 100 + } [INFO] [stdout] 101 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> day5/src/main.rs:106:17 [INFO] [stdout] | [INFO] [stdout] 106 | / if coordinates.contains_key(&c) { [INFO] [stdout] 107 | | let count = coordinates.entry(c).or_default(); [INFO] [stdout] 108 | | if *count == 2 { [INFO] [stdout] 109 | | continue; [INFO] [stdout] ... | [INFO] [stdout] 114 | | coordinates.insert(c, 1); [INFO] [stdout] 115 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 106 ~ if let std::collections::hash_map::Entry::Vacant(e) = coordinates.entry(c) { [INFO] [stdout] 107 + e.insert(1); [INFO] [stdout] 108 + } else { [INFO] [stdout] 109 + let count = coordinates.entry(c).or_default(); [INFO] [stdout] 110 + if *count == 2 { [INFO] [stdout] 111 + continue; [INFO] [stdout] 112 + } [INFO] [stdout] 113 + *count += 1; [INFO] [stdout] 114 + overlapping_coordinates += 1; [INFO] [stdout] 115 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> day5/src/main.rs:120:13 [INFO] [stdout] | [INFO] [stdout] 120 | / if coordinates.contains_key(&c) { [INFO] [stdout] 121 | | let count = coordinates.entry(c).or_default(); [INFO] [stdout] 122 | | if *count != 2 { [INFO] [stdout] 123 | | *count += 1; [INFO] [stdout] ... | [INFO] [stdout] 127 | | coordinates.insert(c, 1); [INFO] [stdout] 128 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 120 ~ if let std::collections::hash_map::Entry::Vacant(e) = coordinates.entry(c) { [INFO] [stdout] 121 + e.insert(1); [INFO] [stdout] 122 + } else { [INFO] [stdout] 123 + let count = coordinates.entry(c).or_default(); [INFO] [stdout] 124 + if *count != 2 { [INFO] [stdout] 125 + *count += 1; [INFO] [stdout] 126 + overlapping_coordinates += 1; [INFO] [stdout] 127 + } [INFO] [stdout] 128 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> day5/src/main.rs:133:17 [INFO] [stdout] | [INFO] [stdout] 133 | / if coordinates.contains_key(&c) { [INFO] [stdout] 134 | | let count = coordinates.entry(c).or_default(); [INFO] [stdout] 135 | | if *count == 2 { [INFO] [stdout] 136 | | continue; [INFO] [stdout] ... | [INFO] [stdout] 141 | | coordinates.insert(c, 1); [INFO] [stdout] 142 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 133 ~ if let std::collections::hash_map::Entry::Vacant(e) = coordinates.entry(c) { [INFO] [stdout] 134 + e.insert(1); [INFO] [stdout] 135 + } else { [INFO] [stdout] 136 + let count = coordinates.entry(c).or_default(); [INFO] [stdout] 137 + if *count == 2 { [INFO] [stdout] 138 + continue; [INFO] [stdout] 139 + } [INFO] [stdout] 140 + *count += 1; [INFO] [stdout] 141 + overlapping_coordinates += 1; [INFO] [stdout] 142 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> day5/src/main.rs:147:13 [INFO] [stdout] | [INFO] [stdout] 147 | / if coordinates.contains_key(&c) { [INFO] [stdout] 148 | | let count = coordinates.entry(c).or_default(); [INFO] [stdout] 149 | | if *count != 2 { [INFO] [stdout] 150 | | *count += 1; [INFO] [stdout] ... | [INFO] [stdout] 154 | | coordinates.insert(c, 1); [INFO] [stdout] 155 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 147 ~ if let std::collections::hash_map::Entry::Vacant(e) = coordinates.entry(c) { [INFO] [stdout] 148 + e.insert(1); [INFO] [stdout] 149 + } else { [INFO] [stdout] 150 + let count = coordinates.entry(c).or_default(); [INFO] [stdout] 151 + if *count != 2 { [INFO] [stdout] 152 + *count += 1; [INFO] [stdout] 153 + overlapping_coordinates += 1; [INFO] [stdout] 154 + } [INFO] [stdout] 155 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> day5/src/main.rs:161:17 [INFO] [stdout] | [INFO] [stdout] 161 | / if coordinates.contains_key(&c) { [INFO] [stdout] 162 | | let count = coordinates.entry(c).or_default(); [INFO] [stdout] 163 | | if *count == 2 { [INFO] [stdout] 164 | | continue; [INFO] [stdout] ... | [INFO] [stdout] 169 | | coordinates.insert(c, 1); [INFO] [stdout] 170 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 161 ~ if let std::collections::hash_map::Entry::Vacant(e) = coordinates.entry(c) { [INFO] [stdout] 162 + e.insert(1); [INFO] [stdout] 163 + } else { [INFO] [stdout] 164 + let count = coordinates.entry(c).or_default(); [INFO] [stdout] 165 + if *count == 2 { [INFO] [stdout] 166 + continue; [INFO] [stdout] 167 + } [INFO] [stdout] 168 + *count += 1; [INFO] [stdout] 169 + overlapping_coordinates += 1; [INFO] [stdout] 170 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> day5/src/main.rs:175:13 [INFO] [stdout] | [INFO] [stdout] 175 | / if coordinates.contains_key(&c) { [INFO] [stdout] 176 | | let count = coordinates.entry(c).or_default(); [INFO] [stdout] 177 | | if *count != 2 { [INFO] [stdout] 178 | | *count += 1; [INFO] [stdout] ... | [INFO] [stdout] 182 | | coordinates.insert(c, 1); [INFO] [stdout] 183 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 175 ~ if let std::collections::hash_map::Entry::Vacant(e) = coordinates.entry(c) { [INFO] [stdout] 176 + e.insert(1); [INFO] [stdout] 177 + } else { [INFO] [stdout] 178 + let count = coordinates.entry(c).or_default(); [INFO] [stdout] 179 + if *count != 2 { [INFO] [stdout] 180 + *count += 1; [INFO] [stdout] 181 + overlapping_coordinates += 1; [INFO] [stdout] 182 + } [INFO] [stdout] 183 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> day5/src/main.rs:189:17 [INFO] [stdout] | [INFO] [stdout] 189 | / if coordinates.contains_key(&c) { [INFO] [stdout] 190 | | let count = coordinates.entry(c).or_default(); [INFO] [stdout] 191 | | if *count == 2 { [INFO] [stdout] 192 | | continue; [INFO] [stdout] ... | [INFO] [stdout] 197 | | coordinates.insert(c, 1); [INFO] [stdout] 198 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 189 ~ if let std::collections::hash_map::Entry::Vacant(e) = coordinates.entry(c) { [INFO] [stdout] 190 + e.insert(1); [INFO] [stdout] 191 + } else { [INFO] [stdout] 192 + let count = coordinates.entry(c).or_default(); [INFO] [stdout] 193 + if *count == 2 { [INFO] [stdout] 194 + continue; [INFO] [stdout] 195 + } [INFO] [stdout] 196 + *count += 1; [INFO] [stdout] 197 + overlapping_coordinates += 1; [INFO] [stdout] 198 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.59s [INFO] running `Command { std: "docker" "inspect" "255999310beb6d14dc41ad85c2f80088d071608be9735f910d6c39b2f6e84fc3", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "255999310beb6d14dc41ad85c2f80088d071608be9735f910d6c39b2f6e84fc3", kill_on_drop: false }` [INFO] [stdout] 255999310beb6d14dc41ad85c2f80088d071608be9735f910d6c39b2f6e84fc3