[INFO] cloning repository https://github.com/mfigurski80/advent_23 [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/mfigurski80/advent_23" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fmfigurski80%2Fadvent_23", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fmfigurski80%2Fadvent_23'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 3e636f107973e7967ed582b924d4b74de1e5cc5c [INFO] linting mfigurski80/advent_23 against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fmfigurski80%2Fadvent_23" "/workspace/builds/worker-2-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-2-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/mfigurski80/advent_23 [INFO] finished tweaking git repo https://github.com/mfigurski80/advent_23 [INFO] tweaked toml for git repo https://github.com/mfigurski80/advent_23 written to /workspace/builds/worker-2-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/mfigurski80/advent_23 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/mfigurski80/advent_23 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] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-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] 99471eee5b7cabcc38b86cb964ef39ecdb7564c9c321ae7f4bd85434cd1f9642 [INFO] running `Command { std: "docker" "start" "-a" "99471eee5b7cabcc38b86cb964ef39ecdb7564c9c321ae7f4bd85434cd1f9642", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "99471eee5b7cabcc38b86cb964ef39ecdb7564c9c321ae7f4bd85434cd1f9642", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "99471eee5b7cabcc38b86cb964ef39ecdb7564c9c321ae7f4bd85434cd1f9642", kill_on_drop: false }` [INFO] [stdout] 99471eee5b7cabcc38b86cb964ef39ecdb7564c9c321ae7f4bd85434cd1f9642 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-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] b5f13ff59cdb50fac565551b2ffdef3e871e4a96c6ab991692054f26a40eb925 [INFO] running `Command { std: "docker" "start" "-a" "b5f13ff59cdb50fac565551b2ffdef3e871e4a96c6ab991692054f26a40eb925", kill_on_drop: false }` [INFO] [stderr] Compiling num-traits v0.2.17 [INFO] [stderr] Compiling matrixmultiply v0.3.8 [INFO] [stderr] Checking memchr v2.6.4 [INFO] [stderr] Compiling num-bigint v0.4.4 [INFO] [stderr] Checking either v1.9.0 [INFO] [stderr] Checking itertools v0.12.0 [INFO] [stderr] Checking aho-corasick v1.1.2 [INFO] [stderr] Checking num-integer v0.1.45 [INFO] [stderr] Checking num-complex v0.4.4 [INFO] [stderr] Checking ndarray v0.15.6 [INFO] [stderr] Checking regex-automata v0.4.3 [INFO] [stderr] Checking regex v1.10.2 [INFO] [stderr] Checking advent_23 v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> src/d13.rs:43:21 [INFO] [stdout] | [INFO] [stdout] 43 | hash |= 1 << i % 64; [INFO] [stdout] | ^^^^^^^^^^^ help: consider parenthesizing your expression: `1 << (i % 64)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] = note: `#[warn(clippy::precedence)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> src/d14.rs:72:21 [INFO] [stdout] | [INFO] [stdout] 72 | hash |= 1 << i % 64; [INFO] [stdout] | ^^^^^^^^^^^ help: consider parenthesizing your expression: `1 << (i % 64)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the feature `slice_group_by` has been stable since 1.77.0 and no longer requires an attribute to enable [INFO] [stdout] --> src/main.rs:3:12 [INFO] [stdout] | [INFO] [stdout] 3 | #![feature(slice_group_by)] [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(stable_features)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> src/d13.rs:43:21 [INFO] [stdout] | [INFO] [stdout] 43 | hash |= 1 << i % 64; [INFO] [stdout] | ^^^^^^^^^^^ help: consider parenthesizing your expression: `1 << (i % 64)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] = note: `#[warn(clippy::precedence)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> src/d14.rs:72:21 [INFO] [stdout] | [INFO] [stdout] 72 | hash |= 1 << i % 64; [INFO] [stdout] | ^^^^^^^^^^^ help: consider parenthesizing your expression: `1 << (i % 64)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the feature `slice_group_by` has been stable since 1.77.0 and no longer requires an attribute to enable [INFO] [stdout] --> src/main.rs:3:12 [INFO] [stdout] | [INFO] [stdout] 3 | #![feature(slice_group_by)] [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(stable_features)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/d1.rs:10:63 [INFO] [stdout] | [INFO] [stdout] 10 | let first_digit = digits.clone().into_iter().find(|c| c.is_digit(10)).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `c.is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] = note: `#[warn(clippy::is_digit_ascii_radix)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/d1.rs:11:60 [INFO] [stdout] | [INFO] [stdout] 11 | let last_digit = digits.into_iter().rev().find(|c| c.is_digit(10)).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `c.is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/d1.rs:54:12 [INFO] [stdout] | [INFO] [stdout] 54 | if !next_char.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `next_char.is_some()` [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: called `unwrap` on `next_char` after checking its variant with `is_none` [INFO] [stdout] --> src/d1.rs:55:25 [INFO] [stdout] | [INFO] [stdout] 54 | if !next_char.is_none() { [INFO] [stdout] | ------------------- the check is happening here [INFO] [stdout] 55 | window.push(next_char.unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/d1.rs:36:11 [INFO] [stdout] | [INFO] [stdout] 36 | while window.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!window.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: the borrowed expression implements the required traits [INFO] [stdout] --> src/d1.rs:39:55 [INFO] [stdout] | [INFO] [stdout] 39 | .position(|&str_digit| window.starts_with(&str_digit)); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `str_digit` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/d1.rs:47:20 [INFO] [stdout] | [INFO] [stdout] 47 | if ch.is_digit(10) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `ch.is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `TILE` contains a capitalized acronym [INFO] [stdout] --> src/d10.rs:25:6 [INFO] [stdout] | [INFO] [stdout] 25 | enum TILE { [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Tile` [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 `EMPTY` contains a capitalized acronym [INFO] [stdout] --> src/d10.rs:26:5 [INFO] [stdout] | [INFO] [stdout] 26 | EMPTY = 0, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Empty` [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: name `VERTICAL` contains a capitalized acronym [INFO] [stdout] --> src/d10.rs:27:5 [INFO] [stdout] | [INFO] [stdout] 27 | VERTICAL = 1, [INFO] [stdout] | ^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Vertical` [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: name `HORIZONTAL` contains a capitalized acronym [INFO] [stdout] --> src/d10.rs:28:5 [INFO] [stdout] | [INFO] [stdout] 28 | HORIZONTAL = 2, [INFO] [stdout] | ^^^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Horizontal` [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: name `BOTTOMLEFT` contains a capitalized acronym [INFO] [stdout] --> src/d10.rs:29:5 [INFO] [stdout] | [INFO] [stdout] 29 | BOTTOMLEFT = 3, [INFO] [stdout] | ^^^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Bottomleft` [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: name `BOTTOMRIGHT` contains a capitalized acronym [INFO] [stdout] --> src/d10.rs:30:5 [INFO] [stdout] | [INFO] [stdout] 30 | BOTTOMRIGHT = 4, [INFO] [stdout] | ^^^^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Bottomright` [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: name `TOPLEFT` contains a capitalized acronym [INFO] [stdout] --> src/d10.rs:31:5 [INFO] [stdout] | [INFO] [stdout] 31 | TOPLEFT = 5, [INFO] [stdout] | ^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Topleft` [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: name `TOPRIGHT` contains a capitalized acronym [INFO] [stdout] --> src/d10.rs:32:5 [INFO] [stdout] | [INFO] [stdout] 32 | TOPRIGHT = 6, [INFO] [stdout] | ^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Topright` [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: name `START` contains a capitalized acronym [INFO] [stdout] --> src/d10.rs:33:5 [INFO] [stdout] | [INFO] [stdout] 33 | START = 7, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Start` [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/d10.rs:50:21 [INFO] [stdout] | [INFO] [stdout] 50 | fn find_tile(map2d: &Vec>, tile: TILE) -> Option<(usize, usize)> { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 50 - fn find_tile(map2d: &Vec>, tile: TILE) -> Option<(usize, usize)> { [INFO] [stdout] 50 + fn find_tile(map2d: &[Vec], tile: TILE) -> Option<(usize, usize)> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `TILEEDGE` contains a capitalized acronym [INFO] [stdout] --> src/d10.rs:59:6 [INFO] [stdout] | [INFO] [stdout] 59 | enum TILEEDGE { [INFO] [stdout] | ^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Tileedge` [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: name `DOWN` contains a capitalized acronym [INFO] [stdout] --> src/d10.rs:61:5 [INFO] [stdout] | [INFO] [stdout] 61 | DOWN, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Down` [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: name `LEFT` contains a capitalized acronym [INFO] [stdout] --> src/d10.rs:62:5 [INFO] [stdout] | [INFO] [stdout] 62 | LEFT, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Left` [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: name `RIGHT` contains a capitalized acronym [INFO] [stdout] --> src/d10.rs:63:5 [INFO] [stdout] | [INFO] [stdout] 63 | RIGHT, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Right` [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/d10.rs:97:12 [INFO] [stdout] | [INFO] [stdout] 97 | map2d: &Vec>, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 97 - map2d: &Vec>, [INFO] [stdout] 97 + map2d: &[Vec], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u8` is unnecessary [INFO] [stdout] --> src/d11.rs:17:54 [INFO] [stdout] | [INFO] [stdout] 17 | distance.iter().flatten().sum::() / 2 as u8 [INFO] [stdout] | ^^^^^^^ help: try: `2_u8` [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: name `TILE` contains a capitalized acronym [INFO] [stdout] --> src/d11.rs:27:6 [INFO] [stdout] | [INFO] [stdout] 27 | enum TILE { [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Tile` [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: name `SPACE` contains a capitalized acronym [INFO] [stdout] --> src/d11.rs:28:5 [INFO] [stdout] | [INFO] [stdout] 28 | SPACE = 0, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Space` [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: name `GALAXY` contains a capitalized acronym [INFO] [stdout] --> src/d11.rs:29:5 [INFO] [stdout] | [INFO] [stdout] 29 | GALAXY = 1, [INFO] [stdout] | ^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Galaxy` [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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/d11.rs:45:13 [INFO] [stdout] | [INFO] [stdout] 45 | / match match_tile(c) { [INFO] [stdout] 46 | | TILE::GALAXY => galaxies.push((y.to_biguint().unwrap(), x.to_biguint().unwrap())), [INFO] [stdout] 47 | | _ => (), [INFO] [stdout] 48 | | } [INFO] [stdout] | |_____________^ help: try: `if let TILE::GALAXY = match_tile(c) { galaxies.push((y.to_biguint().unwrap(), x.to_biguint().unwrap())) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/d11.rs:55:32 [INFO] [stdout] | [INFO] [stdout] 55 | fn apply_y_expansion(galaxies: &mut Vec) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 55 - fn apply_y_expansion(galaxies: &mut Vec) { [INFO] [stdout] 55 + fn apply_y_expansion(galaxies: &mut [Point]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u8` is unnecessary [INFO] [stdout] --> src/d11.rs:66:30 [INFO] [stdout] | [INFO] [stdout] 66 | last_y = y.clone() + 1 as u8; [INFO] [stdout] | ^^^^^^^ help: try: `1_u8` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/d11.rs:72:32 [INFO] [stdout] | [INFO] [stdout] 72 | fn apply_x_expansion(galaxies: &mut Vec) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 72 - fn apply_x_expansion(galaxies: &mut Vec) { [INFO] [stdout] 72 + fn apply_x_expansion(galaxies: &mut [Point]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u8` is unnecessary [INFO] [stdout] --> src/d11.rs:82:30 [INFO] [stdout] | [INFO] [stdout] 82 | last_x = x.clone() + 1 as u8; [INFO] [stdout] | ^^^^^^^ help: try: `1_u8` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/d11.rs:87:34 [INFO] [stdout] | [INFO] [stdout] 87 | fn get_distance_matrix(galaxies: &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] help: change this to [INFO] [stdout] | [INFO] [stdout] 87 - fn get_distance_matrix(galaxies: &Vec) -> Vec> { [INFO] [stdout] 87 + fn get_distance_matrix(galaxies: &[Point]) -> Vec> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/d12.rs:35:45 [INFO] [stdout] | [INFO] [stdout] 35 | fn record_match_runs(record: &String, runs: &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] 35 - fn record_match_runs(record: &String, runs: &Vec) -> bool { [INFO] [stdout] 35 + fn record_match_runs(record: &String, runs: &[usize]) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/d12.rs:38:20 [INFO] [stdout] | [INFO] [stdout] 38 | .find_iter(&record) [INFO] [stdout] | ^^^^^^^ help: change this to: `record` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/d12.rs:64:5 [INFO] [stdout] | [INFO] [stdout] 64 | return it.collect::>().into_iter(); [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] 64 - return it.collect::>().into_iter(); [INFO] [stdout] 64 + it.collect::>().into_iter() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/d13.rs:63:13 [INFO] [stdout] | [INFO] [stdout] 63 | return dif == 0; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 63 - return dif == 0; [INFO] [stdout] 63 + dif == 0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `(&str, char, u8)` which implements the `Copy` trait [INFO] [stdout] --> src/d15.rs:12:46 [INFO] [stdout] | [INFO] [stdout] 12 | acc[holiday_hash(x.0) as usize].push(x.clone()); [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*x` [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: unneeded `return` statement [INFO] [stdout] --> src/d15.rs:46:5 [INFO] [stdout] | [INFO] [stdout] 46 | return (label, '=', digit); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 46 - return (label, '=', digit); [INFO] [stdout] 46 + (label, '=', digit) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u8` is unnecessary [INFO] [stdout] --> src/d15.rs:53:15 [INFO] [stdout] | [INFO] [stdout] 53 | .fold(0 as u8, |acc, x| acc.wrapping_add(*x).wrapping_mul(17)) [INFO] [stdout] | ^^^^^^^ help: try: `0_u8` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `same_label_index` after checking its variant with `is_some` [INFO] [stdout] --> src/d15.rs:61:27 [INFO] [stdout] | [INFO] [stdout] 60 | if inst.1 == '-' && same_label_index.is_some() { [INFO] [stdout] | -------------------------- the check is happening here [INFO] [stdout] 61 | lenses.remove(same_label_index.unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/d3.rs:9:14 [INFO] [stdout] | [INFO] [stdout] 9 | .map(|ents| filter_spaces(ents)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `filter_spaces` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/d3.rs:8:14 [INFO] [stdout] | [INFO] [stdout] 8 | .map(|line| parse_entities(line)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `parse_entities` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/d3.rs:15:27 [INFO] [stdout] | [INFO] [stdout] 15 | .filter(|ent| match ent.2 { [INFO] [stdout] | ___________________________^ [INFO] [stdout] 16 | | Entity::Symbol(_) => true, [INFO] [stdout] 17 | | _ => false, [INFO] [stdout] 18 | | }) [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 15 - .filter(|ent| match ent.2 { [INFO] [stdout] 16 - Entity::Symbol(_) => true, [INFO] [stdout] 17 - _ => false, [INFO] [stdout] 18 - }) [INFO] [stdout] 15 + .filter(|ent| matches!(ent.2, Entity::Symbol(_))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.fold` can be written more succinctly using another method [INFO] [stdout] --> src/d3.rs:48:51 [INFO] [stdout] | [INFO] [stdout] 48 | let sum = adj_nums.iter().map(|(_, n)| n).fold(1, |acc, n| acc * n); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `product::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fold [INFO] [stdout] = note: `#[warn(clippy::unnecessary_fold)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/d3.rs:63:24 [INFO] [stdout] | [INFO] [stdout] 63 | fn parse_entities(row: &String) -> Vec<(usize, Entity)> { [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] 63 - fn parse_entities(row: &String) -> Vec<(usize, Entity)> { [INFO] [stdout] 63 + fn parse_entities(row: &str) -> Vec<(usize, Entity)> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/d3.rs:104:23 [INFO] [stdout] | [INFO] [stdout] 104 | .filter(|ent| match ent.1 { [INFO] [stdout] | _______________________^ [INFO] [stdout] 105 | | Entity::Space => false, [INFO] [stdout] 106 | | _ => true, [INFO] [stdout] 107 | | }) [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 104 - .filter(|ent| match ent.1 { [INFO] [stdout] 105 - Entity::Space => false, [INFO] [stdout] 106 - _ => true, [INFO] [stdout] 107 - }) [INFO] [stdout] 104 + .filter(|ent| !matches!(ent.1, Entity::Space)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/d4.rs:8:14 [INFO] [stdout] | [INFO] [stdout] 8 | .map(|line| parse_sets(line)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `parse_sets` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u32` is unnecessary [INFO] [stdout] --> src/d4.rs:13:32 [INFO] [stdout] | [INFO] [stdout] 13 | let mut card_counts = vec![1 as u32; scores.len()]; [INFO] [stdout] | ^^^^^^^^ help: try: `1_u32` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/d5.rs:54:13 [INFO] [stdout] | [INFO] [stdout] 50 | / let offset = RangeOffset { [INFO] [stdout] 51 | | range: source_start..source_start + len, [INFO] [stdout] 52 | | offset: (dest_start as isize - source_start as isize), [INFO] [stdout] 53 | | }; [INFO] [stdout] | |______________- unnecessary `let` binding [INFO] [stdout] 54 | offset [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] 50 ~ [INFO] [stdout] 51 ~ RangeOffset { [INFO] [stdout] 52 + range: source_start..source_start + len, [INFO] [stdout] 53 + offset: (dest_start as isize - source_start as isize), [INFO] [stdout] 54 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/d5.rs:83:5 [INFO] [stdout] | [INFO] [stdout] 83 | return new_seeds; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 83 - return new_seeds; [INFO] [stdout] 83 + new_seeds [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u8` -> `u8`) [INFO] [stdout] --> src/d7.rs:91:19 [INFO] [stdout] | [INFO] [stdout] 91 | .map(|&c| c as u8) [INFO] [stdout] | ^^^^^^^ help: try: `c` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/d8.rs:29:35 [INFO] [stdout] | [INFO] [stdout] 29 | if start_nodes.iter().all(|n| is_node_end(n)) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `is_node_end` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `DIR` contains a capitalized acronym [INFO] [stdout] --> src/d8.rs:37:6 [INFO] [stdout] | [INFO] [stdout] 37 | enum DIR { [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Dir` [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: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/d8.rs:68:22 [INFO] [stdout] | [INFO] [stdout] 68 | fn is_node_start(id: &String) -> 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] 68 - fn is_node_start(id: &String) -> bool { [INFO] [stdout] 68 + fn is_node_start(id: &str) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should use the `ends_with` method [INFO] [stdout] --> src/d8.rs:69:5 [INFO] [stdout] | [INFO] [stdout] 69 | id.chars().last().unwrap() == 'A' [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `id.ends_with('A')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#chars_last_cmp [INFO] [stdout] = note: `#[warn(clippy::chars_last_cmp)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/d8.rs:72:20 [INFO] [stdout] | [INFO] [stdout] 72 | fn is_node_end(id: &String) -> 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] 72 - fn is_node_end(id: &String) -> bool { [INFO] [stdout] 72 + fn is_node_end(id: &str) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should use the `ends_with` method [INFO] [stdout] --> src/d8.rs:73:5 [INFO] [stdout] | [INFO] [stdout] 73 | id.chars().last().unwrap() == 'Z' [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `id.ends_with('Z')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#chars_last_cmp [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is only used to index `map` [INFO] [stdout] --> src/map_utils.rs:29:18 [INFO] [stdout] | [INFO] [stdout] 29 | for j in 0..row_len { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 29 - for j in 0..row_len { [INFO] [stdout] 29 + for in map.iter().take(row_len) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/range_utils.rs:39:6 [INFO] [stdout] | [INFO] [stdout] 39 | ) -> ( [INFO] [stdout] | ______^ [INFO] [stdout] 40 | | Option>, [INFO] [stdout] 41 | | Option>, [INFO] [stdout] 42 | | Option>, [INFO] [stdout] 43 | | ) { [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: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/d15.rs:38:28 [INFO] [stdout] | [INFO] [stdout] 38 | fn parse_instruction(line: &str) -> Instruction { [INFO] [stdout] | ^^^^ ^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 38 | fn parse_instruction(line: &str) -> Instruction<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: feature `coroutines` is declared but not used [INFO] [stdout] --> src/main.rs:4:12 [INFO] [stdout] | [INFO] [stdout] 4 | #![feature(coroutines)] [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_features)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: feature `coroutine_trait` is declared but not used [INFO] [stdout] --> src/main.rs:5:12 [INFO] [stdout] | [INFO] [stdout] 5 | #![feature(coroutine_trait)] [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/d1.rs:10:63 [INFO] [stdout] | [INFO] [stdout] 10 | let first_digit = digits.clone().into_iter().find(|c| c.is_digit(10)).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `c.is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] = note: `#[warn(clippy::is_digit_ascii_radix)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/d1.rs:11:60 [INFO] [stdout] | [INFO] [stdout] 11 | let last_digit = digits.into_iter().rev().find(|c| c.is_digit(10)).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `c.is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/d1.rs:54:12 [INFO] [stdout] | [INFO] [stdout] 54 | if !next_char.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `next_char.is_some()` [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: called `unwrap` on `next_char` after checking its variant with `is_none` [INFO] [stdout] --> src/d1.rs:55:25 [INFO] [stdout] | [INFO] [stdout] 54 | if !next_char.is_none() { [INFO] [stdout] | ------------------- the check is happening here [INFO] [stdout] 55 | window.push(next_char.unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/d1.rs:36:11 [INFO] [stdout] | [INFO] [stdout] 36 | while window.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!window.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: the borrowed expression implements the required traits [INFO] [stdout] --> src/d1.rs:39:55 [INFO] [stdout] | [INFO] [stdout] 39 | .position(|&str_digit| window.starts_with(&str_digit)); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `str_digit` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/d1.rs:47:20 [INFO] [stdout] | [INFO] [stdout] 47 | if ch.is_digit(10) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `ch.is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `TILE` contains a capitalized acronym [INFO] [stdout] --> src/d10.rs:25:6 [INFO] [stdout] | [INFO] [stdout] 25 | enum TILE { [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Tile` [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 `EMPTY` contains a capitalized acronym [INFO] [stdout] --> src/d10.rs:26:5 [INFO] [stdout] | [INFO] [stdout] 26 | EMPTY = 0, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Empty` [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: name `VERTICAL` contains a capitalized acronym [INFO] [stdout] --> src/d10.rs:27:5 [INFO] [stdout] | [INFO] [stdout] 27 | VERTICAL = 1, [INFO] [stdout] | ^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Vertical` [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: name `HORIZONTAL` contains a capitalized acronym [INFO] [stdout] --> src/d10.rs:28:5 [INFO] [stdout] | [INFO] [stdout] 28 | HORIZONTAL = 2, [INFO] [stdout] | ^^^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Horizontal` [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: name `BOTTOMLEFT` contains a capitalized acronym [INFO] [stdout] --> src/d10.rs:29:5 [INFO] [stdout] | [INFO] [stdout] 29 | BOTTOMLEFT = 3, [INFO] [stdout] | ^^^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Bottomleft` [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: name `BOTTOMRIGHT` contains a capitalized acronym [INFO] [stdout] --> src/d10.rs:30:5 [INFO] [stdout] | [INFO] [stdout] 30 | BOTTOMRIGHT = 4, [INFO] [stdout] | ^^^^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Bottomright` [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: name `TOPLEFT` contains a capitalized acronym [INFO] [stdout] --> src/d10.rs:31:5 [INFO] [stdout] | [INFO] [stdout] 31 | TOPLEFT = 5, [INFO] [stdout] | ^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Topleft` [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: name `TOPRIGHT` contains a capitalized acronym [INFO] [stdout] --> src/d10.rs:32:5 [INFO] [stdout] | [INFO] [stdout] 32 | TOPRIGHT = 6, [INFO] [stdout] | ^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Topright` [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: name `START` contains a capitalized acronym [INFO] [stdout] --> src/d10.rs:33:5 [INFO] [stdout] | [INFO] [stdout] 33 | START = 7, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Start` [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/d10.rs:50:21 [INFO] [stdout] | [INFO] [stdout] 50 | fn find_tile(map2d: &Vec>, tile: TILE) -> Option<(usize, usize)> { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 50 - fn find_tile(map2d: &Vec>, tile: TILE) -> Option<(usize, usize)> { [INFO] [stdout] 50 + fn find_tile(map2d: &[Vec], tile: TILE) -> Option<(usize, usize)> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `TILEEDGE` contains a capitalized acronym [INFO] [stdout] --> src/d10.rs:59:6 [INFO] [stdout] | [INFO] [stdout] 59 | enum TILEEDGE { [INFO] [stdout] | ^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Tileedge` [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: name `DOWN` contains a capitalized acronym [INFO] [stdout] --> src/d10.rs:61:5 [INFO] [stdout] | [INFO] [stdout] 61 | DOWN, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Down` [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: name `LEFT` contains a capitalized acronym [INFO] [stdout] --> src/d10.rs:62:5 [INFO] [stdout] | [INFO] [stdout] 62 | LEFT, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Left` [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: name `RIGHT` contains a capitalized acronym [INFO] [stdout] --> src/d10.rs:63:5 [INFO] [stdout] | [INFO] [stdout] 63 | RIGHT, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Right` [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/d10.rs:97:12 [INFO] [stdout] | [INFO] [stdout] 97 | map2d: &Vec>, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 97 - map2d: &Vec>, [INFO] [stdout] 97 + map2d: &[Vec], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u8` is unnecessary [INFO] [stdout] --> src/d11.rs:17:54 [INFO] [stdout] | [INFO] [stdout] 17 | distance.iter().flatten().sum::() / 2 as u8 [INFO] [stdout] | ^^^^^^^ help: try: `2_u8` [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: name `TILE` contains a capitalized acronym [INFO] [stdout] --> src/d11.rs:27:6 [INFO] [stdout] | [INFO] [stdout] 27 | enum TILE { [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Tile` [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: name `SPACE` contains a capitalized acronym [INFO] [stdout] --> src/d11.rs:28:5 [INFO] [stdout] | [INFO] [stdout] 28 | SPACE = 0, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Space` [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: name `GALAXY` contains a capitalized acronym [INFO] [stdout] --> src/d11.rs:29:5 [INFO] [stdout] | [INFO] [stdout] 29 | GALAXY = 1, [INFO] [stdout] | ^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Galaxy` [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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/d11.rs:45:13 [INFO] [stdout] | [INFO] [stdout] 45 | / match match_tile(c) { [INFO] [stdout] 46 | | TILE::GALAXY => galaxies.push((y.to_biguint().unwrap(), x.to_biguint().unwrap())), [INFO] [stdout] 47 | | _ => (), [INFO] [stdout] 48 | | } [INFO] [stdout] | |_____________^ help: try: `if let TILE::GALAXY = match_tile(c) { galaxies.push((y.to_biguint().unwrap(), x.to_biguint().unwrap())) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/d11.rs:55:32 [INFO] [stdout] | [INFO] [stdout] 55 | fn apply_y_expansion(galaxies: &mut Vec) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 55 - fn apply_y_expansion(galaxies: &mut Vec) { [INFO] [stdout] 55 + fn apply_y_expansion(galaxies: &mut [Point]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u8` is unnecessary [INFO] [stdout] --> src/d11.rs:66:30 [INFO] [stdout] | [INFO] [stdout] 66 | last_y = y.clone() + 1 as u8; [INFO] [stdout] | ^^^^^^^ help: try: `1_u8` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/d11.rs:72:32 [INFO] [stdout] | [INFO] [stdout] 72 | fn apply_x_expansion(galaxies: &mut Vec) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 72 - fn apply_x_expansion(galaxies: &mut Vec) { [INFO] [stdout] 72 + fn apply_x_expansion(galaxies: &mut [Point]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u8` is unnecessary [INFO] [stdout] --> src/d11.rs:82:30 [INFO] [stdout] | [INFO] [stdout] 82 | last_x = x.clone() + 1 as u8; [INFO] [stdout] | ^^^^^^^ help: try: `1_u8` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/d11.rs:87:34 [INFO] [stdout] | [INFO] [stdout] 87 | fn get_distance_matrix(galaxies: &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] help: change this to [INFO] [stdout] | [INFO] [stdout] 87 - fn get_distance_matrix(galaxies: &Vec) -> Vec> { [INFO] [stdout] 87 + fn get_distance_matrix(galaxies: &[Point]) -> Vec> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/d12.rs:35:45 [INFO] [stdout] | [INFO] [stdout] 35 | fn record_match_runs(record: &String, runs: &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] 35 - fn record_match_runs(record: &String, runs: &Vec) -> bool { [INFO] [stdout] 35 + fn record_match_runs(record: &String, runs: &[usize]) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/d12.rs:38:20 [INFO] [stdout] | [INFO] [stdout] 38 | .find_iter(&record) [INFO] [stdout] | ^^^^^^^ help: change this to: `record` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/d12.rs:64:5 [INFO] [stdout] | [INFO] [stdout] 64 | return it.collect::>().into_iter(); [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] 64 - return it.collect::>().into_iter(); [INFO] [stdout] 64 + it.collect::>().into_iter() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/d13.rs:63:13 [INFO] [stdout] | [INFO] [stdout] 63 | return dif == 0; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 63 - return dif == 0; [INFO] [stdout] 63 + dif == 0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `(&str, char, u8)` which implements the `Copy` trait [INFO] [stdout] --> src/d15.rs:12:46 [INFO] [stdout] | [INFO] [stdout] 12 | acc[holiday_hash(x.0) as usize].push(x.clone()); [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*x` [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: unneeded `return` statement [INFO] [stdout] --> src/d15.rs:46:5 [INFO] [stdout] | [INFO] [stdout] 46 | return (label, '=', digit); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 46 - return (label, '=', digit); [INFO] [stdout] 46 + (label, '=', digit) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u8` is unnecessary [INFO] [stdout] --> src/d15.rs:53:15 [INFO] [stdout] | [INFO] [stdout] 53 | .fold(0 as u8, |acc, x| acc.wrapping_add(*x).wrapping_mul(17)) [INFO] [stdout] | ^^^^^^^ help: try: `0_u8` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `same_label_index` after checking its variant with `is_some` [INFO] [stdout] --> src/d15.rs:61:27 [INFO] [stdout] | [INFO] [stdout] 60 | if inst.1 == '-' && same_label_index.is_some() { [INFO] [stdout] | -------------------------- the check is happening here [INFO] [stdout] 61 | lenses.remove(same_label_index.unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/d3.rs:9:14 [INFO] [stdout] | [INFO] [stdout] 9 | .map(|ents| filter_spaces(ents)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `filter_spaces` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/d3.rs:8:14 [INFO] [stdout] | [INFO] [stdout] 8 | .map(|line| parse_entities(line)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `parse_entities` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/d3.rs:15:27 [INFO] [stdout] | [INFO] [stdout] 15 | .filter(|ent| match ent.2 { [INFO] [stdout] | ___________________________^ [INFO] [stdout] 16 | | Entity::Symbol(_) => true, [INFO] [stdout] 17 | | _ => false, [INFO] [stdout] 18 | | }) [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 15 - .filter(|ent| match ent.2 { [INFO] [stdout] 16 - Entity::Symbol(_) => true, [INFO] [stdout] 17 - _ => false, [INFO] [stdout] 18 - }) [INFO] [stdout] 15 + .filter(|ent| matches!(ent.2, Entity::Symbol(_))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.fold` can be written more succinctly using another method [INFO] [stdout] --> src/d3.rs:48:51 [INFO] [stdout] | [INFO] [stdout] 48 | let sum = adj_nums.iter().map(|(_, n)| n).fold(1, |acc, n| acc * n); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `product::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fold [INFO] [stdout] = note: `#[warn(clippy::unnecessary_fold)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/d3.rs:63:24 [INFO] [stdout] | [INFO] [stdout] 63 | fn parse_entities(row: &String) -> Vec<(usize, Entity)> { [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] 63 - fn parse_entities(row: &String) -> Vec<(usize, Entity)> { [INFO] [stdout] 63 + fn parse_entities(row: &str) -> Vec<(usize, Entity)> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/d3.rs:104:23 [INFO] [stdout] | [INFO] [stdout] 104 | .filter(|ent| match ent.1 { [INFO] [stdout] | _______________________^ [INFO] [stdout] 105 | | Entity::Space => false, [INFO] [stdout] 106 | | _ => true, [INFO] [stdout] 107 | | }) [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 104 - .filter(|ent| match ent.1 { [INFO] [stdout] 105 - Entity::Space => false, [INFO] [stdout] 106 - _ => true, [INFO] [stdout] 107 - }) [INFO] [stdout] 104 + .filter(|ent| !matches!(ent.1, Entity::Space)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/d4.rs:8:14 [INFO] [stdout] | [INFO] [stdout] 8 | .map(|line| parse_sets(line)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `parse_sets` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u32` is unnecessary [INFO] [stdout] --> src/d4.rs:13:32 [INFO] [stdout] | [INFO] [stdout] 13 | let mut card_counts = vec![1 as u32; scores.len()]; [INFO] [stdout] | ^^^^^^^^ help: try: `1_u32` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/d5.rs:54:13 [INFO] [stdout] | [INFO] [stdout] 50 | / let offset = RangeOffset { [INFO] [stdout] 51 | | range: source_start..source_start + len, [INFO] [stdout] 52 | | offset: (dest_start as isize - source_start as isize), [INFO] [stdout] 53 | | }; [INFO] [stdout] | |______________- unnecessary `let` binding [INFO] [stdout] 54 | offset [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] 50 ~ [INFO] [stdout] 51 ~ RangeOffset { [INFO] [stdout] 52 + range: source_start..source_start + len, [INFO] [stdout] 53 + offset: (dest_start as isize - source_start as isize), [INFO] [stdout] 54 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/d5.rs:83:5 [INFO] [stdout] | [INFO] [stdout] 83 | return new_seeds; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 83 - return new_seeds; [INFO] [stdout] 83 + new_seeds [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u8` -> `u8`) [INFO] [stdout] --> src/d7.rs:91:19 [INFO] [stdout] | [INFO] [stdout] 91 | .map(|&c| c as u8) [INFO] [stdout] | ^^^^^^^ help: try: `c` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/d8.rs:29:35 [INFO] [stdout] | [INFO] [stdout] 29 | if start_nodes.iter().all(|n| is_node_end(n)) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `is_node_end` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `DIR` contains a capitalized acronym [INFO] [stdout] --> src/d8.rs:37:6 [INFO] [stdout] | [INFO] [stdout] 37 | enum DIR { [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Dir` [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: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/d8.rs:68:22 [INFO] [stdout] | [INFO] [stdout] 68 | fn is_node_start(id: &String) -> 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] 68 - fn is_node_start(id: &String) -> bool { [INFO] [stdout] 68 + fn is_node_start(id: &str) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should use the `ends_with` method [INFO] [stdout] --> src/d8.rs:69:5 [INFO] [stdout] | [INFO] [stdout] 69 | id.chars().last().unwrap() == 'A' [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `id.ends_with('A')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#chars_last_cmp [INFO] [stdout] = note: `#[warn(clippy::chars_last_cmp)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/d8.rs:72:20 [INFO] [stdout] | [INFO] [stdout] 72 | fn is_node_end(id: &String) -> 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] 72 - fn is_node_end(id: &String) -> bool { [INFO] [stdout] 72 + fn is_node_end(id: &str) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should use the `ends_with` method [INFO] [stdout] --> src/d8.rs:73:5 [INFO] [stdout] | [INFO] [stdout] 73 | id.chars().last().unwrap() == 'Z' [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `id.ends_with('Z')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#chars_last_cmp [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is only used to index `map` [INFO] [stdout] --> src/map_utils.rs:29:18 [INFO] [stdout] | [INFO] [stdout] 29 | for j in 0..row_len { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 29 - for j in 0..row_len { [INFO] [stdout] 29 + for in map.iter().take(row_len) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/range_utils.rs:39:6 [INFO] [stdout] | [INFO] [stdout] 39 | ) -> ( [INFO] [stdout] | ______^ [INFO] [stdout] 40 | | Option>, [INFO] [stdout] 41 | | Option>, [INFO] [stdout] 42 | | Option>, [INFO] [stdout] 43 | | ) { [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: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/d15.rs:38:28 [INFO] [stdout] | [INFO] [stdout] 38 | fn parse_instruction(line: &str) -> Instruction { [INFO] [stdout] | ^^^^ ^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 38 | fn parse_instruction(line: &str) -> Instruction<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: feature `coroutines` is declared but not used [INFO] [stdout] --> src/main.rs:4:12 [INFO] [stdout] | [INFO] [stdout] 4 | #![feature(coroutines)] [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_features)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: feature `coroutine_trait` is declared but not used [INFO] [stdout] --> src/main.rs:5:12 [INFO] [stdout] | [INFO] [stdout] 5 | #![feature(coroutine_trait)] [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 11.66s [INFO] running `Command { std: "docker" "inspect" "b5f13ff59cdb50fac565551b2ffdef3e871e4a96c6ab991692054f26a40eb925", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "b5f13ff59cdb50fac565551b2ffdef3e871e4a96c6ab991692054f26a40eb925", kill_on_drop: false }` [INFO] [stdout] b5f13ff59cdb50fac565551b2ffdef3e871e4a96c6ab991692054f26a40eb925