[INFO] cloning repository https://github.com/bigbass1997/advent-of-code-2021 [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/bigbass1997/advent-of-code-2021" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fbigbass1997%2Fadvent-of-code-2021", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fbigbass1997%2Fadvent-of-code-2021'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] a4ae57c82c95d4221617293c81c1ea9fd614d967 [INFO] linting bigbass1997/advent-of-code-2021 against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fbigbass1997%2Fadvent-of-code-2021" "/workspace/builds/worker-7-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-7-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/bigbass1997/advent-of-code-2021 [INFO] finished tweaking git repo https://github.com/bigbass1997/advent-of-code-2021 [INFO] tweaked toml for git repo https://github.com/bigbass1997/advent-of-code-2021 written to /workspace/builds/worker-7-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/bigbass1997/advent-of-code-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/bigbass1997/advent-of-code-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] warning: virtual workspace defaulting to `resolver = "1"` despite one or more workspace members being on edition 2021 which implies `resolver = "2"` [INFO] [stderr] | [INFO] [stderr] = note: to keep the current resolver, specify `workspace.resolver = "1"` in the workspace root's manifest [INFO] [stderr] = note: to use the edition 2021 resolver, specify `workspace.resolver = "2"` in the workspace root's manifest [INFO] [stderr] = note: for more details see https://doc.rust-lang.org/cargo/reference/resolver.html#resolver-versions [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 0dcd536b1828e07320bbdfa5d64f6540f227323df23e7c19785510d7f28d3ae2 [INFO] running `Command { std: "docker" "start" "-a" "0dcd536b1828e07320bbdfa5d64f6540f227323df23e7c19785510d7f28d3ae2", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "0dcd536b1828e07320bbdfa5d64f6540f227323df23e7c19785510d7f28d3ae2", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "0dcd536b1828e07320bbdfa5d64f6540f227323df23e7c19785510d7f28d3ae2", kill_on_drop: false }` [INFO] [stdout] 0dcd536b1828e07320bbdfa5d64f6540f227323df23e7c19785510d7f28d3ae2 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 63a3c171fcedec52b015ce2f209429965a2da71b57370f3ebb2ef86615146541 [INFO] running `Command { std: "docker" "start" "-a" "63a3c171fcedec52b015ce2f209429965a2da71b57370f3ebb2ef86615146541", kill_on_drop: false }` [INFO] [stderr] warning: virtual workspace defaulting to `resolver = "1"` despite one or more workspace members being on edition 2021 which implies `resolver = "2"` [INFO] [stderr] | [INFO] [stderr] = note: to keep the current resolver, specify `workspace.resolver = "1"` in the workspace root's manifest [INFO] [stderr] = note: to use the edition 2021 resolver, specify `workspace.resolver = "2"` in the workspace root's manifest [INFO] [stderr] = note: for more details see https://doc.rust-lang.org/cargo/reference/resolver.html#resolver-versions [INFO] [stderr] Compiling autocfg v1.0.1 [INFO] [stderr] Checking day4 v0.1.0 (/opt/rustwide/workdir/day4) [INFO] [stderr] Checking day6 v0.1.0 (/opt/rustwide/workdir/day6) [INFO] [stderr] Checking day2 v0.1.0 (/opt/rustwide/workdir/day2) [INFO] [stderr] Checking day1 v0.1.0 (/opt/rustwide/workdir/day1) [INFO] [stderr] Checking day3 v0.1.0 (/opt/rustwide/workdir/day3) [INFO] [stdout] warning: unused import: `std::time::Instant` [INFO] [stdout] --> day6/src/main.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::time::Instant; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `pointer` is used as a loop counter [INFO] [stdout] --> day6/src/main.rs:27:5 [INFO] [stdout] | [INFO] [stdout] 27 | for _ in days..256 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: consider using: `for (pointer, _) in (days - 1..).zip((days..256))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] = note: `#[warn(clippy::explicit_counter_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::time::Instant` [INFO] [stdout] --> day6/src/main.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::time::Instant; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `pointer` is used as a loop counter [INFO] [stdout] --> day6/src/main.rs:27:5 [INFO] [stdout] | [INFO] [stdout] 27 | for _ in days..256 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: consider using: `for (pointer, _) in (days - 1..).zip((days..256))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] = note: `#[warn(clippy::explicit_counter_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `increases` is assigned to, but never used [INFO] [stdout] --> day1/src/main.rs:38:13 [INFO] [stdout] | [INFO] [stdout] 38 | let mut increases = 0; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: consider using `_increases` instead [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `increases` is never read [INFO] [stdout] --> day1/src/main.rs:40:47 [INFO] [stdout] | [INFO] [stdout] 40 | if input[i] < input[i + window] { increases += 1 } [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> day3/src/main.rs:9:13 [INFO] [stdout] | [INFO] [stdout] 9 | if !counts.contains_key(&i) { counts.insert(i, Default::default()); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `counts.entry(i).or_insert_with(|| Default::default());` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry [INFO] [stdout] = note: `#[warn(clippy::map_entry)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> day3/src/main.rs:25:45 [INFO] [stdout] | [INFO] [stdout] 25 | } else if counts[bit].1 > counts[bit].0 { [INFO] [stdout] | _____________________________________________^ [INFO] [stdout] 26 | | 1 [INFO] [stdout] 27 | | } else { [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> day3/src/main.rs:27:12 [INFO] [stdout] | [INFO] [stdout] 27 | } else { [INFO] [stdout] | ____________^ [INFO] [stdout] 28 | | 1 [INFO] [stdout] 29 | | } [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: this boolean expression can be simplified [INFO] [stdout] --> day3/src/main.rs:79:26 [INFO] [stdout] | [INFO] [stdout] 79 | gamma.push_str(&(!(counts[&i].0 > counts[&i].1) as u8).to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(counts[&i].0 <= counts[&i].1)` [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: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> day3/src/main.rs:9:13 [INFO] [stdout] | [INFO] [stdout] 9 | if !counts.contains_key(&i) { counts.insert(i, Default::default()); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `counts.entry(i).or_insert_with(|| Default::default());` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry [INFO] [stdout] = note: `#[warn(clippy::map_entry)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> day3/src/main.rs:25:45 [INFO] [stdout] | [INFO] [stdout] 25 | } else if counts[bit].1 > counts[bit].0 { [INFO] [stdout] | _____________________________________________^ [INFO] [stdout] 26 | | 1 [INFO] [stdout] 27 | | } else { [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> day3/src/main.rs:27:12 [INFO] [stdout] | [INFO] [stdout] 27 | } else { [INFO] [stdout] | ____________^ [INFO] [stdout] 28 | | 1 [INFO] [stdout] 29 | | } [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: this boolean expression can be simplified [INFO] [stdout] --> day3/src/main.rs:79:26 [INFO] [stdout] | [INFO] [stdout] 79 | gamma.push_str(&(!(counts[&i].0 > counts[&i].1) as u8).to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(counts[&i].0 <= counts[&i].1)` [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: variable `increases` is assigned to, but never used [INFO] [stdout] --> day1/src/main.rs:38:13 [INFO] [stdout] | [INFO] [stdout] 38 | let mut increases = 0; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: consider using `_increases` instead [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `increases` is never read [INFO] [stdout] --> day1/src/main.rs:40:47 [INFO] [stdout] | [INFO] [stdout] 40 | if input[i] < input[i + window] { increases += 1 } [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Compiling num-traits v0.2.14 [INFO] [stderr] Checking approx v0.4.0 [INFO] [stderr] Checking cgmath v0.18.0 [INFO] [stderr] Checking day5 v0.1.0 (/opt/rustwide/workdir/day5) [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> day5/src/main.rs:6:20 [INFO] [stdout] | [INFO] [stdout] 6 | fn mark_grid(grid: &mut Vec>, seg: &Segment, diagonals: bool) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 6 - fn mark_grid(grid: &mut Vec>, seg: &Segment, diagonals: bool) { [INFO] [stdout] 6 + fn mark_grid(grid: &mut [Vec], seg: &Segment, diagonals: bool) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> day5/src/main.rs:58:30 [INFO] [stdout] | [INFO] [stdout] 58 | mark_grid(&mut grid, &segment, false); [INFO] [stdout] | ^^^^^^^^ help: change this to: `segment` [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: the loop variable `x` is only used to index `grid` [INFO] [stdout] --> day5/src/main.rs:62:14 [INFO] [stdout] | [INFO] [stdout] 62 | for x in 0..grid.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] 62 - for x in 0..grid.len() { [INFO] [stdout] 62 + for in &grid { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `y` is only used to index `grid` [INFO] [stdout] --> day5/src/main.rs:63:18 [INFO] [stdout] | [INFO] [stdout] 63 | for y in 0..grid[x].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] 63 - for y in 0..grid[x].len() { [INFO] [stdout] 63 + for in grid.iter().take(grid[x].len()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> day5/src/main.rs:75:30 [INFO] [stdout] | [INFO] [stdout] 75 | mark_grid(&mut grid, &segment, true); [INFO] [stdout] | ^^^^^^^^ help: change this to: `segment` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `x` is only used to index `grid` [INFO] [stdout] --> day5/src/main.rs:79:14 [INFO] [stdout] | [INFO] [stdout] 79 | for x in 0..grid.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] 79 - for x in 0..grid.len() { [INFO] [stdout] 79 + for in &grid { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `y` is only used to index `grid` [INFO] [stdout] --> day5/src/main.rs:80:18 [INFO] [stdout] | [INFO] [stdout] 80 | for y in 0..grid[x].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] 80 - for y in 0..grid[x].len() { [INFO] [stdout] 80 + for in grid.iter().take(grid[x].len()) { [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] --> day5/src/main.rs:6:20 [INFO] [stdout] | [INFO] [stdout] 6 | fn mark_grid(grid: &mut Vec>, seg: &Segment, diagonals: bool) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 6 - fn mark_grid(grid: &mut Vec>, seg: &Segment, diagonals: bool) { [INFO] [stdout] 6 + fn mark_grid(grid: &mut [Vec], seg: &Segment, diagonals: bool) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 3.84s [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> day5/src/main.rs:58:30 [INFO] [stdout] | [INFO] [stdout] 58 | mark_grid(&mut grid, &segment, false); [INFO] [stdout] | ^^^^^^^^ help: change this to: `segment` [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: the loop variable `x` is only used to index `grid` [INFO] [stdout] --> day5/src/main.rs:62:14 [INFO] [stdout] | [INFO] [stdout] 62 | for x in 0..grid.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] 62 - for x in 0..grid.len() { [INFO] [stdout] 62 + for in &grid { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `y` is only used to index `grid` [INFO] [stdout] --> day5/src/main.rs:63:18 [INFO] [stdout] | [INFO] [stdout] 63 | for y in 0..grid[x].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] 63 - for y in 0..grid[x].len() { [INFO] [stdout] 63 + for in grid.iter().take(grid[x].len()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> day5/src/main.rs:75:30 [INFO] [stdout] | [INFO] [stdout] 75 | mark_grid(&mut grid, &segment, true); [INFO] [stdout] | ^^^^^^^^ help: change this to: `segment` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `x` is only used to index `grid` [INFO] [stdout] --> day5/src/main.rs:79:14 [INFO] [stdout] | [INFO] [stdout] 79 | for x in 0..grid.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] 79 - for x in 0..grid.len() { [INFO] [stdout] 79 + for in &grid { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `y` is only used to index `grid` [INFO] [stdout] --> day5/src/main.rs:80:18 [INFO] [stdout] | [INFO] [stdout] 80 | for y in 0..grid[x].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] 80 - for y in 0..grid[x].len() { [INFO] [stdout] 80 + for in grid.iter().take(grid[x].len()) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] running `Command { std: "docker" "inspect" "63a3c171fcedec52b015ce2f209429965a2da71b57370f3ebb2ef86615146541", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "63a3c171fcedec52b015ce2f209429965a2da71b57370f3ebb2ef86615146541", kill_on_drop: false }` [INFO] [stdout] 63a3c171fcedec52b015ce2f209429965a2da71b57370f3ebb2ef86615146541