[INFO] cloning repository https://github.com/Big-Smarty/advent-of-code-2025 [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/Big-Smarty/advent-of-code-2025" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FBig-Smarty%2Fadvent-of-code-2025", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FBig-Smarty%2Fadvent-of-code-2025'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 9407b69c6c1ab37f24645971ad2ee2b569c5a2f3 [INFO] linting Big-Smarty/advent-of-code-2025 against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FBig-Smarty%2Fadvent-of-code-2025" "/workspace/builds/worker-4-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-4-tc1/source'... [INFO] [stderr] done. [INFO] removed /workspace/builds/worker-4-tc1/source/.cargo/config.toml [INFO] started tweaking git repo https://github.com/Big-Smarty/advent-of-code-2025 [INFO] finished tweaking git repo https://github.com/Big-Smarty/advent-of-code-2025 [INFO] tweaked toml for git repo https://github.com/Big-Smarty/advent-of-code-2025 written to /workspace/builds/worker-4-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/Big-Smarty/advent-of-code-2025 on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/Big-Smarty/advent-of-code-2025 already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded mintex v0.1.2 [INFO] [stderr] Downloaded sys-info v0.9.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] 73ab8e3db5c938d36e6be7a37429f25b3ea2e88751a59f5d805460ade73cb77c [INFO] running `Command { std: "docker" "start" "-a" "73ab8e3db5c938d36e6be7a37429f25b3ea2e88751a59f5d805460ade73cb77c", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "73ab8e3db5c938d36e6be7a37429f25b3ea2e88751a59f5d805460ade73cb77c", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "73ab8e3db5c938d36e6be7a37429f25b3ea2e88751a59f5d805460ade73cb77c", kill_on_drop: false }` [INFO] [stdout] 73ab8e3db5c938d36e6be7a37429f25b3ea2e88751a59f5d805460ade73cb77c [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] 039461d6a9704e7c699c0736d4ebdd609fd9cd12860e0a244b1202c62a19d5d4 [INFO] running `Command { std: "docker" "start" "-a" "039461d6a9704e7c699c0736d4ebdd609fd9cd12860e0a244b1202c62a19d5d4", kill_on_drop: false }` [INFO] [stderr] Checking glam v0.30.9 [INFO] [stderr] Checking tinyjson v2.5.1 [INFO] [stderr] Checking pico-args v0.5.0 [INFO] [stderr] Checking advent_of_code v0.12.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: consider using `sort_unstable_by_key` [INFO] [stdout] --> src/template/timings.rs:54:9 [INFO] [stdout] | [INFO] [stdout] 54 | data.sort_unstable_by(|a, b| a.day.cmp(&b.day)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] = note: `#[warn(clippy::unnecessary_sort_by)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 54 - data.sort_unstable_by(|a, b| a.day.cmp(&b.day)); [INFO] [stdout] 54 + data.sort_unstable_by_key(|a| a.day); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/01.rs:21:21 [INFO] [stdout] | [INFO] [stdout] 21 | self.position = self.position - mod_r; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.position -= mod_r` [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: unneeded `return` statement [INFO] [stdout] --> src/bin/01.rs:42:17 [INFO] [stdout] | [INFO] [stdout] 42 | return out; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 42 - return out; [INFO] [stdout] 42 + out [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/01.rs:53:17 [INFO] [stdout] | [INFO] [stdout] 53 | return out; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 53 - return out; [INFO] [stdout] 53 + out [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/01.rs:65:17 [INFO] [stdout] | [INFO] [stdout] 65 | return Rotation::R(count.parse().unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 65 - return Rotation::R(count.parse().unwrap()); [INFO] [stdout] 65 + Rotation::R(count.parse().unwrap()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/01.rs:67:17 [INFO] [stdout] | [INFO] [stdout] 67 | return Rotation::L(count.parse().unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 67 - return Rotation::L(count.parse().unwrap()); [INFO] [stdout] 67 + Rotation::L(count.parse().unwrap()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/01.rs:88:17 [INFO] [stdout] | [INFO] [stdout] 88 | return Rotation::R(count.parse().unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 88 - return Rotation::R(count.parse().unwrap()); [INFO] [stdout] 88 + Rotation::R(count.parse().unwrap()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/01.rs:90:17 [INFO] [stdout] | [INFO] [stdout] 90 | return Rotation::L(count.parse().unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 90 - return Rotation::L(count.parse().unwrap()); [INFO] [stdout] 90 + Rotation::L(count.parse().unwrap()) [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: function `check_validity` is never used [INFO] [stdout] --> src/bin/02.rs:39:4 [INFO] [stdout] | [INFO] [stdout] 39 | fn check_validity(id: u64) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `check_validity_2` is never used [INFO] [stdout] --> src/bin/02.rs:65:4 [INFO] [stdout] | [INFO] [stdout] 65 | fn check_validity_2(id: u64) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/04.rs:70:29 [INFO] [stdout] | [INFO] [stdout] 70 | ... return 0; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 70 - return 0; [INFO] [stdout] 70 + 0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::str::Split<'_, char>` [INFO] [stdout] --> src/bin/02.rs:13:22 [INFO] [stdout] | [INFO] [stdout] 13 | let minmax = input [INFO] [stdout] | ______________________^ [INFO] [stdout] 14 | | .split('-') [INFO] [stdout] 15 | | .into_iter() [INFO] [stdout] | |________________________^ [INFO] [stdout] | [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 `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 13 ~ let minmax = input [INFO] [stdout] 14 + .split('-') [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::ops::RangeInclusive` [INFO] [stdout] --> src/bin/02.rs:32:9 [INFO] [stdout] | [INFO] [stdout] 32 | / (self.min..=self.max) [INFO] [stdout] 33 | | .into_iter() [INFO] [stdout] | |________________________^ help: consider removing `.into_iter()`: `(self.min..=self.max)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/02.rs:42:9 [INFO] [stdout] | [INFO] [stdout] 42 | return true; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 42 - return true; [INFO] [stdout] 42 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/02.rs:46:13 [INFO] [stdout] | [INFO] [stdout] 46 | return false; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 46 - return false; [INFO] [stdout] 46 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/02.rs:48:13 [INFO] [stdout] | [INFO] [stdout] 48 | return true; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 48 - return true; [INFO] [stdout] 48 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Ranges` is never constructed [INFO] [stdout] --> src/bin/05.rs:47:8 [INFO] [stdout] | [INFO] [stdout] 47 | struct Ranges { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/bin/02.rs:41:8 [INFO] [stdout] | [INFO] [stdout] 41 | if id_str.len() % 2 != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace with: `!id_str.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 if-then-else expression returns a bool literal [INFO] [stdout] --> src/bin/02.rs:45:9 [INFO] [stdout] | [INFO] [stdout] 45 | / if upper == lower { [INFO] [stdout] 46 | | return false; [INFO] [stdout] 47 | | } else { [INFO] [stdout] 48 | | return true; [INFO] [stdout] 49 | | } [INFO] [stdout] | |_________^ help: you can reduce it to: `return upper != lower` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] = note: `#[warn(clippy::needless_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/bin/02.rs:61:9 [INFO] [stdout] | [INFO] [stdout] 61 | !(lower_half == upper_half) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(lower_half != upper_half)` [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: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/bin/02.rs:56:8 [INFO] [stdout] | [INFO] [stdout] 56 | if id_len % 2 != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: replace with: `!id_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] [INFO] [stdout] [INFO] [stdout] warning: usage of `.map(...).all(identity)` [INFO] [stdout] --> src/bin/02.rs:71:10 [INFO] [stdout] | [INFO] [stdout] 71 | .map(|i| { [INFO] [stdout] | __________^ [INFO] [stdout] 72 | | // OPTIMIZATION: skip current iteration if the id length is not divisible by i [INFO] [stdout] 73 | | if id_str.len() % i != 0 { [INFO] [stdout] 74 | | return true; [INFO] [stdout] ... | [INFO] [stdout] 89 | | }) [INFO] [stdout] 90 | | .all(|i| i) [INFO] [stdout] | |___________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_all_any_identity [INFO] [stdout] = note: `#[warn(clippy::map_all_any_identity)]` on by default [INFO] [stdout] help: use `.all(...)` instead [INFO] [stdout] | [INFO] [stdout] 71 ~ .all(|i| { [INFO] [stdout] 72 + // OPTIMIZATION: skip current iteration if the id length is not divisible by i [INFO] [stdout] 73 + if id_str.len() % i != 0 { [INFO] [stdout] 74 + return true; [INFO] [stdout] 75 + } else { [INFO] [stdout] 76 + // iterate through all chunks; if all chunks are equal to the first chunk, the id is invalid! [INFO] [stdout] 77 + if id_str.as_bytes().chunks(i).all(|x| { [INFO] [stdout] 78 + // check if current chunk is equal to first chunk [INFO] [stdout] 79 + *x == id_str.as_bytes()[0..i] [INFO] [stdout] 80 + }) { [INFO] [stdout] 81 + // id is invalid; all chunks were equal [INFO] [stdout] 82 + //println!("invalid id: {id}"); [INFO] [stdout] 83 + return false; [INFO] [stdout] 84 + // id is valid; not all chunks were equal [INFO] [stdout] 85 + } else { [INFO] [stdout] 86 + return true; [INFO] [stdout] 87 + } [INFO] [stdout] 88 + } [INFO] [stdout] 89 + }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::ops::RangeInclusive` [INFO] [stdout] --> src/bin/02.rs:69:5 [INFO] [stdout] | [INFO] [stdout] 69 | / (1..=id_str.len() / 2) [INFO] [stdout] 70 | | .into_iter() [INFO] [stdout] | |____________________^ help: consider removing `.into_iter()`: `(1..=id_str.len() / 2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/02.rs:74:17 [INFO] [stdout] | [INFO] [stdout] 74 | return true; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 74 - return true; [INFO] [stdout] 74 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/02.rs:83:21 [INFO] [stdout] | [INFO] [stdout] 83 | return false; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 83 - return false; [INFO] [stdout] 83 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `MergingIter` is never constructed [INFO] [stdout] --> src/bin/05.rs:73:8 [INFO] [stdout] | [INFO] [stdout] 73 | struct MergingIter { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::ops::Range` [INFO] [stdout] --> src/bin/04.rs:126:19 [INFO] [stdout] | [INFO] [stdout] 126 | let out = (0..self.input.line_count) [INFO] [stdout] | ___________________^ [INFO] [stdout] 127 | | .into_iter() [INFO] [stdout] | |________________________^ help: consider removing `.into_iter()`: `(0..self.input.line_count)` [INFO] [stdout] | [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] [INFO] [stdout] [INFO] [stdout] warning: unnecessary map of the identity function [INFO] [stdout] --> src/bin/05.rs:151:15 [INFO] [stdout] | [INFO] [stdout] 151 | }) [INFO] [stdout] | _______________^ [INFO] [stdout] 152 | | .map(|r| r); [INFO] [stdout] | |_______________________^ help: remove the call to `map` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_identity [INFO] [stdout] = note: `#[warn(clippy::map_identity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/02.rs:86:21 [INFO] [stdout] | [INFO] [stdout] 86 | return true; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 86 - return true; [INFO] [stdout] 86 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/bin/02.rs:73:16 [INFO] [stdout] | [INFO] [stdout] 73 | if id_str.len() % i != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace with: `!id_str.len().is_multiple_of(i)` [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] [INFO] [stdout] [INFO] [stdout] warning: usage of `.map(...).all(identity)` [INFO] [stdout] --> src/bin/02.rs:98:10 [INFO] [stdout] | [INFO] [stdout] 98 | .map(|i| { [INFO] [stdout] | __________^ [INFO] [stdout] 99 | | if id_len % i != 0 { [INFO] [stdout] 100 | | return true; [INFO] [stdout] 101 | | } else { [INFO] [stdout] ... | [INFO] [stdout] 112 | | }) [INFO] [stdout] 113 | | .all(|i| i) [INFO] [stdout] | |___________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_all_any_identity [INFO] [stdout] help: use `.all(...)` instead [INFO] [stdout] | [INFO] [stdout] 98 ~ .all(|i| { [INFO] [stdout] 99 + if id_len % i != 0 { [INFO] [stdout] 100 + return true; [INFO] [stdout] 101 + } else { [INFO] [stdout] 102 + let chunk_size = i; [INFO] [stdout] 103 + [INFO] [stdout] 104 + // create chunks with size chunk_size (i) [INFO] [stdout] 105 + !(1..=(id_len / chunk_size)) [INFO] [stdout] 106 + .map(|j| { [INFO] [stdout] 107 + (id % 10u64.pow(j * chunk_size) - (id % 10u64.pow((j - 1) * chunk_size))) [INFO] [stdout] 108 + / 10u64.pow((j - 1) * chunk_size) [INFO] [stdout] 109 + }) [INFO] [stdout] 110 + .all(|x| x == (id % 10u64.pow(chunk_size))) [INFO] [stdout] 111 + } [INFO] [stdout] 112 + }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::ops::RangeInclusive` [INFO] [stdout] --> src/bin/02.rs:96:5 [INFO] [stdout] | [INFO] [stdout] 96 | / (1..=(id_len / 2)) [INFO] [stdout] 97 | | .into_iter() [INFO] [stdout] | |____________________^ help: consider removing `.into_iter()`: `(1..=(id_len / 2))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/02.rs:100:17 [INFO] [stdout] | [INFO] [stdout] 100 | return true; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 100 - return true; [INFO] [stdout] 100 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/bin/02.rs:99:16 [INFO] [stdout] | [INFO] [stdout] 99 | if id_len % i != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: replace with: `!id_len.is_multiple_of(i)` [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] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/bin/02.rs:120:14 [INFO] [stdout] | [INFO] [stdout] 120 | .map(|i| Range::new(i)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Range::new` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::vec::IntoIter>` [INFO] [stdout] --> src/bin/05.rs:158:31 [INFO] [stdout] | [INFO] [stdout] 158 | let mut sorted_iter = sorted_ranges.clone().into_iter(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `sorted_ranges.clone()` [INFO] [stdout] | [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] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/bin/06.rs:7:10 [INFO] [stdout] | [INFO] [stdout] 7 | .map(|s| s.split("*")) [INFO] [stdout] | __________^ [INFO] [stdout] 8 | | .flatten() [INFO] [stdout] | |__________________^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(|s| s.split("*"))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] = note: `#[warn(clippy::map_flatten)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: feature `new_range_api` is declared but not used [INFO] [stdout] --> src/bin/05.rs:1:12 [INFO] [stdout] | [INFO] [stdout] 1 | #![feature(new_range_api)] [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_features)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: feature `iter_map_windows` is declared but not used [INFO] [stdout] --> src/bin/05.rs:2:12 [INFO] [stdout] | [INFO] [stdout] 2 | #![feature(iter_map_windows)] [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/bin/06.rs:14:21 [INFO] [stdout] | [INFO] [stdout] 14 | .filter(|s| *s != "") [INFO] [stdout] | ^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!s.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: this `.fold` can be written more succinctly using another method [INFO] [stdout] --> src/bin/06.rs:37:33 [INFO] [stdout] | [INFO] [stdout] 37 | "+" => n.iter().fold(0, |state, i| state + i), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `sum::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fold [INFO] [stdout] = note: `#[warn(clippy::unnecessary_fold)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/bin/06.rs:49:10 [INFO] [stdout] | [INFO] [stdout] 49 | .map(|s| s.split("*")) [INFO] [stdout] | __________^ [INFO] [stdout] 50 | | .flatten() [INFO] [stdout] | |__________________^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(|s| s.split("*"))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/bin/06.rs:59:21 [INFO] [stdout] | [INFO] [stdout] 59 | .filter(|s| *s != "") [INFO] [stdout] | ^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!s.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/bin/06.rs:66:13 [INFO] [stdout] | [INFO] [stdout] 66 | / h.iter() [INFO] [stdout] 67 | | .filter(|f| **f != " ") [INFO] [stdout] 68 | | .map(|f| *f) [INFO] [stdout] 69 | | .collect::>() [INFO] [stdout] 70 | | .len() [INFO] [stdout] 71 | | != 0 [INFO] [stdout] | |____________________^ [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] help: using `!is_empty` is clearer and more explicit [INFO] [stdout] | [INFO] [stdout] 66 ~ !h.iter() [INFO] [stdout] 67 + .filter(|f| **f != " ") [INFO] [stdout] 68 + .map(|f| *f) [INFO] [stdout] 69 + .collect::>().is_empty() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> src/bin/06.rs:66:13 [INFO] [stdout] | [INFO] [stdout] 66 | / h.iter() [INFO] [stdout] 67 | | .filter(|f| **f != " ") [INFO] [stdout] 68 | | .map(|f| *f) [INFO] [stdout] | |____________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] = note: `#[warn(clippy::map_clone)]` on by default [INFO] [stdout] help: consider calling the dedicated `copied` method [INFO] [stdout] | [INFO] [stdout] 66 ~ h.iter() [INFO] [stdout] 67 + .filter(|f| **f != " ").copied() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Ranges` is never constructed [INFO] [stdout] --> src/bin/05.rs:47:8 [INFO] [stdout] | [INFO] [stdout] 47 | struct Ranges { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/bin/06.rs:85:13 [INFO] [stdout] | [INFO] [stdout] 78 | / let filtered = c [INFO] [stdout] 79 | | .iter() [INFO] [stdout] 80 | | .filter(|f| **f != " " && **f != "+" && **f != "*") [INFO] [stdout] 81 | | .map(|f| *f) [INFO] [stdout] 82 | | .collect::() [INFO] [stdout] 83 | | .parse::() [INFO] [stdout] 84 | | .unwrap(); [INFO] [stdout] | |__________________________- unnecessary `let` binding [INFO] [stdout] 85 | filtered [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 78 ~ [INFO] [stdout] 79 ~ c [INFO] [stdout] 80 + .iter() [INFO] [stdout] 81 + .filter(|f| **f != " " && **f != "+" && **f != "*") [INFO] [stdout] 82 + .map(|f| *f) [INFO] [stdout] 83 + .collect::() [INFO] [stdout] 84 + .parse::() [INFO] [stdout] 85 + .unwrap() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> src/bin/06.rs:78:28 [INFO] [stdout] | [INFO] [stdout] 78 | let filtered = c [INFO] [stdout] | ____________________________^ [INFO] [stdout] 79 | | .iter() [INFO] [stdout] 80 | | .filter(|f| **f != " " && **f != "+" && **f != "*") [INFO] [stdout] 81 | | .map(|f| *f) [INFO] [stdout] | |____________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] help: consider calling the dedicated `copied` method [INFO] [stdout] | [INFO] [stdout] 78 ~ let filtered = c [INFO] [stdout] 79 + .iter() [INFO] [stdout] 80 + .filter(|f| **f != " " && **f != "+" && **f != "*").copied() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.fold` can be written more succinctly using another method [INFO] [stdout] --> src/bin/06.rs:101:26 [INFO] [stdout] | [INFO] [stdout] 101 | .fold(0, |state, j| state + j); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `sum::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fold [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/bin/06.rs:99:29 [INFO] [stdout] | [INFO] [stdout] 98 | ... let numbers = numbers[idx + i]; [INFO] [stdout] | ------------------------------- unnecessary `let` binding [INFO] [stdout] 99 | ... numbers [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 98 ~ [INFO] [stdout] 99 ~ numbers[idx + i] [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/bin/06.rs:109:29 [INFO] [stdout] | [INFO] [stdout] 108 | ... let numbers = numbers[idx + i]; [INFO] [stdout] | ------------------------------- unnecessary `let` binding [INFO] [stdout] 109 | ... numbers [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 108 ~ [INFO] [stdout] 109 ~ numbers[idx + i] [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `MergingIter` is never constructed [INFO] [stdout] --> src/bin/05.rs:73:8 [INFO] [stdout] | [INFO] [stdout] 73 | struct MergingIter { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary map of the identity function [INFO] [stdout] --> src/bin/05.rs:151:15 [INFO] [stdout] | [INFO] [stdout] 151 | }) [INFO] [stdout] | _______________^ [INFO] [stdout] 152 | | .map(|r| r); [INFO] [stdout] | |_______________________^ help: remove the call to `map` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_identity [INFO] [stdout] = note: `#[warn(clippy::map_identity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/bin/09.rs:37:17 [INFO] [stdout] | [INFO] [stdout] 37 | pub fn part_two(input: &str) -> Option { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/bin/09.rs:38:9 [INFO] [stdout] | [INFO] [stdout] 38 | let input = "7,1 [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/bin/09.rs:24:10 [INFO] [stdout] | [INFO] [stdout] 24 | .map(|c| coords.iter().filter(|f| **f != c.clone()).map(|f| (*c, *f))) [INFO] [stdout] | __________^ [INFO] [stdout] 25 | | .flatten() [INFO] [stdout] | |__________________^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(|c| coords.iter().filter(|f| **f != c.clone()).map(|f| (*c, *f)))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] = note: `#[warn(clippy::map_flatten)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `(u64, u64)` which implements the `Copy` trait [INFO] [stdout] --> src/bin/09.rs:24:50 [INFO] [stdout] | [INFO] [stdout] 24 | .map(|c| coords.iter().filter(|f| **f != c.clone()).map(|f| (*c, *f))) [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*c` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/bin/09.rs:37:17 [INFO] [stdout] | [INFO] [stdout] 37 | pub fn part_two(input: &str) -> Option { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/bin/09.rs:38:9 [INFO] [stdout] | [INFO] [stdout] 38 | let input = "7,1 [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/bin/09.rs:24:10 [INFO] [stdout] | [INFO] [stdout] 24 | .map(|c| coords.iter().filter(|f| **f != c.clone()).map(|f| (*c, *f))) [INFO] [stdout] | __________^ [INFO] [stdout] 25 | | .flatten() [INFO] [stdout] | |__________________^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(|c| coords.iter().filter(|f| **f != c.clone()).map(|f| (*c, *f)))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] = note: `#[warn(clippy::map_flatten)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `(u64, u64)` which implements the `Copy` trait [INFO] [stdout] --> src/bin/09.rs:24:50 [INFO] [stdout] | [INFO] [stdout] 24 | .map(|c| coords.iter().filter(|f| **f != c.clone()).map(|f| (*c, *f))) [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*c` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::vec::IntoIter>` [INFO] [stdout] --> src/bin/05.rs:158:31 [INFO] [stdout] | [INFO] [stdout] 158 | let mut sorted_iter = sorted_ranges.clone().into_iter(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `sorted_ranges.clone()` [INFO] [stdout] | [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] [INFO] [stdout] [INFO] [stdout] warning: feature `new_range_api` is declared but not used [INFO] [stdout] --> src/bin/05.rs:1:12 [INFO] [stdout] | [INFO] [stdout] 1 | #![feature(new_range_api)] [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_features)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: feature `iter_map_windows` is declared but not used [INFO] [stdout] --> src/bin/05.rs:2:12 [INFO] [stdout] | [INFO] [stdout] 2 | #![feature(iter_map_windows)] [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/bin/06.rs:7:10 [INFO] [stdout] | [INFO] [stdout] 7 | .map(|s| s.split("*")) [INFO] [stdout] | __________^ [INFO] [stdout] 8 | | .flatten() [INFO] [stdout] | |__________________^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(|s| s.split("*"))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] = note: `#[warn(clippy::map_flatten)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: feature `new_range_api` is declared but not used [INFO] [stdout] --> src/main.rs:1:12 [INFO] [stdout] | [INFO] [stdout] 1 | #![feature(new_range_api)] [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_features)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: feature `iter_map_windows` is declared but not used [INFO] [stdout] --> src/main.rs:2:12 [INFO] [stdout] | [INFO] [stdout] 2 | #![feature(iter_map_windows)] [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/bin/06.rs:14:21 [INFO] [stdout] | [INFO] [stdout] 14 | .filter(|s| *s != "") [INFO] [stdout] | ^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!s.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: this `.fold` can be written more succinctly using another method [INFO] [stdout] --> src/bin/06.rs:37:33 [INFO] [stdout] | [INFO] [stdout] 37 | "+" => n.iter().fold(0, |state, i| state + i), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `sum::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fold [INFO] [stdout] = note: `#[warn(clippy::unnecessary_fold)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/bin/06.rs:49:10 [INFO] [stdout] | [INFO] [stdout] 49 | .map(|s| s.split("*")) [INFO] [stdout] | __________^ [INFO] [stdout] 50 | | .flatten() [INFO] [stdout] | |__________________^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(|s| s.split("*"))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/bin/06.rs:59:21 [INFO] [stdout] | [INFO] [stdout] 59 | .filter(|s| *s != "") [INFO] [stdout] | ^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!s.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/bin/06.rs:66:13 [INFO] [stdout] | [INFO] [stdout] 66 | / h.iter() [INFO] [stdout] 67 | | .filter(|f| **f != " ") [INFO] [stdout] 68 | | .map(|f| *f) [INFO] [stdout] 69 | | .collect::>() [INFO] [stdout] 70 | | .len() [INFO] [stdout] 71 | | != 0 [INFO] [stdout] | |____________________^ [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] help: using `!is_empty` is clearer and more explicit [INFO] [stdout] | [INFO] [stdout] 66 ~ !h.iter() [INFO] [stdout] 67 + .filter(|f| **f != " ") [INFO] [stdout] 68 + .map(|f| *f) [INFO] [stdout] 69 + .collect::>().is_empty() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> src/bin/06.rs:66:13 [INFO] [stdout] | [INFO] [stdout] 66 | / h.iter() [INFO] [stdout] 67 | | .filter(|f| **f != " ") [INFO] [stdout] 68 | | .map(|f| *f) [INFO] [stdout] | |____________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] = note: `#[warn(clippy::map_clone)]` on by default [INFO] [stdout] help: consider calling the dedicated `copied` method [INFO] [stdout] | [INFO] [stdout] 66 ~ h.iter() [INFO] [stdout] 67 + .filter(|f| **f != " ").copied() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/bin/06.rs:85:13 [INFO] [stdout] | [INFO] [stdout] 78 | / let filtered = c [INFO] [stdout] 79 | | .iter() [INFO] [stdout] 80 | | .filter(|f| **f != " " && **f != "+" && **f != "*") [INFO] [stdout] 81 | | .map(|f| *f) [INFO] [stdout] 82 | | .collect::() [INFO] [stdout] 83 | | .parse::() [INFO] [stdout] 84 | | .unwrap(); [INFO] [stdout] | |__________________________- unnecessary `let` binding [INFO] [stdout] 85 | filtered [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 78 ~ [INFO] [stdout] 79 ~ c [INFO] [stdout] 80 + .iter() [INFO] [stdout] 81 + .filter(|f| **f != " " && **f != "+" && **f != "*") [INFO] [stdout] 82 + .map(|f| *f) [INFO] [stdout] 83 + .collect::() [INFO] [stdout] 84 + .parse::() [INFO] [stdout] 85 + .unwrap() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> src/bin/06.rs:78:28 [INFO] [stdout] | [INFO] [stdout] 78 | let filtered = c [INFO] [stdout] | ____________________________^ [INFO] [stdout] 79 | | .iter() [INFO] [stdout] 80 | | .filter(|f| **f != " " && **f != "+" && **f != "*") [INFO] [stdout] 81 | | .map(|f| *f) [INFO] [stdout] | |____________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] help: consider calling the dedicated `copied` method [INFO] [stdout] | [INFO] [stdout] 78 ~ let filtered = c [INFO] [stdout] 79 + .iter() [INFO] [stdout] 80 + .filter(|f| **f != " " && **f != "+" && **f != "*").copied() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.fold` can be written more succinctly using another method [INFO] [stdout] --> src/bin/06.rs:101:26 [INFO] [stdout] | [INFO] [stdout] 101 | .fold(0, |state, j| state + j); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `sum::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fold [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/bin/06.rs:99:29 [INFO] [stdout] | [INFO] [stdout] 98 | ... let numbers = numbers[idx + i]; [INFO] [stdout] | ------------------------------- unnecessary `let` binding [INFO] [stdout] 99 | ... numbers [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 98 ~ [INFO] [stdout] 99 ~ numbers[idx + i] [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/bin/06.rs:109:29 [INFO] [stdout] | [INFO] [stdout] 108 | ... let numbers = numbers[idx + i]; [INFO] [stdout] | ------------------------------- unnecessary `let` binding [INFO] [stdout] 109 | ... numbers [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 108 ~ [INFO] [stdout] 109 ~ numbers[idx + i] [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/03.rs:22:21 [INFO] [stdout] | [INFO] [stdout] 22 | return second_max * 10 + max; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 22 - return second_max * 10 + max; [INFO] [stdout] 22 + second_max * 10 + max [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/03.rs:29:21 [INFO] [stdout] | [INFO] [stdout] 29 | return max * 10 + second_max; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 29 - return max * 10 + second_max; [INFO] [stdout] 29 + max * 10 + second_max [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/bin/03.rs:11:20 [INFO] [stdout] | [INFO] [stdout] 11 | if l.chars() [INFO] [stdout] | ____________________^ [INFO] [stdout] 12 | | .map(|c| c as u8 - 48) [INFO] [stdout] 13 | | .position(|y| y == max) [INFO] [stdout] 14 | | .unwrap() as usize [INFO] [stdout] | |______________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 11 ~ if l.chars() [INFO] [stdout] 12 + .map(|c| c as u8 - 48) [INFO] [stdout] 13 + .position(|y| y == max) [INFO] [stdout] 14 + .unwrap() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/bin/07.rs:27:25 [INFO] [stdout] | [INFO] [stdout] 27 | / { [INFO] [stdout] 28 | | out = '^'; [INFO] [stdout] 29 | | break; [INFO] [stdout] 30 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/bin/07.rs:32:72 [INFO] [stdout] | [INFO] [stdout] 32 | else if &cleared_lines[y - i][x..x + 1] == "S" { [INFO] [stdout] | ________________________________________________________________________^ [INFO] [stdout] 33 | | out = '^'; [INFO] [stdout] 34 | | break; [INFO] [stdout] 35 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/04.rs:70:29 [INFO] [stdout] | [INFO] [stdout] 70 | ... return 0; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 70 - return 0; [INFO] [stdout] 70 + 0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: slow zero-filling initialization [INFO] [stdout] --> src/bin/07.rs:61:43 [INFO] [stdout] | [INFO] [stdout] 61 | let mut previous_timeline: Vec = Vec::new(); [INFO] [stdout] | ___________________________________________^ [INFO] [stdout] 62 | | previous_timeline.resize(lines[0].len(), 0); [INFO] [stdout] | |_______________________________________________^ help: consider replacing this with: `vec![0; lines[0].len()]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#slow_vector_initialization [INFO] [stdout] = note: `#[warn(clippy::slow_vector_initialization)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: slow zero-filling initialization [INFO] [stdout] --> src/bin/07.rs:70:41 [INFO] [stdout] | [INFO] [stdout] 70 | let mut out: Vec = Vec::new(); [INFO] [stdout] | _________________________________________^ [INFO] [stdout] 71 | | out.resize(lines[0].len(), 0); [INFO] [stdout] | |_____________________________________________^ help: consider replacing this with: `vec![0; lines[0].len()]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#slow_vector_initialization [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/01.rs:21:21 [INFO] [stdout] | [INFO] [stdout] 21 | self.position = self.position - mod_r; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.position -= mod_r` [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: useless conversion to the same type: `std::ops::Range` [INFO] [stdout] --> src/bin/04.rs:126:19 [INFO] [stdout] | [INFO] [stdout] 126 | let out = (0..self.input.line_count) [INFO] [stdout] | ___________________^ [INFO] [stdout] 127 | | .into_iter() [INFO] [stdout] | |________________________^ help: consider removing `.into_iter()`: `(0..self.input.line_count)` [INFO] [stdout] | [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] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/01.rs:42:17 [INFO] [stdout] | [INFO] [stdout] 42 | return out; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 42 - return out; [INFO] [stdout] 42 + out [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/01.rs:53:17 [INFO] [stdout] | [INFO] [stdout] 53 | return out; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 53 - return out; [INFO] [stdout] 53 + out [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/01.rs:65:17 [INFO] [stdout] | [INFO] [stdout] 65 | return Rotation::R(count.parse().unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 65 - return Rotation::R(count.parse().unwrap()); [INFO] [stdout] 65 + Rotation::R(count.parse().unwrap()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/01.rs:67:17 [INFO] [stdout] | [INFO] [stdout] 67 | return Rotation::L(count.parse().unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 67 - return Rotation::L(count.parse().unwrap()); [INFO] [stdout] 67 + Rotation::L(count.parse().unwrap()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/01.rs:88:17 [INFO] [stdout] | [INFO] [stdout] 88 | return Rotation::R(count.parse().unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 88 - return Rotation::R(count.parse().unwrap()); [INFO] [stdout] 88 + Rotation::R(count.parse().unwrap()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: feature `new_range_api` is declared but not used [INFO] [stdout] --> src/main.rs:1:12 [INFO] [stdout] | [INFO] [stdout] 1 | #![feature(new_range_api)] [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_features)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: feature `iter_map_windows` is declared but not used [INFO] [stdout] --> src/main.rs:2:12 [INFO] [stdout] | [INFO] [stdout] 2 | #![feature(iter_map_windows)] [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/01.rs:90:17 [INFO] [stdout] | [INFO] [stdout] 90 | return Rotation::L(count.parse().unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 90 - return Rotation::L(count.parse().unwrap()); [INFO] [stdout] 90 + Rotation::L(count.parse().unwrap()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/bin/07.rs:27:25 [INFO] [stdout] | [INFO] [stdout] 27 | / { [INFO] [stdout] 28 | | out = '^'; [INFO] [stdout] 29 | | break; [INFO] [stdout] 30 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/bin/07.rs:32:72 [INFO] [stdout] | [INFO] [stdout] 32 | else if &cleared_lines[y - i][x..x + 1] == "S" { [INFO] [stdout] | ________________________________________________________________________^ [INFO] [stdout] 33 | | out = '^'; [INFO] [stdout] 34 | | break; [INFO] [stdout] 35 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/bin/08.rs:58:17 [INFO] [stdout] | [INFO] [stdout] 58 | pub fn part_one(input: &str) -> Option { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/bin/08.rs:141:17 [INFO] [stdout] | [INFO] [stdout] 141 | pub fn part_two(input: &str) -> Option { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: slow zero-filling initialization [INFO] [stdout] --> src/bin/07.rs:61:43 [INFO] [stdout] | [INFO] [stdout] 61 | let mut previous_timeline: Vec = Vec::new(); [INFO] [stdout] | ___________________________________________^ [INFO] [stdout] 62 | | previous_timeline.resize(lines[0].len(), 0); [INFO] [stdout] | |_______________________________________________^ help: consider replacing this with: `vec![0; lines[0].len()]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#slow_vector_initialization [INFO] [stdout] = note: `#[warn(clippy::slow_vector_initialization)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: slow zero-filling initialization [INFO] [stdout] --> src/bin/07.rs:70:41 [INFO] [stdout] | [INFO] [stdout] 70 | let mut out: Vec = Vec::new(); [INFO] [stdout] | _________________________________________^ [INFO] [stdout] 71 | | out.resize(lines[0].len(), 0); [INFO] [stdout] | |_____________________________________________^ help: consider replacing this with: `vec![0; lines[0].len()]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#slow_vector_initialization [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `I64Vec3` which implements the `Copy` trait [INFO] [stdout] --> src/bin/08.rs:27:51 [INFO] [stdout] | [INFO] [stdout] 27 | .map(|b2| b1.distance_squared(b2.clone())) [INFO] [stdout] | ^^^^^^^^^^ help: try dereferencing it: `*b2` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> src/bin/08.rs:37:20 [INFO] [stdout] | [INFO] [stdout] 37 | boxes: l.boxes.union(&r.boxes).map(|x| *x).collect(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `l.boxes.union(&r.boxes).copied()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] = note: `#[warn(clippy::map_clone)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for cloning elements [INFO] [stdout] --> src/bin/08.rs:125:20 [INFO] [stdout] | [INFO] [stdout] 125 | circuits = circuits [INFO] [stdout] | ____________________^ [INFO] [stdout] 126 | | .iter() [INFO] [stdout] 127 | | .filter(|f| *f.clone() != pair) [INFO] [stdout] 128 | | .map(|x| x.clone()) [INFO] [stdout] | |_______________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] help: consider calling the dedicated `cloned` method [INFO] [stdout] | [INFO] [stdout] 125 ~ circuits = circuits [INFO] [stdout] 126 + .iter() [INFO] [stdout] 127 + .filter(|f| *f.clone() != pair).cloned() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `.clone()` on a double reference, which returns `&Circuit` instead of cloning the inner type [INFO] [stdout] --> src/bin/08.rs:127:27 [INFO] [stdout] | [INFO] [stdout] 127 | .filter(|f| *f.clone() != pair) [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(suspicious_double_ref_op)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/03.rs:22:21 [INFO] [stdout] | [INFO] [stdout] 22 | return second_max * 10 + max; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 22 - return second_max * 10 + max; [INFO] [stdout] 22 + second_max * 10 + max [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/03.rs:29:21 [INFO] [stdout] | [INFO] [stdout] 29 | return max * 10 + second_max; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 29 - return max * 10 + second_max; [INFO] [stdout] 29 + max * 10 + second_max [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/bin/03.rs:11:20 [INFO] [stdout] | [INFO] [stdout] 11 | if l.chars() [INFO] [stdout] | ____________________^ [INFO] [stdout] 12 | | .map(|c| c as u8 - 48) [INFO] [stdout] 13 | | .position(|y| y == max) [INFO] [stdout] 14 | | .unwrap() as usize [INFO] [stdout] | |______________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 11 ~ if l.chars() [INFO] [stdout] 12 + .map(|c| c as u8 - 48) [INFO] [stdout] 13 + .position(|y| y == max) [INFO] [stdout] 14 + .unwrap() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `check_validity` is never used [INFO] [stdout] --> src/bin/02.rs:39:4 [INFO] [stdout] | [INFO] [stdout] 39 | fn check_validity(id: u64) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `check_validity_2` is never used [INFO] [stdout] --> src/bin/02.rs:65:4 [INFO] [stdout] | [INFO] [stdout] 65 | fn check_validity_2(id: u64) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/bin/08.rs:58:17 [INFO] [stdout] | [INFO] [stdout] 58 | pub fn part_one(input: &str) -> Option { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/bin/08.rs:141:17 [INFO] [stdout] | [INFO] [stdout] 141 | pub fn part_two(input: &str) -> Option { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::str::Split<'_, char>` [INFO] [stdout] --> src/bin/02.rs:13:22 [INFO] [stdout] | [INFO] [stdout] 13 | let minmax = input [INFO] [stdout] | ______________________^ [INFO] [stdout] 14 | | .split('-') [INFO] [stdout] 15 | | .into_iter() [INFO] [stdout] | |________________________^ [INFO] [stdout] | [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 `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 13 ~ let minmax = input [INFO] [stdout] 14 + .split('-') [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::ops::RangeInclusive` [INFO] [stdout] --> src/bin/02.rs:32:9 [INFO] [stdout] | [INFO] [stdout] 32 | / (self.min..=self.max) [INFO] [stdout] 33 | | .into_iter() [INFO] [stdout] | |________________________^ help: consider removing `.into_iter()`: `(self.min..=self.max)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/02.rs:42:9 [INFO] [stdout] | [INFO] [stdout] 42 | return true; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 42 - return true; [INFO] [stdout] 42 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/02.rs:46:13 [INFO] [stdout] | [INFO] [stdout] 46 | return false; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 46 - return false; [INFO] [stdout] 46 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/02.rs:48:13 [INFO] [stdout] | [INFO] [stdout] 48 | return true; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 48 - return true; [INFO] [stdout] 48 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/bin/02.rs:41:8 [INFO] [stdout] | [INFO] [stdout] 41 | if id_str.len() % 2 != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace with: `!id_str.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 if-then-else expression returns a bool literal [INFO] [stdout] --> src/bin/02.rs:45:9 [INFO] [stdout] | [INFO] [stdout] 45 | / if upper == lower { [INFO] [stdout] 46 | | return false; [INFO] [stdout] 47 | | } else { [INFO] [stdout] 48 | | return true; [INFO] [stdout] 49 | | } [INFO] [stdout] | |_________^ help: you can reduce it to: `return upper != lower` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] = note: `#[warn(clippy::needless_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/bin/02.rs:61:9 [INFO] [stdout] | [INFO] [stdout] 61 | !(lower_half == upper_half) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(lower_half != upper_half)` [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: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/bin/02.rs:56:8 [INFO] [stdout] | [INFO] [stdout] 56 | if id_len % 2 != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: replace with: `!id_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] [INFO] [stdout] [INFO] [stdout] warning: usage of `.map(...).all(identity)` [INFO] [stdout] --> src/bin/02.rs:71:10 [INFO] [stdout] | [INFO] [stdout] 71 | .map(|i| { [INFO] [stdout] | __________^ [INFO] [stdout] 72 | | // OPTIMIZATION: skip current iteration if the id length is not divisible by i [INFO] [stdout] 73 | | if id_str.len() % i != 0 { [INFO] [stdout] 74 | | return true; [INFO] [stdout] ... | [INFO] [stdout] 89 | | }) [INFO] [stdout] 90 | | .all(|i| i) [INFO] [stdout] | |___________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_all_any_identity [INFO] [stdout] = note: `#[warn(clippy::map_all_any_identity)]` on by default [INFO] [stdout] help: use `.all(...)` instead [INFO] [stdout] | [INFO] [stdout] 71 ~ .all(|i| { [INFO] [stdout] 72 + // OPTIMIZATION: skip current iteration if the id length is not divisible by i [INFO] [stdout] 73 + if id_str.len() % i != 0 { [INFO] [stdout] 74 + return true; [INFO] [stdout] 75 + } else { [INFO] [stdout] 76 + // iterate through all chunks; if all chunks are equal to the first chunk, the id is invalid! [INFO] [stdout] 77 + if id_str.as_bytes().chunks(i).all(|x| { [INFO] [stdout] 78 + // check if current chunk is equal to first chunk [INFO] [stdout] 79 + *x == id_str.as_bytes()[0..i] [INFO] [stdout] 80 + }) { [INFO] [stdout] 81 + // id is invalid; all chunks were equal [INFO] [stdout] 82 + //println!("invalid id: {id}"); [INFO] [stdout] 83 + return false; [INFO] [stdout] 84 + // id is valid; not all chunks were equal [INFO] [stdout] 85 + } else { [INFO] [stdout] 86 + return true; [INFO] [stdout] 87 + } [INFO] [stdout] 88 + } [INFO] [stdout] 89 + }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::ops::RangeInclusive` [INFO] [stdout] --> src/bin/02.rs:69:5 [INFO] [stdout] | [INFO] [stdout] 69 | / (1..=id_str.len() / 2) [INFO] [stdout] 70 | | .into_iter() [INFO] [stdout] | |____________________^ help: consider removing `.into_iter()`: `(1..=id_str.len() / 2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/02.rs:74:17 [INFO] [stdout] | [INFO] [stdout] 74 | return true; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 74 - return true; [INFO] [stdout] 74 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/02.rs:83:21 [INFO] [stdout] | [INFO] [stdout] 83 | return false; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 83 - return false; [INFO] [stdout] 83 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/02.rs:86:21 [INFO] [stdout] | [INFO] [stdout] 86 | return true; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 86 - return true; [INFO] [stdout] 86 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/bin/02.rs:73:16 [INFO] [stdout] | [INFO] [stdout] 73 | if id_str.len() % i != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace with: `!id_str.len().is_multiple_of(i)` [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] [INFO] [stdout] [INFO] [stdout] warning: usage of `.map(...).all(identity)` [INFO] [stdout] --> src/bin/02.rs:98:10 [INFO] [stdout] | [INFO] [stdout] 98 | .map(|i| { [INFO] [stdout] | __________^ [INFO] [stdout] 99 | | if id_len % i != 0 { [INFO] [stdout] 100 | | return true; [INFO] [stdout] 101 | | } else { [INFO] [stdout] ... | [INFO] [stdout] 112 | | }) [INFO] [stdout] 113 | | .all(|i| i) [INFO] [stdout] | |___________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_all_any_identity [INFO] [stdout] help: use `.all(...)` instead [INFO] [stdout] | [INFO] [stdout] 98 ~ .all(|i| { [INFO] [stdout] 99 + if id_len % i != 0 { [INFO] [stdout] 100 + return true; [INFO] [stdout] 101 + } else { [INFO] [stdout] 102 + let chunk_size = i; [INFO] [stdout] 103 + [INFO] [stdout] 104 + // create chunks with size chunk_size (i) [INFO] [stdout] 105 + !(1..=(id_len / chunk_size)) [INFO] [stdout] 106 + .map(|j| { [INFO] [stdout] 107 + (id % 10u64.pow(j * chunk_size) - (id % 10u64.pow((j - 1) * chunk_size))) [INFO] [stdout] 108 + / 10u64.pow((j - 1) * chunk_size) [INFO] [stdout] 109 + }) [INFO] [stdout] 110 + .all(|x| x == (id % 10u64.pow(chunk_size))) [INFO] [stdout] 111 + } [INFO] [stdout] 112 + }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::ops::RangeInclusive` [INFO] [stdout] --> src/bin/02.rs:96:5 [INFO] [stdout] | [INFO] [stdout] 96 | / (1..=(id_len / 2)) [INFO] [stdout] 97 | | .into_iter() [INFO] [stdout] | |____________________^ help: consider removing `.into_iter()`: `(1..=(id_len / 2))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/02.rs:100:17 [INFO] [stdout] | [INFO] [stdout] 100 | return true; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 100 - return true; [INFO] [stdout] 100 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/bin/02.rs:99:16 [INFO] [stdout] | [INFO] [stdout] 99 | if id_len % i != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: replace with: `!id_len.is_multiple_of(i)` [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] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `I64Vec3` which implements the `Copy` trait [INFO] [stdout] --> src/bin/08.rs:27:51 [INFO] [stdout] | [INFO] [stdout] 27 | .map(|b2| b1.distance_squared(b2.clone())) [INFO] [stdout] | ^^^^^^^^^^ help: try dereferencing it: `*b2` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/bin/02.rs:120:14 [INFO] [stdout] | [INFO] [stdout] 120 | .map(|i| Range::new(i)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Range::new` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> src/bin/08.rs:37:20 [INFO] [stdout] | [INFO] [stdout] 37 | boxes: l.boxes.union(&r.boxes).map(|x| *x).collect(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `l.boxes.union(&r.boxes).copied()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] = note: `#[warn(clippy::map_clone)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for cloning elements [INFO] [stdout] --> src/bin/08.rs:125:20 [INFO] [stdout] | [INFO] [stdout] 125 | circuits = circuits [INFO] [stdout] | ____________________^ [INFO] [stdout] 126 | | .iter() [INFO] [stdout] 127 | | .filter(|f| *f.clone() != pair) [INFO] [stdout] 128 | | .map(|x| x.clone()) [INFO] [stdout] | |_______________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] help: consider calling the dedicated `cloned` method [INFO] [stdout] | [INFO] [stdout] 125 ~ circuits = circuits [INFO] [stdout] 126 + .iter() [INFO] [stdout] 127 + .filter(|f| *f.clone() != pair).cloned() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `.clone()` on a double reference, which returns `&Circuit` instead of cloning the inner type [INFO] [stdout] --> src/bin/08.rs:127:27 [INFO] [stdout] | [INFO] [stdout] 127 | .filter(|f| *f.clone() != pair) [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(suspicious_double_ref_op)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 9.41s [INFO] running `Command { std: "docker" "inspect" "039461d6a9704e7c699c0736d4ebdd609fd9cd12860e0a244b1202c62a19d5d4", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "039461d6a9704e7c699c0736d4ebdd609fd9cd12860e0a244b1202c62a19d5d4", kill_on_drop: false }` [INFO] [stdout] 039461d6a9704e7c699c0736d4ebdd609fd9cd12860e0a244b1202c62a19d5d4