[INFO] cloning repository https://github.com/nindalf/advent-2021 [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/nindalf/advent-2021" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fnindalf%2Fadvent-2021", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fnindalf%2Fadvent-2021'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 8588460acc80011f16462df0c99b84df6bbdcc53 [INFO] linting nindalf/advent-2021 against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fnindalf%2Fadvent-2021" "/workspace/builds/worker-3-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-3-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/nindalf/advent-2021 [INFO] finished tweaking git repo https://github.com/nindalf/advent-2021 [INFO] tweaked toml for git repo https://github.com/nindalf/advent-2021 written to /workspace/builds/worker-3-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/nindalf/advent-2021 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/nindalf/advent-2021 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] Downloading crates ... [INFO] [stderr] Downloaded regex v1.5.4 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-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] 06005f8bcea9736b46cb6d28996dc2e41c70eaf819f674460fa0b156bd9b4186 [INFO] running `Command { std: "docker" "start" "-a" "06005f8bcea9736b46cb6d28996dc2e41c70eaf819f674460fa0b156bd9b4186", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "06005f8bcea9736b46cb6d28996dc2e41c70eaf819f674460fa0b156bd9b4186", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "06005f8bcea9736b46cb6d28996dc2e41c70eaf819f674460fa0b156bd9b4186", kill_on_drop: false }` [INFO] [stdout] 06005f8bcea9736b46cb6d28996dc2e41c70eaf819f674460fa0b156bd9b4186 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-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] cfbeccc3c3804b2383f3984e33eb9f4267dfbe09353fb61dfec98e56bf03833e [INFO] running `Command { std: "docker" "start" "-a" "cfbeccc3c3804b2383f3984e33eb9f4267dfbe09353fb61dfec98e56bf03833e", kill_on_drop: false }` [INFO] [stderr] Compiling memchr v2.4.1 [INFO] [stderr] Compiling anyhow v1.0.52 [INFO] [stderr] Checking regex-syntax v0.6.25 [INFO] [stderr] Checking aho-corasick v0.7.18 [INFO] [stderr] Checking regex v1.5.4 [INFO] [stderr] Checking aoc2021 v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unnecessary parentheses around match arm expression [INFO] [stdout] --> src/hexreader.rs:129:41 [INFO] [stdout] | [INFO] [stdout] 129 | (Some(higher), None) => (higher << 4), [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] 129 - (Some(higher), None) => (higher << 4), [INFO] [stdout] 129 + (Some(higher), None) => higher << 4 , [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around index expression [INFO] [stdout] --> src/matrix.rs:93:22 [INFO] [stdout] | [INFO] [stdout] 93 | self.storage[(point.y * self.max_x + point.x)] = val; [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 93 - self.storage[(point.y * self.max_x + point.x)] = val; [INFO] [stdout] 93 + self.storage[point.y * self.max_x + point.x ] = val; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around index expression [INFO] [stdout] --> src/matrix.rs:103:22 [INFO] [stdout] | [INFO] [stdout] 103 | self.storage[(point.y * self.max_x + point.x)] += n; [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 103 - self.storage[(point.y * self.max_x + point.x)] += n; [INFO] [stdout] 103 + self.storage[point.y * self.max_x + point.x ] += n; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around match arm expression [INFO] [stdout] --> src/hexreader.rs:129:41 [INFO] [stdout] | [INFO] [stdout] 129 | (Some(higher), None) => (higher << 4), [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] 129 - (Some(higher), None) => (higher << 4), [INFO] [stdout] 129 + (Some(higher), None) => higher << 4 , [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around index expression [INFO] [stdout] --> src/matrix.rs:93:22 [INFO] [stdout] | [INFO] [stdout] 93 | self.storage[(point.y * self.max_x + point.x)] = val; [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 93 - self.storage[(point.y * self.max_x + point.x)] = val; [INFO] [stdout] 93 + self.storage[point.y * self.max_x + point.x ] = val; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around index expression [INFO] [stdout] --> src/matrix.rs:103:22 [INFO] [stdout] | [INFO] [stdout] 103 | self.storage[(point.y * self.max_x + point.x)] += n; [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 103 - self.storage[(point.y * self.max_x + point.x)] += n; [INFO] [stdout] 103 + self.storage[point.y * self.max_x + point.x ] += n; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `rhs` [INFO] [stdout] --> src/day22.rs:23:18 [INFO] [stdout] | [INFO] [stdout] 23 | fn sub(self, rhs: Self) -> Self::Output { [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_rhs` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Cuboid` is never constructed [INFO] [stdout] --> src/day22.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 3 | struct Cuboid { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `State` is never used [INFO] [stdout] --> src/day22.rs:13:6 [INFO] [stdout] | [INFO] [stdout] 13 | enum State { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Range` is never constructed [INFO] [stdout] --> src/day22.rs:18:8 [INFO] [stdout] | [INFO] [stdout] 18 | struct Range(i32, i32); [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `intersect` and `no_overlap` are never used [INFO] [stdout] --> src/day22.rs:29:8 [INFO] [stdout] | [INFO] [stdout] 28 | impl Cuboid { [INFO] [stdout] | ----------- associated items in this implementation [INFO] [stdout] 29 | fn intersect(self, other: &Cuboid) -> (Cuboid, Option, Option) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 46 | fn no_overlap(l1: (i32, i32), l2: (i32, i32)) -> bool { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression can be written more simply using `.retain()` [INFO] [stdout] --> src/day03.rs:43:9 [INFO] [stdout] | [INFO] [stdout] 43 | / temp = temp [INFO] [stdout] 44 | | .into_iter() [INFO] [stdout] 45 | | .filter(|line| match line.chars().nth(index) { [INFO] [stdout] 46 | | Some(c) => c == digit, [INFO] [stdout] 47 | | None => false, [INFO] [stdout] 48 | | }) [INFO] [stdout] 49 | | .collect(); [INFO] [stdout] | |______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_retain [INFO] [stdout] = note: `#[warn(clippy::manual_retain)]` on by default [INFO] [stdout] help: consider calling `.retain()` instead [INFO] [stdout] | [INFO] [stdout] 43 ~ temp.retain(|line| match line.chars().nth(index) { [INFO] [stdout] 44 + Some(c) => c == digit, [INFO] [stdout] 45 + None => false, [INFO] [stdout] 46 ~ }); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `self.completions.get(0)` [INFO] [stdout] --> src/day04.rs:50:9 [INFO] [stdout] | [INFO] [stdout] 50 | / self.completions [INFO] [stdout] 51 | | .get(0) [INFO] [stdout] | |___________________^ help: try: `self.completions.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/day12.rs:48:14 [INFO] [stdout] | [INFO] [stdout] 48 | .or_insert_with(HashSet::new) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/day12.rs:52:14 [INFO] [stdout] | [INFO] [stdout] 52 | .or_insert_with(HashSet::new) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used a field initializer for a tuple struct [INFO] [stdout] --> src/day14.rs:25:22 [INFO] [stdout] | [INFO] [stdout] 25 | .map(|p| Pair { 0: p }) [INFO] [stdout] | ^^^^^^^^^^^^^ help: use tuple initialization: `Pair(p)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#init_numbered_fields [INFO] [stdout] = note: `#[warn(clippy::init_numbered_fields)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used a field initializer for a tuple struct [INFO] [stdout] --> src/day14.rs:94:24 [INFO] [stdout] | [INFO] [stdout] 94 | let dest_one = Pair { [INFO] [stdout] | ________________________^ [INFO] [stdout] 95 | | 0: (source.0 .0, dest), [INFO] [stdout] 96 | | }; [INFO] [stdout] | |_________^ help: use tuple initialization: `Pair((source.0 .0, dest))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#init_numbered_fields [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used a field initializer for a tuple struct [INFO] [stdout] --> src/day14.rs:97:24 [INFO] [stdout] | [INFO] [stdout] 97 | let dest_two = Pair { [INFO] [stdout] | ________________________^ [INFO] [stdout] 98 | | 0: (dest, source.0 .1), [INFO] [stdout] 99 | | }; [INFO] [stdout] | |_________^ help: use tuple initialization: `Pair((dest, source.0 .1))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#init_numbered_fields [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used a field initializer for a tuple struct [INFO] [stdout] --> src/day14.rs:105:14 [INFO] [stdout] | [INFO] [stdout] 105 | Some(Pair { 0: p }) [INFO] [stdout] | ^^^^^^^^^^^^^ help: use tuple initialization: `Pair(p)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#init_numbered_fields [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> src/day16.rs:31:26 [INFO] [stdout] | [INFO] [stdout] 31 | q.extend(sub_packets.into_iter()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()` [INFO] [stdout] --> /rustc/3645249d79dfb136b5d8de3ce153d19d6698d92d/library/core/src/iter/traits/collect.rs:416:17 [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] help: consider removing the `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 31 - q.extend(sub_packets.into_iter()); [INFO] [stdout] 31 + q.extend(sub_packets); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> src/day16.rs:33:70 [INFO] [stdout] | [INFO] [stdout] 33 | PacketContent::SubPacketsInBits(sub_packets) => q.extend(sub_packets.into_iter()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()` [INFO] [stdout] --> /rustc/3645249d79dfb136b5d8de3ce153d19d6698d92d/library/core/src/iter/traits/collect.rs:416:17 [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] help: consider removing the `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 33 - PacketContent::SubPacketsInBits(sub_packets) => q.extend(sub_packets.into_iter()), [INFO] [stdout] 33 + PacketContent::SubPacketsInBits(sub_packets) => q.extend(sub_packets), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/day18.rs:171:25 [INFO] [stdout] | [INFO] [stdout] 171 | / if depth == 1 { [INFO] [stdout] 172 | | comma_index = i; [INFO] [stdout] 173 | | break; [INFO] [stdout] 174 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 170 ~ ',' [INFO] [stdout] 171 ~ if depth == 1 => { [INFO] [stdout] 172 | comma_index = i; [INFO] [stdout] 173 | break; [INFO] [stdout] 174 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `rhs` [INFO] [stdout] --> src/day22.rs:23:18 [INFO] [stdout] | [INFO] [stdout] 23 | fn sub(self, rhs: Self) -> Self::Output { [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_rhs` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/day22.rs:37:12 [INFO] [stdout] | [INFO] [stdout] 37 | if (no_x_overlap && no_y_overlap) [INFO] [stdout] | ____________^ [INFO] [stdout] 38 | | || (no_x_overlap && no_z_overlap) [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] 37 - if (no_x_overlap && no_y_overlap) [INFO] [stdout] 38 - || (no_x_overlap && no_z_overlap) [INFO] [stdout] 37 + if !(!no_x_overlap || !no_y_overlap && !no_z_overlap) [INFO] [stdout] | [INFO] [stdout] 37 - if (no_x_overlap && no_y_overlap) [INFO] [stdout] 38 - || (no_x_overlap && no_z_overlap) [INFO] [stdout] 37 + if (no_z_overlap || no_y_overlap) && no_x_overlap [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `filter_map()` will run forever if the iterator repeatedly produces an `Err` [INFO] [stdout] --> src/files.rs:12:10 [INFO] [stdout] | [INFO] [stdout] 12 | .filter_map(|line_result| line_result.ok()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `map_while(Result::ok)` [INFO] [stdout] | [INFO] [stdout] note: this expression returning a `std::io::Lines` may produce an infinite number of `Err` in case of a read error [INFO] [stdout] --> src/files.rs:10:8 [INFO] [stdout] | [INFO] [stdout] 10 | Ok(std::io::BufReader::new(file) [INFO] [stdout] | ________^ [INFO] [stdout] 11 | | .lines() [INFO] [stdout] | |________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#lines_filter_map_ok [INFO] [stdout] = note: `#[warn(clippy::lines_filter_map_ok)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `filter_map()` will run forever if the iterator repeatedly produces an `Err` [INFO] [stdout] --> src/files.rs:22:10 [INFO] [stdout] | [INFO] [stdout] 22 | .filter_map(|line_result| line_result.ok()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `map_while(Result::ok)` [INFO] [stdout] | [INFO] [stdout] note: this expression returning a `std::io::Lines` may produce an infinite number of `Err` in case of a read error [INFO] [stdout] --> src/files.rs:20:8 [INFO] [stdout] | [INFO] [stdout] 20 | Ok(std::io::BufReader::new(file) [INFO] [stdout] | ________^ [INFO] [stdout] 21 | | .lines() [INFO] [stdout] | |________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#lines_filter_map_ok [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/hexreader.rs:119:20 [INFO] [stdout] | [INFO] [stdout] 119 | let n = if nibbles.len() % 2 == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `nibbles.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: struct `Cuboid` is never constructed [INFO] [stdout] --> src/day22.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 3 | struct Cuboid { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `State` is never used [INFO] [stdout] --> src/day22.rs:13:6 [INFO] [stdout] | [INFO] [stdout] 13 | enum State { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Range` is never constructed [INFO] [stdout] --> src/day22.rs:18:8 [INFO] [stdout] | [INFO] [stdout] 18 | struct Range(i32, i32); [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `intersect` and `no_overlap` are never used [INFO] [stdout] --> src/day22.rs:29:8 [INFO] [stdout] | [INFO] [stdout] 28 | impl Cuboid { [INFO] [stdout] | ----------- associated items in this implementation [INFO] [stdout] 29 | fn intersect(self, other: &Cuboid) -> (Cuboid, Option, Option) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 46 | fn no_overlap(l1: (i32, i32), l2: (i32, i32)) -> bool { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression can be written more simply using `.retain()` [INFO] [stdout] --> src/day03.rs:43:9 [INFO] [stdout] | [INFO] [stdout] 43 | / temp = temp [INFO] [stdout] 44 | | .into_iter() [INFO] [stdout] 45 | | .filter(|line| match line.chars().nth(index) { [INFO] [stdout] 46 | | Some(c) => c == digit, [INFO] [stdout] 47 | | None => false, [INFO] [stdout] 48 | | }) [INFO] [stdout] 49 | | .collect(); [INFO] [stdout] | |______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_retain [INFO] [stdout] = note: `#[warn(clippy::manual_retain)]` on by default [INFO] [stdout] help: consider calling `.retain()` instead [INFO] [stdout] | [INFO] [stdout] 43 ~ temp.retain(|line| match line.chars().nth(index) { [INFO] [stdout] 44 + Some(c) => c == digit, [INFO] [stdout] 45 + None => false, [INFO] [stdout] 46 ~ }); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `self.completions.get(0)` [INFO] [stdout] --> src/day04.rs:50:9 [INFO] [stdout] | [INFO] [stdout] 50 | / self.completions [INFO] [stdout] 51 | | .get(0) [INFO] [stdout] | |___________________^ help: try: `self.completions.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/day12.rs:48:14 [INFO] [stdout] | [INFO] [stdout] 48 | .or_insert_with(HashSet::new) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/day12.rs:52:14 [INFO] [stdout] | [INFO] [stdout] 52 | .or_insert_with(HashSet::new) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used a field initializer for a tuple struct [INFO] [stdout] --> src/day14.rs:25:22 [INFO] [stdout] | [INFO] [stdout] 25 | .map(|p| Pair { 0: p }) [INFO] [stdout] | ^^^^^^^^^^^^^ help: use tuple initialization: `Pair(p)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#init_numbered_fields [INFO] [stdout] = note: `#[warn(clippy::init_numbered_fields)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used a field initializer for a tuple struct [INFO] [stdout] --> src/day14.rs:94:24 [INFO] [stdout] | [INFO] [stdout] 94 | let dest_one = Pair { [INFO] [stdout] | ________________________^ [INFO] [stdout] 95 | | 0: (source.0 .0, dest), [INFO] [stdout] 96 | | }; [INFO] [stdout] | |_________^ help: use tuple initialization: `Pair((source.0 .0, dest))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#init_numbered_fields [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used a field initializer for a tuple struct [INFO] [stdout] --> src/day14.rs:97:24 [INFO] [stdout] | [INFO] [stdout] 97 | let dest_two = Pair { [INFO] [stdout] | ________________________^ [INFO] [stdout] 98 | | 0: (dest, source.0 .1), [INFO] [stdout] 99 | | }; [INFO] [stdout] | |_________^ help: use tuple initialization: `Pair((dest, source.0 .1))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#init_numbered_fields [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used a field initializer for a tuple struct [INFO] [stdout] --> src/day14.rs:105:14 [INFO] [stdout] | [INFO] [stdout] 105 | Some(Pair { 0: p }) [INFO] [stdout] | ^^^^^^^^^^^^^ help: use tuple initialization: `Pair(p)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#init_numbered_fields [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> src/day16.rs:31:26 [INFO] [stdout] | [INFO] [stdout] 31 | q.extend(sub_packets.into_iter()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()` [INFO] [stdout] --> /rustc/3645249d79dfb136b5d8de3ce153d19d6698d92d/library/core/src/iter/traits/collect.rs:416:17 [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] help: consider removing the `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 31 - q.extend(sub_packets.into_iter()); [INFO] [stdout] 31 + q.extend(sub_packets); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> src/day16.rs:33:70 [INFO] [stdout] | [INFO] [stdout] 33 | PacketContent::SubPacketsInBits(sub_packets) => q.extend(sub_packets.into_iter()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()` [INFO] [stdout] --> /rustc/3645249d79dfb136b5d8de3ce153d19d6698d92d/library/core/src/iter/traits/collect.rs:416:17 [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] help: consider removing the `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 33 - PacketContent::SubPacketsInBits(sub_packets) => q.extend(sub_packets.into_iter()), [INFO] [stdout] 33 + PacketContent::SubPacketsInBits(sub_packets) => q.extend(sub_packets), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/day18.rs:171:25 [INFO] [stdout] | [INFO] [stdout] 171 | / if depth == 1 { [INFO] [stdout] 172 | | comma_index = i; [INFO] [stdout] 173 | | break; [INFO] [stdout] 174 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 170 ~ ',' [INFO] [stdout] 171 ~ if depth == 1 => { [INFO] [stdout] 172 | comma_index = i; [INFO] [stdout] 173 | break; [INFO] [stdout] 174 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/day22.rs:37:12 [INFO] [stdout] | [INFO] [stdout] 37 | if (no_x_overlap && no_y_overlap) [INFO] [stdout] | ____________^ [INFO] [stdout] 38 | | || (no_x_overlap && no_z_overlap) [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] 37 - if (no_x_overlap && no_y_overlap) [INFO] [stdout] 38 - || (no_x_overlap && no_z_overlap) [INFO] [stdout] 37 + if !(!no_x_overlap || !no_y_overlap && !no_z_overlap) [INFO] [stdout] | [INFO] [stdout] 37 - if (no_x_overlap && no_y_overlap) [INFO] [stdout] 38 - || (no_x_overlap && no_z_overlap) [INFO] [stdout] 37 + if (no_z_overlap || no_y_overlap) && no_x_overlap [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `filter_map()` will run forever if the iterator repeatedly produces an `Err` [INFO] [stdout] --> src/files.rs:12:10 [INFO] [stdout] | [INFO] [stdout] 12 | .filter_map(|line_result| line_result.ok()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `map_while(Result::ok)` [INFO] [stdout] | [INFO] [stdout] note: this expression returning a `std::io::Lines` may produce an infinite number of `Err` in case of a read error [INFO] [stdout] --> src/files.rs:10:8 [INFO] [stdout] | [INFO] [stdout] 10 | Ok(std::io::BufReader::new(file) [INFO] [stdout] | ________^ [INFO] [stdout] 11 | | .lines() [INFO] [stdout] | |________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#lines_filter_map_ok [INFO] [stdout] = note: `#[warn(clippy::lines_filter_map_ok)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `filter_map()` will run forever if the iterator repeatedly produces an `Err` [INFO] [stdout] --> src/files.rs:22:10 [INFO] [stdout] | [INFO] [stdout] 22 | .filter_map(|line_result| line_result.ok()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `map_while(Result::ok)` [INFO] [stdout] | [INFO] [stdout] note: this expression returning a `std::io::Lines` may produce an infinite number of `Err` in case of a read error [INFO] [stdout] --> src/files.rs:20:8 [INFO] [stdout] | [INFO] [stdout] 20 | Ok(std::io::BufReader::new(file) [INFO] [stdout] | ________^ [INFO] [stdout] 21 | | .lines() [INFO] [stdout] | |________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#lines_filter_map_ok [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/hexreader.rs:119:20 [INFO] [stdout] | [INFO] [stdout] 119 | let n = if nibbles.len() % 2 == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `nibbles.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 4.24s [INFO] running `Command { std: "docker" "inspect" "cfbeccc3c3804b2383f3984e33eb9f4267dfbe09353fb61dfec98e56bf03833e", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "cfbeccc3c3804b2383f3984e33eb9f4267dfbe09353fb61dfec98e56bf03833e", kill_on_drop: false }` [INFO] [stdout] cfbeccc3c3804b2383f3984e33eb9f4267dfbe09353fb61dfec98e56bf03833e