[INFO] cloning repository https://github.com/lodrem/aocrs [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/lodrem/aocrs" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Flodrem%2Faocrs", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Flodrem%2Faocrs'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 1c2facacfc9ce41870e61bd36cddbb92282bf68f [INFO] linting lodrem/aocrs against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Flodrem%2Faocrs" "/workspace/builds/worker-3-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-3-tc1/source'... [INFO] [stderr] done. [INFO] removed /workspace/builds/worker-3-tc1/source/.cargo/config.toml [INFO] started tweaking git repo https://github.com/lodrem/aocrs [INFO] finished tweaking git repo https://github.com/lodrem/aocrs [INFO] tweaked toml for git repo https://github.com/lodrem/aocrs written to /workspace/builds/worker-3-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/lodrem/aocrs 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/lodrem/aocrs 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-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-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] 5d45b72ec0b370a41eae816f03c8b1b931e861813c6f3c6dc00e297396469253 [INFO] running `Command { std: "docker" "start" "-a" "5d45b72ec0b370a41eae816f03c8b1b931e861813c6f3c6dc00e297396469253", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "5d45b72ec0b370a41eae816f03c8b1b931e861813c6f3c6dc00e297396469253", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "5d45b72ec0b370a41eae816f03c8b1b931e861813c6f3c6dc00e297396469253", kill_on_drop: false }` [INFO] [stdout] 5d45b72ec0b370a41eae816f03c8b1b931e861813c6f3c6dc00e297396469253 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-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] 8f271102f6905450a47faf00540ed9f854596deef44ef9d77fc934bbeee7b8ed [INFO] running `Command { std: "docker" "start" "-a" "8f271102f6905450a47faf00540ed9f854596deef44ef9d77fc934bbeee7b8ed", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.74 [INFO] [stderr] Checking anstyle v1.0.4 [INFO] [stderr] Compiling anyhow v1.0.94 [INFO] [stderr] Checking clap_lex v0.6.0 [INFO] [stderr] Checking anstream v0.6.5 [INFO] [stderr] Checking clap_builder v4.4.12 [INFO] [stderr] Compiling quote v1.0.35 [INFO] [stderr] Compiling syn v2.0.46 [INFO] [stderr] Compiling clap_derive v4.4.7 [INFO] [stderr] Checking clap v4.4.12 [INFO] [stderr] Checking aocrs v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unnecessary `>= y + 1` or `x - 1 >=` [INFO] [stdout] --> src/year2023/day5.rs:72:30 [INFO] [stdout] | [INFO] [stdout] 72 | if s <= start && start <= s + len - 1 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: change it to: `start < s + len` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#int_plus_one [INFO] [stdout] = note: `#[warn(clippy::int_plus_one)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `>= y + 1` or `x - 1 >=` [INFO] [stdout] --> src/year2023/day5.rs:72:30 [INFO] [stdout] | [INFO] [stdout] 72 | if s <= start && start <= s + len - 1 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: change it to: `start < s + len` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#int_plus_one [INFO] [stdout] = note: `#[warn(clippy::int_plus_one)]` 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/year2023/day10.rs:43:20 [INFO] [stdout] | [INFO] [stdout] 43 | fn get_start(grid: &Vec>) -> (usize, usize) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 43 - fn get_start(grid: &Vec>) -> (usize, usize) { [INFO] [stdout] 43 + fn get_start(grid: &[Vec]) -> (usize, usize) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is used to index `grid` [INFO] [stdout] --> src/year2023/day10.rs:45:18 [INFO] [stdout] | [INFO] [stdout] 45 | for j in 0..grid[0].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] 45 - for j in 0..grid[0].len() { [INFO] [stdout] 45 + for (j, ) in grid.iter().enumerate().take(grid[0].len()) { [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/year2023/day10.rs:54:35 [INFO] [stdout] | [INFO] [stdout] 54 | fn list_connected_neighbors(grid: &Vec>, r: usize, c: usize) -> Vec<(usize, usize)> { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 54 - fn list_connected_neighbors(grid: &Vec>, r: usize, c: usize) -> Vec<(usize, usize)> { [INFO] [stdout] 54 + fn list_connected_neighbors(grid: &[Vec], r: usize, c: usize) -> Vec<(usize, usize)> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `slice` [INFO] [stdout] --> src/year2023/day11.rs:32:32 [INFO] [stdout] | [INFO] [stdout] 32 | for (i, &cnt) in dimension.into_iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] = note: `#[warn(clippy::into_iter_on_ref)]` 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/year2023/day10.rs:43:20 [INFO] [stdout] | [INFO] [stdout] 43 | fn get_start(grid: &Vec>) -> (usize, usize) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 43 - fn get_start(grid: &Vec>) -> (usize, usize) { [INFO] [stdout] 43 + fn get_start(grid: &[Vec]) -> (usize, usize) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is used to index `grid` [INFO] [stdout] --> src/year2023/day10.rs:45:18 [INFO] [stdout] | [INFO] [stdout] 45 | for j in 0..grid[0].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] 45 - for j in 0..grid[0].len() { [INFO] [stdout] 45 + for (j, ) in grid.iter().enumerate().take(grid[0].len()) { [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/year2023/day10.rs:54:35 [INFO] [stdout] | [INFO] [stdout] 54 | fn list_connected_neighbors(grid: &Vec>, r: usize, c: usize) -> Vec<(usize, usize)> { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 54 - fn list_connected_neighbors(grid: &Vec>, r: usize, c: usize) -> Vec<(usize, usize)> { [INFO] [stdout] 54 + fn list_connected_neighbors(grid: &[Vec], r: usize, c: usize) -> Vec<(usize, usize)> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.fold` can be written more succinctly using another method [INFO] [stdout] --> src/year2023/day3.rs:121:18 [INFO] [stdout] | [INFO] [stdout] 121 | .fold(1, |acc, elem| acc * elem); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `product::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fold [INFO] [stdout] = note: `#[warn(clippy::unnecessary_fold)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `slice` [INFO] [stdout] --> src/year2023/day11.rs:32:32 [INFO] [stdout] | [INFO] [stdout] 32 | for (i, &cnt) in dimension.into_iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] = note: `#[warn(clippy::into_iter_on_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/year2023/day5.rs:99:5 [INFO] [stdout] | [INFO] [stdout] 99 | / input.seeds = parts[0] [INFO] [stdout] 100 | | .split_once(':') [INFO] [stdout] 101 | | .unwrap() [INFO] [stdout] 102 | | .1 [INFO] [stdout] ... | [INFO] [stdout] 106 | | .map(|v| v.parse::().unwrap()) [INFO] [stdout] 107 | | .collect(); [INFO] [stdout] | |___________________^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `year2023::day5::Input { seeds: parts[0] [INFO] [stdout] .split_once(':') [INFO] [stdout] .unwrap() [INFO] [stdout] .1 [INFO] [stdout] .trim() [INFO] [stdout] .split(' ') [INFO] [stdout] .map(|v| v.trim()) [INFO] [stdout] .map(|v| v.parse::().unwrap()) [INFO] [stdout] .collect(), seed_to_soil: RangeMap::parse(parts[1]), soil_to_fertilizer: RangeMap::parse(parts[2]), fertilizer_to_water: RangeMap::parse(parts[3]), water_to_light: RangeMap::parse(parts[4]), light_to_temperature: RangeMap::parse(parts[5]), temperature_to_humidity: RangeMap::parse(parts[6]), humidity_to_location: RangeMap::parse(parts[7]) }` and removing relevant reassignments [INFO] [stdout] --> src/year2023/day5.rs:98:5 [INFO] [stdout] | [INFO] [stdout] 98 | let mut input = Input::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] = note: `#[warn(clippy::field_reassign_with_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.fold` can be written more succinctly using another method [INFO] [stdout] --> src/year2023/day3.rs:121:18 [INFO] [stdout] | [INFO] [stdout] 121 | .fold(1, |acc, elem| acc * elem); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `product::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fold [INFO] [stdout] = note: `#[warn(clippy::unnecessary_fold)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.fold` can be written more succinctly using another method [INFO] [stdout] --> src/year2023/day6.rs:84:10 [INFO] [stdout] | [INFO] [stdout] 84 | .fold(1, |acc, v| acc * v) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `product()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fold [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `slice` [INFO] [stdout] --> src/year2023/day7.rs:39:14 [INFO] [stdout] | [INFO] [stdout] 39 | .into_iter() [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/year2023/day7.rs:117:14 [INFO] [stdout] | [INFO] [stdout] 117 | .expect(&format!("{card} must be valid")) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|| panic!("{card} must be valid"))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] = note: `#[warn(clippy::expect_fun_call)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/year2023/day5.rs:99:5 [INFO] [stdout] | [INFO] [stdout] 99 | / input.seeds = parts[0] [INFO] [stdout] 100 | | .split_once(':') [INFO] [stdout] 101 | | .unwrap() [INFO] [stdout] 102 | | .1 [INFO] [stdout] ... | [INFO] [stdout] 106 | | .map(|v| v.parse::().unwrap()) [INFO] [stdout] 107 | | .collect(); [INFO] [stdout] | |___________________^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `year2023::day5::Input { seeds: parts[0] [INFO] [stdout] .split_once(':') [INFO] [stdout] .unwrap() [INFO] [stdout] .1 [INFO] [stdout] .trim() [INFO] [stdout] .split(' ') [INFO] [stdout] .map(|v| v.trim()) [INFO] [stdout] .map(|v| v.parse::().unwrap()) [INFO] [stdout] .collect(), seed_to_soil: RangeMap::parse(parts[1]), soil_to_fertilizer: RangeMap::parse(parts[2]), fertilizer_to_water: RangeMap::parse(parts[3]), water_to_light: RangeMap::parse(parts[4]), light_to_temperature: RangeMap::parse(parts[5]), temperature_to_humidity: RangeMap::parse(parts[6]), humidity_to_location: RangeMap::parse(parts[7]) }` and removing relevant reassignments [INFO] [stdout] --> src/year2023/day5.rs:98:5 [INFO] [stdout] | [INFO] [stdout] 98 | let mut input = Input::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] = note: `#[warn(clippy::field_reassign_with_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `slice` [INFO] [stdout] --> src/year2023/day8.rs:25:10 [INFO] [stdout] | [INFO] [stdout] 25 | .into_iter() [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/year2023/day8.rs:95:27 [INFO] [stdout] | [INFO] [stdout] 95 | rv.into_iter().reduce(|acc, elem| lcm(acc, elem)).unwrap() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `lcm` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.fold` can be written more succinctly using another method [INFO] [stdout] --> src/year2023/day6.rs:84:10 [INFO] [stdout] | [INFO] [stdout] 84 | .fold(1, |acc, v| acc * v) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `product()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fold [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/year2023/day9.rs:38:13 [INFO] [stdout] | [INFO] [stdout] 38 | diff = vs.last().unwrap() + diff; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `diff += vs.last().unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `slice` [INFO] [stdout] --> src/year2023/day7.rs:39:14 [INFO] [stdout] | [INFO] [stdout] 39 | .into_iter() [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/year2023/day7.rs:117:14 [INFO] [stdout] | [INFO] [stdout] 117 | .expect(&format!("{card} must be valid")) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|| panic!("{card} must be valid"))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] = note: `#[warn(clippy::expect_fun_call)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/year2023/mod.rs:61:45 [INFO] [stdout] | [INFO] [stdout] 61 | fs::read_to_string(&input_path).expect(&format!("read test input: {input_path}")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("read test input: {input_path}"))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/year2023/mod.rs:63:46 [INFO] [stdout] | [INFO] [stdout] 63 | fs::read_to_string(&output_path).expect(&format!("read test output: {output_path}")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("read test output: {output_path}"))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `slice` [INFO] [stdout] --> src/year2023/day8.rs:25:10 [INFO] [stdout] | [INFO] [stdout] 25 | .into_iter() [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/year2023/day8.rs:95:27 [INFO] [stdout] | [INFO] [stdout] 95 | rv.into_iter().reduce(|acc, elem| lcm(acc, elem)).unwrap() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `lcm` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/year2023/day9.rs:38:13 [INFO] [stdout] | [INFO] [stdout] 38 | diff = vs.last().unwrap() + diff; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `diff += vs.last().unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::iter::Filter, {closure@src/year2024/day1.rs:14:17: 14:23}>` [INFO] [stdout] --> src/year2024/day1.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | / input [INFO] [stdout] 13 | | .split('\n') [INFO] [stdout] 14 | | .filter(|line| !line.is_empty()) [INFO] [stdout] 15 | | .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] 12 ~ input [INFO] [stdout] 13 + .split('\n') [INFO] [stdout] 14 + .filter(|line| !line.is_empty()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> src/year2024/day1.rs:33:14 [INFO] [stdout] | [INFO] [stdout] 33 | .zip(right.into_iter()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()` [INFO] [stdout] --> /rustc/3645249d79dfb136b5d8de3ce153d19d6698d92d/library/core/src/iter/traits/iterator.rs:629:11 [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] help: consider removing the `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 33 - .zip(right.into_iter()) [INFO] [stdout] 33 + .zip(right) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::iter::Filter, {closure@src/year2024/day1.rs:14:17: 14:23}>` [INFO] [stdout] --> src/year2024/day1.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | / input [INFO] [stdout] 13 | | .split('\n') [INFO] [stdout] 14 | | .filter(|line| !line.is_empty()) [INFO] [stdout] 15 | | .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] 12 ~ input [INFO] [stdout] 13 + .split('\n') [INFO] [stdout] 14 + .filter(|line| !line.is_empty()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> src/year2024/day1.rs:33:14 [INFO] [stdout] | [INFO] [stdout] 33 | .zip(right.into_iter()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()` [INFO] [stdout] --> /rustc/3645249d79dfb136b5d8de3ce153d19d6698d92d/library/core/src/iter/traits/iterator.rs:629:11 [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] help: consider removing the `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 33 - .zip(right.into_iter()) [INFO] [stdout] 33 + .zip(right) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `as_bytes` after slicing a string [INFO] [stdout] --> src/year2024/day3.rs:17:53 [INFO] [stdout] | [INFO] [stdout] 17 | let (x, x_idx) = if let Some(v) = read_int(&input[i + 4..].as_bytes()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&input.as_bytes()[i + 4..]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#sliced_string_as_bytes [INFO] [stdout] = note: `#[warn(clippy::sliced_string_as_bytes)]` 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/year2024/day3.rs:17:52 [INFO] [stdout] | [INFO] [stdout] 17 | let (x, x_idx) = if let Some(v) = read_int(&input[i + 4..].as_bytes()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `input[i + 4..].as_bytes()` [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: calling `as_bytes` after slicing a string [INFO] [stdout] --> src/year2024/day3.rs:24:12 [INFO] [stdout] | [INFO] [stdout] 24 | if input[i + 4 + x_idx..].as_bytes()[0] != b',' { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&input.as_bytes()[i + 4 + x_idx..]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#sliced_string_as_bytes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `as_bytes` after slicing a string [INFO] [stdout] --> src/year2024/day3.rs:28:53 [INFO] [stdout] | [INFO] [stdout] 28 | let (y, y_idx) = if let Some(v) = read_int(&input[i + 4 + x_idx + 1..].as_bytes()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&input.as_bytes()[i + 4 + x_idx + 1..]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#sliced_string_as_bytes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/year2024/day3.rs:28:52 [INFO] [stdout] | [INFO] [stdout] 28 | let (y, y_idx) = if let Some(v) = read_int(&input[i + 4 + x_idx + 1..].as_bytes()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `input[i + 4 + x_idx + 1..].as_bytes()` [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: calling `as_bytes` after slicing a string [INFO] [stdout] --> src/year2024/day3.rs:34:12 [INFO] [stdout] | [INFO] [stdout] 34 | if input[i + 4 + x_idx + 1 + y_idx..].as_bytes()[0] != b')' { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&input.as_bytes()[i + 4 + x_idx + 1 + y_idx..]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#sliced_string_as_bytes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `as_bytes` after slicing a string [INFO] [stdout] --> src/year2024/day3.rs:17:53 [INFO] [stdout] | [INFO] [stdout] 17 | let (x, x_idx) = if let Some(v) = read_int(&input[i + 4..].as_bytes()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&input.as_bytes()[i + 4..]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#sliced_string_as_bytes [INFO] [stdout] = note: `#[warn(clippy::sliced_string_as_bytes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `input` [INFO] [stdout] --> src/year2024/day3.rs:95:14 [INFO] [stdout] | [INFO] [stdout] 95 | for i in 0..3 { [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] 95 - for i in 0..3 { [INFO] [stdout] 95 + for (i, ) in input.iter().enumerate().take(3) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/year2024/day3.rs:17:52 [INFO] [stdout] | [INFO] [stdout] 17 | let (x, x_idx) = if let Some(v) = read_int(&input[i + 4..].as_bytes()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `input[i + 4..].as_bytes()` [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: calling `as_bytes` after slicing a string [INFO] [stdout] --> src/year2024/day3.rs:24:12 [INFO] [stdout] | [INFO] [stdout] 24 | if input[i + 4 + x_idx..].as_bytes()[0] != b',' { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&input.as_bytes()[i + 4 + x_idx..]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#sliced_string_as_bytes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `as_bytes` after slicing a string [INFO] [stdout] --> src/year2024/day3.rs:28:53 [INFO] [stdout] | [INFO] [stdout] 28 | let (y, y_idx) = if let Some(v) = read_int(&input[i + 4 + x_idx + 1..].as_bytes()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&input.as_bytes()[i + 4 + x_idx + 1..]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#sliced_string_as_bytes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/year2024/day3.rs:28:52 [INFO] [stdout] | [INFO] [stdout] 28 | let (y, y_idx) = if let Some(v) = read_int(&input[i + 4 + x_idx + 1..].as_bytes()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `input[i + 4 + x_idx + 1..].as_bytes()` [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: calling `as_bytes` after slicing a string [INFO] [stdout] --> src/year2024/day3.rs:34:12 [INFO] [stdout] | [INFO] [stdout] 34 | if input[i + 4 + x_idx + 1 + y_idx..].as_bytes()[0] != b')' { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&input.as_bytes()[i + 4 + x_idx + 1 + y_idx..]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#sliced_string_as_bytes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `input` [INFO] [stdout] --> src/year2024/day3.rs:95:14 [INFO] [stdout] | [INFO] [stdout] 95 | for i in 0..3 { [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] 95 - for i in 0..3 { [INFO] [stdout] 95 + for (i, ) in input.iter().enumerate().take(3) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/year2024/day4.rs:76:8 [INFO] [stdout] | [INFO] [stdout] 76 | if !(grid.get(i - 1, j - 1) == &b'M' && grid.get(i + 1, j + 1) == &b'S') [INFO] [stdout] | ________^ [INFO] [stdout] 77 | | && !(grid.get(i - 1, j - 1) == &b'S' && grid.get(i + 1, j + 1) == &b'M') [INFO] [stdout] | |________________________________________________________________________________^ help: try: `!(grid.get(i - 1, j - 1) == &b'M' && grid.get(i + 1, j + 1) == &b'S' || grid.get(i - 1, j - 1) == &b'S' && grid.get(i + 1, j + 1) == &b'M')` [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: this boolean expression can be simplified [INFO] [stdout] --> src/year2024/day4.rs:81:8 [INFO] [stdout] | [INFO] [stdout] 81 | if !(grid.get(i - 1, j + 1) == &b'M' && grid.get(i + 1, j - 1) == &b'S') [INFO] [stdout] | ________^ [INFO] [stdout] 82 | | && !(grid.get(i - 1, j + 1) == &b'S' && grid.get(i + 1, j - 1) == &b'M') [INFO] [stdout] | |________________________________________________________________________________^ help: try: `!(grid.get(i - 1, j + 1) == &b'M' && grid.get(i + 1, j - 1) == &b'S' || grid.get(i - 1, j + 1) == &b'S' && grid.get(i + 1, j - 1) == &b'M')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/year2024/day4.rs:76:8 [INFO] [stdout] | [INFO] [stdout] 76 | if !(grid.get(i - 1, j - 1) == &b'M' && grid.get(i + 1, j + 1) == &b'S') [INFO] [stdout] | ________^ [INFO] [stdout] 77 | | && !(grid.get(i - 1, j - 1) == &b'S' && grid.get(i + 1, j + 1) == &b'M') [INFO] [stdout] | |________________________________________________________________________________^ help: try: `!(grid.get(i - 1, j - 1) == &b'M' && grid.get(i + 1, j + 1) == &b'S' || grid.get(i - 1, j - 1) == &b'S' && grid.get(i + 1, j + 1) == &b'M')` [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: this boolean expression can be simplified [INFO] [stdout] --> src/year2024/day4.rs:81:8 [INFO] [stdout] | [INFO] [stdout] 81 | if !(grid.get(i - 1, j + 1) == &b'M' && grid.get(i + 1, j - 1) == &b'S') [INFO] [stdout] | ________^ [INFO] [stdout] 82 | | && !(grid.get(i - 1, j + 1) == &b'S' && grid.get(i + 1, j - 1) == &b'M') [INFO] [stdout] | |________________________________________________________________________________^ help: try: `!(grid.get(i - 1, j + 1) == &b'M' && grid.get(i + 1, j - 1) == &b'S' || grid.get(i - 1, j + 1) == &b'S' && grid.get(i + 1, j - 1) == &b'M')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: found call to `str::trim` before `str::split_whitespace` [INFO] [stdout] --> src/year2024/day7.rs:17:19 [INFO] [stdout] | [INFO] [stdout] 17 | r.trim() [INFO] [stdout] | ___________________^ [INFO] [stdout] 18 | | .split_whitespace() [INFO] [stdout] | |_____________________^ help: remove `trim()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trim_split_whitespace [INFO] [stdout] = note: `#[warn(clippy::trim_split_whitespace)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: found call to `str::trim` before `str::split_whitespace` [INFO] [stdout] --> src/year2024/day7.rs:17:19 [INFO] [stdout] | [INFO] [stdout] 17 | r.trim() [INFO] [stdout] | ___________________^ [INFO] [stdout] 18 | | .split_whitespace() [INFO] [stdout] | |_____________________^ help: remove `trim()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trim_split_whitespace [INFO] [stdout] = note: `#[warn(clippy::trim_split_whitespace)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/year2024/day8.rs:24:43 [INFO] [stdout] | [INFO] [stdout] 24 | freqs.entry(v).or_insert_with(|| Vec::new()).push((r, c)); [INFO] [stdout] | ^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Vec::new` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/year2024/day8.rs:67:43 [INFO] [stdout] | [INFO] [stdout] 67 | freqs.entry(v).or_insert_with(|| Vec::new()).push((r, c)); [INFO] [stdout] | ^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Vec::new` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/year2024/day8.rs:24:43 [INFO] [stdout] | [INFO] [stdout] 24 | freqs.entry(v).or_insert_with(|| Vec::new()).push((r, c)); [INFO] [stdout] | ^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Vec::new` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `lst` [INFO] [stdout] --> src/year2024/day9.rs:11:14 [INFO] [stdout] | [INFO] [stdout] 11 | for i in 0..lst.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] 11 - for i in 0..lst.len() { [INFO] [stdout] 11 + for (i, ) in lst.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/year2024/day8.rs:67:43 [INFO] [stdout] | [INFO] [stdout] 67 | freqs.entry(v).or_insert_with(|| Vec::new()).push((r, c)); [INFO] [stdout] | ^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Vec::new` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/year2024/mod.rs:61:45 [INFO] [stdout] | [INFO] [stdout] 61 | fs::read_to_string(&input_path).expect(&format!("read test input: {input_path}")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("read test input: {input_path}"))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/year2024/mod.rs:63:46 [INFO] [stdout] | [INFO] [stdout] 63 | fs::read_to_string(&output_path).expect(&format!("read test output: {output_path}")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("read test output: {output_path}"))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `lst` [INFO] [stdout] --> src/year2024/day9.rs:11:14 [INFO] [stdout] | [INFO] [stdout] 11 | for i in 0..lst.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] 11 - for i in 0..lst.len() { [INFO] [stdout] 11 + for (i, ) in lst.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 9.41s [INFO] running `Command { std: "docker" "inspect" "8f271102f6905450a47faf00540ed9f854596deef44ef9d77fc934bbeee7b8ed", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "8f271102f6905450a47faf00540ed9f854596deef44ef9d77fc934bbeee7b8ed", kill_on_drop: false }` [INFO] [stdout] 8f271102f6905450a47faf00540ed9f854596deef44ef9d77fc934bbeee7b8ed