[INFO] cloning repository https://github.com/colincross/aoc2024 [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/colincross/aoc2024" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fcolincross%2Faoc2024", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fcolincross%2Faoc2024'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] f5b39d02fc423c59e963fe05e122b5199b9bb00f [INFO] linting colincross/aoc2024 against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fcolincross%2Faoc2024" "/workspace/builds/worker-7-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-7-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/colincross/aoc2024 [INFO] finished tweaking git repo https://github.com/colincross/aoc2024 [INFO] tweaked toml for git repo https://github.com/colincross/aoc2024 written to /workspace/builds/worker-7-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/colincross/aoc2024 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/colincross/aoc2024 already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded regex_static_macro v0.1.0 [INFO] [stderr] Downloaded regex_static v0.1.1 [INFO] [stderr] Downloaded regex_static_impl v0.1.0 [INFO] [stderr] Downloaded rayon v0.9.0 [INFO] [stderr] Downloaded auto-impl-ops v0.2.1 [INFO] [stderr] Downloaded pathfinding v3.0.14 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-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] 7ce5349c4399ba78c8a75d2940e71bc0567818ba4a1d3dc1b65adf5fdb6b0e4c [INFO] running `Command { std: "docker" "start" "-a" "7ce5349c4399ba78c8a75d2940e71bc0567818ba4a1d3dc1b65adf5fdb6b0e4c", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "7ce5349c4399ba78c8a75d2940e71bc0567818ba4a1d3dc1b65adf5fdb6b0e4c", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "7ce5349c4399ba78c8a75d2940e71bc0567818ba4a1d3dc1b65adf5fdb6b0e4c", kill_on_drop: false }` [INFO] [stdout] 7ce5349c4399ba78c8a75d2940e71bc0567818ba4a1d3dc1b65adf5fdb6b0e4c [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-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] 1fb94c23b0a2e3651ca6cbb588963d84b480f89903f16740f8cd04685c27c5db [INFO] running `Command { std: "docker" "start" "-a" "1fb94c23b0a2e3651ca6cbb588963d84b480f89903f16740f8cd04685c27c5db", kill_on_drop: false }` [INFO] [stderr] Compiling rustversion v1.0.18 [INFO] [stderr] Checking either v1.13.0 [INFO] [stderr] Compiling rayon-core v1.12.1 [INFO] [stderr] Checking fixedbitset v0.4.2 [INFO] [stderr] Compiling regex-syntax v0.6.29 [INFO] [stderr] Compiling num-traits v0.2.19 [INFO] [stderr] Compiling indexmap v1.9.3 [INFO] [stderr] Checking aoc09 v0.1.0 (/opt/rustwide/workdir/aoc09) [INFO] [stderr] Checking aoc01 v0.1.0 (/opt/rustwide/workdir/aoc01) [INFO] [stderr] Checking aoc08 v0.1.0 (/opt/rustwide/workdir/aoc08) [INFO] [stderr] Compiling quote v1.0.37 [INFO] [stderr] Checking aoc23 v0.1.0 (/opt/rustwide/workdir/aoc23) [INFO] [stderr] Checking aoc02 v0.1.0 (/opt/rustwide/workdir/aoc02) [INFO] [stderr] Checking aoc24 v0.1.0 (/opt/rustwide/workdir/aoc24) [INFO] [stderr] Checking aoc25 v0.1.0 (/opt/rustwide/workdir/aoc25) [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> aoc02/src/main.rs:4:20 [INFO] [stdout] | [INFO] [stdout] 4 | fn is_safe(report: &Vec) -> bool { [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] 4 - fn is_safe(report: &Vec) -> bool { [INFO] [stdout] 4 + fn is_safe(report: &[i64]) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> aoc02/src/main.rs:14:5 [INFO] [stdout] | [INFO] [stdout] 12 | let safe = (all_positive || all_negative) && max_magnitude <= 3; [INFO] [stdout] | ---------------------------------------------------------------- unnecessary `let` binding [INFO] [stdout] 13 | [INFO] [stdout] 14 | safe [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 12 ~ [INFO] [stdout] 13 | [INFO] [stdout] 14 ~ (all_positive || all_negative) && max_magnitude <= 3 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> aoc02/src/main.rs:17:34 [INFO] [stdout] | [INFO] [stdout] 17 | fn is_safe_with_dampener(report: &Vec) -> bool { [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] 17 - fn is_safe_with_dampener(report: &Vec) -> bool { [INFO] [stdout] 17 + fn is_safe_with_dampener(report: &[i64]) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> aoc02/src/main.rs:23:26 [INFO] [stdout] | [INFO] [stdout] 23 | fn safe_reports(reports: &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] 23 - fn safe_reports(reports: &Vec>) -> usize { [INFO] [stdout] 23 + fn safe_reports(reports: &[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] --> aoc02/src/main.rs:27:40 [INFO] [stdout] | [INFO] [stdout] 27 | fn safe_reports_with_dampener(reports: &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] 27 - fn safe_reports_with_dampener(reports: &Vec>) -> usize { [INFO] [stdout] 27 + fn safe_reports_with_dampener(reports: &[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] --> aoc01/src/main.rs:4:37 [INFO] [stdout] | [INFO] [stdout] 4 | fn rotate_vector_of_vectors(vec: &Vec>) -> 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] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 4 - fn rotate_vector_of_vectors(vec: &Vec>) -> Vec> [INFO] [stdout] 4 + fn rotate_vector_of_vectors(vec: &[Vec]) -> Vec> [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking aoc04 v0.1.0 (/opt/rustwide/workdir/aoc04) [INFO] [stdout] warning: name `LOCK` contains a capitalized acronym [INFO] [stdout] --> aoc25/src/main.rs:11:5 [INFO] [stdout] | [INFO] [stdout] 11 | LOCK, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter (notice the capitalization): `Lock` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `KEY` contains a capitalized acronym [INFO] [stdout] --> aoc25/src/main.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | KEY, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Key` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u64` -> `u64`) [INFO] [stdout] --> aoc09/src/main.rs:66:30 [INFO] [stdout] | [INFO] [stdout] 66 | .map(|b| b * file.id as u64) [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `file.id` [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> aoc02/src/main.rs:4:20 [INFO] [stdout] | [INFO] [stdout] 4 | fn is_safe(report: &Vec) -> bool { [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] 4 - fn is_safe(report: &Vec) -> bool { [INFO] [stdout] 4 + fn is_safe(report: &[i64]) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> aoc02/src/main.rs:14:5 [INFO] [stdout] | [INFO] [stdout] 12 | let safe = (all_positive || all_negative) && max_magnitude <= 3; [INFO] [stdout] | ---------------------------------------------------------------- unnecessary `let` binding [INFO] [stdout] 13 | [INFO] [stdout] 14 | safe [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 12 ~ [INFO] [stdout] 13 | [INFO] [stdout] 14 ~ (all_positive || all_negative) && max_magnitude <= 3 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> aoc02/src/main.rs:17:34 [INFO] [stdout] | [INFO] [stdout] 17 | fn is_safe_with_dampener(report: &Vec) -> bool { [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] 17 - fn is_safe_with_dampener(report: &Vec) -> bool { [INFO] [stdout] 17 + fn is_safe_with_dampener(report: &[i64]) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> aoc02/src/main.rs:23:26 [INFO] [stdout] | [INFO] [stdout] 23 | fn safe_reports(reports: &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] 23 - fn safe_reports(reports: &Vec>) -> usize { [INFO] [stdout] 23 + fn safe_reports(reports: &[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] --> aoc02/src/main.rs:27:40 [INFO] [stdout] | [INFO] [stdout] 27 | fn safe_reports_with_dampener(reports: &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] 27 - fn safe_reports_with_dampener(reports: &Vec>) -> usize { [INFO] [stdout] 27 + fn safe_reports_with_dampener(reports: &[Vec]) -> usize { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking aoc19 v0.1.0 (/opt/rustwide/workdir/aoc19) [INFO] [stderr] Checking aoc06 v0.1.0 (/opt/rustwide/workdir/aoc06) [INFO] [stdout] warning: using `clone` on type `File` which implements the `Copy` trait [INFO] [stdout] --> aoc09/src/main.rs:123:24 [INFO] [stdout] | [INFO] [stdout] 123 | let file = file.clone(); [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*file` [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] [stderr] Checking aoc05 v0.1.0 (/opt/rustwide/workdir/aoc05) [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> aoc04/src/main.rs:63:28 [INFO] [stdout] | [INFO] [stdout] 63 | const DIRECTIONS: &'static [&[Direction]] = &[ [INFO] [stdout] | -^^^^^^^--------------- help: consider removing `'static`: `&[&[Direction]]` [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: constants have by default a `'static` lifetime [INFO] [stdout] --> aoc04/src/main.rs:81:28 [INFO] [stdout] | [INFO] [stdout] 81 | const DIRECTIONS: &'static [Direction] = &[ [INFO] [stdout] | -^^^^^^^------------ help: consider removing `'static`: `&[Direction]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> aoc24/src/main.rs:129:17 [INFO] [stdout] | [INFO] [stdout] 129 | fn swap_outputs<'a>(name: &'a str) -> &'a str { [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] 129 - fn swap_outputs<'a>(name: &'a str) -> &'a str { [INFO] [stdout] 129 + fn swap_outputs(name: &str) -> &str { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> aoc24/src/main.rs:149:6 [INFO] [stdout] | [INFO] [stdout] 149 | ) -> ( [INFO] [stdout] | ______^ [INFO] [stdout] 150 | | HashMap>, [INFO] [stdout] 151 | | Vec<(Rc, bool)>, [INFO] [stdout] 152 | | Vec>, [INFO] [stdout] 153 | | ) { [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: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> aoc24/src/main.rs:160:6 [INFO] [stdout] | [INFO] [stdout] 160 | ) -> ( [INFO] [stdout] | ______^ [INFO] [stdout] 161 | | HashMap>, [INFO] [stdout] 162 | | Vec<(Rc, bool)>, [INFO] [stdout] 163 | | Vec>, [INFO] [stdout] 164 | | ) { [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] [stderr] Checking aoc11 v0.1.0 (/opt/rustwide/workdir/aoc11) [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> aoc04/src/main.rs:115:45 [INFO] [stdout] | [INFO] [stdout] 115 | .filter(|(pos, _)| grid.x_mas_match(&pos)) [INFO] [stdout] | ^^^^ help: change this to: `pos` [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] [stderr] Checking aoc07 v0.1.0 (/opt/rustwide/workdir/aoc07) [INFO] [stderr] Checking aoc03 v0.1.0 (/opt/rustwide/workdir/aoc03) [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> aoc11/src/main.rs:14:15 [INFO] [stdout] | [INFO] [stdout] 14 | } else if d % 2 == 0 { [INFO] [stdout] | ^^^^^^^^^^ help: replace with: `d.is_multiple_of(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> aoc11/src/main.rs:32:20 [INFO] [stdout] | [INFO] [stdout] 32 | return occupied.get().clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*occupied.get()` [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: struct `Delta` is never constructed [INFO] [stdout] --> aoc08/src/main.rs:135:8 [INFO] [stdout] | [INFO] [stdout] 135 | struct Delta { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> aoc03/src/main.rs:15:13 [INFO] [stdout] | [INFO] [stdout] 15 | buf: buf, [INFO] [stdout] | ^^^^^^^^ help: replace it with: `buf` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> aoc03/src/main.rs:19:13 [INFO] [stdout] | [INFO] [stdout] 19 | parse_enables: parse_enables, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `parse_enables` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking itertools v0.10.5 [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> aoc08/src/main.rs:101:6 [INFO] [stdout] | [INFO] [stdout] 101 | impl<'a, 'b> Add<&'b Position> for &'a Position { [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] 101 - impl<'a, 'b> Add<&'b Position> for &'a Position { [INFO] [stdout] 101 + impl<'b> Add<&'b Position> for &Position { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> aoc08/src/main.rs:112:6 [INFO] [stdout] | [INFO] [stdout] 112 | impl<'a, 'b> Sub<&'b Position> for &'a Position { [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] 112 - impl<'a, 'b> Sub<&'b Position> for &'a Position { [INFO] [stdout] 112 + impl<'b> Sub<&'b Position> for &Position { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> aoc08/src/main.rs:142:5 [INFO] [stdout] | [INFO] [stdout] 141 | let text_grid = Grid::::from_file(data); [INFO] [stdout] | -------------------------------------------- unnecessary `let` binding [INFO] [stdout] 142 | text_grid [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 141 ~ [INFO] [stdout] 142 ~ Grid::::from_file(data) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> aoc19/src/main.rs:42:5 [INFO] [stdout] | [INFO] [stdout] 42 | return 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] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 42 - return count; [INFO] [stdout] 42 + count [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> aoc19/src/main.rs:25:8 [INFO] [stdout] | [INFO] [stdout] 25 | if design == "" { [INFO] [stdout] | ^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `design.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] = note: `#[warn(clippy::comparison_to_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for cloning elements [INFO] [stdout] --> aoc08/src/main.rs:150:5 [INFO] [stdout] | [INFO] [stdout] 150 | antenna_groups.values().map(|v| v.clone()).collect() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `cloned` method: `antenna_groups.values().cloned()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] = note: `#[warn(clippy::map_clone)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `generate_inputs` is never used [INFO] [stdout] --> aoc24/src/main.rs:113:4 [INFO] [stdout] | [INFO] [stdout] 113 | fn generate_inputs( [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 `swap_outputs` is never used [INFO] [stdout] --> aoc24/src/main.rs:129:4 [INFO] [stdout] | [INFO] [stdout] 129 | fn swap_outputs<'a>(name: &'a str) -> &'a str { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> aoc24/src/main.rs:129:17 [INFO] [stdout] | [INFO] [stdout] 129 | fn swap_outputs<'a>(name: &'a str) -> &'a str { [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] 129 - fn swap_outputs<'a>(name: &'a str) -> &'a str { [INFO] [stdout] 129 + fn swap_outputs(name: &str) -> &str { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> aoc24/src/main.rs:149:6 [INFO] [stdout] | [INFO] [stdout] 149 | ) -> ( [INFO] [stdout] | ______^ [INFO] [stdout] 150 | | HashMap>, [INFO] [stdout] 151 | | Vec<(Rc, bool)>, [INFO] [stdout] 152 | | Vec>, [INFO] [stdout] 153 | | ) { [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: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> aoc24/src/main.rs:160:6 [INFO] [stdout] | [INFO] [stdout] 160 | ) -> ( [INFO] [stdout] | ______^ [INFO] [stdout] 161 | | HashMap>, [INFO] [stdout] 162 | | Vec<(Rc, bool)>, [INFO] [stdout] 163 | | Vec>, [INFO] [stdout] 164 | | ) { [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: called `filter(..).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(..)` instead [INFO] [stdout] --> aoc08/src/main.rs:177:5 [INFO] [stdout] | [INFO] [stdout] 177 | / (1..=std::cmp::min(a.abs(), b.abs())) [INFO] [stdout] 178 | | .rev() [INFO] [stdout] 179 | | .filter(|v| a % v == 0 && b % v == 0) [INFO] [stdout] 180 | | .next() [INFO] [stdout] | |_______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_next [INFO] [stdout] = note: `#[warn(clippy::filter_next)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 177 ~ (1..=std::cmp::min(a.abs(), b.abs())) [INFO] [stdout] 178 + .rev().find(|v| a % v == 0 && b % v == 0) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `LOCK` contains a capitalized acronym [INFO] [stdout] --> aoc25/src/main.rs:11:5 [INFO] [stdout] | [INFO] [stdout] 11 | LOCK, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter (notice the capitalization): `Lock` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `KEY` contains a capitalized acronym [INFO] [stdout] --> aoc25/src/main.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | KEY, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Key` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> aoc03/src/main.rs:77:24 [INFO] [stdout] | [INFO] [stdout] 77 | if num.len() > 0 && num.len() <= 3 { [INFO] [stdout] | ^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!num.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] [stderr] Compiling syn v1.0.109 [INFO] [stderr] Compiling syn v2.0.90 [INFO] [stderr] Checking itertools v0.13.0 [INFO] [stdout] warning: using `clone` on type `Position` which implements the `Copy` trait [INFO] [stdout] --> aoc06/src/main.rs:141:19 [INFO] [stdout] | [INFO] [stdout] 141 | let mut pos = start.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*start` [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: using `clone` on type `Position` which implements the `Copy` trait [INFO] [stdout] --> aoc06/src/main.rs:153:47 [INFO] [stdout] | [INFO] [stdout] 153 | let key: (Position, Direction) = (pos.clone(), dir.clone()); [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `pos` [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 `Direction` which implements the `Copy` trait [INFO] [stdout] --> aoc06/src/main.rs:153:60 [INFO] [stdout] | [INFO] [stdout] 153 | let key: (Position, Direction) = (pos.clone(), dir.clone()); [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `dir` [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] --> aoc19/src/main.rs:42:5 [INFO] [stdout] | [INFO] [stdout] 42 | return 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] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 42 - return count; [INFO] [stdout] 42 + count [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> aoc19/src/main.rs:25:8 [INFO] [stdout] | [INFO] [stdout] 25 | if design == "" { [INFO] [stdout] | ^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `design.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] = note: `#[warn(clippy::comparison_to_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Delta` is never constructed [INFO] [stdout] --> aoc08/src/main.rs:135:8 [INFO] [stdout] | [INFO] [stdout] 135 | struct Delta { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> aoc08/src/main.rs:101:6 [INFO] [stdout] | [INFO] [stdout] 101 | impl<'a, 'b> Add<&'b Position> for &'a Position { [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] 101 - impl<'a, 'b> Add<&'b Position> for &'a Position { [INFO] [stdout] 101 + impl<'b> Add<&'b Position> for &Position { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> aoc08/src/main.rs:112:6 [INFO] [stdout] | [INFO] [stdout] 112 | impl<'a, 'b> Sub<&'b Position> for &'a Position { [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] 112 - impl<'a, 'b> Sub<&'b Position> for &'a Position { [INFO] [stdout] 112 + impl<'b> Sub<&'b Position> for &Position { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> aoc08/src/main.rs:142:5 [INFO] [stdout] | [INFO] [stdout] 141 | let text_grid = Grid::::from_file(data); [INFO] [stdout] | -------------------------------------------- unnecessary `let` binding [INFO] [stdout] 142 | text_grid [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 141 ~ [INFO] [stdout] 142 ~ Grid::::from_file(data) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for cloning elements [INFO] [stdout] --> aoc08/src/main.rs:150:5 [INFO] [stdout] | [INFO] [stdout] 150 | antenna_groups.values().map(|v| v.clone()).collect() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `cloned` method: `antenna_groups.values().cloned()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] = note: `#[warn(clippy::map_clone)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `filter(..).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(..)` instead [INFO] [stdout] --> aoc08/src/main.rs:177:5 [INFO] [stdout] | [INFO] [stdout] 177 | / (1..=std::cmp::min(a.abs(), b.abs())) [INFO] [stdout] 178 | | .rev() [INFO] [stdout] 179 | | .filter(|v| a % v == 0 && b % v == 0) [INFO] [stdout] 180 | | .next() [INFO] [stdout] | |_______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_next [INFO] [stdout] = note: `#[warn(clippy::filter_next)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 177 ~ (1..=std::cmp::min(a.abs(), b.abs())) [INFO] [stdout] 178 + .rev().find(|v| a % v == 0 && b % v == 0) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u64` -> `u64`) [INFO] [stdout] --> aoc09/src/main.rs:66:30 [INFO] [stdout] | [INFO] [stdout] 66 | .map(|b| b * file.id as u64) [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `file.id` [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: using `clone` on type `Position` which implements the `Copy` trait [INFO] [stdout] --> aoc06/src/main.rs:141:19 [INFO] [stdout] | [INFO] [stdout] 141 | let mut pos = start.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*start` [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: using `clone` on type `Position` which implements the `Copy` trait [INFO] [stdout] --> aoc06/src/main.rs:153:47 [INFO] [stdout] | [INFO] [stdout] 153 | let key: (Position, Direction) = (pos.clone(), dir.clone()); [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `pos` [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 `Direction` which implements the `Copy` trait [INFO] [stdout] --> aoc06/src/main.rs:153:60 [INFO] [stdout] | [INFO] [stdout] 153 | let key: (Position, Direction) = (pos.clone(), dir.clone()); [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `dir` [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 `File` which implements the `Copy` trait [INFO] [stdout] --> aoc09/src/main.rs:123:24 [INFO] [stdout] | [INFO] [stdout] 123 | let file = file.clone(); [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*file` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> aoc03/src/main.rs:15:13 [INFO] [stdout] | [INFO] [stdout] 15 | buf: buf, [INFO] [stdout] | ^^^^^^^^ help: replace it with: `buf` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> aoc03/src/main.rs:19:13 [INFO] [stdout] | [INFO] [stdout] 19 | parse_enables: parse_enables, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `parse_enables` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> aoc04/src/main.rs:63:28 [INFO] [stdout] | [INFO] [stdout] 63 | const DIRECTIONS: &'static [&[Direction]] = &[ [INFO] [stdout] | -^^^^^^^--------------- help: consider removing `'static`: `&[&[Direction]]` [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: constants have by default a `'static` lifetime [INFO] [stdout] --> aoc04/src/main.rs:81:28 [INFO] [stdout] | [INFO] [stdout] 81 | const DIRECTIONS: &'static [Direction] = &[ [INFO] [stdout] | -^^^^^^^------------ help: consider removing `'static`: `&[Direction]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> aoc11/src/main.rs:14:15 [INFO] [stdout] | [INFO] [stdout] 14 | } else if d % 2 == 0 { [INFO] [stdout] | ^^^^^^^^^^ help: replace with: `d.is_multiple_of(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> aoc11/src/main.rs:32:20 [INFO] [stdout] | [INFO] [stdout] 32 | return occupied.get().clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*occupied.get()` [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: length comparison to zero [INFO] [stdout] --> aoc03/src/main.rs:77:24 [INFO] [stdout] | [INFO] [stdout] 77 | if num.len() > 0 && num.len() <= 3 { [INFO] [stdout] | ^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!num.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: casting integer literal to `u64` is unnecessary [INFO] [stdout] --> aoc07/src/main.rs:44:15 [INFO] [stdout] | [INFO] [stdout] 44 | f: |a, b| (10 as u64).pow(count_digits(b)) * a + b, [INFO] [stdout] | ^^^^^^^^^^^ help: try: `10_u64` [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: casting integer literal to `u64` is unnecessary [INFO] [stdout] --> aoc07/src/main.rs:44:15 [INFO] [stdout] | [INFO] [stdout] 44 | f: |a, b| (10 as u64).pow(count_digits(b)) * a + b, [INFO] [stdout] | ^^^^^^^^^^^ help: try: `10_u64` [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> aoc01/src/main.rs:4:37 [INFO] [stdout] | [INFO] [stdout] 4 | fn rotate_vector_of_vectors(vec: &Vec>) -> 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] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 4 - fn rotate_vector_of_vectors(vec: &Vec>) -> Vec> [INFO] [stdout] 4 + fn rotate_vector_of_vectors(vec: &[Vec]) -> Vec> [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> aoc04/src/main.rs:115:45 [INFO] [stdout] | [INFO] [stdout] 115 | .filter(|(pos, _)| grid.x_mas_match(&pos)) [INFO] [stdout] | ^^^^ help: change this to: `pos` [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] [stderr] Checking rayon v0.9.0 [INFO] [stderr] Checking integer-sqrt v0.1.5 [INFO] [stderr] Checking aoc22 v0.1.0 (/opt/rustwide/workdir/aoc22) [INFO] [stderr] Checking aoc21 v0.1.0 (/opt/rustwide/workdir/aoc21) [INFO] [stderr] Checking aoc17 v0.1.0 (/opt/rustwide/workdir/aoc17) [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> aoc22/src/main.rs:200:35 [INFO] [stdout] | [INFO] [stdout] 200 | let secrets = parse_input(&data); [INFO] [stdout] | ^^^^^ help: change this to: `data` [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] --> aoc22/src/main.rs:238:60 [INFO] [stdout] | [INFO] [stdout] 238 | .map(|sequences_and_prices| price_for_sequence(&sequences_and_prices, &[-2, 1, -1, 3])) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: change this to: `sequences_and_prices` [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: octal-looking escape in a literal [INFO] [stdout] --> aoc21/src/main.rs:144:70 [INFO] [stdout] | [INFO] [stdout] 144 | static ref NUMPAD: Keypad = Keypad::from(&["789", "456", "123", "\00A"]); [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: octal escapes are not supported, `\0` is always null [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#octal_escapes [INFO] [stdout] = note: `#[warn(clippy::octal_escapes)]` on by default [INFO] [stdout] help: if an octal escape is intended, use a hex escape instead [INFO] [stdout] | [INFO] [stdout] 144 | static ref NUMPAD: Keypad = Keypad::from(&["789", "456", "123", "\x00A"]); [INFO] [stdout] | + [INFO] [stdout] help: if a null escape is intended, disambiguate using [INFO] [stdout] | [INFO] [stdout] 144 | static ref NUMPAD: Keypad = Keypad::from(&["789", "456", "123", "\x0000A"]); [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: octal-looking escape in a literal [INFO] [stdout] --> aoc21/src/main.rs:144:70 [INFO] [stdout] | [INFO] [stdout] 144 | static ref NUMPAD: Keypad = Keypad::from(&["789", "456", "123", "\00A"]); [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: octal escapes are not supported, `\0` is always null [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#octal_escapes [INFO] [stdout] = note: `#[warn(clippy::octal_escapes)]` on by default [INFO] [stdout] help: if an octal escape is intended, use a hex escape instead [INFO] [stdout] | [INFO] [stdout] 144 | static ref NUMPAD: Keypad = Keypad::from(&["789", "456", "123", "\x00A"]); [INFO] [stdout] | + [INFO] [stdout] help: if a null escape is intended, disambiguate using [INFO] [stdout] | [INFO] [stdout] 144 | static ref NUMPAD: Keypad = Keypad::from(&["789", "456", "123", "\x0000A"]); [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: taken reference of right operand [INFO] [stdout] --> aoc21/src/main.rs:129:27 [INFO] [stdout] | [INFO] [stdout] 129 | let horiz_first = horiz.clone() + &vert + &"A"; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^---- [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `"A"` [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] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> aoc21/src/main.rs:129:51 [INFO] [stdout] | [INFO] [stdout] 129 | let horiz_first = horiz.clone() + &vert + &"A"; [INFO] [stdout] | ^^^^ help: change this to: `"A"` [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: taken reference of right operand [INFO] [stdout] --> aoc21/src/main.rs:130:26 [INFO] [stdout] | [INFO] [stdout] 130 | let vert_first = vert + &horiz + &"A"; [INFO] [stdout] | ^^^^^^^^^^^^^^^^---- [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `"A"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> aoc21/src/main.rs:130:42 [INFO] [stdout] | [INFO] [stdout] 130 | let vert_first = vert + &horiz + &"A"; [INFO] [stdout] | ^^^^ help: change this to: `"A"` [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: taken reference of right operand [INFO] [stdout] --> aoc21/src/main.rs:129:27 [INFO] [stdout] | [INFO] [stdout] 129 | let horiz_first = horiz.clone() + &vert + &"A"; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^---- [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `"A"` [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] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> aoc21/src/main.rs:129:51 [INFO] [stdout] | [INFO] [stdout] 129 | let horiz_first = horiz.clone() + &vert + &"A"; [INFO] [stdout] | ^^^^ help: change this to: `"A"` [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: taken reference of right operand [INFO] [stdout] --> aoc21/src/main.rs:130:26 [INFO] [stdout] | [INFO] [stdout] 130 | let vert_first = vert + &horiz + &"A"; [INFO] [stdout] | ^^^^^^^^^^^^^^^^---- [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `"A"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> aoc21/src/main.rs:130:42 [INFO] [stdout] | [INFO] [stdout] 130 | let vert_first = vert + &horiz + &"A"; [INFO] [stdout] | ^^^^ help: change this to: `"A"` [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: manual implementation of an assign operation [INFO] [stdout] --> aoc17/src/main.rs:43:9 [INFO] [stdout] | [INFO] [stdout] 43 | self.a.val = self.a.val >> self.combo_operand(operand); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.a.val >>= self.combo_operand(operand)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> aoc17/src/main.rs:58:9 [INFO] [stdout] | [INFO] [stdout] 58 | self.b.val = self.b.val ^ operand as u64; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.b.val ^= operand as u64` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> aoc17/src/main.rs:76:9 [INFO] [stdout] | [INFO] [stdout] 76 | self.b.val = self.b.val ^ self.c.val; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.b.val ^= self.c.val` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> aoc17/src/main.rs:43:9 [INFO] [stdout] | [INFO] [stdout] 43 | self.a.val = self.a.val >> self.combo_operand(operand); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.a.val >>= self.combo_operand(operand)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> aoc17/src/main.rs:58:9 [INFO] [stdout] | [INFO] [stdout] 58 | self.b.val = self.b.val ^ operand as u64; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.b.val ^= operand as u64` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> aoc17/src/main.rs:76:9 [INFO] [stdout] | [INFO] [stdout] 76 | self.b.val = self.b.val ^ self.c.val; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.b.val ^= self.c.val` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Compiling thiserror-impl v1.0.69 [INFO] [stderr] Checking thiserror v1.0.69 [INFO] [stderr] Checking pathfinding v3.0.14 [INFO] [stderr] Compiling regex_static_impl v0.1.0 [INFO] [stderr] Compiling strum_macros v0.24.3 [INFO] [stderr] Compiling derive-syn-parse v0.1.5 [INFO] [stderr] Compiling regex_static_macro v0.1.0 [INFO] [stderr] Checking regex_static v0.1.1 [INFO] [stderr] Checking aoc13 v0.1.0 (/opt/rustwide/workdir/aoc13) [INFO] [stderr] Compiling strum v0.24.1 [INFO] [stderr] Compiling auto-impl-ops v0.2.1 [INFO] [stderr] Checking mygrid v0.1.0 (/opt/rustwide/workdir/lib/mygrid) [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> lib/mygrid/src/lib.rs:182:13 [INFO] [stdout] | [INFO] [stdout] 182 | same_region_fn: same_region_fn, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `same_region_fn` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> lib/mygrid/src/lib.rs:182:13 [INFO] [stdout] | [INFO] [stdout] 182 | same_region_fn: same_region_fn, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `same_region_fn` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> lib/mygrid/src/lib.rs:72:9 [INFO] [stdout] | [INFO] [stdout] 72 | / self.grid [INFO] [stdout] 73 | | .iter() [INFO] [stdout] 74 | | .enumerate() [INFO] [stdout] 75 | | .find(|&(_, v)| v == t) [INFO] [stdout] ... | [INFO] [stdout] 80 | | )) [INFO] [stdout] 81 | | }) [INFO] [stdout] | |______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] = note: `#[warn(clippy::bind_instead_of_map)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 72 ~ self.grid [INFO] [stdout] 73 + .iter() [INFO] [stdout] 74 + .enumerate() [INFO] [stdout] 75 + .find(|&(_, v)| v == t).map(|(i, _)| Position::new( [INFO] [stdout] 76 + (i % self.x_size) as i32, [INFO] [stdout] 77 + (i / self.x_size) as i32, [INFO] [stdout] 78 + )) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: implementation of inherent method `to_string(&self) -> String` for type `Grid` [INFO] [stdout] --> lib/mygrid/src/lib.rs:84:5 [INFO] [stdout] | [INFO] [stdout] 84 | / pub fn to_string(&self) -> String [INFO] [stdout] 85 | | where [INFO] [stdout] 86 | | T: ToString, [INFO] [stdout] ... | [INFO] [stdout] 98 | | .collect() [INFO] [stdout] 99 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: implement trait `Display` for type `Grid` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inherent_to_string [INFO] [stdout] = note: `#[warn(clippy::inherent_to_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Position` which implements the `Copy` trait [INFO] [stdout] --> lib/mygrid/src/lib.rs:148:21 [INFO] [stdout] | [INFO] [stdout] 148 | let start = start.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*start` [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: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> lib/mygrid/src/lib.rs:152:31 [INFO] [stdout] | [INFO] [stdout] 152 | .filter_map(|pos| self.at(&pos).and_then(|v| Some((pos, v)))) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.at(&pos).map(|v| (pos, v))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Position` which implements the `Copy` trait [INFO] [stdout] --> lib/mygrid/src/lib.rs:156:21 [INFO] [stdout] | [INFO] [stdout] 156 | let start = start.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*start` [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 `Position` which implements the `Copy` trait [INFO] [stdout] --> lib/mygrid/src/lib.rs:161:21 [INFO] [stdout] | [INFO] [stdout] 161 | let start = start.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*start` [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 `Position` which implements the `Copy` trait [INFO] [stdout] --> lib/mygrid/src/lib.rs:181:28 [INFO] [stdout] | [INFO] [stdout] 181 | pending: vec![(start.clone(), &grid.at(start).expect("valid"))], [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*start` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> lib/mygrid/src/lib.rs:181:43 [INFO] [stdout] | [INFO] [stdout] 181 | pending: vec![(start.clone(), &grid.at(start).expect("valid"))], [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `grid.at(start).expect("valid")` [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] --> lib/mygrid/src/lib.rs:192:58 [INFO] [stdout] | [INFO] [stdout] 192 | .filter(move |&(pos, v)| same_region_fn(pos, &v)) [INFO] [stdout] | ^^ help: change this to: `v` [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: direct implementation of `ToString` [INFO] [stdout] --> lib/mygrid/src/lib.rs:241:1 [INFO] [stdout] | [INFO] [stdout] 241 | / impl ToString for Position { [INFO] [stdout] 242 | | fn to_string(&self) -> String { [INFO] [stdout] 243 | | self.x.to_string() + "," + &self.y.to_string() [INFO] [stdout] 244 | | } [INFO] [stdout] 245 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: prefer implementing `Display` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_trait_impl [INFO] [stdout] = note: `#[warn(clippy::to_string_trait_impl)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> lib/mygrid/src/lib.rs:250:18 [INFO] [stdout] | [INFO] [stdout] 250 | self.x = &self.x + &other.x; [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] 250 - self.x = &self.x + &other.x; [INFO] [stdout] 250 + self.x = self.x + other.x; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> lib/mygrid/src/lib.rs:251:18 [INFO] [stdout] | [INFO] [stdout] 251 | self.y = &self.y + &other.y; [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] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 251 - self.y = &self.y + &other.y; [INFO] [stdout] 251 + self.y = self.y + other.y; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of left operand [INFO] [stdout] --> lib/mygrid/src/lib.rs:258:18 [INFO] [stdout] | [INFO] [stdout] 258 | self.x = &self.x + other; [INFO] [stdout] | -------^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: use the left value directly: `self.x` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of left operand [INFO] [stdout] --> lib/mygrid/src/lib.rs:259:18 [INFO] [stdout] | [INFO] [stdout] 259 | self.y = &self.y + other; [INFO] [stdout] | -------^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: use the left value directly: `self.y` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> lib/mygrid/src/lib.rs:266:18 [INFO] [stdout] | [INFO] [stdout] 266 | self.x = &self.x * &other.x; [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] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 266 - self.x = &self.x * &other.x; [INFO] [stdout] 266 + self.x = self.x * other.x; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> lib/mygrid/src/lib.rs:267:18 [INFO] [stdout] | [INFO] [stdout] 267 | self.y = &self.y * &other.y; [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] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 267 - self.y = &self.y * &other.y; [INFO] [stdout] 267 + self.y = self.y * other.y; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of left operand [INFO] [stdout] --> lib/mygrid/src/lib.rs:274:18 [INFO] [stdout] | [INFO] [stdout] 274 | self.x = &self.x * other; [INFO] [stdout] | -------^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: use the left value directly: `self.x` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of left operand [INFO] [stdout] --> lib/mygrid/src/lib.rs:275:18 [INFO] [stdout] | [INFO] [stdout] 275 | self.y = &self.y * other; [INFO] [stdout] | -------^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: use the left value directly: `self.y` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> lib/mygrid/src/lib.rs:72:9 [INFO] [stdout] | [INFO] [stdout] 72 | / self.grid [INFO] [stdout] 73 | | .iter() [INFO] [stdout] 74 | | .enumerate() [INFO] [stdout] 75 | | .find(|&(_, v)| v == t) [INFO] [stdout] ... | [INFO] [stdout] 80 | | )) [INFO] [stdout] 81 | | }) [INFO] [stdout] | |______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] = note: `#[warn(clippy::bind_instead_of_map)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 72 ~ self.grid [INFO] [stdout] 73 + .iter() [INFO] [stdout] 74 + .enumerate() [INFO] [stdout] 75 + .find(|&(_, v)| v == t).map(|(i, _)| Position::new( [INFO] [stdout] 76 + (i % self.x_size) as i32, [INFO] [stdout] 77 + (i / self.x_size) as i32, [INFO] [stdout] 78 + )) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: implementation of inherent method `to_string(&self) -> String` for type `Grid` [INFO] [stdout] --> lib/mygrid/src/lib.rs:84:5 [INFO] [stdout] | [INFO] [stdout] 84 | / pub fn to_string(&self) -> String [INFO] [stdout] 85 | | where [INFO] [stdout] 86 | | T: ToString, [INFO] [stdout] ... | [INFO] [stdout] 98 | | .collect() [INFO] [stdout] 99 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: implement trait `Display` for type `Grid` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inherent_to_string [INFO] [stdout] = note: `#[warn(clippy::inherent_to_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of left operand [INFO] [stdout] --> lib/mygrid/src/lib.rs:282:18 [INFO] [stdout] | [INFO] [stdout] 282 | self.x = &self.x / other; [INFO] [stdout] | -------^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: use the left value directly: `self.x` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of left operand [INFO] [stdout] --> lib/mygrid/src/lib.rs:283:18 [INFO] [stdout] | [INFO] [stdout] 283 | self.y = &self.y / other; [INFO] [stdout] | -------^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: use the left value directly: `self.y` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> lib/mygrid/src/lib.rs:290:18 [INFO] [stdout] | [INFO] [stdout] 290 | self.x = &self.x % &other.x; [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] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 290 - self.x = &self.x % &other.x; [INFO] [stdout] 290 + self.x = self.x % other.x; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> lib/mygrid/src/lib.rs:291:18 [INFO] [stdout] | [INFO] [stdout] 291 | self.y = &self.y % &other.y; [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] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 291 - self.y = &self.y % &other.y; [INFO] [stdout] 291 + self.y = self.y % other.y; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Position` which implements the `Copy` trait [INFO] [stdout] --> lib/mygrid/src/lib.rs:148:21 [INFO] [stdout] | [INFO] [stdout] 148 | let start = start.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*start` [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: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> lib/mygrid/src/lib.rs:152:31 [INFO] [stdout] | [INFO] [stdout] 152 | .filter_map(|pos| self.at(&pos).and_then(|v| Some((pos, v)))) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.at(&pos).map(|v| (pos, v))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Position` which implements the `Copy` trait [INFO] [stdout] --> lib/mygrid/src/lib.rs:156:21 [INFO] [stdout] | [INFO] [stdout] 156 | let start = start.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*start` [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 `Position` which implements the `Copy` trait [INFO] [stdout] --> lib/mygrid/src/lib.rs:161:21 [INFO] [stdout] | [INFO] [stdout] 161 | let start = start.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*start` [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 `Position` which implements the `Copy` trait [INFO] [stdout] --> lib/mygrid/src/lib.rs:181:28 [INFO] [stdout] | [INFO] [stdout] 181 | pending: vec![(start.clone(), &grid.at(start).expect("valid"))], [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*start` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> lib/mygrid/src/lib.rs:181:43 [INFO] [stdout] | [INFO] [stdout] 181 | pending: vec![(start.clone(), &grid.at(start).expect("valid"))], [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `grid.at(start).expect("valid")` [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] --> lib/mygrid/src/lib.rs:192:58 [INFO] [stdout] | [INFO] [stdout] 192 | .filter(move |&(pos, v)| same_region_fn(pos, &v)) [INFO] [stdout] | ^^ help: change this to: `v` [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: direct implementation of `ToString` [INFO] [stdout] --> lib/mygrid/src/lib.rs:241:1 [INFO] [stdout] | [INFO] [stdout] 241 | / impl ToString for Position { [INFO] [stdout] 242 | | fn to_string(&self) -> String { [INFO] [stdout] 243 | | self.x.to_string() + "," + &self.y.to_string() [INFO] [stdout] 244 | | } [INFO] [stdout] 245 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: prefer implementing `Display` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_trait_impl [INFO] [stdout] = note: `#[warn(clippy::to_string_trait_impl)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> lib/mygrid/src/lib.rs:250:18 [INFO] [stdout] | [INFO] [stdout] 250 | self.x = &self.x + &other.x; [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] 250 - self.x = &self.x + &other.x; [INFO] [stdout] 250 + self.x = self.x + other.x; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> lib/mygrid/src/lib.rs:251:18 [INFO] [stdout] | [INFO] [stdout] 251 | self.y = &self.y + &other.y; [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] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 251 - self.y = &self.y + &other.y; [INFO] [stdout] 251 + self.y = self.y + other.y; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of left operand [INFO] [stdout] --> lib/mygrid/src/lib.rs:258:18 [INFO] [stdout] | [INFO] [stdout] 258 | self.x = &self.x + other; [INFO] [stdout] | -------^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: use the left value directly: `self.x` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of left operand [INFO] [stdout] --> lib/mygrid/src/lib.rs:259:18 [INFO] [stdout] | [INFO] [stdout] 259 | self.y = &self.y + other; [INFO] [stdout] | -------^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: use the left value directly: `self.y` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> lib/mygrid/src/lib.rs:266:18 [INFO] [stdout] | [INFO] [stdout] 266 | self.x = &self.x * &other.x; [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] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 266 - self.x = &self.x * &other.x; [INFO] [stdout] 266 + self.x = self.x * other.x; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> lib/mygrid/src/lib.rs:267:18 [INFO] [stdout] | [INFO] [stdout] 267 | self.y = &self.y * &other.y; [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] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 267 - self.y = &self.y * &other.y; [INFO] [stdout] 267 + self.y = self.y * other.y; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of left operand [INFO] [stdout] --> lib/mygrid/src/lib.rs:274:18 [INFO] [stdout] | [INFO] [stdout] 274 | self.x = &self.x * other; [INFO] [stdout] | -------^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: use the left value directly: `self.x` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of left operand [INFO] [stdout] --> lib/mygrid/src/lib.rs:275:18 [INFO] [stdout] | [INFO] [stdout] 275 | self.y = &self.y * other; [INFO] [stdout] | -------^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: use the left value directly: `self.y` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of left operand [INFO] [stdout] --> lib/mygrid/src/lib.rs:282:18 [INFO] [stdout] | [INFO] [stdout] 282 | self.x = &self.x / other; [INFO] [stdout] | -------^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: use the left value directly: `self.x` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of left operand [INFO] [stdout] --> lib/mygrid/src/lib.rs:283:18 [INFO] [stdout] | [INFO] [stdout] 283 | self.y = &self.y / other; [INFO] [stdout] | -------^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: use the left value directly: `self.y` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> lib/mygrid/src/lib.rs:290:18 [INFO] [stdout] | [INFO] [stdout] 290 | self.x = &self.x % &other.x; [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] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 290 - self.x = &self.x % &other.x; [INFO] [stdout] 290 + self.x = self.x % other.x; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> lib/mygrid/src/lib.rs:291:18 [INFO] [stdout] | [INFO] [stdout] 291 | self.y = &self.y % &other.y; [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] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 291 - self.y = &self.y % &other.y; [INFO] [stdout] 291 + self.y = self.y % other.y; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking aoc20 v0.1.0 (/opt/rustwide/workdir/aoc20) [INFO] [stderr] Checking aoc16 v0.1.0 (/opt/rustwide/workdir/aoc16) [INFO] [stderr] Checking aoc18 v0.1.0 (/opt/rustwide/workdir/aoc18) [INFO] [stderr] Checking aoc14 v0.1.0 (/opt/rustwide/workdir/aoc14) [INFO] [stderr] Checking aoc12 v0.1.0 (/opt/rustwide/workdir/aoc12) [INFO] [stderr] Checking aoc10 v0.1.0 (/opt/rustwide/workdir/aoc10) [INFO] [stderr] Checking aoc15 v0.1.0 (/opt/rustwide/workdir/aoc15) [INFO] [stdout] warning: direct implementation of `ToString` [INFO] [stdout] --> aoc18/src/main.rs:10:1 [INFO] [stdout] | [INFO] [stdout] 10 | / impl ToString for Cell { [INFO] [stdout] 11 | | fn to_string(&self) -> String { [INFO] [stdout] 12 | | match self.t { [INFO] [stdout] 13 | | None => ".".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 17 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: prefer implementing `Display` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_trait_impl [INFO] [stdout] = note: `#[warn(clippy::to_string_trait_impl)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::filter` [INFO] [stdout] --> aoc18/src/main.rs:47:20 [INFO] [stdout] | [INFO] [stdout] 47 | t: match c.t { [INFO] [stdout] | ____________________^ [INFO] [stdout] 48 | | None => None, [INFO] [stdout] 49 | | Some(t) => { [INFO] [stdout] 50 | | if t < max_t { [INFO] [stdout] ... | [INFO] [stdout] 56 | | }, [INFO] [stdout] | |_________________^ help: try: `c.t.filter(|&t| t < max_t)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_filter [INFO] [stdout] = note: `#[warn(clippy::manual_filter)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> aoc18/src/main.rs:68:17 [INFO] [stdout] | [INFO] [stdout] 68 | assert!(self.grid[pos].t.map_or(true, |t| t >= max_t)); [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_none_or` instead [INFO] [stdout] | [INFO] [stdout] 68 - assert!(self.grid[pos].t.map_or(true, |t| t >= max_t)); [INFO] [stdout] 68 + assert!(self.grid[pos].t.is_none_or(|t| t >= max_t)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> aoc18/src/main.rs:74:38 [INFO] [stdout] | [INFO] [stdout] 74 | .is_some_and(|v| v.t.map_or(true, |t| t >= max_t)) [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_none_or` instead [INFO] [stdout] | [INFO] [stdout] 74 - .is_some_and(|v| v.t.map_or(true, |t| t >= max_t)) [INFO] [stdout] 74 + .is_some_and(|v| v.t.is_none_or(|t| t >= max_t)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> aoc18/src/main.rs:76:34 [INFO] [stdout] | [INFO] [stdout] 76 | .map(|dir| (pos.step(&dir), 1)) [INFO] [stdout] | ^^^^ help: change this to: `dir` [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: casting the result of `i32::abs()` to usize [INFO] [stdout] --> aoc18/src/main.rs:82:9 [INFO] [stdout] | [INFO] [stdout] 82 | (self.end.x - pos.x).abs() as usize + (self.end.y - pos.y).abs() as usize [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `(self.end.x - pos.x).unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] = note: `#[warn(clippy::cast_abs_to_unsigned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `i32::abs()` to usize [INFO] [stdout] --> aoc18/src/main.rs:82:47 [INFO] [stdout] | [INFO] [stdout] 82 | (self.end.x - pos.x).abs() as usize + (self.end.y - pos.y).abs() as usize [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `(self.end.y - pos.y).unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> aoc12/src/main.rs:26:35 [INFO] [stdout] | [INFO] [stdout] 26 | .filter(|pos| !grid.at(pos).is_some_and(|v| v == start_value)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `grid.at(pos).is_none_or(|v| v != start_value)` [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: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> aoc12/src/main.rs:35:25 [INFO] [stdout] | [INFO] [stdout] 35 | / region_grid [INFO] [stdout] 36 | | .at(&Position { x, y }) [INFO] [stdout] 37 | | .and_then(|&v| Some(v)) [INFO] [stdout] | |___________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] = note: `#[warn(clippy::bind_instead_of_map)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 35 ~ region_grid [INFO] [stdout] 36 + .at(&Position { x, y }).map(|&v| v) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> aoc12/src/main.rs:122:32 [INFO] [stdout] | [INFO] [stdout] 122 | let grid = parse_input(&data); [INFO] [stdout] | ^^^^^ help: change this to: `data` [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] --> aoc12/src/main.rs:130:32 [INFO] [stdout] | [INFO] [stdout] 130 | let grid = parse_input(&data); [INFO] [stdout] | ^^^^^ help: change this to: `data` [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] --> aoc12/src/main.rs:138:32 [INFO] [stdout] | [INFO] [stdout] 138 | let grid = parse_input(&data); [INFO] [stdout] | ^^^^^ help: change this to: `data` [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: struct `Node` is never constructed [INFO] [stdout] --> aoc20/src/main.rs:30:8 [INFO] [stdout] | [INFO] [stdout] 30 | struct Node { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: direct implementation of `ToString` [INFO] [stdout] --> aoc20/src/main.rs:10:1 [INFO] [stdout] | [INFO] [stdout] 10 | / impl ToString for Cell { [INFO] [stdout] 11 | | fn to_string(&self) -> String { [INFO] [stdout] 12 | | match self { [INFO] [stdout] 13 | | &Cell::Empty => ".".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 17 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: prefer implementing `Display` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_trait_impl [INFO] [stdout] = note: `#[warn(clippy::to_string_trait_impl)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> aoc20/src/main.rs:12:9 [INFO] [stdout] | [INFO] [stdout] 12 | / match self { [INFO] [stdout] 13 | | &Cell::Empty => ".".to_string(), [INFO] [stdout] 14 | | &Cell::Wall => "#".to_string(), [INFO] [stdout] 15 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] = note: `#[warn(clippy::match_ref_pats)]` on by default [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 12 ~ match *self { [INFO] [stdout] 13 ~ Cell::Empty => ".".to_string(), [INFO] [stdout] 14 ~ Cell::Wall => "#".to_string(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> aoc20/src/main.rs:37:49 [INFO] [stdout] | [INFO] [stdout] 37 | let grid_bytes = Grid::::from_bytes(&data); [INFO] [stdout] | ^^^^^ help: change this to: `data` [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 `map_or` can be simplified [INFO] [stdout] --> aoc20/src/main.rs:66:46 [INFO] [stdout] | [INFO] [stdout] 66 | next_pos != &prev_pos && grid.at(next_pos).map_or(false, |&c| c == Cell::Empty) [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] 66 - next_pos != &prev_pos && grid.at(next_pos).map_or(false, |&c| c == Cell::Empty) [INFO] [stdout] 66 + next_pos != &prev_pos && grid.at(next_pos).is_some_and(|&c| c == Cell::Empty) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `i32::abs()` to usize [INFO] [stdout] --> aoc20/src/main.rs:93:33 [INFO] [stdout] | [INFO] [stdout] 93 | let cheat_len = x.abs() as usize + y.abs() as usize; [INFO] [stdout] | ^^^^^^^ help: replace with: `x.unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] = note: `#[warn(clippy::cast_abs_to_unsigned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `i32::abs()` to usize [INFO] [stdout] --> aoc20/src/main.rs:93:52 [INFO] [stdout] | [INFO] [stdout] 93 | let cheat_len = x.abs() as usize + y.abs() as usize; [INFO] [stdout] | ^^^^^^^ help: replace with: `y.unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual saturating arithmetic [INFO] [stdout] --> aoc20/src/main.rs:100:24 [INFO] [stdout] | [INFO] [stdout] 100 | && self.distance[&pos] [INFO] [stdout] | ________________________^ [INFO] [stdout] 101 | | .checked_sub(distance_with_cheat) [INFO] [stdout] 102 | | .unwrap_or(0) [INFO] [stdout] | |_____________________________________^ help: consider using `saturating_sub`: `self.distance[&pos].saturating_sub(distance_with_cheat)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_saturating_arithmetic [INFO] [stdout] = note: `#[warn(clippy::manual_saturating_arithmetic)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: direct implementation of `ToString` [INFO] [stdout] --> aoc15/src/main.rs:13:1 [INFO] [stdout] | [INFO] [stdout] 13 | / impl ToString for Cell { [INFO] [stdout] 14 | | fn to_string(&self) -> String { [INFO] [stdout] 15 | | match self { [INFO] [stdout] 16 | | &Cell::Empty => ".".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 23 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: prefer implementing `Display` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_trait_impl [INFO] [stdout] = note: `#[warn(clippy::to_string_trait_impl)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> aoc15/src/main.rs:15:9 [INFO] [stdout] | [INFO] [stdout] 15 | / match self { [INFO] [stdout] 16 | | &Cell::Empty => ".".to_string(), [INFO] [stdout] 17 | | &Cell::Box => "O".to_string(), [INFO] [stdout] 18 | | &Cell::BoxLeft => "[".to_string(), [INFO] [stdout] 19 | | &Cell::BoxRight => "]".to_string(), [INFO] [stdout] 20 | | &Cell::Wall => "#".to_string(), [INFO] [stdout] 21 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] = note: `#[warn(clippy::match_ref_pats)]` on by default [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 15 ~ match *self { [INFO] [stdout] 16 ~ Cell::Empty => ".".to_string(), [INFO] [stdout] 17 ~ Cell::Box => "O".to_string(), [INFO] [stdout] 18 ~ Cell::BoxLeft => "[".to_string(), [INFO] [stdout] 19 ~ Cell::BoxRight => "]".to_string(), [INFO] [stdout] 20 ~ Cell::Wall => "#".to_string(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> aoc15/src/main.rs:63:14 [INFO] [stdout] | [INFO] [stdout] 63 | .map(|cell| match cell { [INFO] [stdout] | ______________^ [INFO] [stdout] 64 | | &Cell::Box => vec![Cell::BoxLeft, Cell::BoxRight], [INFO] [stdout] 65 | | &Cell::Empty => vec![Cell::Empty, Cell::Empty], [INFO] [stdout] 66 | | &Cell::Wall => vec![Cell::Wall, Cell::Wall], [INFO] [stdout] 67 | | _ => panic!(), [INFO] [stdout] 68 | | }) [INFO] [stdout] 69 | | .flatten(); [INFO] [stdout] | |______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] = note: `#[warn(clippy::map_flatten)]` on by default [INFO] [stdout] help: try replacing `map` with `flat_map` and remove the `.flatten()` [INFO] [stdout] | [INFO] [stdout] 63 ~ .flat_map(|cell| match cell { [INFO] [stdout] 64 + &Cell::Box => vec![Cell::BoxLeft, Cell::BoxRight], [INFO] [stdout] 65 + &Cell::Empty => vec![Cell::Empty, Cell::Empty], [INFO] [stdout] 66 + &Cell::Wall => vec![Cell::Wall, Cell::Wall], [INFO] [stdout] 67 + _ => panic!(), [INFO] [stdout] 68 ~ }); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> aoc15/src/main.rs:63:25 [INFO] [stdout] | [INFO] [stdout] 63 | .map(|cell| match cell { [INFO] [stdout] | _________________________^ [INFO] [stdout] 64 | | &Cell::Box => vec![Cell::BoxLeft, Cell::BoxRight], [INFO] [stdout] 65 | | &Cell::Empty => vec![Cell::Empty, Cell::Empty], [INFO] [stdout] 66 | | &Cell::Wall => vec![Cell::Wall, Cell::Wall], [INFO] [stdout] 67 | | _ => panic!(), [INFO] [stdout] 68 | | }) [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 63 ~ .map(|cell| match *cell { [INFO] [stdout] 64 ~ Cell::Box => vec![Cell::BoxLeft, Cell::BoxRight], [INFO] [stdout] 65 ~ Cell::Empty => vec![Cell::Empty, Cell::Empty], [INFO] [stdout] 66 ~ Cell::Wall => vec![Cell::Wall, Cell::Wall], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> aoc15/src/main.rs:77:25 [INFO] [stdout] | [INFO] [stdout] 77 | match self.grid[&pos] { [INFO] [stdout] | ^^^^ help: change this to: `pos` [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: using `clone` on type `Position` which implements the `Copy` trait [INFO] [stdout] --> aoc15/src/main.rs:95:37 [INFO] [stdout] | [INFO] [stdout] 95 | boxes.insert(0, pair_box.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `pair_box` [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: using `clone` on type `Position` which implements the `Copy` trait [INFO] [stdout] --> aoc15/src/main.rs:98:33 [INFO] [stdout] | [INFO] [stdout] 98 | boxes.insert(0, pos.clone()); [INFO] [stdout] | ^^^^^^^^^^^ help: try dereferencing it: `*pos` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> aoc15/src/main.rs:118:51 [INFO] [stdout] | [INFO] [stdout] 118 | self.grid[&moved_box_pos] = self.grid[&box_pos]; [INFO] [stdout] | ^^^^^^^^ help: change this to: `box_pos` [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] --> aoc15/src/main.rs:119:23 [INFO] [stdout] | [INFO] [stdout] 119 | self.grid[&box_pos] = Cell::Empty; [INFO] [stdout] | ^^^^^^^^ help: change this to: `box_pos` [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: using `clone` on type `Position` which implements the `Copy` trait [INFO] [stdout] --> aoc15/src/main.rs:120:40 [INFO] [stdout] | [INFO] [stdout] 120 | already_moved_boxes.insert(box_pos.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try dereferencing it: `*box_pos` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> aoc15/src/main.rs:221:50 [INFO] [stdout] | [INFO] [stdout] 221 | let (mut state, movements) = parse_input(&data); [INFO] [stdout] | ^^^^^ help: change this to: `data` [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 `let...else` may be rewritten with the `?` operator [INFO] [stdout] --> aoc10/src/main.rs:14:5 [INFO] [stdout] | [INFO] [stdout] 14 | let Some(&n) = grid.at(pos) else { return None }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `let &n = grid.at(pos)?;` [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: using `clone` on type `Position` which implements the `Copy` trait [INFO] [stdout] --> aoc10/src/main.rs:17:48 [INFO] [stdout] | [INFO] [stdout] 17 | return Some(HashSet::::from([pos.clone()])); [INFO] [stdout] | ^^^^^^^^^^^ help: try dereferencing it: `*pos` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> aoc10/src/main.rs:23:31 [INFO] [stdout] | [INFO] [stdout] 23 | .filter(|pos| grid.at(&pos).is_some_and(|&v| v == n + 1)) [INFO] [stdout] | ^^^^ help: change this to: `pos` [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: manual implementation of `Option::map` [INFO] [stdout] --> aoc10/src/main.rs:32:20 [INFO] [stdout] | [INFO] [stdout] 32 | } else if let Some(b) = b { [INFO] [stdout] | ____________________^ [INFO] [stdout] 33 | | Some(b) [INFO] [stdout] 34 | | } else { [INFO] [stdout] 35 | | None [INFO] [stdout] 36 | | } [INFO] [stdout] | |_____________^ help: try: `{ b.map(|b| b) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Node` is never constructed [INFO] [stdout] --> aoc20/src/main.rs:30:8 [INFO] [stdout] | [INFO] [stdout] 30 | struct Node { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: direct implementation of `ToString` [INFO] [stdout] --> aoc20/src/main.rs:10:1 [INFO] [stdout] | [INFO] [stdout] 10 | / impl ToString for Cell { [INFO] [stdout] 11 | | fn to_string(&self) -> String { [INFO] [stdout] 12 | | match self { [INFO] [stdout] 13 | | &Cell::Empty => ".".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 17 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: prefer implementing `Display` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_trait_impl [INFO] [stdout] = note: `#[warn(clippy::to_string_trait_impl)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> aoc10/src/main.rs:62:31 [INFO] [stdout] | [INFO] [stdout] 62 | .filter(|pos| grid.at(&pos).is_some_and(|&v| v == n + 1)) [INFO] [stdout] | ^^^^ help: change this to: `pos` [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: you don't need to add `&` to all patterns [INFO] [stdout] --> aoc20/src/main.rs:12:9 [INFO] [stdout] | [INFO] [stdout] 12 | / match self { [INFO] [stdout] 13 | | &Cell::Empty => ".".to_string(), [INFO] [stdout] 14 | | &Cell::Wall => "#".to_string(), [INFO] [stdout] 15 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] = note: `#[warn(clippy::match_ref_pats)]` on by default [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 12 ~ match *self { [INFO] [stdout] 13 ~ Cell::Empty => ".".to_string(), [INFO] [stdout] 14 ~ Cell::Wall => "#".to_string(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> aoc20/src/main.rs:37:49 [INFO] [stdout] | [INFO] [stdout] 37 | let grid_bytes = Grid::::from_bytes(&data); [INFO] [stdout] | ^^^^^ help: change this to: `data` [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 `map_or` can be simplified [INFO] [stdout] --> aoc20/src/main.rs:66:46 [INFO] [stdout] | [INFO] [stdout] 66 | next_pos != &prev_pos && grid.at(next_pos).map_or(false, |&c| c == Cell::Empty) [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] 66 - next_pos != &prev_pos && grid.at(next_pos).map_or(false, |&c| c == Cell::Empty) [INFO] [stdout] 66 + next_pos != &prev_pos && grid.at(next_pos).is_some_and(|&c| c == Cell::Empty) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `i32::abs()` to usize [INFO] [stdout] --> aoc20/src/main.rs:93:33 [INFO] [stdout] | [INFO] [stdout] 93 | let cheat_len = x.abs() as usize + y.abs() as usize; [INFO] [stdout] | ^^^^^^^ help: replace with: `x.unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] = note: `#[warn(clippy::cast_abs_to_unsigned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `i32::abs()` to usize [INFO] [stdout] --> aoc20/src/main.rs:93:52 [INFO] [stdout] | [INFO] [stdout] 93 | let cheat_len = x.abs() as usize + y.abs() as usize; [INFO] [stdout] | ^^^^^^^ help: replace with: `y.unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual saturating arithmetic [INFO] [stdout] --> aoc20/src/main.rs:100:24 [INFO] [stdout] | [INFO] [stdout] 100 | && self.distance[&pos] [INFO] [stdout] | ________________________^ [INFO] [stdout] 101 | | .checked_sub(distance_with_cheat) [INFO] [stdout] 102 | | .unwrap_or(0) [INFO] [stdout] | |_____________________________________^ help: consider using `saturating_sub`: `self.distance[&pos].saturating_sub(distance_with_cheat)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_saturating_arithmetic [INFO] [stdout] = note: `#[warn(clippy::manual_saturating_arithmetic)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `let...else` may be rewritten with the `?` operator [INFO] [stdout] --> aoc10/src/main.rs:14:5 [INFO] [stdout] | [INFO] [stdout] 14 | let Some(&n) = grid.at(pos) else { return None }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `let &n = grid.at(pos)?;` [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: using `clone` on type `Position` which implements the `Copy` trait [INFO] [stdout] --> aoc10/src/main.rs:17:48 [INFO] [stdout] | [INFO] [stdout] 17 | return Some(HashSet::::from([pos.clone()])); [INFO] [stdout] | ^^^^^^^^^^^ help: try dereferencing it: `*pos` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> aoc10/src/main.rs:23:31 [INFO] [stdout] | [INFO] [stdout] 23 | .filter(|pos| grid.at(&pos).is_some_and(|&v| v == n + 1)) [INFO] [stdout] | ^^^^ help: change this to: `pos` [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: manual implementation of `Option::map` [INFO] [stdout] --> aoc10/src/main.rs:32:20 [INFO] [stdout] | [INFO] [stdout] 32 | } else if let Some(b) = b { [INFO] [stdout] | ____________________^ [INFO] [stdout] 33 | | Some(b) [INFO] [stdout] 34 | | } else { [INFO] [stdout] 35 | | None [INFO] [stdout] 36 | | } [INFO] [stdout] | |_____________^ help: try: `{ b.map(|b| b) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> aoc10/src/main.rs:62:31 [INFO] [stdout] | [INFO] [stdout] 62 | .filter(|pos| grid.at(&pos).is_some_and(|&v| v == n + 1)) [INFO] [stdout] | ^^^^ help: change this to: `pos` [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: direct implementation of `ToString` [INFO] [stdout] --> aoc18/src/main.rs:10:1 [INFO] [stdout] | [INFO] [stdout] 10 | / impl ToString for Cell { [INFO] [stdout] 11 | | fn to_string(&self) -> String { [INFO] [stdout] 12 | | match self.t { [INFO] [stdout] 13 | | None => ".".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 17 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: prefer implementing `Display` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_trait_impl [INFO] [stdout] = note: `#[warn(clippy::to_string_trait_impl)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> aoc14/src/main.rs:33:9 [INFO] [stdout] | [INFO] [stdout] 29 | / let ret = Self { [INFO] [stdout] 30 | | p: (((self.p + self.v * seconds) % size) + size) % size, [INFO] [stdout] 31 | | v: self.v, [INFO] [stdout] 32 | | }; [INFO] [stdout] | |__________- unnecessary `let` binding [INFO] [stdout] 33 | ret [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 29 ~ [INFO] [stdout] 30 ~ Self { [INFO] [stdout] 31 + p: (((self.p + self.v * seconds) % size) + size) % size, [INFO] [stdout] 32 + v: self.v, [INFO] [stdout] 33 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: direct implementation of `ToString` [INFO] [stdout] --> aoc16/src/main.rs:11:1 [INFO] [stdout] | [INFO] [stdout] 11 | / impl ToString for Cell { [INFO] [stdout] 12 | | fn to_string(&self) -> String { [INFO] [stdout] 13 | | match self { [INFO] [stdout] 14 | | &Cell::Empty => ".".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 18 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: prefer implementing `Display` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_trait_impl [INFO] [stdout] = note: `#[warn(clippy::to_string_trait_impl)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> aoc12/src/main.rs:26:35 [INFO] [stdout] | [INFO] [stdout] 26 | .filter(|pos| !grid.at(pos).is_some_and(|v| v == start_value)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `grid.at(pos).is_none_or(|v| v != start_value)` [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: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> aoc12/src/main.rs:35:25 [INFO] [stdout] | [INFO] [stdout] 35 | / region_grid [INFO] [stdout] 36 | | .at(&Position { x, y }) [INFO] [stdout] 37 | | .and_then(|&v| Some(v)) [INFO] [stdout] | |___________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] = note: `#[warn(clippy::bind_instead_of_map)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 35 ~ region_grid [INFO] [stdout] 36 + .at(&Position { x, y }).map(|&v| v) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> aoc16/src/main.rs:13:9 [INFO] [stdout] | [INFO] [stdout] 13 | / match self { [INFO] [stdout] 14 | | &Cell::Empty => ".".to_string(), [INFO] [stdout] 15 | | &Cell::Wall => "#".to_string(), [INFO] [stdout] 16 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] = note: `#[warn(clippy::match_ref_pats)]` on by default [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 13 ~ match *self { [INFO] [stdout] 14 ~ Cell::Empty => ".".to_string(), [INFO] [stdout] 15 ~ Cell::Wall => "#".to_string(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: direct implementation of `ToString` [INFO] [stdout] --> aoc16/src/main.rs:11:1 [INFO] [stdout] | [INFO] [stdout] 11 | / impl ToString for Cell { [INFO] [stdout] 12 | | fn to_string(&self) -> String { [INFO] [stdout] 13 | | match self { [INFO] [stdout] 14 | | &Cell::Empty => ".".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 18 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: prefer implementing `Display` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_trait_impl [INFO] [stdout] = note: `#[warn(clippy::to_string_trait_impl)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> aoc16/src/main.rs:13:9 [INFO] [stdout] | [INFO] [stdout] 13 | / match self { [INFO] [stdout] 14 | | &Cell::Empty => ".".to_string(), [INFO] [stdout] 15 | | &Cell::Wall => "#".to_string(), [INFO] [stdout] 16 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] = note: `#[warn(clippy::match_ref_pats)]` on by default [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 13 ~ match *self { [INFO] [stdout] 14 ~ Cell::Empty => ".".to_string(), [INFO] [stdout] 15 ~ Cell::Wall => "#".to_string(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> aoc14/src/main.rs:85:5 [INFO] [stdout] | [INFO] [stdout] 85 | return grid.iter().filter(|&v| v == &true).count() == robots.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] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 85 - return grid.iter().filter(|&v| v == &true).count() == robots.len(); [INFO] [stdout] 85 + grid.iter().filter(|&v| v == &true).count() == robots.len() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::filter` [INFO] [stdout] --> aoc18/src/main.rs:47:20 [INFO] [stdout] | [INFO] [stdout] 47 | t: match c.t { [INFO] [stdout] | ____________________^ [INFO] [stdout] 48 | | None => None, [INFO] [stdout] 49 | | Some(t) => { [INFO] [stdout] 50 | | if t < max_t { [INFO] [stdout] ... | [INFO] [stdout] 56 | | }, [INFO] [stdout] | |_________________^ help: try: `c.t.filter(|&t| t < max_t)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_filter [INFO] [stdout] = note: `#[warn(clippy::manual_filter)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> aoc18/src/main.rs:68:17 [INFO] [stdout] | [INFO] [stdout] 68 | assert!(self.grid[pos].t.map_or(true, |t| t >= max_t)); [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_none_or` instead [INFO] [stdout] | [INFO] [stdout] 68 - assert!(self.grid[pos].t.map_or(true, |t| t >= max_t)); [INFO] [stdout] 68 + assert!(self.grid[pos].t.is_none_or(|t| t >= max_t)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> aoc16/src/main.rs:34:49 [INFO] [stdout] | [INFO] [stdout] 34 | let grid_bytes = Grid::::from_bytes(&data); [INFO] [stdout] | ^^^^^ help: change this to: `data` [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 `map_or` can be simplified [INFO] [stdout] --> aoc18/src/main.rs:74:38 [INFO] [stdout] | [INFO] [stdout] 74 | .is_some_and(|v| v.t.map_or(true, |t| t >= max_t)) [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_none_or` instead [INFO] [stdout] | [INFO] [stdout] 74 - .is_some_and(|v| v.t.map_or(true, |t| t >= max_t)) [INFO] [stdout] 74 + .is_some_and(|v| v.t.is_none_or(|t| t >= max_t)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> aoc16/src/main.rs:34:49 [INFO] [stdout] | [INFO] [stdout] 34 | let grid_bytes = Grid::::from_bytes(&data); [INFO] [stdout] | ^^^^^ help: change this to: `data` [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] --> aoc18/src/main.rs:76:34 [INFO] [stdout] | [INFO] [stdout] 76 | .map(|dir| (pos.step(&dir), 1)) [INFO] [stdout] | ^^^^ help: change this to: `dir` [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: casting the result of `i32::abs()` to usize [INFO] [stdout] --> aoc18/src/main.rs:82:9 [INFO] [stdout] | [INFO] [stdout] 82 | (self.end.x - pos.x).abs() as usize + (self.end.y - pos.y).abs() as usize [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `(self.end.x - pos.x).unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] = note: `#[warn(clippy::cast_abs_to_unsigned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `i32::abs()` to usize [INFO] [stdout] --> aoc18/src/main.rs:82:47 [INFO] [stdout] | [INFO] [stdout] 82 | (self.end.x - pos.x).abs() as usize + (self.end.y - pos.y).abs() as usize [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `(self.end.y - pos.y).unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> aoc16/src/main.rs:67:51 [INFO] [stdout] | [INFO] [stdout] 67 | pos: pos_and_dir.pos.step(&dir), [INFO] [stdout] | ^^^^ help: change this to: `dir` [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: using `clone` on type `Direction` which implements the `Copy` trait [INFO] [stdout] --> aoc16/src/main.rs:68:30 [INFO] [stdout] | [INFO] [stdout] 68 | dir: dir.clone(), [INFO] [stdout] | ^^^^^^^^^^^ help: try dereferencing it: `*dir` [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: returning the result of a `let` binding from a block [INFO] [stdout] --> aoc16/src/main.rs:86:9 [INFO] [stdout] | [INFO] [stdout] 78 | / let c = match pos_and_dir.dir { [INFO] [stdout] 79 | | mygrid::LEFT => 2000, [INFO] [stdout] 80 | | mygrid::RIGHT => 0, [INFO] [stdout] 81 | | mygrid::UP => 0, [INFO] [stdout] ... | [INFO] [stdout] 84 | | } + (self.end.x - pos_and_dir.pos.x).abs() as usize [INFO] [stdout] 85 | | + (self.end.y - pos_and_dir.pos.y).abs() as usize; [INFO] [stdout] | |______________________________________________________________- unnecessary `let` binding [INFO] [stdout] 86 | c [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 78 ~ [INFO] [stdout] 79 ~ (match pos_and_dir.dir { [INFO] [stdout] 80 + mygrid::LEFT => 2000, [INFO] [stdout] 81 + mygrid::RIGHT => 0, [INFO] [stdout] 82 + mygrid::UP => 0, [INFO] [stdout] 83 + mygrid::DOWN => 2000, [INFO] [stdout] 84 + _ => panic!(), [INFO] [stdout] 85 + } + (self.end.x - pos_and_dir.pos.x).abs() as usize [INFO] [stdout] 86 + + (self.end.y - pos_and_dir.pos.y).abs() as usize) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> aoc16/src/main.rs:67:51 [INFO] [stdout] | [INFO] [stdout] 67 | pos: pos_and_dir.pos.step(&dir), [INFO] [stdout] | ^^^^ help: change this to: `dir` [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 the result of `i32::abs()` to usize [INFO] [stdout] --> aoc16/src/main.rs:84:13 [INFO] [stdout] | [INFO] [stdout] 84 | } + (self.end.x - pos_and_dir.pos.x).abs() as usize [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `(self.end.x - pos_and_dir.pos.x).unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] = note: `#[warn(clippy::cast_abs_to_unsigned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `i32::abs()` to usize [INFO] [stdout] --> aoc16/src/main.rs:85:15 [INFO] [stdout] | [INFO] [stdout] 85 | + (self.end.y - pos_and_dir.pos.y).abs() as usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `(self.end.y - pos_and_dir.pos.y).unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Direction` which implements the `Copy` trait [INFO] [stdout] --> aoc16/src/main.rs:68:30 [INFO] [stdout] | [INFO] [stdout] 68 | dir: dir.clone(), [INFO] [stdout] | ^^^^^^^^^^^ help: try dereferencing it: `*dir` [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: used `assert_eq!` with a literal bool [INFO] [stdout] --> aoc14/src/main.rs:161:9 [INFO] [stdout] | [INFO] [stdout] 161 | assert_eq!(no_duplicate_robots(&[robot1], &size), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_assert_comparison)]` on by default [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 161 - assert_eq!(no_duplicate_robots(&[robot1], &size), true); [INFO] [stdout] 161 + assert!(no_duplicate_robots(&[robot1], &size)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> aoc16/src/main.rs:86:9 [INFO] [stdout] | [INFO] [stdout] 78 | / let c = match pos_and_dir.dir { [INFO] [stdout] 79 | | mygrid::LEFT => 2000, [INFO] [stdout] 80 | | mygrid::RIGHT => 0, [INFO] [stdout] 81 | | mygrid::UP => 0, [INFO] [stdout] ... | [INFO] [stdout] 84 | | } + (self.end.x - pos_and_dir.pos.x).abs() as usize [INFO] [stdout] 85 | | + (self.end.y - pos_and_dir.pos.y).abs() as usize; [INFO] [stdout] | |______________________________________________________________- unnecessary `let` binding [INFO] [stdout] 86 | c [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 78 ~ [INFO] [stdout] 79 ~ (match pos_and_dir.dir { [INFO] [stdout] 80 + mygrid::LEFT => 2000, [INFO] [stdout] 81 + mygrid::RIGHT => 0, [INFO] [stdout] 82 + mygrid::UP => 0, [INFO] [stdout] 83 + mygrid::DOWN => 2000, [INFO] [stdout] 84 + _ => panic!(), [INFO] [stdout] 85 + } + (self.end.x - pos_and_dir.pos.x).abs() as usize [INFO] [stdout] 86 + + (self.end.y - pos_and_dir.pos.y).abs() as usize) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `i32::abs()` to usize [INFO] [stdout] --> aoc16/src/main.rs:84:13 [INFO] [stdout] | [INFO] [stdout] 84 | } + (self.end.x - pos_and_dir.pos.x).abs() as usize [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `(self.end.x - pos_and_dir.pos.x).unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] = note: `#[warn(clippy::cast_abs_to_unsigned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting the result of `i32::abs()` to usize [INFO] [stdout] --> aoc16/src/main.rs:85:15 [INFO] [stdout] | [INFO] [stdout] 85 | + (self.end.y - pos_and_dir.pos.y).abs() as usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `(self.end.y - pos_and_dir.pos.y).unsigned_abs()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> aoc14/src/main.rs:162:9 [INFO] [stdout] | [INFO] [stdout] 162 | assert_eq!(no_duplicate_robots(&[robot1, robot2], &size), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 162 - assert_eq!(no_duplicate_robots(&[robot1, robot2], &size), true); [INFO] [stdout] 162 + assert!(no_duplicate_robots(&[robot1, robot2], &size)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> aoc14/src/main.rs:163:9 [INFO] [stdout] | [INFO] [stdout] 163 | assert_eq!(no_duplicate_robots(&[robot1, robot3], &size), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 163 - assert_eq!(no_duplicate_robots(&[robot1, robot3], &size), false); [INFO] [stdout] 163 + assert!(!no_duplicate_robots(&[robot1, robot3], &size)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> aoc14/src/main.rs:164:9 [INFO] [stdout] | [INFO] [stdout] 164 | assert_eq!(no_duplicate_robots(&[robot1, robot2, robot3], &size), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 164 - assert_eq!(no_duplicate_robots(&[robot1, robot2, robot3], &size), false); [INFO] [stdout] 164 + assert!(!no_duplicate_robots(&[robot1, robot2, robot3], &size)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> aoc14/src/main.rs:33:9 [INFO] [stdout] | [INFO] [stdout] 29 | / let ret = Self { [INFO] [stdout] 30 | | p: (((self.p + self.v * seconds) % size) + size) % size, [INFO] [stdout] 31 | | v: self.v, [INFO] [stdout] 32 | | }; [INFO] [stdout] | |__________- unnecessary `let` binding [INFO] [stdout] 33 | ret [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 29 ~ [INFO] [stdout] 30 ~ Self { [INFO] [stdout] 31 + p: (((self.p + self.v * seconds) % size) + size) % size, [INFO] [stdout] 32 + v: self.v, [INFO] [stdout] 33 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> aoc14/src/main.rs:85:5 [INFO] [stdout] | [INFO] [stdout] 85 | return grid.iter().filter(|&v| v == &true).count() == robots.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] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 85 - return grid.iter().filter(|&v| v == &true).count() == robots.len(); [INFO] [stdout] 85 + grid.iter().filter(|&v| v == &true).count() == robots.len() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: direct implementation of `ToString` [INFO] [stdout] --> aoc15/src/main.rs:13:1 [INFO] [stdout] | [INFO] [stdout] 13 | / impl ToString for Cell { [INFO] [stdout] 14 | | fn to_string(&self) -> String { [INFO] [stdout] 15 | | match self { [INFO] [stdout] 16 | | &Cell::Empty => ".".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 23 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: prefer implementing `Display` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_trait_impl [INFO] [stdout] = note: `#[warn(clippy::to_string_trait_impl)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> aoc15/src/main.rs:15:9 [INFO] [stdout] | [INFO] [stdout] 15 | / match self { [INFO] [stdout] 16 | | &Cell::Empty => ".".to_string(), [INFO] [stdout] 17 | | &Cell::Box => "O".to_string(), [INFO] [stdout] 18 | | &Cell::BoxLeft => "[".to_string(), [INFO] [stdout] 19 | | &Cell::BoxRight => "]".to_string(), [INFO] [stdout] 20 | | &Cell::Wall => "#".to_string(), [INFO] [stdout] 21 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] = note: `#[warn(clippy::match_ref_pats)]` on by default [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 15 ~ match *self { [INFO] [stdout] 16 ~ Cell::Empty => ".".to_string(), [INFO] [stdout] 17 ~ Cell::Box => "O".to_string(), [INFO] [stdout] 18 ~ Cell::BoxLeft => "[".to_string(), [INFO] [stdout] 19 ~ Cell::BoxRight => "]".to_string(), [INFO] [stdout] 20 ~ Cell::Wall => "#".to_string(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> aoc15/src/main.rs:63:14 [INFO] [stdout] | [INFO] [stdout] 63 | .map(|cell| match cell { [INFO] [stdout] | ______________^ [INFO] [stdout] 64 | | &Cell::Box => vec![Cell::BoxLeft, Cell::BoxRight], [INFO] [stdout] 65 | | &Cell::Empty => vec![Cell::Empty, Cell::Empty], [INFO] [stdout] 66 | | &Cell::Wall => vec![Cell::Wall, Cell::Wall], [INFO] [stdout] 67 | | _ => panic!(), [INFO] [stdout] 68 | | }) [INFO] [stdout] 69 | | .flatten(); [INFO] [stdout] | |______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] = note: `#[warn(clippy::map_flatten)]` on by default [INFO] [stdout] help: try replacing `map` with `flat_map` and remove the `.flatten()` [INFO] [stdout] | [INFO] [stdout] 63 ~ .flat_map(|cell| match cell { [INFO] [stdout] 64 + &Cell::Box => vec![Cell::BoxLeft, Cell::BoxRight], [INFO] [stdout] 65 + &Cell::Empty => vec![Cell::Empty, Cell::Empty], [INFO] [stdout] 66 + &Cell::Wall => vec![Cell::Wall, Cell::Wall], [INFO] [stdout] 67 + _ => panic!(), [INFO] [stdout] 68 ~ }); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> aoc15/src/main.rs:63:25 [INFO] [stdout] | [INFO] [stdout] 63 | .map(|cell| match cell { [INFO] [stdout] | _________________________^ [INFO] [stdout] 64 | | &Cell::Box => vec![Cell::BoxLeft, Cell::BoxRight], [INFO] [stdout] 65 | | &Cell::Empty => vec![Cell::Empty, Cell::Empty], [INFO] [stdout] 66 | | &Cell::Wall => vec![Cell::Wall, Cell::Wall], [INFO] [stdout] 67 | | _ => panic!(), [INFO] [stdout] 68 | | }) [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 63 ~ .map(|cell| match *cell { [INFO] [stdout] 64 ~ Cell::Box => vec![Cell::BoxLeft, Cell::BoxRight], [INFO] [stdout] 65 ~ Cell::Empty => vec![Cell::Empty, Cell::Empty], [INFO] [stdout] 66 ~ Cell::Wall => vec![Cell::Wall, Cell::Wall], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> aoc15/src/main.rs:77:25 [INFO] [stdout] | [INFO] [stdout] 77 | match self.grid[&pos] { [INFO] [stdout] | ^^^^ help: change this to: `pos` [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: using `clone` on type `Position` which implements the `Copy` trait [INFO] [stdout] --> aoc15/src/main.rs:95:37 [INFO] [stdout] | [INFO] [stdout] 95 | boxes.insert(0, pair_box.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `pair_box` [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: using `clone` on type `Position` which implements the `Copy` trait [INFO] [stdout] --> aoc15/src/main.rs:98:33 [INFO] [stdout] | [INFO] [stdout] 98 | boxes.insert(0, pos.clone()); [INFO] [stdout] | ^^^^^^^^^^^ help: try dereferencing it: `*pos` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> aoc15/src/main.rs:118:51 [INFO] [stdout] | [INFO] [stdout] 118 | self.grid[&moved_box_pos] = self.grid[&box_pos]; [INFO] [stdout] | ^^^^^^^^ help: change this to: `box_pos` [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] --> aoc15/src/main.rs:119:23 [INFO] [stdout] | [INFO] [stdout] 119 | self.grid[&box_pos] = Cell::Empty; [INFO] [stdout] | ^^^^^^^^ help: change this to: `box_pos` [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: using `clone` on type `Position` which implements the `Copy` trait [INFO] [stdout] --> aoc15/src/main.rs:120:40 [INFO] [stdout] | [INFO] [stdout] 120 | already_moved_boxes.insert(box_pos.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try dereferencing it: `*box_pos` [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] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 14.16s [INFO] running `Command { std: "docker" "inspect" "1fb94c23b0a2e3651ca6cbb588963d84b480f89903f16740f8cd04685c27c5db", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "1fb94c23b0a2e3651ca6cbb588963d84b480f89903f16740f8cd04685c27c5db", kill_on_drop: false }` [INFO] [stdout] 1fb94c23b0a2e3651ca6cbb588963d84b480f89903f16740f8cd04685c27c5db