[INFO] cloning repository https://github.com/Fekinox/aoc-2023 [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/Fekinox/aoc-2023" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FFekinox%2Faoc-2023", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FFekinox%2Faoc-2023'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] c36229d154d3b385b1e09e3716763f016d3d0a99 [INFO] linting Fekinox/aoc-2023 against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FFekinox%2Faoc-2023" "/workspace/builds/worker-1-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-1-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/Fekinox/aoc-2023 [INFO] finished tweaking git repo https://github.com/Fekinox/aoc-2023 [INFO] tweaked toml for git repo https://github.com/Fekinox/aoc-2023 written to /workspace/builds/worker-1-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/Fekinox/aoc-2023 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/Fekinox/aoc-2023 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 wide v0.7.13 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-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] 66f21e097c625611ce3e84e5aab8d16186c4ec9d9b20cc878b2176435189ba23 [INFO] running `Command { std: "docker" "start" "-a" "66f21e097c625611ce3e84e5aab8d16186c4ec9d9b20cc878b2176435189ba23", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "66f21e097c625611ce3e84e5aab8d16186c4ec9d9b20cc878b2176435189ba23", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "66f21e097c625611ce3e84e5aab8d16186c4ec9d9b20cc878b2176435189ba23", kill_on_drop: false }` [INFO] [stdout] 66f21e097c625611ce3e84e5aab8d16186c4ec9d9b20cc878b2176435189ba23 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-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] 763479dc39242e88696f366622dd7c54a1ee5760e76874b4ea54da59e8b970fd [INFO] running `Command { std: "docker" "start" "-a" "763479dc39242e88696f366622dd7c54a1ee5760e76874b4ea54da59e8b970fd", kill_on_drop: false }` [INFO] [stderr] Compiling num-traits v0.2.17 [INFO] [stderr] Compiling num-integer v0.1.45 [INFO] [stderr] Compiling proc-macro2 v1.0.70 [INFO] [stderr] Compiling libc v0.2.151 [INFO] [stderr] Compiling num-bigint v0.4.4 [INFO] [stderr] Compiling num-rational v0.4.1 [INFO] [stderr] Compiling syn v1.0.109 [INFO] [stderr] Checking bytemuck v1.14.0 [INFO] [stderr] Compiling matrixmultiply v0.3.8 [INFO] [stderr] Compiling num-iter v0.1.43 [INFO] [stderr] Compiling anyhow v1.0.75 [INFO] [stderr] Checking ppv-lite86 v0.2.17 [INFO] [stderr] Checking smol_str v0.2.0 [INFO] [stderr] Checking safe_arch v0.7.1 [INFO] [stderr] Checking wide v0.7.13 [INFO] [stderr] Compiling quote v1.0.33 [INFO] [stderr] Checking getrandom v0.2.11 [INFO] [stderr] Checking rand_core v0.6.4 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Checking num-complex v0.4.4 [INFO] [stderr] Checking approx v0.5.1 [INFO] [stderr] Checking rand v0.8.5 [INFO] [stderr] Checking simba v0.8.1 [INFO] [stderr] Checking num v0.4.1 [INFO] [stderr] Compiling nalgebra-macros v0.2.1 [INFO] [stderr] Checking nalgebra v0.32.3 [INFO] [stderr] Checking aoc-2023 v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `HashSet` [INFO] [stdout] --> src/util.rs:1:55 [INFO] [stdout] | [INFO] [stdout] 1 | use std::collections::{HashMap, VecDeque, BinaryHeap, HashSet}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Add` [INFO] [stdout] --> src/util.rs:5:38 [INFO] [stdout] | [INFO] [stdout] 5 | use std::ops::{Deref, DerefMut, Sub, Add}; [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around type [INFO] [stdout] --> src/util.rs:110:21 [INFO] [stdout] | [INFO] [stdout] 110 | mut edges: impl (FnMut(T) -> C), [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] 110 - mut edges: impl (FnMut(T) -> C), [INFO] [stdout] 110 + mut edges: impl FnMut(T) -> C , [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around type [INFO] [stdout] --> src/util.rs:139:17 [INFO] [stdout] | [INFO] [stdout] 139 | edges: impl (Fn(T) -> C), [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 139 - edges: impl (Fn(T) -> C), [INFO] [stdout] 139 + edges: impl Fn(T) -> C , [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around type [INFO] [stdout] --> src/util.rs:167:17 [INFO] [stdout] | [INFO] [stdout] 167 | edges: impl (Fn(T) -> C), [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 167 - edges: impl (Fn(T) -> C), [INFO] [stdout] 167 + edges: impl Fn(T) -> C , [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/aoc01/mod.rs:3:20 [INFO] [stdout] | [INFO] [stdout] 3 | const DIGITMAP: [(&'static str, i64); 9] = [ [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] = note: `#[warn(clippy::redundant_static_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::HashMap` [INFO] [stdout] --> src/aoc06/mod.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::collections::HashMap; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> src/aoc07/mod.rs:65:15 [INFO] [stdout] | [INFO] [stdout] 65 | j += match (second_max, max) { [INFO] [stdout] | _______________^ [INFO] [stdout] 66 | | (1,1) => 0, // high card [INFO] [stdout] 67 | | (1,2) => 1, // one pair [INFO] [stdout] 68 | | (2,2) => 2, // two pair [INFO] [stdout] ... | [INFO] [stdout] 72 | | _ => 6, // five of a kind [INFO] [stdout] 73 | | } << 4 * 5; [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] = note: `#[warn(clippy::precedence)]` on by default [INFO] [stdout] help: consider parenthesizing your expression [INFO] [stdout] | [INFO] [stdout] 65 ~ j += match (second_max, max) { [INFO] [stdout] 66 + (1,1) => 0, // high card [INFO] [stdout] 67 + (1,2) => 1, // one pair [INFO] [stdout] 68 + (2,2) => 2, // two pair [INFO] [stdout] 69 + (1,3) => 3, // three of a kind [INFO] [stdout] 70 + (2,3) => 4, // full house [INFO] [stdout] 71 + (1,4) => 5, // four of a kind [INFO] [stdout] 72 + _ => 6, // five of a kind [INFO] [stdout] 73 ~ } << (4 * 5); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> src/aoc07/mod.rs:100:14 [INFO] [stdout] | [INFO] [stdout] 100 | j += match (second_max, max) { [INFO] [stdout] | ______________^ [INFO] [stdout] 101 | | // high card [INFO] [stdout] 102 | | (1,1) => jokers.min(1), [INFO] [stdout] ... | [INFO] [stdout] 118 | | _ => 6, [INFO] [stdout] 119 | | } << 4 * 5; [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] help: consider parenthesizing your expression [INFO] [stdout] | [INFO] [stdout] 100 ~ j += match (second_max, max) { [INFO] [stdout] 101 + // high card [INFO] [stdout] 102 + (1,1) => jokers.min(1), [INFO] [stdout] 103 + [INFO] [stdout] 104 + // one pair [INFO] [stdout] 105 + (1,2) => 1 + jokers.min(1).mul(2), [INFO] [stdout] 106 + [INFO] [stdout] 107 + // two pair [INFO] [stdout] 108 + (2,2) => (2 + jokers.mul(2)).min(5), [INFO] [stdout] 109 + [INFO] [stdout] 110 + // three of a kind [INFO] [stdout] 111 + (1,3) => 3 + jokers.min(1).mul(2), [INFO] [stdout] 112 + [INFO] [stdout] 113 + // full house [INFO] [stdout] 114 + (2,3) => 4 + jokers.min(1).mul(2), [INFO] [stdout] 115 + [INFO] [stdout] 116 + // four of a kind [INFO] [stdout] 117 + (1,4) => 5 + jokers.min(1), [INFO] [stdout] 118 + _ => 6, [INFO] [stdout] 119 ~ } << (4 * 5); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `VecDeque` [INFO] [stdout] --> src/aoc10/mod.rs:2:33 [INFO] [stdout] | [INFO] [stdout] 2 | use std::collections::{HashSet, VecDeque}; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `collections::HashMap` and `ops` [INFO] [stdout] --> src/aoc15/mod.rs:3:11 [INFO] [stdout] | [INFO] [stdout] 3 | use std::{ops, collections::HashMap}; [INFO] [stdout] | ^^^ ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `cell::RefCell` and `collections::BinaryHeap` [INFO] [stdout] --> src/aoc17/mod.rs:1:11 [INFO] [stdout] | [INFO] [stdout] 1 | use std::{collections::BinaryHeap, cell::RefCell}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `PrioQueueEntry` [INFO] [stdout] --> src/aoc17/mod.rs:3:47 [INFO] [stdout] | [INFO] [stdout] 3 | use crate::util::{Direction, Grid, read_grid, PrioQueueEntry, dijkstra_tree}; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses [INFO] [stdout] --> src/aoc18/mod.rs:109:37 [INFO] [stdout] | [INFO] [stdout] 109 | let new_pos = (pos.0 + dr * ((*dist as isize)), pos.1 + dc * ((*dist as isize))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: remove them: `(*dist as isize)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_parens [INFO] [stdout] = note: `#[warn(clippy::double_parens)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses [INFO] [stdout] --> src/aoc18/mod.rs:109:70 [INFO] [stdout] | [INFO] [stdout] 109 | let new_pos = (pos.0 + dr * ((*dist as isize)), pos.1 + dc * ((*dist as isize))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: remove them: `(*dist as isize)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_parens [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `fmt::format` [INFO] [stdout] --> src/aoc19/mod.rs:1:45 [INFO] [stdout] | [INFO] [stdout] 1 | use std::{collections::{HashMap, VecDeque}, fmt::format}; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `cmp::Ordering` [INFO] [stdout] --> src/aoc20/mod.rs:1:54 [INFO] [stdout] | [INFO] [stdout] 1 | use std::{collections::{HashMap, HashSet, VecDeque}, cmp::Ordering}; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `HashMap` [INFO] [stdout] --> src/aoc23/mod.rs:1:34 [INFO] [stdout] | [INFO] [stdout] 1 | use std::collections::{VecDeque, HashMap}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::fmt::format` [INFO] [stdout] --> src/aoc24/mod.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::fmt::format; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `SMatrix` [INFO] [stdout] --> src/aoc24/mod.rs:2:34 [INFO] [stdout] | [INFO] [stdout] 2 | use nalgebra::{SVector, Vector3, SMatrix, Matrix6, Vector6}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `BigRational`, `Rational64`, `Signed`, `Zero`, and `rational::Ratio` [INFO] [stdout] --> src/aoc24/mod.rs:3:11 [INFO] [stdout] | [INFO] [stdout] 3 | use num::{Rational64, rational::Ratio, Signed, Zero, BigInt, BigRational}; [INFO] [stdout] | ^^^^^^^^^^ ^^^^^^^^^^^^^^^ ^^^^^^ ^^^^ ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `HashSet` [INFO] [stdout] --> src/util.rs:1:55 [INFO] [stdout] | [INFO] [stdout] 1 | use std::collections::{HashMap, VecDeque, BinaryHeap, HashSet}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Add` [INFO] [stdout] --> src/util.rs:5:38 [INFO] [stdout] | [INFO] [stdout] 5 | use std::ops::{Deref, DerefMut, Sub, Add}; [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around type [INFO] [stdout] --> src/util.rs:110:21 [INFO] [stdout] | [INFO] [stdout] 110 | mut edges: impl (FnMut(T) -> C), [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] 110 - mut edges: impl (FnMut(T) -> C), [INFO] [stdout] 110 + mut edges: impl FnMut(T) -> C , [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around type [INFO] [stdout] --> src/util.rs:139:17 [INFO] [stdout] | [INFO] [stdout] 139 | edges: impl (Fn(T) -> C), [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 139 - edges: impl (Fn(T) -> C), [INFO] [stdout] 139 + edges: impl Fn(T) -> C , [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around type [INFO] [stdout] --> src/util.rs:167:17 [INFO] [stdout] | [INFO] [stdout] 167 | edges: impl (Fn(T) -> C), [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 167 - edges: impl (Fn(T) -> C), [INFO] [stdout] 167 + edges: impl Fn(T) -> C , [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/aoc01/mod.rs:3:20 [INFO] [stdout] | [INFO] [stdout] 3 | const DIGITMAP: [(&'static str, i64); 9] = [ [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] = note: `#[warn(clippy::redundant_static_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::HashMap` [INFO] [stdout] --> src/aoc06/mod.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::collections::HashMap; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> src/aoc07/mod.rs:65:15 [INFO] [stdout] | [INFO] [stdout] 65 | j += match (second_max, max) { [INFO] [stdout] | _______________^ [INFO] [stdout] 66 | | (1,1) => 0, // high card [INFO] [stdout] 67 | | (1,2) => 1, // one pair [INFO] [stdout] 68 | | (2,2) => 2, // two pair [INFO] [stdout] ... | [INFO] [stdout] 72 | | _ => 6, // five of a kind [INFO] [stdout] 73 | | } << 4 * 5; [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] = note: `#[warn(clippy::precedence)]` on by default [INFO] [stdout] help: consider parenthesizing your expression [INFO] [stdout] | [INFO] [stdout] 65 ~ j += match (second_max, max) { [INFO] [stdout] 66 + (1,1) => 0, // high card [INFO] [stdout] 67 + (1,2) => 1, // one pair [INFO] [stdout] 68 + (2,2) => 2, // two pair [INFO] [stdout] 69 + (1,3) => 3, // three of a kind [INFO] [stdout] 70 + (2,3) => 4, // full house [INFO] [stdout] 71 + (1,4) => 5, // four of a kind [INFO] [stdout] 72 + _ => 6, // five of a kind [INFO] [stdout] 73 ~ } << (4 * 5); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> src/aoc07/mod.rs:100:14 [INFO] [stdout] | [INFO] [stdout] 100 | j += match (second_max, max) { [INFO] [stdout] | ______________^ [INFO] [stdout] 101 | | // high card [INFO] [stdout] 102 | | (1,1) => jokers.min(1), [INFO] [stdout] ... | [INFO] [stdout] 118 | | _ => 6, [INFO] [stdout] 119 | | } << 4 * 5; [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] help: consider parenthesizing your expression [INFO] [stdout] | [INFO] [stdout] 100 ~ j += match (second_max, max) { [INFO] [stdout] 101 + // high card [INFO] [stdout] 102 + (1,1) => jokers.min(1), [INFO] [stdout] 103 + [INFO] [stdout] 104 + // one pair [INFO] [stdout] 105 + (1,2) => 1 + jokers.min(1).mul(2), [INFO] [stdout] 106 + [INFO] [stdout] 107 + // two pair [INFO] [stdout] 108 + (2,2) => (2 + jokers.mul(2)).min(5), [INFO] [stdout] 109 + [INFO] [stdout] 110 + // three of a kind [INFO] [stdout] 111 + (1,3) => 3 + jokers.min(1).mul(2), [INFO] [stdout] 112 + [INFO] [stdout] 113 + // full house [INFO] [stdout] 114 + (2,3) => 4 + jokers.min(1).mul(2), [INFO] [stdout] 115 + [INFO] [stdout] 116 + // four of a kind [INFO] [stdout] 117 + (1,4) => 5 + jokers.min(1), [INFO] [stdout] 118 + _ => 6, [INFO] [stdout] 119 ~ } << (4 * 5); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `VecDeque` [INFO] [stdout] --> src/aoc10/mod.rs:2:33 [INFO] [stdout] | [INFO] [stdout] 2 | use std::collections::{HashSet, VecDeque}; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `collections::HashMap` and `ops` [INFO] [stdout] --> src/aoc15/mod.rs:3:11 [INFO] [stdout] | [INFO] [stdout] 3 | use std::{ops, collections::HashMap}; [INFO] [stdout] | ^^^ ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `cell::RefCell` and `collections::BinaryHeap` [INFO] [stdout] --> src/aoc17/mod.rs:1:11 [INFO] [stdout] | [INFO] [stdout] 1 | use std::{collections::BinaryHeap, cell::RefCell}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `PrioQueueEntry` [INFO] [stdout] --> src/aoc17/mod.rs:3:47 [INFO] [stdout] | [INFO] [stdout] 3 | use crate::util::{Direction, Grid, read_grid, PrioQueueEntry, dijkstra_tree}; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses [INFO] [stdout] --> src/aoc18/mod.rs:109:37 [INFO] [stdout] | [INFO] [stdout] 109 | let new_pos = (pos.0 + dr * ((*dist as isize)), pos.1 + dc * ((*dist as isize))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: remove them: `(*dist as isize)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_parens [INFO] [stdout] = note: `#[warn(clippy::double_parens)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses [INFO] [stdout] --> src/aoc18/mod.rs:109:70 [INFO] [stdout] | [INFO] [stdout] 109 | let new_pos = (pos.0 + dr * ((*dist as isize)), pos.1 + dc * ((*dist as isize))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: remove them: `(*dist as isize)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_parens [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `fmt::format` [INFO] [stdout] --> src/aoc19/mod.rs:1:45 [INFO] [stdout] | [INFO] [stdout] 1 | use std::{collections::{HashMap, VecDeque}, fmt::format}; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `cmp::Ordering` [INFO] [stdout] --> src/aoc20/mod.rs:1:54 [INFO] [stdout] | [INFO] [stdout] 1 | use std::{collections::{HashMap, HashSet, VecDeque}, cmp::Ordering}; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `HashMap` [INFO] [stdout] --> src/aoc23/mod.rs:1:34 [INFO] [stdout] | [INFO] [stdout] 1 | use std::collections::{VecDeque, HashMap}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::fmt::format` [INFO] [stdout] --> src/aoc24/mod.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::fmt::format; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `SMatrix` [INFO] [stdout] --> src/aoc24/mod.rs:2:34 [INFO] [stdout] | [INFO] [stdout] 2 | use nalgebra::{SVector, Vector3, SMatrix, Matrix6, Vector6}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `BigRational`, `Rational64`, `Signed`, `Zero`, and `rational::Ratio` [INFO] [stdout] --> src/aoc24/mod.rs:3:11 [INFO] [stdout] | [INFO] [stdout] 3 | use num::{Rational64, rational::Ratio, Signed, Zero, BigInt, BigRational}; [INFO] [stdout] | ^^^^^^^^^^ ^^^^^^^^^^^^^^^ ^^^^^^ ^^^^ ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `start` [INFO] [stdout] --> src/aoc06/mod.rs:98:9 [INFO] [stdout] | [INFO] [stdout] 98 | let start = find_first_pass(bigtime, bigdist); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_start` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `end` [INFO] [stdout] --> src/aoc06/mod.rs:99:9 [INFO] [stdout] | [INFO] [stdout] 99 | let end = find_last_pass(bigtime, bigdist); [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_end` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `ins` [INFO] [stdout] --> src/aoc20/mod.rs:231:36 [INFO] [stdout] | [INFO] [stdout] 231 | (ModType::Conjunction, ins, _) => { [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_ins` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `state` [INFO] [stdout] --> src/aoc20/mod.rs:255:9 [INFO] [stdout] | [INFO] [stdout] 255 | let state = init_modstate(&spec); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_state` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `r` [INFO] [stdout] --> src/aoc21/mod.rs:7:41 [INFO] [stdout] | [INFO] [stdout] 7 | let mut new_grid = Grid::build(|r, c| false, grid[0].len(), grid.len()); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_r` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `c` [INFO] [stdout] --> src/aoc21/mod.rs:7:44 [INFO] [stdout] | [INFO] [stdout] 7 | let mut new_grid = Grid::build(|r, c| false, grid[0].len(), grid.len()); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_c` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `r` [INFO] [stdout] --> src/aoc21/mod.rs:40:41 [INFO] [stdout] | [INFO] [stdout] 40 | let mut new_grid = Grid::build(|r, c| false, dilated_grid[0].len(), dilated_grid.len()); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_r` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `c` [INFO] [stdout] --> src/aoc21/mod.rs:40:44 [INFO] [stdout] | [INFO] [stdout] 40 | let mut new_grid = Grid::build(|r, c| false, dilated_grid[0].len(), dilated_grid.len()); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_c` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `height` [INFO] [stdout] --> src/aoc21/mod.rs:96:17 [INFO] [stdout] | [INFO] [stdout] 96 | let (width, height) = (grid[0].len(), grid.len()); [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_height` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `printrow` is never used [INFO] [stdout] --> src/aoc10/mod.rs:92:4 [INFO] [stdout] | [INFO] [stdout] 92 | fn printrow(the_loop: &HashSet<(usize, usize)>, grid: &Grid, row: &Vec<(bool, Option)>, rowidx: usize) { [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 `manacher` is never used [INFO] [stdout] --> src/aoc13/mod.rs:77:4 [INFO] [stdout] | [INFO] [stdout] 77 | fn manacher(v: Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `palindromes_vline` is never used [INFO] [stdout] --> src/aoc13/mod.rs:123:4 [INFO] [stdout] | [INFO] [stdout] 123 | fn palindromes_vline(grid: &Grid) -> Grid { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `pad` is never used [INFO] [stdout] --> src/aoc13/mod.rs:184:4 [INFO] [stdout] | [INFO] [stdout] 184 | fn pad(grid: Grid) -> Grid { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `spin_cycle` is never used [INFO] [stdout] --> src/aoc14/mod.rs:88:4 [INFO] [stdout] | [INFO] [stdout] 88 | fn spin_cycle(grid: &Grid) -> Grid { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `reconstruct` is never used [INFO] [stdout] --> src/aoc14/mod.rs:152:4 [INFO] [stdout] | [INFO] [stdout] 152 | fn reconstruct(points: &Vec<(bool, usize, usize)>, width: usize) -> Grid { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `print_boxes` is never used [INFO] [stdout] --> src/aoc15/mod.rs:41:4 [INFO] [stdout] | [INFO] [stdout] 41 | fn print_boxes(boxes: &Vec>) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type alias `NoSimSpec` is never used [INFO] [stdout] --> src/aoc20/mod.rs:32:6 [INFO] [stdout] | [INFO] [stdout] 32 | type NoSimSpec = HashMap, Vec)>; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `next_module_state_iso` is never used [INFO] [stdout] --> src/aoc20/mod.rs:79:4 [INFO] [stdout] | [INFO] [stdout] 79 | fn next_module_state_iso(spec: &ModSpec, state: &ModStates, targets: &Vec) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type alias `BigIntVector` is never used [INFO] [stdout] --> src/aoc24/mod.rs:7:6 [INFO] [stdout] | [INFO] [stdout] 7 | type BigIntVector = (BigInt, BigInt, BigInt); [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-canonical implementation of `partial_cmp` on an `Ord` type [INFO] [stdout] --> src/util.rs:54:1 [INFO] [stdout] | [INFO] [stdout] 54 | / impl PartialOrd for PrioQueueEntry { [INFO] [stdout] 55 | | fn partial_cmp(&self, other: &Self) -> Option { [INFO] [stdout] 56 | | self.1.partial_cmp(&other.1).map(Ordering::reverse) [INFO] [stdout] 57 | | } [INFO] [stdout] 58 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_canonical_partial_ord_impl [INFO] [stdout] = note: `#[warn(clippy::non_canonical_partial_ord_impl)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 55 - fn partial_cmp(&self, other: &Self) -> Option { [INFO] [stdout] 56 - self.1.partial_cmp(&other.1).map(Ordering::reverse) [INFO] [stdout] 57 - } [INFO] [stdout] 55 + fn partial_cmp(&self, other: &Self) -> Option { Some(self.cmp(other)) } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/util.rs:132:5 [INFO] [stdout] | [INFO] [stdout] 132 | return bfs_tree; [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] 132 - return bfs_tree; [INFO] [stdout] 132 + bfs_tree [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/util.rs:163:5 [INFO] [stdout] | [INFO] [stdout] 163 | return shortest_paths_tree; [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] 163 - return shortest_paths_tree; [INFO] [stdout] 163 + shortest_paths_tree [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/util.rs:206:17 [INFO] [stdout] | [INFO] [stdout] 206 | pub fn iter<'a>(&'a self) -> impl Iterator { [INFO] [stdout] | ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 206 - pub fn iter<'a>(&'a self) -> impl Iterator { [INFO] [stdout] 206 + pub fn iter(&self) -> impl Iterator { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `start` [INFO] [stdout] --> src/aoc06/mod.rs:98:9 [INFO] [stdout] | [INFO] [stdout] 98 | let start = find_first_pass(bigtime, bigdist); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_start` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `end` [INFO] [stdout] --> src/aoc06/mod.rs:99:9 [INFO] [stdout] | [INFO] [stdout] 99 | let end = find_last_pass(bigtime, bigdist); [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_end` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/util.rs:257:35 [INFO] [stdout] | [INFO] [stdout] 257 | pub fn neighborhood_inclusive<'a>(&'a self, row: usize, col: usize, radius: usize) [INFO] [stdout] | ^^ ^^ [INFO] [stdout] 258 | -> impl Iterator { [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 257 ~ pub fn neighborhood_inclusive(&self, row: usize, col: usize, radius: usize) [INFO] [stdout] 258 ~ -> impl Iterator { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/util.rs:271:35 [INFO] [stdout] | [INFO] [stdout] 271 | pub fn neighborhood_exclusive<'a>(&'a self, row: usize, col: usize, radius: usize) [INFO] [stdout] | ^^ ^^ [INFO] [stdout] 272 | -> impl Iterator { [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 271 ~ pub fn neighborhood_exclusive(&self, row: usize, col: usize, radius: usize) [INFO] [stdout] 272 ~ -> impl Iterator { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/util.rs:291:20 [INFO] [stdout] | [INFO] [stdout] 291 | pub fn subgrid<'a>(&'a self, row: usize, col: usize, width: usize, height: usize) [INFO] [stdout] | ^^ ^^ [INFO] [stdout] 292 | -> Grid<&'a T> { [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 291 ~ pub fn subgrid(&self, row: usize, col: usize, width: usize, height: usize) [INFO] [stdout] 292 ~ -> Grid<&T> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc01/mod.rs:26:5 [INFO] [stdout] | [INFO] [stdout] 26 | return first_digit * 10 + last_digit; [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] 26 - return first_digit * 10 + last_digit; [INFO] [stdout] 26 + first_digit * 10 + last_digit [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/aoc01/mod.rs:18:23 [INFO] [stdout] | [INFO] [stdout] 18 | .find(|c| c.is_digit(10)) [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `c.is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] = note: `#[warn(clippy::is_digit_ascii_radix)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/aoc01/mod.rs:23:23 [INFO] [stdout] | [INFO] [stdout] 23 | .find(|c| c.is_digit(10)) [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `c.is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/aoc01/mod.rs:31:8 [INFO] [stdout] | [INFO] [stdout] 31 | if c.is_digit(10) { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `c.is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc01/mod.rs:55:5 [INFO] [stdout] | [INFO] [stdout] 55 | return first_digit * 10 + last_digit; [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] 55 - return first_digit * 10 + last_digit; [INFO] [stdout] 55 + first_digit * 10 + last_digit [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/aoc01/mod.rs:63:42 [INFO] [stdout] | [INFO] [stdout] 63 | .map(|s| get_calibration_val(&s)) [INFO] [stdout] | ^^ help: change this to: `s` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/aoc01/mod.rs:69:34 [INFO] [stdout] | [INFO] [stdout] 69 | .map(|s| get_cal_new(&s)) [INFO] [stdout] | ^^ help: change this to: `s` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc02/mod.rs:18:5 [INFO] [stdout] | [INFO] [stdout] 18 | return Some((first, second)); [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] 18 - return Some((first, second)); [INFO] [stdout] 18 + Some((first, second)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc02/mod.rs:48:5 [INFO] [stdout] | [INFO] [stdout] 48 | return Game { id, events }; [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 Game { id, events }; [INFO] [stdout] 48 + Game { id, events } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this call to `from_str_radix` can be replaced with a call to `str::parse` [INFO] [stdout] --> src/aoc02/mod.rs:24:14 [INFO] [stdout] | [INFO] [stdout] 24 | let id = i64::from_str_radix(tokens.next().unwrap(), 10).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `tokens.next().unwrap().parse::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_str_radix_10 [INFO] [stdout] = note: `#[warn(clippy::from_str_radix_10)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this call to `from_str_radix` can be replaced with a call to `str::parse` [INFO] [stdout] --> src/aoc02/mod.rs:29:21 [INFO] [stdout] | [INFO] [stdout] 29 | let count = i64::from_str_radix(count, 10).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `count.parse::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_str_radix_10 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should use the `ends_with` method [INFO] [stdout] --> src/aoc02/mod.rs:41:12 [INFO] [stdout] | [INFO] [stdout] 41 | if color.chars().last().unwrap() == ';' { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `color.ends_with(';')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#chars_last_cmp [INFO] [stdout] = note: `#[warn(clippy::chars_last_cmp)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc02/mod.rs:61:5 [INFO] [stdout] | [INFO] [stdout] 61 | return Some(g.id); [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] 61 - return Some(g.id); [INFO] [stdout] 61 + Some(g.id) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc02/mod.rs:87:5 [INFO] [stdout] | [INFO] [stdout] 87 | return max_r.unwrap() * max_g.unwrap() * max_b.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] 87 - return max_r.unwrap() * max_g.unwrap() * max_b.unwrap(); [INFO] [stdout] 87 + max_r.unwrap() * max_g.unwrap() * max_b.unwrap() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/aoc02/mod.rs:95:37 [INFO] [stdout] | [INFO] [stdout] 95 | .map(|s| string_to_game(&s)) [INFO] [stdout] | ^^ help: change this to: `s` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/aoc02/mod.rs:100:43 [INFO] [stdout] | [INFO] [stdout] 100 | .filter_map(|g| validate_game(&g, 12, 13, 14)) [INFO] [stdout] | ^^ help: change this to: `g` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/aoc03/mod.rs:7:9 [INFO] [stdout] | [INFO] [stdout] 7 | if !grid[row][col].is_digit(10) { return None; } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `grid[row][col].is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/aoc03/mod.rs:9:19 [INFO] [stdout] | [INFO] [stdout] 9 | if col > 0 && grid[row][col-1].is_digit(10) { return None; } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `grid[row][col-1].is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/aoc03/mod.rs:15:34 [INFO] [stdout] | [INFO] [stdout] 15 | while ptr < grid[0].len() && grid[row][ptr].is_digit(10) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `grid[row][ptr].is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/aoc03/mod.rs:31:17 [INFO] [stdout] | [INFO] [stdout] 31 | if !grid[rr][cc].is_digit(10) && grid[rr][cc] != '.' { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `grid[rr][cc].is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc03/mod.rs:54:5 [INFO] [stdout] | [INFO] [stdout] 54 | return Some(n); [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] 54 - return Some(n); [INFO] [stdout] 54 + Some(n) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/aoc03/mod.rs:41:9 [INFO] [stdout] | [INFO] [stdout] 41 | if !grid[row][col].is_digit(10) { return None; } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `grid[row][col].is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/aoc03/mod.rs:44:22 [INFO] [stdout] | [INFO] [stdout] 44 | while ptr > 0 && grid[row][ptr-1].is_digit(10) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `grid[row][ptr-1].is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/aoc03/mod.rs:50:34 [INFO] [stdout] | [INFO] [stdout] 50 | while ptr < grid[0].len() && grid[row][ptr].is_digit(10) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `grid[row][ptr].is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc03/mod.rs:79:5 [INFO] [stdout] | [INFO] [stdout] 79 | return Some(nums.iter().product()); [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] 79 - return Some(nums.iter().product()); [INFO] [stdout] 79 + Some(nums.iter().product()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc03/mod.rs:98:5 [INFO] [stdout] | [INFO] [stdout] 98 | return Some((n, startrow, startcol)); [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] 98 - return Some((n, startrow, startcol)); [INFO] [stdout] 98 + Some((n, startrow, startcol)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/aoc03/mod.rs:83:9 [INFO] [stdout] | [INFO] [stdout] 83 | if !grid[row][col].is_digit(10) { return None; } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `grid[row][col].is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/aoc03/mod.rs:86:22 [INFO] [stdout] | [INFO] [stdout] 86 | while ptr > 0 && grid[row][ptr-1].is_digit(10) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `grid[row][ptr-1].is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/aoc03/mod.rs:94:34 [INFO] [stdout] | [INFO] [stdout] 94 | while ptr < grid[0].len() && grid[row][ptr].is_digit(10) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `grid[row][ptr].is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/aoc03/mod.rs:134:20 [INFO] [stdout] | [INFO] [stdout] 134 | if c.is_digit(10) || c == &'.' { return None; } [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `c.is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this call to `from_str_radix` can be replaced with a call to `str::parse` [INFO] [stdout] --> src/aoc04/mod.rs:11:34 [INFO] [stdout] | [INFO] [stdout] 11 | .map(|n| i64::from_str_radix(n, 10).unwrap()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `n.parse::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_str_radix_10 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this call to `from_str_radix` can be replaced with a call to `str::parse` [INFO] [stdout] --> src/aoc04/mod.rs:16:34 [INFO] [stdout] | [INFO] [stdout] 16 | .map(|n| i64::from_str_radix(n, 10).unwrap()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `n.parse::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_str_radix_10 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/aoc04/mod.rs:27:22 [INFO] [stdout] | [INFO] [stdout] 27 | let copies = copies.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try dereferencing it: `*copies` [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: the loop variable `z` is only used to index `cards` [INFO] [stdout] --> src/aoc04/mod.rs:36:18 [INFO] [stdout] | [INFO] [stdout] 36 | for z in (i+1)..=(i+matches) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 36 - for z in (i+1)..=(i+matches) { [INFO] [stdout] 36 + for in cards.iter_mut().take(i + matches + 1).skip((i+1)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc05/mod.rs:14:5 [INFO] [stdout] | [INFO] [stdout] 14 | return element; [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] 14 - return element; [INFO] [stdout] 14 + element [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc05/mod.rs:42:5 [INFO] [stdout] | [INFO] [stdout] 42 | return res; [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] 42 - return res; [INFO] [stdout] 42 + res [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc05/mod.rs:87:5 [INFO] [stdout] | [INFO] [stdout] 87 | return combine_ranges(&mapped_ranges); [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] 87 - return combine_ranges(&mapped_ranges); [INFO] [stdout] 87 + combine_ranges(&mapped_ranges) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `u64` which implements the `Copy` trait [INFO] [stdout] --> src/aoc05/mod.rs:122:29 [INFO] [stdout] | [INFO] [stdout] 122 | let mut s = s.clone(); [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*s` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc06/mod.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | / return (0..time) [INFO] [stdout] 8 | | .filter(|time_held| time_held * (time - time_held) > distance) [INFO] [stdout] 9 | | .count(); [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] 7 ~ (0..time) [INFO] [stdout] 8 + .filter(|time_held| time_held * (time - time_held) > distance) [INFO] [stdout] 9 ~ .count() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc06/mod.rs:36:5 [INFO] [stdout] | [INFO] [stdout] 36 | return lo; [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] 36 - return lo; [INFO] [stdout] 36 + lo [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc06/mod.rs:58:5 [INFO] [stdout] | [INFO] [stdout] 58 | return lo; [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] 58 - return lo; [INFO] [stdout] 58 + lo [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc06/mod.rs:70:5 [INFO] [stdout] | [INFO] [stdout] 70 | return (discriminant) as u64; [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] 70 - return (discriminant) as u64; [INFO] [stdout] 70 + (discriminant) as u64 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc08/mod.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 15 | return a; [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] 15 - return a; [INFO] [stdout] 15 + a [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/aoc08/mod.rs:44:42 [INFO] [stdout] | [INFO] [stdout] 44 | ('L', (left, _)) => { curr = &left; } [INFO] [stdout] | ^^^^^ help: change this to: `left` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/aoc08/mod.rs:45:43 [INFO] [stdout] | [INFO] [stdout] 45 | ('R', (_, right)) => { curr = &right; } [INFO] [stdout] | ^^^^^^ help: change this to: `right` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/aoc08/mod.rs:66:54 [INFO] [stdout] | [INFO] [stdout] 66 | ('L', (left, _)) => { curr = &left; } [INFO] [stdout] | ^^^^^ help: change this to: `left` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/aoc08/mod.rs:67:55 [INFO] [stdout] | [INFO] [stdout] 67 | ('R', (_, right)) => { curr = &right; } [INFO] [stdout] | ^^^^^^ help: change this to: `right` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc09/mod.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | return (hist[0] - newbegin, hist[hist.len() - 1] + newend); [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] 8 - return (hist[0] - newbegin, hist[hist.len() - 1] + newend); [INFO] [stdout] 8 + (hist[0] - newbegin, hist[hist.len() - 1] + newend) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc10/mod.rs:67:5 [INFO] [stdout] | [INFO] [stdout] 67 | return res; [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 res; [INFO] [stdout] 67 + res [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/aoc10/mod.rs:57:35 [INFO] [stdout] | [INFO] [stdout] 57 | '|' => get_connections_at(&grid, cell, &[D::Below, D::Above]), [INFO] [stdout] | ^^^^^ help: change this to: `grid` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/aoc10/mod.rs:58:35 [INFO] [stdout] | [INFO] [stdout] 58 | '-' => get_connections_at(&grid, cell, &[D::Left, D::Right]), [INFO] [stdout] | ^^^^^ help: change this to: `grid` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/aoc10/mod.rs:59:35 [INFO] [stdout] | [INFO] [stdout] 59 | 'L' => get_connections_at(&grid, cell, &[D::Below, D::Left]), [INFO] [stdout] | ^^^^^ help: change this to: `grid` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/aoc10/mod.rs:60:35 [INFO] [stdout] | [INFO] [stdout] 60 | 'J' => get_connections_at(&grid, cell, &[D::Below, D::Right]), [INFO] [stdout] | ^^^^^ help: change this to: `grid` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/aoc10/mod.rs:61:35 [INFO] [stdout] | [INFO] [stdout] 61 | '7' => get_connections_at(&grid, cell, &[D::Above, D::Right]), [INFO] [stdout] | ^^^^^ help: change this to: `grid` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/aoc10/mod.rs:62:35 [INFO] [stdout] | [INFO] [stdout] 62 | 'F' => get_connections_at(&grid, cell, &[D::Above, D::Left]), [INFO] [stdout] | ^^^^^ help: change this to: `grid` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/aoc10/mod.rs:73:9 [INFO] [stdout] | [INFO] [stdout] 73 | / grid.try_offset(start, (-1, 0)) [INFO] [stdout] 74 | | .map_or(false, |n| can_enter_from(grid, n, D::Below)), [INFO] [stdout] | |_________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 74 - .map_or(false, |n| can_enter_from(grid, n, D::Below)), [INFO] [stdout] 74 + .is_some_and(|n| can_enter_from(grid, n, D::Below)), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/aoc10/mod.rs:75:9 [INFO] [stdout] | [INFO] [stdout] 75 | / grid.try_offset(start, (1, 0)) [INFO] [stdout] 76 | | .map_or(false, |n| can_enter_from(grid, n, D::Above)), [INFO] [stdout] | |_________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 76 - .map_or(false, |n| can_enter_from(grid, n, D::Above)), [INFO] [stdout] 76 + .is_some_and(|n| can_enter_from(grid, n, D::Above)), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/aoc10/mod.rs:77:9 [INFO] [stdout] | [INFO] [stdout] 77 | / grid.try_offset(start, (0, 1)) [INFO] [stdout] 78 | | .map_or(false, |n| can_enter_from(grid, n, D::Left)), [INFO] [stdout] | |________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 78 - .map_or(false, |n| can_enter_from(grid, n, D::Left)), [INFO] [stdout] 78 + .is_some_and(|n| can_enter_from(grid, n, D::Left)), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/aoc10/mod.rs:79:9 [INFO] [stdout] | [INFO] [stdout] 79 | / grid.try_offset(start, (0, -1)) [INFO] [stdout] 80 | | .map_or(false, |n| can_enter_from(grid, n, D::Right)) [INFO] [stdout] | |_________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 80 - .map_or(false, |n| can_enter_from(grid, n, D::Right)) [INFO] [stdout] 80 + .is_some_and(|n| can_enter_from(grid, n, D::Right)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/aoc10/mod.rs:92:73 [INFO] [stdout] | [INFO] [stdout] 92 | fn printrow(the_loop: &HashSet<(usize, usize)>, grid: &Grid, row: &Vec<(bool, Option)>, rowidx: usize) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 92 - fn printrow(the_loop: &HashSet<(usize, usize)>, grid: &Grid, row: &Vec<(bool, Option)>, rowidx: usize) { [INFO] [stdout] 92 + fn printrow(the_loop: &HashSet<(usize, usize)>, grid: &Grid, row: &[(bool, Option)], rowidx: usize) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `print!()` with a format string that ends in a single newline [INFO] [stdout] --> src/aoc10/mod.rs:103:5 [INFO] [stdout] | [INFO] [stdout] 103 | print!("\n"); [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_with_newline [INFO] [stdout] = note: `#[warn(clippy::print_with_newline)]` on by default [INFO] [stdout] help: use `println!` instead [INFO] [stdout] | [INFO] [stdout] 103 - print!("\n"); [INFO] [stdout] 103 + println!(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `repeat().take()` can be written more concisely [INFO] [stdout] --> src/aoc10/mod.rs:112:9 [INFO] [stdout] | [INFO] [stdout] 112 | iter::repeat((false, None)).take(grid[0].len()).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n((false, None), grid[0].len())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n [INFO] [stdout] = note: `#[warn(clippy::manual_repeat_n)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `repeat().take()` can be written more concisely [INFO] [stdout] --> src/aoc10/mod.rs:174:15 [INFO] [stdout] | [INFO] [stdout] 174 | grid.push(iter::repeat('.').take(len).collect()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n('.', len)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `get_adjacent_pipes` doesn't need a mutable reference [INFO] [stdout] --> src/aoc10/mod.rs:184:43 [INFO] [stdout] | [INFO] [stdout] 184 | bfs(|vertex| { get_adjacent_pipes(&mut grid, vertex) }, location_of_s); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] = note: `#[warn(clippy::unnecessary_mut_passed)]` on by default [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 184 - bfs(|vertex| { get_adjacent_pipes(&mut grid, vertex) }, location_of_s); [INFO] [stdout] 184 + bfs(|vertex| { get_adjacent_pipes(&grid, vertex) }, location_of_s); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `repeat().take()` can be written more concisely [INFO] [stdout] --> src/aoc12/mod.rs:11:40 [INFO] [stdout] | [INFO] [stdout] 11 | let mut table: Vec> = iter::repeat( [INFO] [stdout] | ________________________________________^ [INFO] [stdout] 12 | | iter::repeat(0usize.into()).take(damaged_runs.len()+1).collect() [INFO] [stdout] 13 | | ).take(layout.len()+1).collect(); [INFO] [stdout] | |__________________________^ help: consider using `repeat_n()` instead: `std::iter::repeat_n(iter::repeat(0usize.into()).take(damaged_runs.len()+1).collect(), layout.len()+1)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `repeat().take()` can be written more concisely [INFO] [stdout] --> src/aoc12/mod.rs:12:9 [INFO] [stdout] | [INFO] [stdout] 12 | iter::repeat(0usize.into()).take(damaged_runs.len()+1).collect() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n(0usize.into(), damaged_runs.len()+1)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `repeat().take()` can be written more concisely [INFO] [stdout] --> src/aoc12/mod.rs:88:21 [INFO] [stdout] | [INFO] [stdout] 88 | / iter::repeat(layout_str) [INFO] [stdout] 89 | | .take(5) [INFO] [stdout] | |________________________________^ help: consider using `repeat_n()` instead: `std::iter::repeat_n(layout_str, 5)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `repeat().take()` can be written more concisely [INFO] [stdout] --> src/aoc13/mod.rs:78:33 [INFO] [stdout] | [INFO] [stdout] 78 | let mut radii: Vec = iter::repeat(0).take(v.len()).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n(0, v.len())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `repeat().take()` can be written more concisely [INFO] [stdout] --> src/aoc13/mod.rs:189:9 [INFO] [stdout] | [INFO] [stdout] 189 | / iter::repeat( [INFO] [stdout] 190 | | iter::repeat('X') [INFO] [stdout] 191 | | .take(w*2-1).collect::>().into() [INFO] [stdout] 192 | | ).take(h*2-1).collect::>().into(); [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n [INFO] [stdout] help: consider using `repeat_n()` instead [INFO] [stdout] | [INFO] [stdout] 189 ~ std::iter::repeat_n(iter::repeat('X') [INFO] [stdout] 190 ~ .take(w*2-1).collect::>().into(), h*2-1).collect::>().into(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `ins` [INFO] [stdout] --> src/aoc20/mod.rs:231:36 [INFO] [stdout] | [INFO] [stdout] 231 | (ModType::Conjunction, ins, _) => { [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_ins` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `state` [INFO] [stdout] --> src/aoc20/mod.rs:255:9 [INFO] [stdout] | [INFO] [stdout] 255 | let state = init_modstate(&spec); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_state` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `r` [INFO] [stdout] --> src/aoc21/mod.rs:7:41 [INFO] [stdout] | [INFO] [stdout] 7 | let mut new_grid = Grid::build(|r, c| false, grid[0].len(), grid.len()); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_r` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::vec::Vec` [INFO] [stdout] --> src/aoc13/mod.rs:190:13 [INFO] [stdout] | [INFO] [stdout] 190 | / iter::repeat('X') [INFO] [stdout] 191 | | .take(w*2-1).collect::>().into() [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()` [INFO] [stdout] | [INFO] [stdout] 190 ~ iter::repeat('X') [INFO] [stdout] 191 + .take(w*2-1).collect::>() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `c` [INFO] [stdout] --> src/aoc21/mod.rs:7:44 [INFO] [stdout] | [INFO] [stdout] 7 | let mut new_grid = Grid::build(|r, c| false, grid[0].len(), grid.len()); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_c` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `repeat().take()` can be written more concisely [INFO] [stdout] --> src/aoc13/mod.rs:190:13 [INFO] [stdout] | [INFO] [stdout] 190 | / iter::repeat('X') [INFO] [stdout] 191 | | .take(w*2-1).collect::>().into() [INFO] [stdout] | |____________________________^ help: consider using `repeat_n()` instead: `std::iter::repeat_n('X', w*2-1)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `r` [INFO] [stdout] --> src/aoc21/mod.rs:40:41 [INFO] [stdout] | [INFO] [stdout] 40 | let mut new_grid = Grid::build(|r, c| false, dilated_grid[0].len(), dilated_grid.len()); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_r` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `c` [INFO] [stdout] --> src/aoc21/mod.rs:40:44 [INFO] [stdout] | [INFO] [stdout] 40 | let mut new_grid = Grid::build(|r, c| false, dilated_grid[0].len(), dilated_grid.len()); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_c` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `height` [INFO] [stdout] --> src/aoc21/mod.rs:96:17 [INFO] [stdout] | [INFO] [stdout] 96 | let (width, height) = (grid[0].len(), grid.len()); [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_height` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `repeat().take()` can be written more concisely [INFO] [stdout] --> src/aoc14/mod.rs:18:39 [INFO] [stdout] | [INFO] [stdout] 18 | let mut snap_points: Vec = iter::repeat(0).take(grid[0].len()).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n(0, grid[0].len())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `repeat().take()` can be written more concisely [INFO] [stdout] --> src/aoc14/mod.rs:43:39 [INFO] [stdout] | [INFO] [stdout] 43 | let mut snap_points: Vec = iter::repeat(0).take(grid[0].len()).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n(0, grid[0].len())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `repeat().take()` can be written more concisely [INFO] [stdout] --> src/aoc14/mod.rs:99:39 [INFO] [stdout] | [INFO] [stdout] 99 | let mut snap_points: Vec = iter::repeat(0).take(width).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n(0, width)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `repeat().take()` can be written more concisely [INFO] [stdout] --> src/aoc14/mod.rs:119:39 [INFO] [stdout] | [INFO] [stdout] 119 | let mut snap_points: Vec = iter::repeat(0).take(width).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n(0, width)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/aoc14/mod.rs:143:24 [INFO] [stdout] | [INFO] [stdout] 143 | fn spicy_loads(points: &Vec<(bool, usize, usize)>, width: usize) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 143 - fn spicy_loads(points: &Vec<(bool, usize, usize)>, width: usize) -> usize { [INFO] [stdout] 143 + fn spicy_loads(points: &[(bool, usize, usize)], width: usize) -> usize { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/aoc15/mod.rs:12:28 [INFO] [stdout] | [INFO] [stdout] 12 | fn hashmap_step<'a>(boxes: &mut Vec>, instr: &'a [u8]) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 12 - fn hashmap_step<'a>(boxes: &mut Vec>, instr: &'a [u8]) { [INFO] [stdout] 12 + fn hashmap_step<'a>(boxes: &mut [Vec<(&'a [u8], usize)>], instr: &'a [u8]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression can be written more simply using `.retain()` [INFO] [stdout] --> src/aoc15/mod.rs:16:9 [INFO] [stdout] | [INFO] [stdout] 16 | boxes[hash] = boxes[hash].iter().filter(|(s,_)| s != &label).cloned().collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `boxes[hash].retain(|(s,_)| s != &label)` [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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/aoc15/mod.rs:44:12 [INFO] [stdout] | [INFO] [stdout] 44 | if b.len() == 0 { continue; } [INFO] [stdout] | ^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `b.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/aoc15/mod.rs:49:9 [INFO] [stdout] | [INFO] [stdout] 49 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] = note: `#[warn(clippy::println_empty_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/aoc15/mod.rs:62:39 [INFO] [stdout] | [INFO] [stdout] 62 | let mut boxes = iter::repeat_with(|| vec![]).take(256).collect(); [INFO] [stdout] | ^^^^^^^^^ help: replace the closure with `Vec::new`: `std::vec::Vec::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: unneeded `return` statement [INFO] [stdout] --> src/aoc16/mod.rs:77:5 [INFO] [stdout] | [INFO] [stdout] 77 | / return visited.iter() [INFO] [stdout] 78 | | .filter(|(d,_,_)| !d.is_empty()) [INFO] [stdout] 79 | | .count(); [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] 77 ~ visited.iter() [INFO] [stdout] 78 + .filter(|(d,_,_)| !d.is_empty()) [INFO] [stdout] 79 ~ .count() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `printrow` is never used [INFO] [stdout] --> src/aoc10/mod.rs:92:4 [INFO] [stdout] | [INFO] [stdout] 92 | fn printrow(the_loop: &HashSet<(usize, usize)>, grid: &Grid, row: &Vec<(bool, Option)>, rowidx: usize) { [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 `manacher` is never used [INFO] [stdout] --> src/aoc13/mod.rs:77:4 [INFO] [stdout] | [INFO] [stdout] 77 | fn manacher(v: Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `palindromes_vline` is never used [INFO] [stdout] --> src/aoc13/mod.rs:123:4 [INFO] [stdout] | [INFO] [stdout] 123 | fn palindromes_vline(grid: &Grid) -> Grid { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `pad` is never used [INFO] [stdout] --> src/aoc13/mod.rs:184:4 [INFO] [stdout] | [INFO] [stdout] 184 | fn pad(grid: Grid) -> Grid { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/aoc18/mod.rs:37:52 [INFO] [stdout] | [INFO] [stdout] 37 | let ((width, height), (or, oc)) = grid_extents(&instrs); [INFO] [stdout] | ^^^^^^^ help: change this to: `instrs` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `spin_cycle` is never used [INFO] [stdout] --> src/aoc14/mod.rs:88:4 [INFO] [stdout] | [INFO] [stdout] 88 | fn spin_cycle(grid: &Grid) -> Grid { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `reconstruct` is never used [INFO] [stdout] --> src/aoc14/mod.rs:152:4 [INFO] [stdout] | [INFO] [stdout] 152 | fn reconstruct(points: &Vec<(bool, usize, usize)>, width: usize) -> Grid { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `print_boxes` is never used [INFO] [stdout] --> src/aoc15/mod.rs:41:4 [INFO] [stdout] | [INFO] [stdout] 41 | fn print_boxes(boxes: &Vec>) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type alias `NoSimSpec` is never used [INFO] [stdout] --> src/aoc20/mod.rs:32:6 [INFO] [stdout] | [INFO] [stdout] 32 | type NoSimSpec = HashMap, Vec)>; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `next_module_state_iso` is never used [INFO] [stdout] --> src/aoc20/mod.rs:79:4 [INFO] [stdout] | [INFO] [stdout] 79 | fn next_module_state_iso(spec: &ModSpec, state: &ModStates, targets: &Vec) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type alias `BigIntVector` is never used [INFO] [stdout] --> src/aoc24/mod.rs:7:6 [INFO] [stdout] | [INFO] [stdout] 7 | type BigIntVector = (BigInt, BigInt, BigInt); [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `isize` is unnecessary [INFO] [stdout] --> src/aoc18/mod.rs:103:29 [INFO] [stdout] | [INFO] [stdout] 103 | let mut straight_area = 0 as isize; [INFO] [stdout] | ^^^^^^^^^^ help: try: `0_isize` [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] [INFO] [stdout] [INFO] [stdout] warning: non-canonical implementation of `partial_cmp` on an `Ord` type [INFO] [stdout] --> src/util.rs:54:1 [INFO] [stdout] | [INFO] [stdout] 54 | / impl PartialOrd for PrioQueueEntry { [INFO] [stdout] 55 | | fn partial_cmp(&self, other: &Self) -> Option { [INFO] [stdout] 56 | | self.1.partial_cmp(&other.1).map(Ordering::reverse) [INFO] [stdout] 57 | | } [INFO] [stdout] 58 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_canonical_partial_ord_impl [INFO] [stdout] = note: `#[warn(clippy::non_canonical_partial_ord_impl)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 55 - fn partial_cmp(&self, other: &Self) -> Option { [INFO] [stdout] 56 - self.1.partial_cmp(&other.1).map(Ordering::reverse) [INFO] [stdout] 57 - } [INFO] [stdout] 55 + fn partial_cmp(&self, other: &Self) -> Option { Some(self.cmp(other)) } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `skip(..).next()` on an iterator [INFO] [stdout] --> src/aoc18/mod.rs:142:45 [INFO] [stdout] | [INFO] [stdout] 142 | let s = s.split_whitespace().skip(2).next().unwrap().as_bytes(); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: use `nth` instead: `.nth(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_skip_next [INFO] [stdout] = note: `#[warn(clippy::iter_skip_next)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/util.rs:132:5 [INFO] [stdout] | [INFO] [stdout] 132 | return bfs_tree; [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] 132 - return bfs_tree; [INFO] [stdout] 132 + bfs_tree [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/util.rs:163:5 [INFO] [stdout] | [INFO] [stdout] 163 | return shortest_paths_tree; [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] 163 - return shortest_paths_tree; [INFO] [stdout] 163 + shortest_paths_tree [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `[(usize, usize); 4]` which implements the `Copy` trait [INFO] [stdout] --> src/aoc19/mod.rs:129:35 [INFO] [stdout] | [INFO] [stdout] 129 | let mut passing = part.clone(); [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `part` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/util.rs:206:17 [INFO] [stdout] | [INFO] [stdout] 206 | pub fn iter<'a>(&'a self) -> impl Iterator { [INFO] [stdout] | ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 206 - pub fn iter<'a>(&'a self) -> impl Iterator { [INFO] [stdout] 206 + pub fn iter(&self) -> impl Iterator { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `[(usize, usize); 4]` which implements the `Copy` trait [INFO] [stdout] --> src/aoc19/mod.rs:131:35 [INFO] [stdout] | [INFO] [stdout] 131 | let mut failing = part.clone(); [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `part` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `[(usize, usize); 4]` which implements the `Copy` trait [INFO] [stdout] --> src/aoc19/mod.rs:137:35 [INFO] [stdout] | [INFO] [stdout] 137 | let mut passing = part.clone(); [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `part` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `[(usize, usize); 4]` which implements the `Copy` trait [INFO] [stdout] --> src/aoc19/mod.rs:139:35 [INFO] [stdout] | [INFO] [stdout] 139 | let mut failing = part.clone(); [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `part` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/util.rs:257:35 [INFO] [stdout] | [INFO] [stdout] 257 | pub fn neighborhood_inclusive<'a>(&'a self, row: usize, col: usize, radius: usize) [INFO] [stdout] | ^^ ^^ [INFO] [stdout] 258 | -> impl Iterator { [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 257 ~ pub fn neighborhood_inclusive(&self, row: usize, col: usize, radius: usize) [INFO] [stdout] 258 ~ -> impl Iterator { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc20/mod.rs:19:5 [INFO] [stdout] | [INFO] [stdout] 19 | return x; [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] 19 - return x; [INFO] [stdout] 19 + x [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc20/mod.rs:24:5 [INFO] [stdout] | [INFO] [stdout] 24 | return (x / gcd(x,y)) * y; [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] 24 - return (x / gcd(x,y)) * y; [INFO] [stdout] 24 + (x / gcd(x,y)) * y [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/util.rs:271:35 [INFO] [stdout] | [INFO] [stdout] 271 | pub fn neighborhood_exclusive<'a>(&'a self, row: usize, col: usize, radius: usize) [INFO] [stdout] | ^^ ^^ [INFO] [stdout] 272 | -> impl Iterator { [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 271 ~ pub fn neighborhood_exclusive(&self, row: usize, col: usize, radius: usize) [INFO] [stdout] 272 ~ -> impl Iterator { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/util.rs:291:20 [INFO] [stdout] | [INFO] [stdout] 291 | pub fn subgrid<'a>(&'a self, row: usize, col: usize, width: usize, height: usize) [INFO] [stdout] | ^^ ^^ [INFO] [stdout] 292 | -> Grid<&'a T> { [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 291 ~ pub fn subgrid(&self, row: usize, col: usize, width: usize, height: usize) [INFO] [stdout] 292 ~ -> Grid<&T> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/aoc20/mod.rs:67:25 [INFO] [stdout] | [INFO] [stdout] 67 | let v = !(new_state.1[dest].len() == ins.len()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(new_state.1[dest].len() != ins.len())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/aoc20/mod.rs:51:64 [INFO] [stdout] | [INFO] [stdout] 51 | for o in outs { pulses.push_back((value, dest, &o)); } [INFO] [stdout] | ^^ help: change this to: `o` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/aoc20/mod.rs:58:64 [INFO] [stdout] | [INFO] [stdout] 58 | for o in outs { pulses.push_back((v, dest, &o)); } [INFO] [stdout] | ^^ help: change this to: `o` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/aoc20/mod.rs:68:60 [INFO] [stdout] | [INFO] [stdout] 68 | for o in outs { pulses.push_back((v, dest, &o)); } [INFO] [stdout] | ^^ help: change this to: `o` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/aoc20/mod.rs:128:29 [INFO] [stdout] | [INFO] [stdout] 128 | let v = !(new_state.1[dest].len() == ins.len()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(new_state.1[dest].len() != ins.len())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/aoc20/mod.rs:79:70 [INFO] [stdout] | [INFO] [stdout] 79 | fn next_module_state_iso(spec: &ModSpec, state: &ModStates, targets: &Vec) [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 79 - fn next_module_state_iso(spec: &ModSpec, state: &ModStates, targets: &Vec) [INFO] [stdout] 79 + fn next_module_state_iso(spec: &ModSpec, state: &ModStates, targets: &[SmolStr]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `repeat().take()` can be written more concisely [INFO] [stdout] --> src/aoc20/mod.rs:84:24 [INFO] [stdout] | [INFO] [stdout] 84 | let mut memories = std::iter::repeat(None).take(targets.len()).collect::>(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n(None, targets.len())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_none()` [INFO] [stdout] --> src/aoc20/mod.rs:100:24 [INFO] [stdout] | [INFO] [stdout] 100 | if let None = memories[index] { [INFO] [stdout] | -------^^^^------------------ help: try: `if memories[index].is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc01/mod.rs:26:5 [INFO] [stdout] | [INFO] [stdout] 26 | return first_digit * 10 + last_digit; [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] 26 - return first_digit * 10 + last_digit; [INFO] [stdout] 26 + first_digit * 10 + last_digit [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/aoc20/mod.rs:112:68 [INFO] [stdout] | [INFO] [stdout] 112 | for o in outs { pulses.push_back((value, dest, &o)); } [INFO] [stdout] | ^^ help: change this to: `o` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/aoc01/mod.rs:18:23 [INFO] [stdout] | [INFO] [stdout] 18 | .find(|c| c.is_digit(10)) [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `c.is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] = note: `#[warn(clippy::is_digit_ascii_radix)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/aoc20/mod.rs:119:68 [INFO] [stdout] | [INFO] [stdout] 119 | for o in outs { pulses.push_back((v, dest, &o)); } [INFO] [stdout] | ^^ help: change this to: `o` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/aoc01/mod.rs:23:23 [INFO] [stdout] | [INFO] [stdout] 23 | .find(|c| c.is_digit(10)) [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `c.is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/aoc20/mod.rs:129:64 [INFO] [stdout] | [INFO] [stdout] 129 | for o in outs { pulses.push_back((v, dest, &o)); } [INFO] [stdout] | ^^ help: change this to: `o` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/aoc01/mod.rs:31:8 [INFO] [stdout] | [INFO] [stdout] 31 | if c.is_digit(10) { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `c.is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc01/mod.rs:55:5 [INFO] [stdout] | [INFO] [stdout] 55 | return first_digit * 10 + last_digit; [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] 55 - return first_digit * 10 + last_digit; [INFO] [stdout] 55 + first_digit * 10 + last_digit [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/aoc01/mod.rs:63:42 [INFO] [stdout] | [INFO] [stdout] 63 | .map(|s| get_calibration_val(&s)) [INFO] [stdout] | ^^ help: change this to: `s` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc20/mod.rs:177:5 [INFO] [stdout] | [INFO] [stdout] 177 | / return (left.get(0..1).unwrap().into(), [INFO] [stdout] 178 | | left.get(1..).unwrap().into(), [INFO] [stdout] 179 | | right.split(", ").map(str::to_string).collect::>()); [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] 177 ~ (left.get(0..1).unwrap().into(), [INFO] [stdout] 178 + left.get(1..).unwrap().into(), [INFO] [stdout] 179 ~ right.split(", ").map(str::to_string).collect::>()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/aoc20/mod.rs:175:21 [INFO] [stdout] | [INFO] [stdout] 175 | fn split_line(line: &String) -> (String, String, Vec) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 175 - fn split_line(line: &String) -> (String, String, Vec) { [INFO] [stdout] 175 + fn split_line(line: &str) -> (String, String, Vec) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/aoc01/mod.rs:69:34 [INFO] [stdout] | [INFO] [stdout] 69 | .map(|s| get_cal_new(&s)) [INFO] [stdout] | ^^ help: change this to: `s` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc20/mod.rs:223:5 [INFO] [stdout] | [INFO] [stdout] 223 | return numbers.iter().cloned().reduce(lcm).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] 223 - return numbers.iter().cloned().reduce(lcm).unwrap(); [INFO] [stdout] 223 + numbers.iter().cloned().reduce(lcm).unwrap() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc02/mod.rs:18:5 [INFO] [stdout] | [INFO] [stdout] 18 | return Some((first, second)); [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] 18 - return Some((first, second)); [INFO] [stdout] 18 + Some((first, second)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc02/mod.rs:48:5 [INFO] [stdout] | [INFO] [stdout] 48 | return Game { id, events }; [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 Game { id, events }; [INFO] [stdout] 48 + Game { id, events } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this call to `from_str_radix` can be replaced with a call to `str::parse` [INFO] [stdout] --> src/aoc02/mod.rs:24:14 [INFO] [stdout] | [INFO] [stdout] 24 | let id = i64::from_str_radix(tokens.next().unwrap(), 10).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `tokens.next().unwrap().parse::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_str_radix_10 [INFO] [stdout] = note: `#[warn(clippy::from_str_radix_10)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this call to `from_str_radix` can be replaced with a call to `str::parse` [INFO] [stdout] --> src/aoc02/mod.rs:29:21 [INFO] [stdout] | [INFO] [stdout] 29 | let count = i64::from_str_radix(count, 10).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `count.parse::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_str_radix_10 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should use the `ends_with` method [INFO] [stdout] --> src/aoc02/mod.rs:41:12 [INFO] [stdout] | [INFO] [stdout] 41 | if color.chars().last().unwrap() == ';' { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `color.ends_with(';')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#chars_last_cmp [INFO] [stdout] = note: `#[warn(clippy::chars_last_cmp)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc02/mod.rs:61:5 [INFO] [stdout] | [INFO] [stdout] 61 | return Some(g.id); [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] 61 - return Some(g.id); [INFO] [stdout] 61 + Some(g.id) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc02/mod.rs:87:5 [INFO] [stdout] | [INFO] [stdout] 87 | return max_r.unwrap() * max_g.unwrap() * max_b.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] 87 - return max_r.unwrap() * max_g.unwrap() * max_b.unwrap(); [INFO] [stdout] 87 + max_r.unwrap() * max_g.unwrap() * max_b.unwrap() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/aoc02/mod.rs:95:37 [INFO] [stdout] | [INFO] [stdout] 95 | .map(|s| string_to_game(&s)) [INFO] [stdout] | ^^ help: change this to: `s` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/aoc02/mod.rs:100:43 [INFO] [stdout] | [INFO] [stdout] 100 | .filter_map(|g| validate_game(&g, 12, 13, 14)) [INFO] [stdout] | ^^ help: change this to: `g` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/aoc03/mod.rs:7:9 [INFO] [stdout] | [INFO] [stdout] 7 | if !grid[row][col].is_digit(10) { return None; } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `grid[row][col].is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/aoc03/mod.rs:9:19 [INFO] [stdout] | [INFO] [stdout] 9 | if col > 0 && grid[row][col-1].is_digit(10) { return None; } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `grid[row][col-1].is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/aoc03/mod.rs:15:34 [INFO] [stdout] | [INFO] [stdout] 15 | while ptr < grid[0].len() && grid[row][ptr].is_digit(10) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `grid[row][ptr].is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/aoc03/mod.rs:31:17 [INFO] [stdout] | [INFO] [stdout] 31 | if !grid[rr][cc].is_digit(10) && grid[rr][cc] != '.' { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `grid[rr][cc].is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc03/mod.rs:54:5 [INFO] [stdout] | [INFO] [stdout] 54 | return Some(n); [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] 54 - return Some(n); [INFO] [stdout] 54 + Some(n) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/aoc03/mod.rs:41:9 [INFO] [stdout] | [INFO] [stdout] 41 | if !grid[row][col].is_digit(10) { return None; } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `grid[row][col].is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/aoc03/mod.rs:44:22 [INFO] [stdout] | [INFO] [stdout] 44 | while ptr > 0 && grid[row][ptr-1].is_digit(10) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `grid[row][ptr-1].is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/aoc03/mod.rs:50:34 [INFO] [stdout] | [INFO] [stdout] 50 | while ptr < grid[0].len() && grid[row][ptr].is_digit(10) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `grid[row][ptr].is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc03/mod.rs:79:5 [INFO] [stdout] | [INFO] [stdout] 79 | return Some(nums.iter().product()); [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] 79 - return Some(nums.iter().product()); [INFO] [stdout] 79 + Some(nums.iter().product()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/aoc22/mod.rs:29:5 [INFO] [stdout] | [INFO] [stdout] 29 | blocks.sort_by(|(p1,_), (p2,_)| p1.2.cmp(&p2.2)); [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] 29 - blocks.sort_by(|(p1,_), (p2,_)| p1.2.cmp(&p2.2)); [INFO] [stdout] 29 + blocks.sort_by_key(|(p1,_)| p1.2); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc03/mod.rs:98:5 [INFO] [stdout] | [INFO] [stdout] 98 | return Some((n, startrow, startcol)); [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] 98 - return Some((n, startrow, startcol)); [INFO] [stdout] 98 + Some((n, startrow, startcol)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/aoc03/mod.rs:83:9 [INFO] [stdout] | [INFO] [stdout] 83 | if !grid[row][col].is_digit(10) { return None; } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `grid[row][col].is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/aoc03/mod.rs:86:22 [INFO] [stdout] | [INFO] [stdout] 86 | while ptr > 0 && grid[row][ptr-1].is_digit(10) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `grid[row][ptr-1].is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/aoc03/mod.rs:94:34 [INFO] [stdout] | [INFO] [stdout] 94 | while ptr < grid[0].len() && grid[row][ptr].is_digit(10) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `grid[row][ptr].is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/aoc03/mod.rs:134:20 [INFO] [stdout] | [INFO] [stdout] 134 | if c.is_digit(10) || c == &'.' { return None; } [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `c.is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/aoc22/mod.rs:82:23 [INFO] [stdout] | [INFO] [stdout] 82 | fn drop_blocks(graph: &Vec<(Vec, Vec)>) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 82 - fn drop_blocks(graph: &Vec<(Vec, Vec)>) -> usize { [INFO] [stdout] 82 + fn drop_blocks(graph: &[(Vec, Vec)]) -> usize { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/aoc22/mod.rs:101:26 [INFO] [stdout] | [INFO] [stdout] 101 | fn chain_reaction(graph: &Vec<(Vec, Vec)>) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 101 - fn chain_reaction(graph: &Vec<(Vec, Vec)>) -> usize { [INFO] [stdout] 101 + fn chain_reaction(graph: &[(Vec, Vec)]) -> usize { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this call to `from_str_radix` can be replaced with a call to `str::parse` [INFO] [stdout] --> src/aoc04/mod.rs:11:34 [INFO] [stdout] | [INFO] [stdout] 11 | .map(|n| i64::from_str_radix(n, 10).unwrap()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `n.parse::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_str_radix_10 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this call to `from_str_radix` can be replaced with a call to `str::parse` [INFO] [stdout] --> src/aoc04/mod.rs:16:34 [INFO] [stdout] | [INFO] [stdout] 16 | .map(|n| i64::from_str_radix(n, 10).unwrap()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `n.parse::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_str_radix_10 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/aoc22/mod.rs:113:16 [INFO] [stdout] | [INFO] [stdout] 113 | if new_disints.len() == 0 { break; } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `new_disints.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/aoc04/mod.rs:27:22 [INFO] [stdout] | [INFO] [stdout] 27 | let copies = copies.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try dereferencing it: `*copies` [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: the loop variable `z` is only used to index `cards` [INFO] [stdout] --> src/aoc04/mod.rs:36:18 [INFO] [stdout] | [INFO] [stdout] 36 | for z in (i+1)..=(i+matches) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 36 - for z in (i+1)..=(i+matches) { [INFO] [stdout] 36 + for in cards.iter_mut().take(i + matches + 1).skip((i+1)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/aoc22/mod.rs:129:38 [INFO] [stdout] | [INFO] [stdout] 129 | .map(|s| get_point_pairs(&s)) [INFO] [stdout] | ^^ help: change this to: `s` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc05/mod.rs:14:5 [INFO] [stdout] | [INFO] [stdout] 14 | return element; [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] 14 - return element; [INFO] [stdout] 14 + element [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc05/mod.rs:42:5 [INFO] [stdout] | [INFO] [stdout] 42 | return res; [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] 42 - return res; [INFO] [stdout] 42 + res [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/aoc23/mod.rs:21:16 [INFO] [stdout] | [INFO] [stdout] 21 | junctions: &Vec<((usize, usize), Vec)>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 21 - junctions: &Vec<((usize, usize), Vec)>, [INFO] [stdout] 21 + junctions: &[((usize, usize), Vec)], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/aoc23/mod.rs:23:11 [INFO] [stdout] | [INFO] [stdout] 23 | dirs: &Vec) -> Vec<(usize, usize)> { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 23 - dirs: &Vec) -> Vec<(usize, usize)> { [INFO] [stdout] 23 + dirs: &[Direction]) -> Vec<(usize, usize)> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `let...else` may be rewritten with the `?` operator [INFO] [stdout] --> src/aoc23/mod.rs:43:29 [INFO] [stdout] | [INFO] [stdout] 43 | ... let Some((r, c)) = grid.step(cur, new_d) else { return None; }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `let (r, c) = grid.step(cur, new_d)?;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] = note: `#[warn(clippy::question_mark)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc05/mod.rs:87:5 [INFO] [stdout] | [INFO] [stdout] 87 | return combine_ranges(&mapped_ranges); [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] 87 - return combine_ranges(&mapped_ranges); [INFO] [stdout] 87 + combine_ranges(&mapped_ranges) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/aoc23/mod.rs:55:45 [INFO] [stdout] | [INFO] [stdout] 55 | fn build_simple_graph(grid: &Grid) -> Vec<((usize, usize), Vec<(usize, usize)>)> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc23/mod.rs:85:5 [INFO] [stdout] | [INFO] [stdout] 85 | return junction_graph; [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] 85 - return junction_graph; [INFO] [stdout] 85 + junction_graph [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `u64` which implements the `Copy` trait [INFO] [stdout] --> src/aoc05/mod.rs:122:29 [INFO] [stdout] | [INFO] [stdout] 122 | let mut s = s.clone(); [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*s` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc06/mod.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | / return (0..time) [INFO] [stdout] 8 | | .filter(|time_held| time_held * (time - time_held) > distance) [INFO] [stdout] 9 | | .count(); [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] 7 ~ (0..time) [INFO] [stdout] 8 + .filter(|time_held| time_held * (time - time_held) > distance) [INFO] [stdout] 9 ~ .count() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/aoc23/mod.rs:79:70 [INFO] [stdout] | [INFO] [stdout] 79 | ... Direction::W].contains(&d)).cloned().collect(); [INFO] [stdout] | ^^ help: change this to: `d` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/aoc23/mod.rs:88:46 [INFO] [stdout] | [INFO] [stdout] 88 | fn build_complex_graph(grid: &Grid) -> Vec<((usize, usize), Vec<(usize, usize)>)> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc23/mod.rs:116:5 [INFO] [stdout] | [INFO] [stdout] 116 | return junction_graph; [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] 116 - return junction_graph; [INFO] [stdout] 116 + junction_graph [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc06/mod.rs:36:5 [INFO] [stdout] | [INFO] [stdout] 36 | return lo; [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] 36 - return lo; [INFO] [stdout] 36 + lo [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/aoc23/mod.rs:119:31 [INFO] [stdout] | [INFO] [stdout] 119 | fn longest_path_runner(graph: &Vec<((usize, usize), Vec<(usize, usize)>)>) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc06/mod.rs:58:5 [INFO] [stdout] | [INFO] [stdout] 58 | return lo; [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] 58 - return lo; [INFO] [stdout] 58 + lo [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc23/mod.rs:145:5 [INFO] [stdout] | [INFO] [stdout] 145 | return best; [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] 145 - return best; [INFO] [stdout] 145 + best [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/aoc23/mod.rs:119:31 [INFO] [stdout] | [INFO] [stdout] 119 | fn longest_path_runner(graph: &Vec<((usize, usize), Vec<(usize, usize)>)>) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 119 - fn longest_path_runner(graph: &Vec<((usize, usize), Vec<(usize, usize)>)>) [INFO] [stdout] 119 + fn longest_path_runner(graph: &[((usize, usize), Vec<(usize, usize)>)]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc06/mod.rs:70:5 [INFO] [stdout] | [INFO] [stdout] 70 | return (discriminant) as u64; [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] 70 - return (discriminant) as u64; [INFO] [stdout] 70 + (discriminant) as u64 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc24/mod.rs:62:5 [INFO] [stdout] | [INFO] [stdout] 62 | return Vector3::new(x, y, z); [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] 62 - return Vector3::new(x, y, z); [INFO] [stdout] 62 + Vector3::new(x, y, z) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/aoc24/mod.rs:57:33 [INFO] [stdout] | [INFO] [stdout] 57 | s.trim().parse::().expect(&format!("could not parse {:?}", s)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("could not parse {:?}", s))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] = note: `#[warn(clippy::expect_fun_call)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/aoc25/mod.rs:27:26 [INFO] [stdout] | [INFO] [stdout] 27 | if !has_edge(&flow, src.clone(), tgt.clone()) || has_edge(&flow, tgt.clone(), [INFO] [stdout] | ^^^^^ help: change this to: `flow` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/aoc25/mod.rs:27:71 [INFO] [stdout] | [INFO] [stdout] 27 | if !has_edge(&flow, src.clone(), tgt.clone()) || has_edge(&flow, tgt.clone(), [INFO] [stdout] | ^^^^^ help: change this to: `flow` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc08/mod.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 15 | return a; [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] 15 - return a; [INFO] [stdout] 15 + a [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/aoc25/mod.rs:45:12 [INFO] [stdout] | [INFO] [stdout] 45 | if &v == &t { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] = note: `#[warn(clippy::op_ref)]` on by default [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 45 - if &v == &t { [INFO] [stdout] 45 + if v == t { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc25/mod.rs:73:5 [INFO] [stdout] | [INFO] [stdout] 73 | return visited.len(); [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] 73 - return visited.len(); [INFO] [stdout] 73 + visited.len() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/aoc08/mod.rs:44:42 [INFO] [stdout] | [INFO] [stdout] 44 | ('L', (left, _)) => { curr = &left; } [INFO] [stdout] | ^^^^^ help: change this to: `left` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/aoc08/mod.rs:45:43 [INFO] [stdout] | [INFO] [stdout] 45 | ('R', (_, right)) => { curr = &right; } [INFO] [stdout] | ^^^^^^ help: change this to: `right` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_none()` [INFO] [stdout] --> src/aoc25/mod.rs:97:28 [INFO] [stdout] | [INFO] [stdout] 97 | if let None = v.iter().position(|x| x == &pair[1]) { [INFO] [stdout] | -------^^^^--------------------------------------- help: try: `if v.iter().position(|x| x == &pair[1]).is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/aoc08/mod.rs:66:54 [INFO] [stdout] | [INFO] [stdout] 66 | ('L', (left, _)) => { curr = &left; } [INFO] [stdout] | ^^^^^ help: change this to: `left` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/aoc08/mod.rs:67:55 [INFO] [stdout] | [INFO] [stdout] 67 | ('R', (_, right)) => { curr = &right; } [INFO] [stdout] | ^^^^^^ help: change this to: `right` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc09/mod.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | return (hist[0] - newbegin, hist[hist.len() - 1] + newend); [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] 8 - return (hist[0] - newbegin, hist[hist.len() - 1] + newend); [INFO] [stdout] 8 + (hist[0] - newbegin, hist[hist.len() - 1] + newend) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/main.rs:31:24 [INFO] [stdout] | [INFO] [stdout] 31 | fn profile(f: impl Fn() -> ()) { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] = note: `#[warn(clippy::unused_unit)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc10/mod.rs:67:5 [INFO] [stdout] | [INFO] [stdout] 67 | return res; [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 res; [INFO] [stdout] 67 + res [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/aoc10/mod.rs:57:35 [INFO] [stdout] | [INFO] [stdout] 57 | '|' => get_connections_at(&grid, cell, &[D::Below, D::Above]), [INFO] [stdout] | ^^^^^ help: change this to: `grid` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/aoc10/mod.rs:58:35 [INFO] [stdout] | [INFO] [stdout] 58 | '-' => get_connections_at(&grid, cell, &[D::Left, D::Right]), [INFO] [stdout] | ^^^^^ help: change this to: `grid` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/aoc10/mod.rs:59:35 [INFO] [stdout] | [INFO] [stdout] 59 | 'L' => get_connections_at(&grid, cell, &[D::Below, D::Left]), [INFO] [stdout] | ^^^^^ help: change this to: `grid` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/aoc10/mod.rs:60:35 [INFO] [stdout] | [INFO] [stdout] 60 | 'J' => get_connections_at(&grid, cell, &[D::Below, D::Right]), [INFO] [stdout] | ^^^^^ help: change this to: `grid` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/aoc10/mod.rs:61:35 [INFO] [stdout] | [INFO] [stdout] 61 | '7' => get_connections_at(&grid, cell, &[D::Above, D::Right]), [INFO] [stdout] | ^^^^^ help: change this to: `grid` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/aoc10/mod.rs:62:35 [INFO] [stdout] | [INFO] [stdout] 62 | 'F' => get_connections_at(&grid, cell, &[D::Above, D::Left]), [INFO] [stdout] | ^^^^^ help: change this to: `grid` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/aoc10/mod.rs:73:9 [INFO] [stdout] | [INFO] [stdout] 73 | / grid.try_offset(start, (-1, 0)) [INFO] [stdout] 74 | | .map_or(false, |n| can_enter_from(grid, n, D::Below)), [INFO] [stdout] | |_________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 74 - .map_or(false, |n| can_enter_from(grid, n, D::Below)), [INFO] [stdout] 74 + .is_some_and(|n| can_enter_from(grid, n, D::Below)), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/aoc10/mod.rs:75:9 [INFO] [stdout] | [INFO] [stdout] 75 | / grid.try_offset(start, (1, 0)) [INFO] [stdout] 76 | | .map_or(false, |n| can_enter_from(grid, n, D::Above)), [INFO] [stdout] | |_________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 76 - .map_or(false, |n| can_enter_from(grid, n, D::Above)), [INFO] [stdout] 76 + .is_some_and(|n| can_enter_from(grid, n, D::Above)), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/aoc10/mod.rs:77:9 [INFO] [stdout] | [INFO] [stdout] 77 | / grid.try_offset(start, (0, 1)) [INFO] [stdout] 78 | | .map_or(false, |n| can_enter_from(grid, n, D::Left)), [INFO] [stdout] | |________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 78 - .map_or(false, |n| can_enter_from(grid, n, D::Left)), [INFO] [stdout] 78 + .is_some_and(|n| can_enter_from(grid, n, D::Left)), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/aoc10/mod.rs:79:9 [INFO] [stdout] | [INFO] [stdout] 79 | / grid.try_offset(start, (0, -1)) [INFO] [stdout] 80 | | .map_or(false, |n| can_enter_from(grid, n, D::Right)) [INFO] [stdout] | |_________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 80 - .map_or(false, |n| can_enter_from(grid, n, D::Right)) [INFO] [stdout] 80 + .is_some_and(|n| can_enter_from(grid, n, D::Right)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/aoc10/mod.rs:92:73 [INFO] [stdout] | [INFO] [stdout] 92 | fn printrow(the_loop: &HashSet<(usize, usize)>, grid: &Grid, row: &Vec<(bool, Option)>, rowidx: usize) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 92 - fn printrow(the_loop: &HashSet<(usize, usize)>, grid: &Grid, row: &Vec<(bool, Option)>, rowidx: usize) { [INFO] [stdout] 92 + fn printrow(the_loop: &HashSet<(usize, usize)>, grid: &Grid, row: &[(bool, Option)], rowidx: usize) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `print!()` with a format string that ends in a single newline [INFO] [stdout] --> src/aoc10/mod.rs:103:5 [INFO] [stdout] | [INFO] [stdout] 103 | print!("\n"); [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_with_newline [INFO] [stdout] = note: `#[warn(clippy::print_with_newline)]` on by default [INFO] [stdout] help: use `println!` instead [INFO] [stdout] | [INFO] [stdout] 103 - print!("\n"); [INFO] [stdout] 103 + println!(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `repeat().take()` can be written more concisely [INFO] [stdout] --> src/aoc10/mod.rs:112:9 [INFO] [stdout] | [INFO] [stdout] 112 | iter::repeat((false, None)).take(grid[0].len()).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n((false, None), grid[0].len())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n [INFO] [stdout] = note: `#[warn(clippy::manual_repeat_n)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `repeat().take()` can be written more concisely [INFO] [stdout] --> src/aoc10/mod.rs:174:15 [INFO] [stdout] | [INFO] [stdout] 174 | grid.push(iter::repeat('.').take(len).collect()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n('.', len)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `get_adjacent_pipes` doesn't need a mutable reference [INFO] [stdout] --> src/aoc10/mod.rs:184:43 [INFO] [stdout] | [INFO] [stdout] 184 | bfs(|vertex| { get_adjacent_pipes(&mut grid, vertex) }, location_of_s); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] = note: `#[warn(clippy::unnecessary_mut_passed)]` on by default [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 184 - bfs(|vertex| { get_adjacent_pipes(&mut grid, vertex) }, location_of_s); [INFO] [stdout] 184 + bfs(|vertex| { get_adjacent_pipes(&grid, vertex) }, location_of_s); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `repeat().take()` can be written more concisely [INFO] [stdout] --> src/aoc12/mod.rs:11:40 [INFO] [stdout] | [INFO] [stdout] 11 | let mut table: Vec> = iter::repeat( [INFO] [stdout] | ________________________________________^ [INFO] [stdout] 12 | | iter::repeat(0usize.into()).take(damaged_runs.len()+1).collect() [INFO] [stdout] 13 | | ).take(layout.len()+1).collect(); [INFO] [stdout] | |__________________________^ help: consider using `repeat_n()` instead: `std::iter::repeat_n(iter::repeat(0usize.into()).take(damaged_runs.len()+1).collect(), layout.len()+1)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `repeat().take()` can be written more concisely [INFO] [stdout] --> src/aoc12/mod.rs:12:9 [INFO] [stdout] | [INFO] [stdout] 12 | iter::repeat(0usize.into()).take(damaged_runs.len()+1).collect() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n(0usize.into(), damaged_runs.len()+1)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `repeat().take()` can be written more concisely [INFO] [stdout] --> src/aoc12/mod.rs:88:21 [INFO] [stdout] | [INFO] [stdout] 88 | / iter::repeat(layout_str) [INFO] [stdout] 89 | | .take(5) [INFO] [stdout] | |________________________________^ help: consider using `repeat_n()` instead: `std::iter::repeat_n(layout_str, 5)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `repeat().take()` can be written more concisely [INFO] [stdout] --> src/aoc13/mod.rs:78:33 [INFO] [stdout] | [INFO] [stdout] 78 | let mut radii: Vec = iter::repeat(0).take(v.len()).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n(0, v.len())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `repeat().take()` can be written more concisely [INFO] [stdout] --> src/aoc13/mod.rs:189:9 [INFO] [stdout] | [INFO] [stdout] 189 | / iter::repeat( [INFO] [stdout] 190 | | iter::repeat('X') [INFO] [stdout] 191 | | .take(w*2-1).collect::>().into() [INFO] [stdout] 192 | | ).take(h*2-1).collect::>().into(); [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n [INFO] [stdout] help: consider using `repeat_n()` instead [INFO] [stdout] | [INFO] [stdout] 189 ~ std::iter::repeat_n(iter::repeat('X') [INFO] [stdout] 190 ~ .take(w*2-1).collect::>().into(), h*2-1).collect::>().into(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::vec::Vec` [INFO] [stdout] --> src/aoc13/mod.rs:190:13 [INFO] [stdout] | [INFO] [stdout] 190 | / iter::repeat('X') [INFO] [stdout] 191 | | .take(w*2-1).collect::>().into() [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()` [INFO] [stdout] | [INFO] [stdout] 190 ~ iter::repeat('X') [INFO] [stdout] 191 + .take(w*2-1).collect::>() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `repeat().take()` can be written more concisely [INFO] [stdout] --> src/aoc13/mod.rs:190:13 [INFO] [stdout] | [INFO] [stdout] 190 | / iter::repeat('X') [INFO] [stdout] 191 | | .take(w*2-1).collect::>().into() [INFO] [stdout] | |____________________________^ help: consider using `repeat_n()` instead: `std::iter::repeat_n('X', w*2-1)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `repeat().take()` can be written more concisely [INFO] [stdout] --> src/aoc14/mod.rs:18:39 [INFO] [stdout] | [INFO] [stdout] 18 | let mut snap_points: Vec = iter::repeat(0).take(grid[0].len()).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n(0, grid[0].len())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `repeat().take()` can be written more concisely [INFO] [stdout] --> src/aoc14/mod.rs:43:39 [INFO] [stdout] | [INFO] [stdout] 43 | let mut snap_points: Vec = iter::repeat(0).take(grid[0].len()).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n(0, grid[0].len())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `repeat().take()` can be written more concisely [INFO] [stdout] --> src/aoc14/mod.rs:99:39 [INFO] [stdout] | [INFO] [stdout] 99 | let mut snap_points: Vec = iter::repeat(0).take(width).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n(0, width)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `repeat().take()` can be written more concisely [INFO] [stdout] --> src/aoc14/mod.rs:119:39 [INFO] [stdout] | [INFO] [stdout] 119 | let mut snap_points: Vec = iter::repeat(0).take(width).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n(0, width)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/aoc14/mod.rs:143:24 [INFO] [stdout] | [INFO] [stdout] 143 | fn spicy_loads(points: &Vec<(bool, usize, usize)>, width: usize) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 143 - fn spicy_loads(points: &Vec<(bool, usize, usize)>, width: usize) -> usize { [INFO] [stdout] 143 + fn spicy_loads(points: &[(bool, usize, usize)], width: usize) -> usize { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/aoc15/mod.rs:12:28 [INFO] [stdout] | [INFO] [stdout] 12 | fn hashmap_step<'a>(boxes: &mut Vec>, instr: &'a [u8]) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 12 - fn hashmap_step<'a>(boxes: &mut Vec>, instr: &'a [u8]) { [INFO] [stdout] 12 + fn hashmap_step<'a>(boxes: &mut [Vec<(&'a [u8], usize)>], instr: &'a [u8]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression can be written more simply using `.retain()` [INFO] [stdout] --> src/aoc15/mod.rs:16:9 [INFO] [stdout] | [INFO] [stdout] 16 | boxes[hash] = boxes[hash].iter().filter(|(s,_)| s != &label).cloned().collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.retain()` instead: `boxes[hash].retain(|(s,_)| s != &label)` [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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/aoc15/mod.rs:44:12 [INFO] [stdout] | [INFO] [stdout] 44 | if b.len() == 0 { continue; } [INFO] [stdout] | ^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `b.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/aoc15/mod.rs:49:9 [INFO] [stdout] | [INFO] [stdout] 49 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] = note: `#[warn(clippy::println_empty_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/aoc15/mod.rs:62:39 [INFO] [stdout] | [INFO] [stdout] 62 | let mut boxes = iter::repeat_with(|| vec![]).take(256).collect(); [INFO] [stdout] | ^^^^^^^^^ help: replace the closure with `Vec::new`: `std::vec::Vec::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: unneeded `return` statement [INFO] [stdout] --> src/aoc16/mod.rs:77:5 [INFO] [stdout] | [INFO] [stdout] 77 | / return visited.iter() [INFO] [stdout] 78 | | .filter(|(d,_,_)| !d.is_empty()) [INFO] [stdout] 79 | | .count(); [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] 77 ~ visited.iter() [INFO] [stdout] 78 + .filter(|(d,_,_)| !d.is_empty()) [INFO] [stdout] 79 ~ .count() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/aoc18/mod.rs:37:52 [INFO] [stdout] | [INFO] [stdout] 37 | let ((width, height), (or, oc)) = grid_extents(&instrs); [INFO] [stdout] | ^^^^^^^ help: change this to: `instrs` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `isize` is unnecessary [INFO] [stdout] --> src/aoc18/mod.rs:103:29 [INFO] [stdout] | [INFO] [stdout] 103 | let mut straight_area = 0 as isize; [INFO] [stdout] | ^^^^^^^^^^ help: try: `0_isize` [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] [INFO] [stdout] [INFO] [stdout] warning: called `skip(..).next()` on an iterator [INFO] [stdout] --> src/aoc18/mod.rs:142:45 [INFO] [stdout] | [INFO] [stdout] 142 | let s = s.split_whitespace().skip(2).next().unwrap().as_bytes(); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: use `nth` instead: `.nth(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_skip_next [INFO] [stdout] = note: `#[warn(clippy::iter_skip_next)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `[(usize, usize); 4]` which implements the `Copy` trait [INFO] [stdout] --> src/aoc19/mod.rs:129:35 [INFO] [stdout] | [INFO] [stdout] 129 | let mut passing = part.clone(); [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `part` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `[(usize, usize); 4]` which implements the `Copy` trait [INFO] [stdout] --> src/aoc19/mod.rs:131:35 [INFO] [stdout] | [INFO] [stdout] 131 | let mut failing = part.clone(); [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `part` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `[(usize, usize); 4]` which implements the `Copy` trait [INFO] [stdout] --> src/aoc19/mod.rs:137:35 [INFO] [stdout] | [INFO] [stdout] 137 | let mut passing = part.clone(); [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `part` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `[(usize, usize); 4]` which implements the `Copy` trait [INFO] [stdout] --> src/aoc19/mod.rs:139:35 [INFO] [stdout] | [INFO] [stdout] 139 | let mut failing = part.clone(); [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `part` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc20/mod.rs:19:5 [INFO] [stdout] | [INFO] [stdout] 19 | return x; [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] 19 - return x; [INFO] [stdout] 19 + x [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc20/mod.rs:24:5 [INFO] [stdout] | [INFO] [stdout] 24 | return (x / gcd(x,y)) * y; [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] 24 - return (x / gcd(x,y)) * y; [INFO] [stdout] 24 + (x / gcd(x,y)) * y [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/aoc20/mod.rs:67:25 [INFO] [stdout] | [INFO] [stdout] 67 | let v = !(new_state.1[dest].len() == ins.len()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(new_state.1[dest].len() != ins.len())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/aoc20/mod.rs:51:64 [INFO] [stdout] | [INFO] [stdout] 51 | for o in outs { pulses.push_back((value, dest, &o)); } [INFO] [stdout] | ^^ help: change this to: `o` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/aoc20/mod.rs:58:64 [INFO] [stdout] | [INFO] [stdout] 58 | for o in outs { pulses.push_back((v, dest, &o)); } [INFO] [stdout] | ^^ help: change this to: `o` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/aoc20/mod.rs:68:60 [INFO] [stdout] | [INFO] [stdout] 68 | for o in outs { pulses.push_back((v, dest, &o)); } [INFO] [stdout] | ^^ help: change this to: `o` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/aoc20/mod.rs:128:29 [INFO] [stdout] | [INFO] [stdout] 128 | let v = !(new_state.1[dest].len() == ins.len()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(new_state.1[dest].len() != ins.len())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/aoc20/mod.rs:79:70 [INFO] [stdout] | [INFO] [stdout] 79 | fn next_module_state_iso(spec: &ModSpec, state: &ModStates, targets: &Vec) [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 79 - fn next_module_state_iso(spec: &ModSpec, state: &ModStates, targets: &Vec) [INFO] [stdout] 79 + fn next_module_state_iso(spec: &ModSpec, state: &ModStates, targets: &[SmolStr]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `repeat().take()` can be written more concisely [INFO] [stdout] --> src/aoc20/mod.rs:84:24 [INFO] [stdout] | [INFO] [stdout] 84 | let mut memories = std::iter::repeat(None).take(targets.len()).collect::>(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n(None, targets.len())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_none()` [INFO] [stdout] --> src/aoc20/mod.rs:100:24 [INFO] [stdout] | [INFO] [stdout] 100 | if let None = memories[index] { [INFO] [stdout] | -------^^^^------------------ help: try: `if memories[index].is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/aoc20/mod.rs:112:68 [INFO] [stdout] | [INFO] [stdout] 112 | for o in outs { pulses.push_back((value, dest, &o)); } [INFO] [stdout] | ^^ help: change this to: `o` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/aoc20/mod.rs:119:68 [INFO] [stdout] | [INFO] [stdout] 119 | for o in outs { pulses.push_back((v, dest, &o)); } [INFO] [stdout] | ^^ help: change this to: `o` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/aoc20/mod.rs:129:64 [INFO] [stdout] | [INFO] [stdout] 129 | for o in outs { pulses.push_back((v, dest, &o)); } [INFO] [stdout] | ^^ help: change this to: `o` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc20/mod.rs:177:5 [INFO] [stdout] | [INFO] [stdout] 177 | / return (left.get(0..1).unwrap().into(), [INFO] [stdout] 178 | | left.get(1..).unwrap().into(), [INFO] [stdout] 179 | | right.split(", ").map(str::to_string).collect::>()); [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] 177 ~ (left.get(0..1).unwrap().into(), [INFO] [stdout] 178 + left.get(1..).unwrap().into(), [INFO] [stdout] 179 ~ right.split(", ").map(str::to_string).collect::>()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/aoc20/mod.rs:175:21 [INFO] [stdout] | [INFO] [stdout] 175 | fn split_line(line: &String) -> (String, String, Vec) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 175 - fn split_line(line: &String) -> (String, String, Vec) { [INFO] [stdout] 175 + fn split_line(line: &str) -> (String, String, Vec) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc20/mod.rs:223:5 [INFO] [stdout] | [INFO] [stdout] 223 | return numbers.iter().cloned().reduce(lcm).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] 223 - return numbers.iter().cloned().reduce(lcm).unwrap(); [INFO] [stdout] 223 + numbers.iter().cloned().reduce(lcm).unwrap() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/aoc22/mod.rs:29:5 [INFO] [stdout] | [INFO] [stdout] 29 | blocks.sort_by(|(p1,_), (p2,_)| p1.2.cmp(&p2.2)); [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] 29 - blocks.sort_by(|(p1,_), (p2,_)| p1.2.cmp(&p2.2)); [INFO] [stdout] 29 + blocks.sort_by_key(|(p1,_)| p1.2); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/aoc22/mod.rs:82:23 [INFO] [stdout] | [INFO] [stdout] 82 | fn drop_blocks(graph: &Vec<(Vec, Vec)>) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 82 - fn drop_blocks(graph: &Vec<(Vec, Vec)>) -> usize { [INFO] [stdout] 82 + fn drop_blocks(graph: &[(Vec, Vec)]) -> usize { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/aoc22/mod.rs:101:26 [INFO] [stdout] | [INFO] [stdout] 101 | fn chain_reaction(graph: &Vec<(Vec, Vec)>) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 101 - fn chain_reaction(graph: &Vec<(Vec, Vec)>) -> usize { [INFO] [stdout] 101 + fn chain_reaction(graph: &[(Vec, Vec)]) -> usize { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/aoc22/mod.rs:113:16 [INFO] [stdout] | [INFO] [stdout] 113 | if new_disints.len() == 0 { break; } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `new_disints.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/aoc22/mod.rs:129:38 [INFO] [stdout] | [INFO] [stdout] 129 | .map(|s| get_point_pairs(&s)) [INFO] [stdout] | ^^ help: change this to: `s` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/aoc23/mod.rs:21:16 [INFO] [stdout] | [INFO] [stdout] 21 | junctions: &Vec<((usize, usize), Vec)>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 21 - junctions: &Vec<((usize, usize), Vec)>, [INFO] [stdout] 21 + junctions: &[((usize, usize), Vec)], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/aoc23/mod.rs:23:11 [INFO] [stdout] | [INFO] [stdout] 23 | dirs: &Vec) -> Vec<(usize, usize)> { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 23 - dirs: &Vec) -> Vec<(usize, usize)> { [INFO] [stdout] 23 + dirs: &[Direction]) -> Vec<(usize, usize)> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `let...else` may be rewritten with the `?` operator [INFO] [stdout] --> src/aoc23/mod.rs:43:29 [INFO] [stdout] | [INFO] [stdout] 43 | ... let Some((r, c)) = grid.step(cur, new_d) else { return None; }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `let (r, c) = grid.step(cur, new_d)?;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] = note: `#[warn(clippy::question_mark)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/aoc23/mod.rs:55:45 [INFO] [stdout] | [INFO] [stdout] 55 | fn build_simple_graph(grid: &Grid) -> Vec<((usize, usize), Vec<(usize, usize)>)> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc23/mod.rs:85:5 [INFO] [stdout] | [INFO] [stdout] 85 | return junction_graph; [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] 85 - return junction_graph; [INFO] [stdout] 85 + junction_graph [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/aoc23/mod.rs:79:70 [INFO] [stdout] | [INFO] [stdout] 79 | ... Direction::W].contains(&d)).cloned().collect(); [INFO] [stdout] | ^^ help: change this to: `d` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/aoc23/mod.rs:88:46 [INFO] [stdout] | [INFO] [stdout] 88 | fn build_complex_graph(grid: &Grid) -> Vec<((usize, usize), Vec<(usize, usize)>)> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc23/mod.rs:116:5 [INFO] [stdout] | [INFO] [stdout] 116 | return junction_graph; [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] 116 - return junction_graph; [INFO] [stdout] 116 + junction_graph [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/aoc23/mod.rs:119:31 [INFO] [stdout] | [INFO] [stdout] 119 | fn longest_path_runner(graph: &Vec<((usize, usize), Vec<(usize, usize)>)>) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc23/mod.rs:145:5 [INFO] [stdout] | [INFO] [stdout] 145 | return best; [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] 145 - return best; [INFO] [stdout] 145 + best [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/aoc23/mod.rs:119:31 [INFO] [stdout] | [INFO] [stdout] 119 | fn longest_path_runner(graph: &Vec<((usize, usize), Vec<(usize, usize)>)>) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 119 - fn longest_path_runner(graph: &Vec<((usize, usize), Vec<(usize, usize)>)>) [INFO] [stdout] 119 + fn longest_path_runner(graph: &[((usize, usize), Vec<(usize, usize)>)]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc24/mod.rs:62:5 [INFO] [stdout] | [INFO] [stdout] 62 | return Vector3::new(x, y, z); [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] 62 - return Vector3::new(x, y, z); [INFO] [stdout] 62 + Vector3::new(x, y, z) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/aoc24/mod.rs:57:33 [INFO] [stdout] | [INFO] [stdout] 57 | s.trim().parse::().expect(&format!("could not parse {:?}", s)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("could not parse {:?}", s))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] = note: `#[warn(clippy::expect_fun_call)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/aoc25/mod.rs:27:26 [INFO] [stdout] | [INFO] [stdout] 27 | if !has_edge(&flow, src.clone(), tgt.clone()) || has_edge(&flow, tgt.clone(), [INFO] [stdout] | ^^^^^ help: change this to: `flow` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/aoc25/mod.rs:27:71 [INFO] [stdout] | [INFO] [stdout] 27 | if !has_edge(&flow, src.clone(), tgt.clone()) || has_edge(&flow, tgt.clone(), [INFO] [stdout] | ^^^^^ help: change this to: `flow` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/aoc25/mod.rs:45:12 [INFO] [stdout] | [INFO] [stdout] 45 | if &v == &t { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] = note: `#[warn(clippy::op_ref)]` on by default [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 45 - if &v == &t { [INFO] [stdout] 45 + if v == t { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/aoc25/mod.rs:73:5 [INFO] [stdout] | [INFO] [stdout] 73 | return visited.len(); [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] 73 - return visited.len(); [INFO] [stdout] 73 + visited.len() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_none()` [INFO] [stdout] --> src/aoc25/mod.rs:97:28 [INFO] [stdout] | [INFO] [stdout] 97 | if let None = v.iter().position(|x| x == &pair[1]) { [INFO] [stdout] | -------^^^^--------------------------------------- help: try: `if v.iter().position(|x| x == &pair[1]).is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/main.rs:31:24 [INFO] [stdout] | [INFO] [stdout] 31 | fn profile(f: impl Fn() -> ()) { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] = note: `#[warn(clippy::unused_unit)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 19.07s [INFO] running `Command { std: "docker" "inspect" "763479dc39242e88696f366622dd7c54a1ee5760e76874b4ea54da59e8b970fd", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "763479dc39242e88696f366622dd7c54a1ee5760e76874b4ea54da59e8b970fd", kill_on_drop: false }` [INFO] [stdout] 763479dc39242e88696f366622dd7c54a1ee5760e76874b4ea54da59e8b970fd