[INFO] cloning repository https://github.com/nagxsan/advent-of-code-2024 [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/nagxsan/advent-of-code-2024" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fnagxsan%2Fadvent-of-code-2024", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fnagxsan%2Fadvent-of-code-2024'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] baefab2f553d85ebf8a63c6aa438a8ec105c611a [INFO] linting nagxsan/advent-of-code-2024 against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fnagxsan%2Fadvent-of-code-2024" "/workspace/builds/worker-4-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-4-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/nagxsan/advent-of-code-2024 [INFO] finished tweaking git repo https://github.com/nagxsan/advent-of-code-2024 [INFO] tweaked toml for git repo https://github.com/nagxsan/advent-of-code-2024 written to /workspace/builds/worker-4-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/nagxsan/advent-of-code-2024 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/nagxsan/advent-of-code-2024 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-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-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] 048f69f8aaa9dbb3df2244a2563443fc23eec834a15c82a05d8570b4ce419a65 [INFO] running `Command { std: "docker" "start" "-a" "048f69f8aaa9dbb3df2244a2563443fc23eec834a15c82a05d8570b4ce419a65", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "048f69f8aaa9dbb3df2244a2563443fc23eec834a15c82a05d8570b4ce419a65", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "048f69f8aaa9dbb3df2244a2563443fc23eec834a15c82a05d8570b4ce419a65", kill_on_drop: false }` [INFO] [stdout] 048f69f8aaa9dbb3df2244a2563443fc23eec834a15c82a05d8570b4ce419a65 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-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] 82c6f70a93c919cccfdc4dd3a88508068528fca03ea1262c14c91ffd0c1ada5c [INFO] running `Command { std: "docker" "start" "-a" "82c6f70a93c919cccfdc4dd3a88508068528fca03ea1262c14c91ffd0c1ada5c", kill_on_drop: false }` [INFO] [stderr] Checking aho-corasick v1.1.3 [INFO] [stderr] Checking either v1.13.0 [INFO] [stderr] Checking itertools v0.13.0 [INFO] [stderr] Checking regex-automata v0.4.9 [INFO] [stderr] Checking regex v1.11.1 [INFO] [stderr] Checking advent-of-code-2024 v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/day-7-bridge-repair/main.rs:23:5 [INFO] [stdout] | [INFO] [stdout] 23 | return add_result || mult_result || concat_result; [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] 23 - return add_result || mult_result || concat_result; [INFO] [stdout] 23 + add_result || mult_result || concat_result [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> src/bin/day-7-bridge-repair/main.rs:17:8 [INFO] [stdout] | [INFO] [stdout] 17 | if is_answer_two == true { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `is_answer_two` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary map of the identity function [INFO] [stdout] --> src/bin/day-7-bridge-repair/main.rs:35:30 [INFO] [stdout] | [INFO] [stdout] 35 | let input = input.lines().map(|l| l).collect::>(); [INFO] [stdout] | ^^^^^^^^^^^ help: remove the call to `map` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_identity [INFO] [stdout] = note: `#[warn(clippy::map_identity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/day-7-bridge-repair/main.rs:23:5 [INFO] [stdout] | [INFO] [stdout] 23 | return add_result || mult_result || concat_result; [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] 23 - return add_result || mult_result || concat_result; [INFO] [stdout] 23 + add_result || mult_result || concat_result [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> src/bin/day-7-bridge-repair/main.rs:17:8 [INFO] [stdout] | [INFO] [stdout] 17 | if is_answer_two == true { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `is_answer_two` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary map of the identity function [INFO] [stdout] --> src/bin/day-7-bridge-repair/main.rs:35:30 [INFO] [stdout] | [INFO] [stdout] 35 | let input = input.lines().map(|l| l).collect::>(); [INFO] [stdout] | ^^^^^^^^^^^ help: remove the call to `map` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_identity [INFO] [stdout] = note: `#[warn(clippy::map_identity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `input` [INFO] [stdout] --> src/bin/day-8-resonant-collinearity/main.rs:26:14 [INFO] [stdout] | [INFO] [stdout] 26 | for i in 0..rows { [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 and enumerate() [INFO] [stdout] | [INFO] [stdout] 26 - for i in 0..rows { [INFO] [stdout] 26 + for (i, ) in input.iter().enumerate().take(rows) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is used to index `input` [INFO] [stdout] --> src/bin/day-8-resonant-collinearity/main.rs:27:18 [INFO] [stdout] | [INFO] [stdout] 27 | for j in 0..cols { [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 and enumerate() [INFO] [stdout] | [INFO] [stdout] 27 - for j in 0..cols { [INFO] [stdout] 27 + for (j, ) in input.iter().enumerate().take(cols) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/bin/day-8-resonant-collinearity/main.rs:31:22 [INFO] [stdout] | [INFO] [stdout] 31 | .or_insert_with(Vec::new) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day-8-resonant-collinearity/main.rs:30:28 [INFO] [stdout] | [INFO] [stdout] 30 | .entry(&input[i][j]) [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `input[i][j]` [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 `j` is only used to index `locations` [INFO] [stdout] --> src/bin/day-8-resonant-collinearity/main.rs:45:22 [INFO] [stdout] | [INFO] [stdout] 45 | for j in (i + 1)..locations.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] 45 - for j in (i + 1)..locations.len() { [INFO] [stdout] 45 + for in locations.iter().skip((i + 1)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `usize` is unnecessary [INFO] [stdout] --> src/bin/day-8-resonant-collinearity/main.rs:60:31 [INFO] [stdout] | [INFO] [stdout] 60 | if right_x >= 0 as usize && right_x < rows && right_y >= 0 as usize && right_y < cols { [INFO] [stdout] | ^^^^^^^^^^ help: try: `0_usize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `usize` is unnecessary [INFO] [stdout] --> src/bin/day-8-resonant-collinearity/main.rs:60:74 [INFO] [stdout] | [INFO] [stdout] 60 | if right_x >= 0 as usize && right_x < rows && right_y >= 0 as usize && right_y < cols { [INFO] [stdout] | ^^^^^^^^^^ help: try: `0_usize` [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: the loop variable `i` is only used to index `input` [INFO] [stdout] --> src/bin/day-8-resonant-collinearity/main.rs:67:14 [INFO] [stdout] | [INFO] [stdout] 67 | for i in 0..rows { [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] 67 - for i in 0..rows { [INFO] [stdout] 67 + for in input.iter().take(rows) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is only used to index `input` [INFO] [stdout] --> src/bin/day-8-resonant-collinearity/main.rs:68:18 [INFO] [stdout] | [INFO] [stdout] 68 | for j in 0..cols { [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] 68 - for j in 0..cols { [INFO] [stdout] 68 + for in input.iter().take(cols) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is only used to index `locations` [INFO] [stdout] --> src/bin/day-8-resonant-collinearity/main.rs:85:22 [INFO] [stdout] | [INFO] [stdout] 85 | for j in (i + 1)..locations.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] 85 - for j in (i + 1)..locations.len() { [INFO] [stdout] 85 + for in locations.iter().skip((i + 1)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `input` [INFO] [stdout] --> src/bin/day-8-resonant-collinearity/main.rs:111:14 [INFO] [stdout] | [INFO] [stdout] 111 | for i in 0..rows { [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] 111 - for i in 0..rows { [INFO] [stdout] 111 + for in input.iter().take(rows) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is only used to index `input` [INFO] [stdout] --> src/bin/day-8-resonant-collinearity/main.rs:112:18 [INFO] [stdout] | [INFO] [stdout] 112 | for j in 0..cols { [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] 112 - for j in 0..cols { [INFO] [stdout] 112 + for in input.iter().take(cols) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: a method with this name may be added to the standard library in the future [INFO] [stdout] --> src/bin/day-1-historian-hysteria/main.rs:36:14 [INFO] [stdout] | [INFO] [stdout] 36 | .intersperse(" ") [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: call with fully qualified syntax `itertools::Itertools::intersperse(...)` to keep using the current method [INFO] [stdout] = warning: once this associated item is added to the standard library, the ambiguity may cause an error or change in behavior! [INFO] [stdout] = note: for more information, see issue #48919 [INFO] [stdout] = note: `#[warn(unstable_name_collisions)]` (part of `#[warn(future_incompatible)]`) on by default [INFO] [stdout] help: add `#![feature(iter_intersperse)]` to the crate attributes to enable `std::iter::Iterator::intersperse` [INFO] [stdout] | [INFO] [stdout] 1 + #![feature(iter_intersperse)] [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/bin/day-9-disk-fragmenter/main.rs:67:9 [INFO] [stdout] | [INFO] [stdout] 67 | let mut part_two_answer = 0; [INFO] [stdout] | ----^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) 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/bin/day-9-disk-fragmenter/main.rs:3:27 [INFO] [stdout] | [INFO] [stdout] 3 | fn part_one_answer(input: &Vec<&str>) { [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] 3 - fn part_one_answer(input: &Vec<&str>) { [INFO] [stdout] 3 + fn part_one_answer(input: &[&str]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `input` [INFO] [stdout] --> src/bin/day-9-disk-fragmenter/main.rs:6:14 [INFO] [stdout] | [INFO] [stdout] 6 | for i in 0..input.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 and enumerate() [INFO] [stdout] | [INFO] [stdout] 6 - for i in 0..input.len() { [INFO] [stdout] 6 + for (i, ) in input.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/bin/day-9-disk-fragmenter/main.rs:8:9 [INFO] [stdout] | [INFO] [stdout] 8 | let temp: String; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] = note: `#[warn(clippy::needless_late_init)]` on by default [INFO] [stdout] help: move the declaration `temp` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 8 ~ [INFO] [stdout] 9 ~ let temp: String = if i % 2 == 0 { [INFO] [stdout] 10 ~ (i / 2).to_string() [INFO] [stdout] 11 | } else { [INFO] [stdout] 12 ~ String::from(".") [INFO] [stdout] 13 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `idx` is used to index `blocks` [INFO] [stdout] --> src/bin/day-9-disk-fragmenter/main.rs:20:16 [INFO] [stdout] | [INFO] [stdout] 20 | for idx in 0..blocks.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 and enumerate() [INFO] [stdout] | [INFO] [stdout] 20 - for idx in 0..blocks.len() { [INFO] [stdout] 20 + for (idx, ) in blocks.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `idx` is used to index `blocks` [INFO] [stdout] --> src/bin/day-9-disk-fragmenter/main.rs:31:24 [INFO] [stdout] | [INFO] [stdout] 31 | for idx in (i + 1)..blocks.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 and enumerate() [INFO] [stdout] | [INFO] [stdout] 31 - for idx in (i + 1)..blocks.len() { [INFO] [stdout] 31 + for (idx, ) in blocks.iter().enumerate().skip((i + 1)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `blocks` [INFO] [stdout] --> src/bin/day-9-disk-fragmenter/main.rs:44:14 [INFO] [stdout] | [INFO] [stdout] 44 | for i in 0..blocks.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 and enumerate() [INFO] [stdout] | [INFO] [stdout] 44 - for i in 0..blocks.len() { [INFO] [stdout] 44 + for (i, ) in blocks.iter().enumerate() { [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/bin/day-9-disk-fragmenter/main.rs:51:27 [INFO] [stdout] | [INFO] [stdout] 51 | fn part_two_answer(input: &Vec<&str>) { [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] 51 - fn part_two_answer(input: &Vec<&str>) { [INFO] [stdout] 51 + fn part_two_answer(input: &[&str]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `input` [INFO] [stdout] --> src/bin/day-9-disk-fragmenter/main.rs:54:14 [INFO] [stdout] | [INFO] [stdout] 54 | for i in 0..input.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 and enumerate() [INFO] [stdout] | [INFO] [stdout] 54 - for i in 0..input.len() { [INFO] [stdout] 54 + for (i, ) in input.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/bin/day-9-disk-fragmenter/main.rs:56:9 [INFO] [stdout] | [INFO] [stdout] 56 | let temp: String; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `temp` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 56 ~ [INFO] [stdout] 57 ~ let temp: String = if i % 2 == 0 { [INFO] [stdout] 58 ~ (i / 2).to_string() [INFO] [stdout] 59 | } else { [INFO] [stdout] 60 ~ String::from(".") [INFO] [stdout] 61 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/bin/day-6-guard-gallivant/main.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | input: &Vec>, [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/bin/day-6-guard-gallivant/main.rs:7:1 [INFO] [stdout] | [INFO] [stdout] 7 | / fn can_add_obstruction( [INFO] [stdout] 8 | | input: &Vec>, [INFO] [stdout] 9 | | r: usize, [INFO] [stdout] 10 | | c: usize, [INFO] [stdout] ... | [INFO] [stdout] 15 | | cols: i32 [INFO] [stdout] 16 | | ) -> bool { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` 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/bin/day-6-guard-gallivant/main.rs:8:12 [INFO] [stdout] | [INFO] [stdout] 8 | input: &Vec>, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 8 - input: &Vec>, [INFO] [stdout] 8 + input: &[Vec<&str>], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `println!` args [INFO] [stdout] --> src/bin/day-6-guard-gallivant/main.rs:32:50 [INFO] [stdout] | [INFO] [stdout] 32 | println!("Error reading input: {}", e.to_string()); [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] = note: `#[warn(clippy::to_string_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `input` [INFO] [stdout] --> src/bin/day-6-guard-gallivant/main.rs:75:14 [INFO] [stdout] | [INFO] [stdout] 75 | for i in 0..rows { [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 and enumerate() [INFO] [stdout] | [INFO] [stdout] 75 - for i in 0..rows { [INFO] [stdout] 75 + for (i, ) in input.iter().enumerate().take(rows) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/bin/day-2-red-nosed-reports/main.rs:6:21 [INFO] [stdout] | [INFO] [stdout] 6 | Ok(v) => Ok(String::from(v)), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `v` [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] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is used to index `input` [INFO] [stdout] --> src/bin/day-6-guard-gallivant/main.rs:76:18 [INFO] [stdout] | [INFO] [stdout] 76 | for j in 0..cols { [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 and enumerate() [INFO] [stdout] | [INFO] [stdout] 76 - for j in 0..cols { [INFO] [stdout] 76 + for (j, ) in input.iter().enumerate().take(cols) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/day-2-red-nosed-reports/main.rs:44:5 [INFO] [stdout] | [INFO] [stdout] 44 | return true; [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] 44 - return true; [INFO] [stdout] 44 + true [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/bin/day-2-red-nosed-reports/main.rs:11:27 [INFO] [stdout] | [INFO] [stdout] 11 | fn is_sequence_valid(seq: &Vec) -> bool { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 11 - fn is_sequence_valid(seq: &Vec) -> bool { [INFO] [stdout] 11 + fn is_sequence_valid(seq: &[i32]) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/bin/day-2-red-nosed-reports/main.rs:19:24 [INFO] [stdout] | [INFO] [stdout] 19 | if diff < 1 || diff > 3 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: use: `!(1..=3).contains(&diff)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/bin/day-2-red-nosed-reports/main.rs:24:24 [INFO] [stdout] | [INFO] [stdout] 24 | if diff < -3 || diff > -1 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: use: `!(-3..=-1).contains(&diff)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/bin/day-2-red-nosed-reports/main.rs:33:20 [INFO] [stdout] | [INFO] [stdout] 33 | if diff < 1 || diff > 3 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: use: `!(1..=3).contains(&diff)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/bin/day-2-red-nosed-reports/main.rs:38:20 [INFO] [stdout] | [INFO] [stdout] 38 | if diff < -3 || diff > -1 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: use: `!(-3..=-1).contains(&diff)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/bin/day-2-red-nosed-reports/main.rs:68:9 [INFO] [stdout] | [INFO] [stdout] 68 | while let Some(val) = report_values_it.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for val in report_values_it` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] = note: `#[warn(clippy::while_let_on_iterator)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/bin/day-1-historian-hysteria/main.rs:8:27 [INFO] [stdout] | [INFO] [stdout] 8 | Ok(content) => Ok(String::from(content)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `content` [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] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/bin/day-3-mull-it-over/main.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 6 | / let data = match fs::read_to_string(path) { [INFO] [stdout] 7 | | Ok(v) => Ok(v), [INFO] [stdout] 8 | | Err(e) => Err(e.to_string()) [INFO] [stdout] 9 | | }; [INFO] [stdout] | |______- unnecessary `let` binding [INFO] [stdout] 10 | data [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] 6 ~ [INFO] [stdout] 7 ~ match fs::read_to_string(path) { [INFO] [stdout] 8 + Ok(v) => Ok(v), [INFO] [stdout] 9 + Err(e) => Err(e.to_string()) [INFO] [stdout] 10 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `println!` args [INFO] [stdout] --> src/bin/day-1-historian-hysteria/main.rs:51:65 [INFO] [stdout] | [INFO] [stdout] 51 | println!("Parsing error, incorrect input: {}", e.to_string()); [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] = note: `#[warn(clippy::to_string_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `input` [INFO] [stdout] --> src/bin/day-8-resonant-collinearity/main.rs:26:14 [INFO] [stdout] | [INFO] [stdout] 26 | for i in 0..rows { [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 and enumerate() [INFO] [stdout] | [INFO] [stdout] 26 - for i in 0..rows { [INFO] [stdout] 26 + for (i, ) in input.iter().enumerate().take(rows) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is used to index `input` [INFO] [stdout] --> src/bin/day-8-resonant-collinearity/main.rs:27:18 [INFO] [stdout] | [INFO] [stdout] 27 | for j in 0..cols { [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 and enumerate() [INFO] [stdout] | [INFO] [stdout] 27 - for j in 0..cols { [INFO] [stdout] 27 + for (j, ) in input.iter().enumerate().take(cols) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> src/bin/day-8-resonant-collinearity/main.rs:31:22 [INFO] [stdout] | [INFO] [stdout] 31 | .or_insert_with(Vec::new) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day-8-resonant-collinearity/main.rs:30:28 [INFO] [stdout] | [INFO] [stdout] 30 | .entry(&input[i][j]) [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `input[i][j]` [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 `j` is only used to index `locations` [INFO] [stdout] --> src/bin/day-8-resonant-collinearity/main.rs:45:22 [INFO] [stdout] | [INFO] [stdout] 45 | for j in (i + 1)..locations.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] 45 - for j in (i + 1)..locations.len() { [INFO] [stdout] 45 + for in locations.iter().skip((i + 1)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `usize` is unnecessary [INFO] [stdout] --> src/bin/day-8-resonant-collinearity/main.rs:60:31 [INFO] [stdout] | [INFO] [stdout] 60 | if right_x >= 0 as usize && right_x < rows && right_y >= 0 as usize && right_y < cols { [INFO] [stdout] | ^^^^^^^^^^ help: try: `0_usize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `usize` is unnecessary [INFO] [stdout] --> src/bin/day-8-resonant-collinearity/main.rs:60:74 [INFO] [stdout] | [INFO] [stdout] 60 | if right_x >= 0 as usize && right_x < rows && right_y >= 0 as usize && right_y < cols { [INFO] [stdout] | ^^^^^^^^^^ help: try: `0_usize` [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: the loop variable `i` is only used to index `input` [INFO] [stdout] --> src/bin/day-8-resonant-collinearity/main.rs:67:14 [INFO] [stdout] | [INFO] [stdout] 67 | for i in 0..rows { [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] 67 - for i in 0..rows { [INFO] [stdout] 67 + for in input.iter().take(rows) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is only used to index `input` [INFO] [stdout] --> src/bin/day-8-resonant-collinearity/main.rs:68:18 [INFO] [stdout] | [INFO] [stdout] 68 | for j in 0..cols { [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] 68 - for j in 0..cols { [INFO] [stdout] 68 + for in input.iter().take(cols) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is only used to index `locations` [INFO] [stdout] --> src/bin/day-8-resonant-collinearity/main.rs:85:22 [INFO] [stdout] | [INFO] [stdout] 85 | for j in (i + 1)..locations.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] 85 - for j in (i + 1)..locations.len() { [INFO] [stdout] 85 + for in locations.iter().skip((i + 1)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `input` [INFO] [stdout] --> src/bin/day-8-resonant-collinearity/main.rs:111:14 [INFO] [stdout] | [INFO] [stdout] 111 | for i in 0..rows { [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] 111 - for i in 0..rows { [INFO] [stdout] 111 + for in input.iter().take(rows) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is only used to index `input` [INFO] [stdout] --> src/bin/day-8-resonant-collinearity/main.rs:112:18 [INFO] [stdout] | [INFO] [stdout] 112 | for j in 0..cols { [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] 112 - for j in 0..cols { [INFO] [stdout] 112 + for in input.iter().take(cols) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/bin/day-4-ceres-search/main.rs:15:12 [INFO] [stdout] | [INFO] [stdout] 15 | if !( [INFO] [stdout] | ____________^ [INFO] [stdout] 16 | | input[row][col] == xmas.chars().nth(i).unwrap().to_string() [INFO] [stdout] 17 | | ) { [INFO] [stdout] | |_________^ help: try: `(input[row][col] != xmas.chars().nth(i).unwrap().to_string())` [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: unneeded `return` statement [INFO] [stdout] --> src/bin/day-4-ceres-search/main.rs:28:5 [INFO] [stdout] | [INFO] [stdout] 28 | return 1; [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] 28 - return 1; [INFO] [stdout] 28 + 1 [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/bin/day-4-ceres-search/main.rs:10:78 [INFO] [stdout] | [INFO] [stdout] 10 | fn check_xmas(r: usize, c: usize, p: i32, q: i32, x: usize, y: usize, input: &Vec>) -> i32 { [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] 10 - fn check_xmas(r: usize, c: usize, p: i32, q: i32, x: usize, y: usize, input: &Vec>) -> i32 { [INFO] [stdout] 10 + fn check_xmas(r: usize, c: usize, p: i32, q: i32, x: usize, y: usize, input: &[Vec<&str>]) -> i32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/bin/day-9-disk-fragmenter/main.rs:67:9 [INFO] [stdout] | [INFO] [stdout] 67 | let mut part_two_answer = 0; [INFO] [stdout] | ----^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day-4-ceres-search/main.rs:33:37 [INFO] [stdout] | [INFO] [stdout] 33 | let contents = match read_input(&file_path) { [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `file_path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/bin/day-4-ceres-search/main.rs:81:48 [INFO] [stdout] | [INFO] [stdout] 81 | input[i + 2][j + 2] == "S" { [INFO] [stdout] | ________________________________________________^ [INFO] [stdout] 82 | | masx += 1 [INFO] [stdout] 83 | | } else if input[i][j + 2] == "M" && [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/bin/day-4-ceres-search/main.rs:86:44 [INFO] [stdout] | [INFO] [stdout] 86 | input[i + 2][j] == "S" { [INFO] [stdout] | ____________________________________________^ [INFO] [stdout] 87 | | masx += 1 [INFO] [stdout] 88 | | } else if input[i + 2][j + 2] == "M" && [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 `if` has identical blocks [INFO] [stdout] --> src/bin/day-4-ceres-search/main.rs:86:44 [INFO] [stdout] | [INFO] [stdout] 86 | input[i + 2][j] == "S" { [INFO] [stdout] | ____________________________________________^ [INFO] [stdout] 87 | | masx += 1 [INFO] [stdout] 88 | | } else if input[i + 2][j + 2] == "M" && [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/bin/day-4-ceres-search/main.rs:91:44 [INFO] [stdout] | [INFO] [stdout] 91 | input[i][j + 2] == "S" { [INFO] [stdout] | ____________________________________________^ [INFO] [stdout] 92 | | masx += 1 [INFO] [stdout] 93 | | } [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] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day-9-disk-fragmenter/main.rs:3:27 [INFO] [stdout] | [INFO] [stdout] 3 | fn part_one_answer(input: &Vec<&str>) { [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] 3 - fn part_one_answer(input: &Vec<&str>) { [INFO] [stdout] 3 + fn part_one_answer(input: &[&str]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `input` [INFO] [stdout] --> src/bin/day-9-disk-fragmenter/main.rs:6:14 [INFO] [stdout] | [INFO] [stdout] 6 | for i in 0..input.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 and enumerate() [INFO] [stdout] | [INFO] [stdout] 6 - for i in 0..input.len() { [INFO] [stdout] 6 + for (i, ) in input.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/bin/day-9-disk-fragmenter/main.rs:8:9 [INFO] [stdout] | [INFO] [stdout] 8 | let temp: String; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] = note: `#[warn(clippy::needless_late_init)]` on by default [INFO] [stdout] help: move the declaration `temp` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 8 ~ [INFO] [stdout] 9 ~ let temp: String = if i % 2 == 0 { [INFO] [stdout] 10 ~ (i / 2).to_string() [INFO] [stdout] 11 | } else { [INFO] [stdout] 12 ~ String::from(".") [INFO] [stdout] 13 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `idx` is used to index `blocks` [INFO] [stdout] --> src/bin/day-9-disk-fragmenter/main.rs:20:16 [INFO] [stdout] | [INFO] [stdout] 20 | for idx in 0..blocks.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 and enumerate() [INFO] [stdout] | [INFO] [stdout] 20 - for idx in 0..blocks.len() { [INFO] [stdout] 20 + for (idx, ) in blocks.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `idx` is used to index `blocks` [INFO] [stdout] --> src/bin/day-9-disk-fragmenter/main.rs:31:24 [INFO] [stdout] | [INFO] [stdout] 31 | for idx in (i + 1)..blocks.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 and enumerate() [INFO] [stdout] | [INFO] [stdout] 31 - for idx in (i + 1)..blocks.len() { [INFO] [stdout] 31 + for (idx, ) in blocks.iter().enumerate().skip((i + 1)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `blocks` [INFO] [stdout] --> src/bin/day-9-disk-fragmenter/main.rs:44:14 [INFO] [stdout] | [INFO] [stdout] 44 | for i in 0..blocks.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 and enumerate() [INFO] [stdout] | [INFO] [stdout] 44 - for i in 0..blocks.len() { [INFO] [stdout] 44 + for (i, ) in blocks.iter().enumerate() { [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/bin/day-9-disk-fragmenter/main.rs:51:27 [INFO] [stdout] | [INFO] [stdout] 51 | fn part_two_answer(input: &Vec<&str>) { [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] 51 - fn part_two_answer(input: &Vec<&str>) { [INFO] [stdout] 51 + fn part_two_answer(input: &[&str]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `input` [INFO] [stdout] --> src/bin/day-9-disk-fragmenter/main.rs:54:14 [INFO] [stdout] | [INFO] [stdout] 54 | for i in 0..input.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 and enumerate() [INFO] [stdout] | [INFO] [stdout] 54 - for i in 0..input.len() { [INFO] [stdout] 54 + for (i, ) in input.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/bin/day-3-mull-it-over/main.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 6 | / let data = match fs::read_to_string(path) { [INFO] [stdout] 7 | | Ok(v) => Ok(v), [INFO] [stdout] 8 | | Err(e) => Err(e.to_string()) [INFO] [stdout] 9 | | }; [INFO] [stdout] | |______- unnecessary `let` binding [INFO] [stdout] 10 | data [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] 6 ~ [INFO] [stdout] 7 ~ match fs::read_to_string(path) { [INFO] [stdout] 8 + Ok(v) => Ok(v), [INFO] [stdout] 9 + Err(e) => Err(e.to_string()) [INFO] [stdout] 10 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/bin/day-9-disk-fragmenter/main.rs:56:9 [INFO] [stdout] | [INFO] [stdout] 56 | let temp: String; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `temp` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 56 ~ [INFO] [stdout] 57 ~ let temp: String = if i % 2 == 0 { [INFO] [stdout] 58 ~ (i / 2).to_string() [INFO] [stdout] 59 | } else { [INFO] [stdout] 60 ~ String::from(".") [INFO] [stdout] 61 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day-5-print-queue/main.rs:12:34 [INFO] [stdout] | [INFO] [stdout] 12 | let input = match read_input(&file_path) { [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `file_path` [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: unused variable: `input` [INFO] [stdout] --> src/bin/day-6-guard-gallivant/main.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | input: &Vec>, [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day-5-print-queue/main.rs:12:34 [INFO] [stdout] | [INFO] [stdout] 12 | let input = match read_input(&file_path) { [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `file_path` [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: useless conversion to the same type: `std::iter::Map, {closure@src/bin/day-5-print-queue/main.rs:26:14: 26:17}>` [INFO] [stdout] --> src/bin/day-5-print-queue/main.rs:24:17 [INFO] [stdout] | [INFO] [stdout] 24 | let rules = rules [INFO] [stdout] | _________________^ [INFO] [stdout] 25 | | .into_iter() [INFO] [stdout] 26 | | .map(|r| r.split('|').collect::>()) [INFO] [stdout] 27 | | .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] 24 ~ let rules = rules [INFO] [stdout] 25 + .into_iter() [INFO] [stdout] 26 + .map(|r| r.split('|').collect::>()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::iter::Map, {closure@src/bin/day-5-print-queue/main.rs:26:14: 26:17}>` [INFO] [stdout] --> src/bin/day-5-print-queue/main.rs:24:17 [INFO] [stdout] | [INFO] [stdout] 24 | let rules = rules [INFO] [stdout] | _________________^ [INFO] [stdout] 25 | | .into_iter() [INFO] [stdout] 26 | | .map(|r| r.split('|').collect::>()) [INFO] [stdout] 27 | | .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] 24 ~ let rules = rules [INFO] [stdout] 25 + .into_iter() [INFO] [stdout] 26 + .map(|r| r.split('|').collect::>()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `page_nums` [INFO] [stdout] --> src/bin/day-5-print-queue/main.rs:58:22 [INFO] [stdout] | [INFO] [stdout] 58 | for i in 0..page_nums.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] 58 - for i in 0..page_nums.len() { [INFO] [stdout] 58 + for in &page_nums { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `page_nums` [INFO] [stdout] --> src/bin/day-5-print-queue/main.rs:58:22 [INFO] [stdout] | [INFO] [stdout] 58 | for i in 0..page_nums.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] 58 - for i in 0..page_nums.len() { [INFO] [stdout] 58 + for in &page_nums { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/bin/day-5-print-queue/main.rs:60:20 [INFO] [stdout] | [INFO] [stdout] 60 | if corrected_page_nums.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `corrected_page_nums.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: length comparison to zero [INFO] [stdout] --> src/bin/day-5-print-queue/main.rs:60:20 [INFO] [stdout] | [INFO] [stdout] 60 | if corrected_page_nums.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `corrected_page_nums.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: this function has too many arguments (8/7) [INFO] [stdout] --> src/bin/day-6-guard-gallivant/main.rs:7:1 [INFO] [stdout] | [INFO] [stdout] 7 | / fn can_add_obstruction( [INFO] [stdout] 8 | | input: &Vec>, [INFO] [stdout] 9 | | r: usize, [INFO] [stdout] 10 | | c: usize, [INFO] [stdout] ... | [INFO] [stdout] 15 | | cols: i32 [INFO] [stdout] 16 | | ) -> bool { [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` 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/bin/day-6-guard-gallivant/main.rs:8:12 [INFO] [stdout] | [INFO] [stdout] 8 | input: &Vec>, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 8 - input: &Vec>, [INFO] [stdout] 8 + input: &[Vec<&str>], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/bin/day-4-ceres-search/main.rs:15:12 [INFO] [stdout] | [INFO] [stdout] 15 | if !( [INFO] [stdout] | ____________^ [INFO] [stdout] 16 | | input[row][col] == xmas.chars().nth(i).unwrap().to_string() [INFO] [stdout] 17 | | ) { [INFO] [stdout] | |_________^ help: try: `(input[row][col] != xmas.chars().nth(i).unwrap().to_string())` [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: unneeded `return` statement [INFO] [stdout] --> src/bin/day-4-ceres-search/main.rs:28:5 [INFO] [stdout] | [INFO] [stdout] 28 | return 1; [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] 28 - return 1; [INFO] [stdout] 28 + 1 [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/bin/day-4-ceres-search/main.rs:10:78 [INFO] [stdout] | [INFO] [stdout] 10 | fn check_xmas(r: usize, c: usize, p: i32, q: i32, x: usize, y: usize, input: &Vec>) -> i32 { [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] 10 - fn check_xmas(r: usize, c: usize, p: i32, q: i32, x: usize, y: usize, input: &Vec>) -> i32 { [INFO] [stdout] 10 + fn check_xmas(r: usize, c: usize, p: i32, q: i32, x: usize, y: usize, input: &[Vec<&str>]) -> i32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: a method with this name may be added to the standard library in the future [INFO] [stdout] --> src/bin/day-1-historian-hysteria/main.rs:36:14 [INFO] [stdout] | [INFO] [stdout] 36 | .intersperse(" ") [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: call with fully qualified syntax `itertools::Itertools::intersperse(...)` to keep using the current method [INFO] [stdout] = warning: once this associated item is added to the standard library, the ambiguity may cause an error or change in behavior! [INFO] [stdout] = note: for more information, see issue #48919 [INFO] [stdout] = note: `#[warn(unstable_name_collisions)]` (part of `#[warn(future_incompatible)]`) on by default [INFO] [stdout] help: add `#![feature(iter_intersperse)]` to the crate attributes to enable `std::iter::Iterator::intersperse` [INFO] [stdout] | [INFO] [stdout] 1 + #![feature(iter_intersperse)] [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `println!` args [INFO] [stdout] --> src/bin/day-6-guard-gallivant/main.rs:32:50 [INFO] [stdout] | [INFO] [stdout] 32 | println!("Error reading input: {}", e.to_string()); [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] = note: `#[warn(clippy::to_string_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day-4-ceres-search/main.rs:33:37 [INFO] [stdout] | [INFO] [stdout] 33 | let contents = match read_input(&file_path) { [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `file_path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/bin/day-4-ceres-search/main.rs:81:48 [INFO] [stdout] | [INFO] [stdout] 81 | input[i + 2][j + 2] == "S" { [INFO] [stdout] | ________________________________________________^ [INFO] [stdout] 82 | | masx += 1 [INFO] [stdout] 83 | | } else if input[i][j + 2] == "M" && [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/bin/day-4-ceres-search/main.rs:86:44 [INFO] [stdout] | [INFO] [stdout] 86 | input[i + 2][j] == "S" { [INFO] [stdout] | ____________________________________________^ [INFO] [stdout] 87 | | masx += 1 [INFO] [stdout] 88 | | } else if input[i + 2][j + 2] == "M" && [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 `if` has identical blocks [INFO] [stdout] --> src/bin/day-4-ceres-search/main.rs:86:44 [INFO] [stdout] | [INFO] [stdout] 86 | input[i + 2][j] == "S" { [INFO] [stdout] | ____________________________________________^ [INFO] [stdout] 87 | | masx += 1 [INFO] [stdout] 88 | | } else if input[i + 2][j + 2] == "M" && [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/bin/day-4-ceres-search/main.rs:91:44 [INFO] [stdout] | [INFO] [stdout] 91 | input[i][j + 2] == "S" { [INFO] [stdout] | ____________________________________________^ [INFO] [stdout] 92 | | masx += 1 [INFO] [stdout] 93 | | } [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] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/bin/day-2-red-nosed-reports/main.rs:6:21 [INFO] [stdout] | [INFO] [stdout] 6 | Ok(v) => Ok(String::from(v)), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `v` [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] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/day-2-red-nosed-reports/main.rs:44:5 [INFO] [stdout] | [INFO] [stdout] 44 | return true; [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] 44 - return true; [INFO] [stdout] 44 + true [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/bin/day-2-red-nosed-reports/main.rs:11:27 [INFO] [stdout] | [INFO] [stdout] 11 | fn is_sequence_valid(seq: &Vec) -> bool { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 11 - fn is_sequence_valid(seq: &Vec) -> bool { [INFO] [stdout] 11 + fn is_sequence_valid(seq: &[i32]) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/bin/day-2-red-nosed-reports/main.rs:19:24 [INFO] [stdout] | [INFO] [stdout] 19 | if diff < 1 || diff > 3 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: use: `!(1..=3).contains(&diff)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/bin/day-2-red-nosed-reports/main.rs:24:24 [INFO] [stdout] | [INFO] [stdout] 24 | if diff < -3 || diff > -1 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: use: `!(-3..=-1).contains(&diff)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `input` [INFO] [stdout] --> src/bin/day-6-guard-gallivant/main.rs:75:14 [INFO] [stdout] | [INFO] [stdout] 75 | for i in 0..rows { [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 and enumerate() [INFO] [stdout] | [INFO] [stdout] 75 - for i in 0..rows { [INFO] [stdout] 75 + for (i, ) in input.iter().enumerate().take(rows) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/bin/day-2-red-nosed-reports/main.rs:33:20 [INFO] [stdout] | [INFO] [stdout] 33 | if diff < 1 || diff > 3 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: use: `!(1..=3).contains(&diff)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/bin/day-2-red-nosed-reports/main.rs:38:20 [INFO] [stdout] | [INFO] [stdout] 38 | if diff < -3 || diff > -1 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: use: `!(-3..=-1).contains(&diff)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is used to index `input` [INFO] [stdout] --> src/bin/day-6-guard-gallivant/main.rs:76:18 [INFO] [stdout] | [INFO] [stdout] 76 | for j in 0..cols { [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 and enumerate() [INFO] [stdout] | [INFO] [stdout] 76 - for j in 0..cols { [INFO] [stdout] 76 + for (j, ) in input.iter().enumerate().take(cols) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/bin/day-2-red-nosed-reports/main.rs:68:9 [INFO] [stdout] | [INFO] [stdout] 68 | while let Some(val) = report_values_it.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for val in report_values_it` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] = note: `#[warn(clippy::while_let_on_iterator)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/bin/day-1-historian-hysteria/main.rs:8:27 [INFO] [stdout] | [INFO] [stdout] 8 | Ok(content) => Ok(String::from(content)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `content` [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] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `println!` args [INFO] [stdout] --> src/bin/day-1-historian-hysteria/main.rs:51:65 [INFO] [stdout] | [INFO] [stdout] 51 | println!("Parsing error, incorrect input: {}", e.to_string()); [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] = note: `#[warn(clippy::to_string_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 4.73s [INFO] running `Command { std: "docker" "inspect" "82c6f70a93c919cccfdc4dd3a88508068528fca03ea1262c14c91ffd0c1ada5c", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "82c6f70a93c919cccfdc4dd3a88508068528fca03ea1262c14c91ffd0c1ada5c", kill_on_drop: false }` [INFO] [stdout] 82c6f70a93c919cccfdc4dd3a88508068528fca03ea1262c14c91ffd0c1ada5c