[INFO] cloning repository https://github.com/emmgame221/advent-2021 [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/emmgame221/advent-2021" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Femmgame221%2Fadvent-2021", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Femmgame221%2Fadvent-2021'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 1b638d4778aadcc47ff57a1ebfd8a18742f3ef92 [INFO] linting emmgame221/advent-2021 against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Femmgame221%2Fadvent-2021" "/workspace/builds/worker-0-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-0-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/emmgame221/advent-2021 [INFO] finished tweaking git repo https://github.com/emmgame221/advent-2021 [INFO] tweaked toml for git repo https://github.com/emmgame221/advent-2021 written to /workspace/builds/worker-0-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/emmgame221/advent-2021 on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/emmgame221/advent-2021 already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded priority-queue v1.2.1 [INFO] [stderr] Downloaded clap v2.33.4 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-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] 42d491326e4604b86db28c5c66fc8a5da3b8a60dcd2cd8e3ad4335f795513597 [INFO] running `Command { std: "docker" "start" "-a" "42d491326e4604b86db28c5c66fc8a5da3b8a60dcd2cd8e3ad4335f795513597", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "42d491326e4604b86db28c5c66fc8a5da3b8a60dcd2cd8e3ad4335f795513597", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "42d491326e4604b86db28c5c66fc8a5da3b8a60dcd2cd8e3ad4335f795513597", kill_on_drop: false }` [INFO] [stdout] 42d491326e4604b86db28c5c66fc8a5da3b8a60dcd2cd8e3ad4335f795513597 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-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] 586112a9c43b4430d7c1f59a8cdf19834c49c73c61eefc7f14def00db9811896 [INFO] running `Command { std: "docker" "start" "-a" "586112a9c43b4430d7c1f59a8cdf19834c49c73c61eefc7f14def00db9811896", kill_on_drop: false }` [INFO] [stderr] Compiling indexmap v1.7.0 [INFO] [stderr] Compiling priority-queue v1.2.1 [INFO] [stderr] Checking unicode-width v0.1.9 [INFO] [stderr] Checking either v1.6.1 [INFO] [stderr] Checking textwrap v0.11.0 [INFO] [stderr] Checking itertools v0.10.3 [INFO] [stderr] Checking clap v2.33.4 [INFO] [stderr] Checking advent-2021 v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: useless conversion to the same type: `std::str::Split<'_, char>` [INFO] [stdout] --> src/problems/day4.rs:11:27 [INFO] [stdout] | [INFO] [stdout] 11 | let draws: Vec = first [INFO] [stdout] | ___________________________^ [INFO] [stdout] 12 | | .trim() [INFO] [stdout] 13 | | .split(',') [INFO] [stdout] 14 | | .into_iter() [INFO] [stdout] | |____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] help: consider removing `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 11 ~ let draws: Vec = first [INFO] [stdout] 12 + .trim() [INFO] [stdout] 13 + .split(',') [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: found call to `str::trim` before `str::split_whitespace` [INFO] [stdout] --> src/problems/day4.rs:79:40 [INFO] [stdout] | [INFO] [stdout] 79 | let nums: Vec<&str> = line.trim().split_whitespace().collect(); [INFO] [stdout] | ^^^^^^^ help: remove `trim()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trim_split_whitespace [INFO] [stdout] = note: `#[warn(clippy::trim_split_whitespace)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/problems/day9.rs:108:44 [INFO] [stdout] | [INFO] [stdout] 108 | if y >= map.len() || x >= map[y].len() { [INFO] [stdout] | ____________________________________________^ [INFO] [stdout] 109 | | found.insert((x, y), true); [INFO] [stdout] 110 | | 0 [INFO] [stdout] 111 | | } else if map[y][x] == 9 { [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/problems/day9.rs:111:30 [INFO] [stdout] | [INFO] [stdout] 111 | } else if map[y][x] == 9 { [INFO] [stdout] | ______________________________^ [INFO] [stdout] 112 | | found.insert((x, y), true); [INFO] [stdout] 113 | | 0 [INFO] [stdout] 114 | | } else { [INFO] [stdout] | |_____^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to pop elements from a `Vec` in a loop [INFO] [stdout] --> src/problems/day10.rs:37:17 [INFO] [stdout] | [INFO] [stdout] 37 | let top = stack.pop().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_while_let_some [INFO] [stdout] = note: `#[warn(clippy::manual_while_let_some)]` on by default [INFO] [stdout] help: consider using a `while..let` loop [INFO] [stdout] | [INFO] [stdout] 36 ~ while let Some(top) = stack.pop() { [INFO] [stdout] 37 ~ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/problems/day11.rs:32:21 [INFO] [stdout] | [INFO] [stdout] 32 | fn sim_step(octopi: &mut 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] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 32 - fn sim_step(octopi: &mut Vec>) -> usize { [INFO] [stdout] 32 + fn sim_step(octopi: &mut [Vec]) -> usize { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/problems/day11.rs:69:24 [INFO] [stdout] | [INFO] [stdout] 69 | fn sim_step_p2(octopi: &mut 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] 69 - fn sim_step_p2(octopi: &mut Vec>) -> bool { [INFO] [stdout] 69 + fn sim_step_p2(octopi: &mut [Vec]) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::str::Split<'_, char>` [INFO] [stdout] --> src/problems/day4.rs:11:27 [INFO] [stdout] | [INFO] [stdout] 11 | let draws: Vec = first [INFO] [stdout] | ___________________________^ [INFO] [stdout] 12 | | .trim() [INFO] [stdout] 13 | | .split(',') [INFO] [stdout] 14 | | .into_iter() [INFO] [stdout] | |____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] help: consider removing `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 11 ~ let draws: Vec = first [INFO] [stdout] 12 + .trim() [INFO] [stdout] 13 + .split(',') [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: found call to `str::trim` before `str::split_whitespace` [INFO] [stdout] --> src/problems/day4.rs:79:40 [INFO] [stdout] | [INFO] [stdout] 79 | let nums: Vec<&str> = line.trim().split_whitespace().collect(); [INFO] [stdout] | ^^^^^^^ help: remove `trim()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trim_split_whitespace [INFO] [stdout] = note: `#[warn(clippy::trim_split_whitespace)]` 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] --> src/problems/day11.rs:105:25 [INFO] [stdout] | [INFO] [stdout] 105 | fn print_octopi(octopi: &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] 105 - fn print_octopi(octopi: &Vec>) { [INFO] [stdout] 105 + fn print_octopi(octopi: &[Vec]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `y` is only used to index `octopi` [INFO] [stdout] --> src/problems/day11.rs:106:14 [INFO] [stdout] | [INFO] [stdout] 106 | for y in 0..10 { [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] 106 - for y in 0..10 { [INFO] [stdout] 106 + for in octopi.iter().take(10) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `x` is only used to index `octopi` [INFO] [stdout] --> src/problems/day11.rs:107:18 [INFO] [stdout] | [INFO] [stdout] 107 | for x in 0..10 { [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] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 107 - for x in 0..10 { [INFO] [stdout] 107 + for in octopi.iter().take(10) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/problems/day13.rs:21:19 [INFO] [stdout] | [INFO] [stdout] 21 | } else if !(line == "") { [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `(line != "")` [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: comparison to empty slice [INFO] [stdout] --> src/problems/day13.rs:21:21 [INFO] [stdout] | [INFO] [stdout] 21 | } else if !(line == "") { [INFO] [stdout] | ^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `line.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: useless conversion to the same type: `std::str::Split<'_, char>` [INFO] [stdout] --> src/problems/day13.rs:22:37 [INFO] [stdout] | [INFO] [stdout] 22 | let parts: Vec = line.trim().split(',').into_iter().map(|s| s.parse().unwrap()).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `line.trim().split(',')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `folds` [INFO] [stdout] --> src/problems/day13.rs:28:14 [INFO] [stdout] | [INFO] [stdout] 28 | for i in 1..folds.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] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 28 - for i in 1..folds.len() { [INFO] [stdout] 28 + for in folds.iter().skip(1) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/problems/day14.rs:26:13 [INFO] [stdout] | [INFO] [stdout] 26 | parts[0].chars().nth(0).unwrap() as u8, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `parts[0].chars().next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] = note: `#[warn(clippy::iter_nth_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/problems/day14.rs:29:17 [INFO] [stdout] | [INFO] [stdout] 29 | let c = parts[1].chars().nth(0).unwrap() as u8; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `parts[1].chars().next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/problems/day15.rs:18:16 [INFO] [stdout] | [INFO] [stdout] 18 | fn part1(grid: &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] 18 - fn part1(grid: &Vec>) -> usize { [INFO] [stdout] 18 + fn part1(grid: &[Vec]) -> usize { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/problems/day9.rs:108:44 [INFO] [stdout] | [INFO] [stdout] 108 | if y >= map.len() || x >= map[y].len() { [INFO] [stdout] | ____________________________________________^ [INFO] [stdout] 109 | | found.insert((x, y), true); [INFO] [stdout] 110 | | 0 [INFO] [stdout] 111 | | } else if map[y][x] == 9 { [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/problems/day9.rs:111:30 [INFO] [stdout] | [INFO] [stdout] 111 | } else if map[y][x] == 9 { [INFO] [stdout] | ______________________________^ [INFO] [stdout] 112 | | found.insert((x, y), true); [INFO] [stdout] 113 | | 0 [INFO] [stdout] 114 | | } else { [INFO] [stdout] | |_____^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to pop elements from a `Vec` in a loop [INFO] [stdout] --> src/problems/day10.rs:37:17 [INFO] [stdout] | [INFO] [stdout] 37 | let top = stack.pop().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_while_let_some [INFO] [stdout] = note: `#[warn(clippy::manual_while_let_some)]` on by default [INFO] [stdout] help: consider using a `while..let` loop [INFO] [stdout] | [INFO] [stdout] 36 ~ while let Some(top) = stack.pop() { [INFO] [stdout] 37 ~ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/problems/day11.rs:32:21 [INFO] [stdout] | [INFO] [stdout] 32 | fn sim_step(octopi: &mut 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] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 32 - fn sim_step(octopi: &mut Vec>) -> usize { [INFO] [stdout] 32 + fn sim_step(octopi: &mut [Vec]) -> usize { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/problems/day11.rs:69:24 [INFO] [stdout] | [INFO] [stdout] 69 | fn sim_step_p2(octopi: &mut 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] 69 - fn sim_step_p2(octopi: &mut Vec>) -> bool { [INFO] [stdout] 69 + fn sim_step_p2(octopi: &mut [Vec]) -> 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] --> src/problems/day11.rs:105:25 [INFO] [stdout] | [INFO] [stdout] 105 | fn print_octopi(octopi: &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] 105 - fn print_octopi(octopi: &Vec>) { [INFO] [stdout] 105 + fn print_octopi(octopi: &[Vec]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `y` is only used to index `octopi` [INFO] [stdout] --> src/problems/day11.rs:106:14 [INFO] [stdout] | [INFO] [stdout] 106 | for y in 0..10 { [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] 106 - for y in 0..10 { [INFO] [stdout] 106 + for in octopi.iter().take(10) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `x` is only used to index `octopi` [INFO] [stdout] --> src/problems/day11.rs:107:18 [INFO] [stdout] | [INFO] [stdout] 107 | for x in 0..10 { [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] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 107 - for x in 0..10 { [INFO] [stdout] 107 + for in octopi.iter().take(10) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/problems/day13.rs:21:19 [INFO] [stdout] | [INFO] [stdout] 21 | } else if !(line == "") { [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `(line != "")` [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: comparison to empty slice [INFO] [stdout] --> src/problems/day13.rs:21:21 [INFO] [stdout] | [INFO] [stdout] 21 | } else if !(line == "") { [INFO] [stdout] | ^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `line.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: useless conversion to the same type: `std::str::Split<'_, char>` [INFO] [stdout] --> src/problems/day13.rs:22:37 [INFO] [stdout] | [INFO] [stdout] 22 | let parts: Vec = line.trim().split(',').into_iter().map(|s| s.parse().unwrap()).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `line.trim().split(',')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `folds` [INFO] [stdout] --> src/problems/day13.rs:28:14 [INFO] [stdout] | [INFO] [stdout] 28 | for i in 1..folds.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] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 28 - for i in 1..folds.len() { [INFO] [stdout] 28 + for in folds.iter().skip(1) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/problems/day14.rs:26:13 [INFO] [stdout] | [INFO] [stdout] 26 | parts[0].chars().nth(0).unwrap() as u8, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `parts[0].chars().next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] = note: `#[warn(clippy::iter_nth_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/problems/day14.rs:29:17 [INFO] [stdout] | [INFO] [stdout] 29 | let c = parts[1].chars().nth(0).unwrap() as u8; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `parts[1].chars().next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/problems/day15.rs:18:16 [INFO] [stdout] | [INFO] [stdout] 18 | fn part1(grid: &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] 18 - fn part1(grid: &Vec>) -> usize { [INFO] [stdout] 18 + fn part1(grid: &[Vec]) -> usize { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 3.23s [INFO] running `Command { std: "docker" "inspect" "586112a9c43b4430d7c1f59a8cdf19834c49c73c61eefc7f14def00db9811896", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "586112a9c43b4430d7c1f59a8cdf19834c49c73c61eefc7f14def00db9811896", kill_on_drop: false }` [INFO] [stdout] 586112a9c43b4430d7c1f59a8cdf19834c49c73c61eefc7f14def00db9811896