[INFO] cloning repository https://github.com/albert-gonzalez/advent-of-code-2021-rust [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/albert-gonzalez/advent-of-code-2021-rust" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Falbert-gonzalez%2Fadvent-of-code-2021-rust", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Falbert-gonzalez%2Fadvent-of-code-2021-rust'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] ca5fbea8401c26706f179495ed62116c5142f31a [INFO] linting albert-gonzalez/advent-of-code-2021-rust against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Falbert-gonzalez%2Fadvent-of-code-2021-rust" "/workspace/builds/worker-5-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-5-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/albert-gonzalez/advent-of-code-2021-rust [INFO] finished tweaking git repo https://github.com/albert-gonzalez/advent-of-code-2021-rust [INFO] tweaked toml for git repo https://github.com/albert-gonzalez/advent-of-code-2021-rust written to /workspace/builds/worker-5-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/albert-gonzalez/advent-of-code-2021-rust 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/albert-gonzalez/advent-of-code-2021-rust already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-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] d268fcda73b09cea1508be8ade01d18c3e2891d4d9edb6c708152833a2c0e645 [INFO] running `Command { std: "docker" "start" "-a" "d268fcda73b09cea1508be8ade01d18c3e2891d4d9edb6c708152833a2c0e645", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "d268fcda73b09cea1508be8ade01d18c3e2891d4d9edb6c708152833a2c0e645", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "d268fcda73b09cea1508be8ade01d18c3e2891d4d9edb6c708152833a2c0e645", kill_on_drop: false }` [INFO] [stdout] d268fcda73b09cea1508be8ade01d18c3e2891d4d9edb6c708152833a2c0e645 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-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] 9002998ff19f75563b4b25ae7799c13740639b2b8b158bc6aa24502fc0e6c658 [INFO] running `Command { std: "docker" "start" "-a" "9002998ff19f75563b4b25ae7799c13740639b2b8b158bc6aa24502fc0e6c658", kill_on_drop: false }` [INFO] [stderr] Checking advent_of_code_2021 v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: this `.fold` can be written more succinctly using another method [INFO] [stdout] --> src/bin/day9_1/main.rs:19:10 [INFO] [stdout] | [INFO] [stdout] 19 | .fold(0, |count, risk_level| count + risk_level) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `sum()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fold [INFO] [stdout] = note: `#[warn(clippy::unnecessary_fold)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day9_1/main.rs:22:44 [INFO] [stdout] | [INFO] [stdout] 22 | fn create_lava_tubes_map(lava_tubes_input: &Vec) -> Vec> { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 22 - fn create_lava_tubes_map(lava_tubes_input: &Vec) -> Vec> { [INFO] [stdout] 22 + fn create_lava_tubes_map(lava_tubes_input: &[String]) -> Vec> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day9_1/main.rs:50:67 [INFO] [stdout] | [INFO] [stdout] 50 | fn is_the_lowest_vertical_adjacent_level(i: usize, j: usize, map: &Vec>) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 50 - fn is_the_lowest_vertical_adjacent_level(i: usize, j: usize, map: &Vec>) -> bool { [INFO] [stdout] 50 + fn is_the_lowest_vertical_adjacent_level(i: usize, j: usize, map: &[Vec]) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day9_1/main.rs:55:69 [INFO] [stdout] | [INFO] [stdout] 55 | fn is_the_lowest_horizontal_adjacent_level(i: usize, j: usize, map: &Vec>) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 55 - fn is_the_lowest_horizontal_adjacent_level(i: usize, j: usize, map: &Vec>) -> bool { [INFO] [stdout] 55 + fn is_the_lowest_horizontal_adjacent_level(i: usize, j: usize, map: &[Vec]) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.fold` can be written more succinctly using another method [INFO] [stdout] --> src/bin/day6/main.rs:40:10 [INFO] [stdout] | [INFO] [stdout] 40 | .fold(0, |count, fishes| count + fishes) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `sum()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fold [INFO] [stdout] = note: `#[warn(clippy::unnecessary_fold)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day6/main.rs:43:49 [INFO] [stdout] | [INFO] [stdout] 43 | fn create_laternfishes_state(lanternfish_input: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 43 - fn create_laternfishes_state(lanternfish_input: &Vec) -> Vec { [INFO] [stdout] 43 + fn create_laternfishes_state(lanternfish_input: &[String]) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/bin/day18_1/main.rs:271:24 [INFO] [stdout] | [INFO] [stdout] 271 | (SnailFishNumber { x: x, y: y }, current_index) [INFO] [stdout] | ^^^^ help: replace it with: `x` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/bin/day18_1/main.rs:271:30 [INFO] [stdout] | [INFO] [stdout] 271 | (SnailFishNumber { x: x, y: y }, current_index) [INFO] [stdout] | ^^^^ help: replace it with: `y` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/day1_2/main.rs:16:5 [INFO] [stdout] | [INFO] [stdout] 16 | return count_increased_distances(three_measurements_window_distances); [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] 16 - return count_increased_distances(three_measurements_window_distances); [INFO] [stdout] 16 + count_increased_distances(three_measurements_window_distances) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/day1_2/main.rs:39:5 [INFO] [stdout] | [INFO] [stdout] 39 | return three_measurements_window_distances; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 39 - return three_measurements_window_distances; [INFO] [stdout] 39 + three_measurements_window_distances [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/day1_2/main.rs:56:5 [INFO] [stdout] | [INFO] [stdout] 56 | return distance_increased_count; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 56 - return distance_increased_count; [INFO] [stdout] 56 + distance_increased_count [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/day11_2/main.rs:24:45 [INFO] [stdout] | [INFO] [stdout] 24 | fn create_energy_map(dumbo_octopuses_input: &Vec) -> Vec> { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 24 - fn create_energy_map(dumbo_octopuses_input: &Vec) -> Vec> { [INFO] [stdout] 24 + fn create_energy_map(dumbo_octopuses_input: &[String]) -> Vec> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> src/bin/day11_2/main.rs:68:8 [INFO] [stdout] | [INFO] [stdout] 68 | if flashed_octopus[y as usize][x as usize] == true { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `flashed_octopus[y as usize][x as usize]` [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: this `.fold` can be written more succinctly using another method [INFO] [stdout] --> src/bin/day9_2/main.rs:27:10 [INFO] [stdout] | [INFO] [stdout] 27 | .fold(1, |count, basin_size| count * basin_size) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `product()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fold [INFO] [stdout] = note: `#[warn(clippy::unnecessary_fold)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day9_2/main.rs:30:44 [INFO] [stdout] | [INFO] [stdout] 30 | fn create_lava_tubes_map(lava_tubes_input: &Vec) -> Vec> { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 30 - fn create_lava_tubes_map(lava_tubes_input: &Vec) -> Vec> { [INFO] [stdout] 30 + fn create_lava_tubes_map(lava_tubes_input: &[String]) -> Vec> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day9_2/main.rs:61:28 [INFO] [stdout] | [INFO] [stdout] 61 | risk_levels_positions: &Vec, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 61 - risk_levels_positions: &Vec, [INFO] [stdout] 61 + risk_levels_positions: &[RiskLevelPosition], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> src/bin/day9_2/main.rs:93:8 [INFO] [stdout] | [INFO] [stdout] 93 | if already_added_positions[y as usize][x as usize] == true { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `already_added_positions[y as usize][x as usize]` [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day9_2/main.rs:106:67 [INFO] [stdout] | [INFO] [stdout] 106 | fn is_the_lowest_vertical_adjacent_level(i: usize, j: usize, map: &Vec>) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 106 - fn is_the_lowest_vertical_adjacent_level(i: usize, j: usize, map: &Vec>) -> bool { [INFO] [stdout] 106 + fn is_the_lowest_vertical_adjacent_level(i: usize, j: usize, map: &[Vec]) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day9_2/main.rs:111:69 [INFO] [stdout] | [INFO] [stdout] 111 | fn is_the_lowest_horizontal_adjacent_level(i: usize, j: usize, map: &Vec>) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 111 - fn is_the_lowest_horizontal_adjacent_level(i: usize, j: usize, map: &Vec>) -> bool { [INFO] [stdout] 111 + fn is_the_lowest_horizontal_adjacent_level(i: usize, j: usize, map: &[Vec]) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/day3_1/main.rs:47:5 [INFO] [stdout] | [INFO] [stdout] 47 | return gamma_rate * epsilon_rate; [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] 47 - return gamma_rate * epsilon_rate; [INFO] [stdout] 47 + gamma_rate * epsilon_rate [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/bin/day16_1/main.rs:94:13 [INFO] [stdout] | [INFO] [stdout] 94 | version: version, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `version` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/bin/day16_1/main.rs:95:13 [INFO] [stdout] | [INFO] [stdout] 95 | type_id: type_id, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `type_id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.fold` can be written more succinctly using another method [INFO] [stdout] --> src/bin/day6/main.rs:40:10 [INFO] [stdout] | [INFO] [stdout] 40 | .fold(0, |count, fishes| count + fishes) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `sum()` [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: redundant field names in struct initialization [INFO] [stdout] --> src/bin/day16_1/main.rs:96:13 [INFO] [stdout] | [INFO] [stdout] 96 | sub_packets: sub_packets, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `sub_packets` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/bin/day16_1/main.rs:97:13 [INFO] [stdout] | [INFO] [stdout] 97 | length_type: length_type, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `length_type` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/bin/day16_1/main.rs:99:13 [INFO] [stdout] | [INFO] [stdout] 99 | literal: literal, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `literal` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day6/main.rs:43:49 [INFO] [stdout] | [INFO] [stdout] 43 | fn create_laternfishes_state(lanternfish_input: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 43 - fn create_laternfishes_state(lanternfish_input: &Vec) -> Vec { [INFO] [stdout] 43 + fn create_laternfishes_state(lanternfish_input: &[String]) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day11_2/main.rs:24:45 [INFO] [stdout] | [INFO] [stdout] 24 | fn create_energy_map(dumbo_octopuses_input: &Vec) -> Vec> { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 24 - fn create_energy_map(dumbo_octopuses_input: &Vec) -> Vec> { [INFO] [stdout] 24 + fn create_energy_map(dumbo_octopuses_input: &[String]) -> Vec> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> src/bin/day11_2/main.rs:68:8 [INFO] [stdout] | [INFO] [stdout] 68 | if flashed_octopus[y as usize][x as usize] == true { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `flashed_octopus[y as usize][x as usize]` [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day16_1/main.rs:45:26 [INFO] [stdout] | [INFO] [stdout] 45 | fn sum_versions(packets: &Vec) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 45 - fn sum_versions(packets: &Vec) -> usize { [INFO] [stdout] 45 + fn sum_versions(packets: &[Packet]) -> usize { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/bin/day17/main.rs:52:19 [INFO] [stdout] | [INFO] [stdout] 52 | while current_y_velocity >= 0 [INFO] [stdout] | ___________________^ [INFO] [stdout] 53 | | || (current_y_velocity < 0 && y_for_step > target_area.start_y) [INFO] [stdout] | |_______________________________________________________________________________^ [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] help: try [INFO] [stdout] | [INFO] [stdout] 52 - while current_y_velocity >= 0 [INFO] [stdout] 53 - || (current_y_velocity < 0 && y_for_step > target_area.start_y) [INFO] [stdout] 52 + while !(current_y_velocity < 0 && y_for_step <= target_area.start_y) [INFO] [stdout] | [INFO] [stdout] 52 - while current_y_velocity >= 0 [INFO] [stdout] 53 - || (current_y_velocity < 0 && y_for_step > target_area.start_y) [INFO] [stdout] 52 + while current_y_velocity >= 0 || y_for_step > target_area.start_y [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day16_1/main.rs:105:39 [INFO] [stdout] | [INFO] [stdout] 105 | fn parse_literal_packet(binary_input: &String, mut current_index: usize) -> (u64, 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] 105 - fn parse_literal_packet(binary_input: &String, mut current_index: usize) -> (u64, usize) { [INFO] [stdout] 105 + fn parse_literal_packet(binary_input: &str, mut current_index: usize) -> (u64, usize) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated associated function `std::array::IntoIter::::new`: use `IntoIterator::into_iter` instead [INFO] [stdout] --> src/bin/day10_2/main.rs:80:34 [INFO] [stdout] | [INFO] [stdout] 80 | HashMap::from_iter(IntoIter::new([ [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(deprecated)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated associated function `std::array::IntoIter::::new`: use `IntoIterator::into_iter` instead [INFO] [stdout] --> src/bin/day10_2/main.rs:109:34 [INFO] [stdout] | [INFO] [stdout] 109 | HashMap::from_iter(IntoIter::new([ [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/day1_2/main.rs:16:5 [INFO] [stdout] | [INFO] [stdout] 16 | return count_increased_distances(three_measurements_window_distances); [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] 16 - return count_increased_distances(three_measurements_window_distances); [INFO] [stdout] 16 + count_increased_distances(three_measurements_window_distances) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/bin/day16_1/main.rs:148:57 [INFO] [stdout] | [INFO] [stdout] 148 | let sub_packets_end_index = current_index + length as usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `length` [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day16_1/main.rs:176:51 [INFO] [stdout] | [INFO] [stdout] 176 | fn transform_hex_string_to_binary(bits_hex_input: &Vec) -> String { [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] 176 - fn transform_hex_string_to_binary(bits_hex_input: &Vec) -> String { [INFO] [stdout] 176 + fn transform_hex_string_to_binary(bits_hex_input: &[String]) -> String { [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/day17/main.rs:83:41 [INFO] [stdout] | [INFO] [stdout] 83 | fn parse_target_area(target_area_input: &Vec) -> TargetArea { [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] 83 - fn parse_target_area(target_area_input: &Vec) -> TargetArea { [INFO] [stdout] 83 + fn parse_target_area(target_area_input: &[String]) -> TargetArea { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/day1_2/main.rs:39:5 [INFO] [stdout] | [INFO] [stdout] 39 | return three_measurements_window_distances; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 39 - return three_measurements_window_distances; [INFO] [stdout] 39 + three_measurements_window_distances [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/day1_2/main.rs:56:5 [INFO] [stdout] | [INFO] [stdout] 56 | return distance_increased_count; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 56 - return distance_increased_count; [INFO] [stdout] 56 + distance_increased_count [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/bin/day8_1/main.rs:25:35 [INFO] [stdout] | [INFO] [stdout] 25 | |count, digit| if *digit != None { count + 1 } else { count }, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: use `Option::is_some()` instead: `digit.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] = note: `#[warn(clippy::partialeq_to_none)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day10_2/main.rs:54:11 [INFO] [stdout] | [INFO] [stdout] 54 | line: &String, [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] 54 - line: &String, [INFO] [stdout] 54 + line: &str, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `y` is used to index `cave_risk_map` [INFO] [stdout] --> src/bin/day15_2/main.rs:60:22 [INFO] [stdout] | [INFO] [stdout] 60 | for y in 0..cave_length { [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] 60 - for y in 0..cave_length { [INFO] [stdout] 60 + for (y, ) in cave_risk_map.iter().enumerate().take(cave_length) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `x` is used to index `cave_risk_map` [INFO] [stdout] --> src/bin/day15_2/main.rs:61:26 [INFO] [stdout] | [INFO] [stdout] 61 | for x in 0..cave_length { [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] 61 - for x in 0..cave_length { [INFO] [stdout] 61 + for (x, ) in cave_risk_map.iter().enumerate().take(cave_length) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day15_2/main.rs:69:25 [INFO] [stdout] | [INFO] [stdout] 69 | / extended_cave_risk_map[current_y_pos][current_x_pos] = [INFO] [stdout] 70 | | extended_cave_risk_map[current_y_pos][current_x_pos] - MAX_RISK; [INFO] [stdout] | |___________________________________________________________________________________________^ help: replace it with: `extended_cave_risk_map[current_y_pos][current_x_pos] -= MAX_RISK` [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 function has too many arguments (8/7) [INFO] [stdout] --> src/bin/day15_2/main.rs:80:1 [INFO] [stdout] | [INFO] [stdout] 80 | / fn explore_cave_to_get_risk_from_point( [INFO] [stdout] 81 | | cave_risk_map: &Vec>, [INFO] [stdout] 82 | | cave_min_risk_cache: &mut Vec>>, [INFO] [stdout] 83 | | previous_visited_caves: &HashMap<(i32, i32), bool>, [INFO] [stdout] ... | [INFO] [stdout] 88 | | previous_risk: i32, [INFO] [stdout] 89 | | ) -> i32 { [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: unneeded `return` statement [INFO] [stdout] --> src/bin/day15_2/main.rs:134:13 [INFO] [stdout] | [INFO] [stdout] 134 | return risk + current_risk; [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] 134 - return risk + current_risk; [INFO] [stdout] 134 + risk + current_risk [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/bin/day18_1/main.rs:34:9 [INFO] [stdout] | [INFO] [stdout] 34 | let magnitude_x: i32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ created here [INFO] [stdout] 35 | let magnitude_y: i32; [INFO] [stdout] 36 | / magnitude_x = 3 * match &self.x { [INFO] [stdout] 37 | | SnailFishNumberOption::Complex(number) => number.magnitude(), [INFO] [stdout] 38 | | SnailFishNumberOption::Literal(number) => *number, [INFO] [stdout] 39 | | }; [INFO] [stdout] | |_________^ initialised here [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 `magnitude_x` here [INFO] [stdout] | [INFO] [stdout] 34 ~ [INFO] [stdout] 35 | let magnitude_y: i32; [INFO] [stdout] 36 ~ let magnitude_x: i32 = 3 * match &self.x { [INFO] [stdout] 37 + SnailFishNumberOption::Complex(number) => number.magnitude(), [INFO] [stdout] 38 + SnailFishNumberOption::Literal(number) => *number, [INFO] [stdout] 39 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/day15_2/main.rs:193:13 [INFO] [stdout] | [INFO] [stdout] 193 | return minimum_risk; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 193 - return minimum_risk; [INFO] [stdout] 193 + minimum_risk [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/bin/day18_1/main.rs:35:9 [INFO] [stdout] | [INFO] [stdout] 35 | let magnitude_y: i32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ created here [INFO] [stdout] ... [INFO] [stdout] 41 | / magnitude_y = 2 * match &self.y { [INFO] [stdout] 42 | | SnailFishNumberOption::Complex(number) => number.magnitude(), [INFO] [stdout] 43 | | SnailFishNumberOption::Literal(number) => *number, [INFO] [stdout] 44 | | }; [INFO] [stdout] | |_________^ initialised here [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 `magnitude_y` here [INFO] [stdout] | [INFO] [stdout] 35 ~ [INFO] [stdout] 36 | magnitude_x = 3 * match &self.x { [INFO] [stdout] ... [INFO] [stdout] 40 | [INFO] [stdout] 41 ~ let magnitude_y: i32 = 2 * match &self.y { [INFO] [stdout] 42 + SnailFishNumberOption::Complex(number) => number.magnitude(), [INFO] [stdout] 43 + SnailFishNumberOption::Literal(number) => *number, [INFO] [stdout] 44 ~ }; [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/day11_1/main.rs:24:45 [INFO] [stdout] | [INFO] [stdout] 24 | fn create_energy_map(dumbo_octopuses_input: &Vec) -> Vec> { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 24 - fn create_energy_map(dumbo_octopuses_input: &Vec) -> Vec> { [INFO] [stdout] 24 + fn create_energy_map(dumbo_octopuses_input: &[String]) -> Vec> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/bin/day18_1/main.rs:90:12 [INFO] [stdout] | [INFO] [stdout] 90 | if exploded_x != None && exploded_y != None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: use `Option::is_some()` instead: `exploded_x.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] = note: `#[warn(clippy::partialeq_to_none)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/bin/day18_1/main.rs:90:34 [INFO] [stdout] | [INFO] [stdout] 90 | if exploded_x != None && exploded_y != None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: use `Option::is_some()` instead: `exploded_y.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> src/bin/day11_1/main.rs:68:8 [INFO] [stdout] | [INFO] [stdout] 68 | if flashed_octopus[y as usize][x as usize] == true { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `flashed_octopus[y as usize][x as usize]` [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: binary comparison to literal `Option::None` [INFO] [stdout] --> src/bin/day18_1/main.rs:111:12 [INFO] [stdout] | [INFO] [stdout] 111 | if exploded_x != None && exploded_y != None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: use `Option::is_some()` instead: `exploded_x.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/bin/day18_1/main.rs:111:34 [INFO] [stdout] | [INFO] [stdout] 111 | if exploded_x != None && exploded_y != None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: use `Option::is_some()` instead: `exploded_y.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day18_1/main.rs:189:58 [INFO] [stdout] | [INFO] [stdout] 189 | fn calculate_magnitude_of_all_numbers(snailfish_numbers: &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] 189 - fn calculate_magnitude_of_all_numbers(snailfish_numbers: &Vec) -> i32 { [INFO] [stdout] 189 + fn calculate_magnitude_of_all_numbers(snailfish_numbers: &[SnailFishNumber]) -> i32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `snailfish_numbers` [INFO] [stdout] --> src/bin/day18_1/main.rs:192:14 [INFO] [stdout] | [INFO] [stdout] 192 | for i in 1..snailfish_numbers.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] 192 - for i in 1..snailfish_numbers.len() { [INFO] [stdout] 192 + for in snailfish_numbers.iter().skip(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/day18_1/main.rs:199:50 [INFO] [stdout] | [INFO] [stdout] 199 | fn find_max_magnitude_of_sums(snailfish_numbers: &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] help: change this to [INFO] [stdout] | [INFO] [stdout] 199 - fn find_max_magnitude_of_sums(snailfish_numbers: &Vec) -> i32 { [INFO] [stdout] 199 + fn find_max_magnitude_of_sums(snailfish_numbers: &[SnailFishNumber]) -> i32 { [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/day18_1/main.rs:218:43 [INFO] [stdout] | [INFO] [stdout] 218 | fn parse_snailfish_input(snailfish_input: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 218 - fn parse_snailfish_input(snailfish_input: &Vec) -> Vec { [INFO] [stdout] 218 + fn parse_snailfish_input(snailfish_input: &[String]) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day18_1/main.rs:280:13 [INFO] [stdout] | [INFO] [stdout] 280 | *literal = *literal + number; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `*literal += number` [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: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day18_1/main.rs:291:13 [INFO] [stdout] | [INFO] [stdout] 291 | *literal = *literal + number; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `*literal += number` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/day5_1/main.rs:42:5 [INFO] [stdout] | [INFO] [stdout] 42 | return vec![vec![0; max_y + 1]; max_y + 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] 42 - return vec![vec![0; max_y + 1]; max_y + 1]; [INFO] [stdout] 42 + vec![vec![0; max_y + 1]; max_y + 1] [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day5_1/main.rs:83:29 [INFO] [stdout] | [INFO] [stdout] 83 | fn check_vertical_vent(map: &mut Vec>, vent: &Vent) { [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] 83 - fn check_vertical_vent(map: &mut Vec>, vent: &Vent) { [INFO] [stdout] 83 + fn check_vertical_vent(map: &mut [Vec], vent: &Vent) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `map` [INFO] [stdout] --> src/bin/day5_1/main.rs:96:14 [INFO] [stdout] | [INFO] [stdout] 96 | for i in start..=end { [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] 96 - for i in start..=end { [INFO] [stdout] 96 + for in map.iter_mut().take(end + 1).skip(start) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day5_1/main.rs:101:31 [INFO] [stdout] | [INFO] [stdout] 101 | fn check_horizontal_vent(map: &mut Vec>, vent: &Vent) { [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] 101 - fn check_horizontal_vent(map: &mut Vec>, vent: &Vent) { [INFO] [stdout] 101 + fn check_horizontal_vent(map: &mut [Vec], vent: &Vent) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `map` [INFO] [stdout] --> src/bin/day5_1/main.rs:114:14 [INFO] [stdout] | [INFO] [stdout] 114 | for i in start..=end { [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] 114 - for i in start..=end { [INFO] [stdout] 114 + for in map.iter_mut().take(end + 1).skip(start) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/day1_1/main.rs:28:5 [INFO] [stdout] | [INFO] [stdout] 28 | return distance_increased_count; [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 distance_increased_count; [INFO] [stdout] 28 + distance_increased_count [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/day13_2/main.rs:62:47 [INFO] [stdout] | [INFO] [stdout] 62 | fn create_dots_paper(transparent_paper_input: &Vec) -> Vec> { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 62 - fn create_dots_paper(transparent_paper_input: &Vec) -> Vec> { [INFO] [stdout] 62 + fn create_dots_paper(transparent_paper_input: &[String]) -> Vec> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day13_2/main.rs:96:54 [INFO] [stdout] | [INFO] [stdout] 96 | fn create_fold_instructions(transparent_paper_input: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 96 - fn create_fold_instructions(transparent_paper_input: &Vec) -> Vec { [INFO] [stdout] 96 + fn create_fold_instructions(transparent_paper_input: &[String]) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day13_2/main.rs:115:27 [INFO] [stdout] | [INFO] [stdout] 115 | fn fold_paper(dots_paper: &mut Vec>, folds: &Vec) -> Vec> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 115 ~ fn fold_paper(dots_paper: &mut [Vec], folds: &Vec) -> Vec> { [INFO] [stdout] 116 ~ let mut folded_paper = dots_paper.to_owned(); [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/day13_2/main.rs:129:32 [INFO] [stdout] | [INFO] [stdout] 129 | fn fold_horizontal(dots_paper: &Vec>, fold_position: usize) -> Vec> { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 129 ~ fn fold_horizontal(dots_paper: &[Vec], fold_position: usize) -> Vec> { [INFO] [stdout] 130 ~ let mut folded_paper_first_part = dots_paper.to_owned(); [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/day13_2/main.rs:144:30 [INFO] [stdout] | [INFO] [stdout] 144 | fn fold_vertical(dots_paper: &Vec>, fold_position: usize) -> Vec> { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 144 - fn fold_vertical(dots_paper: &Vec>, fold_position: usize) -> Vec> { [INFO] [stdout] 144 + fn fold_vertical(dots_paper: &[Vec], fold_position: usize) -> Vec> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/bin/day4_2/main.rs:86:17 [INFO] [stdout] | [INFO] [stdout] 86 | for mut bingo_cell in &mut *bingo_line { [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/day4_2/main.rs:45:37 [INFO] [stdout] | [INFO] [stdout] 45 | fn parse_bingo_numbers(bingo_input: &Vec) -> 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] 45 - fn parse_bingo_numbers(bingo_input: &Vec) -> Vec<&str> { [INFO] [stdout] 45 + fn parse_bingo_numbers(bingo_input: &[String]) -> Vec<&str> { [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/day4_2/main.rs:49:36 [INFO] [stdout] | [INFO] [stdout] 49 | fn create_bingo_cards(bingo_input: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 49 - fn create_bingo_cards(bingo_input: &Vec) -> Vec { [INFO] [stdout] 49 + fn create_bingo_cards(bingo_input: &[String]) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `bingo_input` [INFO] [stdout] --> src/bin/day4_2/main.rs:56:14 [INFO] [stdout] | [INFO] [stdout] 56 | for i in 2..bingo_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 [INFO] [stdout] | [INFO] [stdout] 56 - for i in 2..bingo_input.len() { [INFO] [stdout] 56 + for in bingo_input.iter().skip(2) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/bin/day4_2/main.rs:59:12 [INFO] [stdout] | [INFO] [stdout] 59 | if line.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `line.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.fold` can be written more succinctly using another method [INFO] [stdout] --> src/bin/day9_2/main.rs:27:10 [INFO] [stdout] | [INFO] [stdout] 27 | .fold(1, |count, basin_size| count * basin_size) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `product()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fold [INFO] [stdout] = note: `#[warn(clippy::unnecessary_fold)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day9_2/main.rs:30:44 [INFO] [stdout] | [INFO] [stdout] 30 | fn create_lava_tubes_map(lava_tubes_input: &Vec) -> Vec> { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 30 - fn create_lava_tubes_map(lava_tubes_input: &Vec) -> Vec> { [INFO] [stdout] 30 + fn create_lava_tubes_map(lava_tubes_input: &[String]) -> Vec> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day9_2/main.rs:61:28 [INFO] [stdout] | [INFO] [stdout] 61 | risk_levels_positions: &Vec, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 61 - risk_levels_positions: &Vec, [INFO] [stdout] 61 + risk_levels_positions: &[RiskLevelPosition], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> src/bin/day9_2/main.rs:93:8 [INFO] [stdout] | [INFO] [stdout] 93 | if already_added_positions[y as usize][x as usize] == true { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `already_added_positions[y as usize][x as usize]` [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day9_2/main.rs:106:67 [INFO] [stdout] | [INFO] [stdout] 106 | fn is_the_lowest_vertical_adjacent_level(i: usize, j: usize, map: &Vec>) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 106 - fn is_the_lowest_vertical_adjacent_level(i: usize, j: usize, map: &Vec>) -> bool { [INFO] [stdout] 106 + fn is_the_lowest_vertical_adjacent_level(i: usize, j: usize, map: &[Vec]) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day9_2/main.rs:111:69 [INFO] [stdout] | [INFO] [stdout] 111 | fn is_the_lowest_horizontal_adjacent_level(i: usize, j: usize, map: &Vec>) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 111 - fn is_the_lowest_horizontal_adjacent_level(i: usize, j: usize, map: &Vec>) -> bool { [INFO] [stdout] 111 + fn is_the_lowest_horizontal_adjacent_level(i: usize, j: usize, map: &[Vec]) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/bin/day8_1/main.rs:25:35 [INFO] [stdout] | [INFO] [stdout] 25 | |count, digit| if *digit != None { count + 1 } else { count }, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: use `Option::is_some()` instead: `digit.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] = note: `#[warn(clippy::partialeq_to_none)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/bin/day4_2/main.rs:86:17 [INFO] [stdout] | [INFO] [stdout] 86 | for mut bingo_cell in &mut *bingo_line { [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/day11_1/main.rs:24:45 [INFO] [stdout] | [INFO] [stdout] 24 | fn create_energy_map(dumbo_octopuses_input: &Vec) -> Vec> { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 24 - fn create_energy_map(dumbo_octopuses_input: &Vec) -> Vec> { [INFO] [stdout] 24 + fn create_energy_map(dumbo_octopuses_input: &[String]) -> Vec> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day13_1/main.rs:47:47 [INFO] [stdout] | [INFO] [stdout] 47 | fn create_dots_paper(transparent_paper_input: &Vec) -> Vec> { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 47 - fn create_dots_paper(transparent_paper_input: &Vec) -> Vec> { [INFO] [stdout] 47 + fn create_dots_paper(transparent_paper_input: &[String]) -> Vec> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> src/bin/day11_1/main.rs:68:8 [INFO] [stdout] | [INFO] [stdout] 68 | if flashed_octopus[y as usize][x as usize] == true { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `flashed_octopus[y as usize][x as usize]` [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day13_1/main.rs:81:54 [INFO] [stdout] | [INFO] [stdout] 81 | fn create_fold_instructions(transparent_paper_input: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 81 - fn create_fold_instructions(transparent_paper_input: &Vec) -> Vec { [INFO] [stdout] 81 + fn create_fold_instructions(transparent_paper_input: &[String]) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day13_1/main.rs:100:27 [INFO] [stdout] | [INFO] [stdout] 100 | fn fold_paper(dots_paper: &mut Vec>, folds: &Vec) -> Vec> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 100 ~ fn fold_paper(dots_paper: &mut [Vec], folds: &Vec) -> Vec> { [INFO] [stdout] 101 | let fold = &folds[0]; [INFO] [stdout] 102 ~ let mut folded_paper = dots_paper.to_owned(); [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/day13_1/main.rs:100:55 [INFO] [stdout] | [INFO] [stdout] 100 | fn fold_paper(dots_paper: &mut Vec>, folds: &Vec) -> Vec> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 100 - fn fold_paper(dots_paper: &mut Vec>, folds: &Vec) -> Vec> { [INFO] [stdout] 100 + fn fold_paper(dots_paper: &mut Vec>, folds: &[FoldInstruction]) -> Vec> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day13_1/main.rs:113:32 [INFO] [stdout] | [INFO] [stdout] 113 | fn fold_horizontal(dots_paper: &Vec>, fold_position: usize) -> Vec> { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 113 ~ fn fold_horizontal(dots_paper: &[Vec], fold_position: usize) -> Vec> { [INFO] [stdout] 114 ~ let mut folded_paper_first_part = dots_paper.to_owned(); [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/day13_1/main.rs:128:30 [INFO] [stdout] | [INFO] [stdout] 128 | fn fold_vertical(dots_paper: &Vec>, fold_position: usize) -> Vec> { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 128 - fn fold_vertical(dots_paper: &Vec>, fold_position: usize) -> Vec> { [INFO] [stdout] 128 + fn fold_vertical(dots_paper: &[Vec], fold_position: usize) -> Vec> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/day5_2/main.rs:42:5 [INFO] [stdout] | [INFO] [stdout] 42 | return vec![vec![0; max_y + 1]; max_y + 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] 42 - return vec![vec![0; max_y + 1]; max_y + 1]; [INFO] [stdout] 42 + vec![vec![0; max_y + 1]; max_y + 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/day4_2/main.rs:45:37 [INFO] [stdout] | [INFO] [stdout] 45 | fn parse_bingo_numbers(bingo_input: &Vec) -> 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] 45 - fn parse_bingo_numbers(bingo_input: &Vec) -> Vec<&str> { [INFO] [stdout] 45 + fn parse_bingo_numbers(bingo_input: &[String]) -> Vec<&str> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated associated function `std::array::IntoIter::::new`: use `IntoIterator::into_iter` instead [INFO] [stdout] --> src/bin/day10_2/main.rs:80:34 [INFO] [stdout] | [INFO] [stdout] 80 | HashMap::from_iter(IntoIter::new([ [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(deprecated)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/day3_1/main.rs:47:5 [INFO] [stdout] | [INFO] [stdout] 47 | return gamma_rate * epsilon_rate; [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] 47 - return gamma_rate * epsilon_rate; [INFO] [stdout] 47 + gamma_rate * epsilon_rate [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated associated function `std::array::IntoIter::::new`: use `IntoIterator::into_iter` instead [INFO] [stdout] --> src/bin/day10_2/main.rs:109:34 [INFO] [stdout] | [INFO] [stdout] 109 | HashMap::from_iter(IntoIter::new([ [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/day4_2/main.rs:49:36 [INFO] [stdout] | [INFO] [stdout] 49 | fn create_bingo_cards(bingo_input: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 49 - fn create_bingo_cards(bingo_input: &Vec) -> Vec { [INFO] [stdout] 49 + fn create_bingo_cards(bingo_input: &[String]) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `bingo_input` [INFO] [stdout] --> src/bin/day4_2/main.rs:56:14 [INFO] [stdout] | [INFO] [stdout] 56 | for i in 2..bingo_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 [INFO] [stdout] | [INFO] [stdout] 56 - for i in 2..bingo_input.len() { [INFO] [stdout] 56 + for in bingo_input.iter().skip(2) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/bin/day4_2/main.rs:59:12 [INFO] [stdout] | [INFO] [stdout] 59 | if line.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `line.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day5_2/main.rs:85:29 [INFO] [stdout] | [INFO] [stdout] 85 | fn check_vertical_vent(map: &mut Vec>, vent: &Vent) { [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] 85 - fn check_vertical_vent(map: &mut Vec>, vent: &Vent) { [INFO] [stdout] 85 + fn check_vertical_vent(map: &mut [Vec], vent: &Vent) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `map` [INFO] [stdout] --> src/bin/day5_2/main.rs:98:14 [INFO] [stdout] | [INFO] [stdout] 98 | for i in start..=end { [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] 98 - for i in start..=end { [INFO] [stdout] 98 + for in map.iter_mut().take(end + 1).skip(start) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/day3_2/main.rs:23:5 [INFO] [stdout] | [INFO] [stdout] 23 | return oxygen_rating * scrubber_rating; [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 oxygen_rating * scrubber_rating; [INFO] [stdout] 23 + oxygen_rating * scrubber_rating [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day5_2/main.rs:103:31 [INFO] [stdout] | [INFO] [stdout] 103 | fn check_horizontal_vent(map: &mut Vec>, vent: &Vent) { [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] 103 - fn check_horizontal_vent(map: &mut Vec>, vent: &Vent) { [INFO] [stdout] 103 + fn check_horizontal_vent(map: &mut [Vec], vent: &Vent) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `map` [INFO] [stdout] --> src/bin/day5_2/main.rs:116:14 [INFO] [stdout] | [INFO] [stdout] 116 | for i in start..=end { [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] 116 - for i in start..=end { [INFO] [stdout] 116 + for in map.iter_mut().take(end + 1).skip(start) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day5_2/main.rs:121:29 [INFO] [stdout] | [INFO] [stdout] 121 | fn check_diagonal_vent(map: &mut Vec>, vent: &Vent) { [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] 121 - fn check_diagonal_vent(map: &mut Vec>, vent: &Vent) { [INFO] [stdout] 121 + fn check_diagonal_vent(map: &mut [Vec], vent: &Vent) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/day2_1/main.rs:30:5 [INFO] [stdout] | [INFO] [stdout] 30 | return depth * horizontal_position; [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] 30 - return depth * horizontal_position; [INFO] [stdout] 30 + depth * horizontal_position [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day10_2/main.rs:54:11 [INFO] [stdout] | [INFO] [stdout] 54 | line: &String, [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] 54 - line: &String, [INFO] [stdout] 54 + line: &str, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.fold` can be written more succinctly using another method [INFO] [stdout] --> src/bin/day9_1/main.rs:19:10 [INFO] [stdout] | [INFO] [stdout] 19 | .fold(0, |count, risk_level| count + risk_level) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `sum()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fold [INFO] [stdout] = note: `#[warn(clippy::unnecessary_fold)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day9_1/main.rs:22:44 [INFO] [stdout] | [INFO] [stdout] 22 | fn create_lava_tubes_map(lava_tubes_input: &Vec) -> Vec> { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 22 - fn create_lava_tubes_map(lava_tubes_input: &Vec) -> Vec> { [INFO] [stdout] 22 + fn create_lava_tubes_map(lava_tubes_input: &[String]) -> Vec> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day9_1/main.rs:50:67 [INFO] [stdout] | [INFO] [stdout] 50 | fn is_the_lowest_vertical_adjacent_level(i: usize, j: usize, map: &Vec>) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 50 - fn is_the_lowest_vertical_adjacent_level(i: usize, j: usize, map: &Vec>) -> bool { [INFO] [stdout] 50 + fn is_the_lowest_vertical_adjacent_level(i: usize, j: usize, map: &[Vec]) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/bin/day7_1/main.rs:24:12 [INFO] [stdout] | [INFO] [stdout] 24 | if minimum_fuel == None || minimum_fuel.unwrap() > spent_fuel { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `minimum_fuel.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] = note: `#[warn(clippy::partialeq_to_none)]` 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/day9_1/main.rs:55:69 [INFO] [stdout] | [INFO] [stdout] 55 | fn is_the_lowest_horizontal_adjacent_level(i: usize, j: usize, map: &Vec>) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 55 - fn is_the_lowest_horizontal_adjacent_level(i: usize, j: usize, map: &Vec>) -> bool { [INFO] [stdout] 55 + fn is_the_lowest_horizontal_adjacent_level(i: usize, j: usize, map: &[Vec]) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day7_1/main.rs:34:50 [INFO] [stdout] | [INFO] [stdout] 34 | fn create_crabs_positions(crabs_positions_input: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 34 - fn create_crabs_positions(crabs_positions_input: &Vec) -> Vec { [INFO] [stdout] 34 + fn create_crabs_positions(crabs_positions_input: &[String]) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `y` is used to index `cave_risk_map` [INFO] [stdout] --> src/bin/day15_2/main.rs:60:22 [INFO] [stdout] | [INFO] [stdout] 60 | for y in 0..cave_length { [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] 60 - for y in 0..cave_length { [INFO] [stdout] 60 + for (y, ) in cave_risk_map.iter().enumerate().take(cave_length) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/bin/day16_2/main.rs:159:13 [INFO] [stdout] | [INFO] [stdout] 159 | version: version, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `version` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `x` is used to index `cave_risk_map` [INFO] [stdout] --> src/bin/day15_2/main.rs:61:26 [INFO] [stdout] | [INFO] [stdout] 61 | for x in 0..cave_length { [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] 61 - for x in 0..cave_length { [INFO] [stdout] 61 + for (x, ) in cave_risk_map.iter().enumerate().take(cave_length) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/bin/day16_2/main.rs:160:13 [INFO] [stdout] | [INFO] [stdout] 160 | type_id: type_id, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `type_id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/bin/day16_2/main.rs:161:13 [INFO] [stdout] | [INFO] [stdout] 161 | sub_packets: sub_packets, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `sub_packets` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/bin/day16_2/main.rs:162:13 [INFO] [stdout] | [INFO] [stdout] 162 | length_type: length_type, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `length_type` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/bin/day16_2/main.rs:164:13 [INFO] [stdout] | [INFO] [stdout] 164 | literal: literal, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `literal` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day15_2/main.rs:69:25 [INFO] [stdout] | [INFO] [stdout] 69 | / extended_cave_risk_map[current_y_pos][current_x_pos] = [INFO] [stdout] 70 | | extended_cave_risk_map[current_y_pos][current_x_pos] - MAX_RISK; [INFO] [stdout] | |___________________________________________________________________________________________^ help: replace it with: `extended_cave_risk_map[current_y_pos][current_x_pos] -= MAX_RISK` [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 function has too many arguments (8/7) [INFO] [stdout] --> src/bin/day15_2/main.rs:80:1 [INFO] [stdout] | [INFO] [stdout] 80 | / fn explore_cave_to_get_risk_from_point( [INFO] [stdout] 81 | | cave_risk_map: &Vec>, [INFO] [stdout] 82 | | cave_min_risk_cache: &mut Vec>>, [INFO] [stdout] 83 | | previous_visited_caves: &HashMap<(i32, i32), bool>, [INFO] [stdout] ... | [INFO] [stdout] 88 | | previous_risk: i32, [INFO] [stdout] 89 | | ) -> i32 { [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: unneeded `return` statement [INFO] [stdout] --> src/bin/day15_2/main.rs:134:13 [INFO] [stdout] | [INFO] [stdout] 134 | return risk + current_risk; [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] 134 - return risk + current_risk; [INFO] [stdout] 134 + risk + current_risk [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/day15_2/main.rs:193:13 [INFO] [stdout] | [INFO] [stdout] 193 | return minimum_risk; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 193 - return minimum_risk; [INFO] [stdout] 193 + minimum_risk [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `START` contains a capitalized acronym [INFO] [stdout] --> src/bin/day12_1/main.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | START, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Start` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `END` contains a capitalized acronym [INFO] [stdout] --> src/bin/day12_1/main.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | END, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `End` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `SMALL` contains a capitalized acronym [INFO] [stdout] --> src/bin/day12_1/main.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | SMALL, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Small` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `BIG` contains a capitalized acronym [INFO] [stdout] --> src/bin/day12_1/main.rs:11:5 [INFO] [stdout] | [INFO] [stdout] 11 | BIG, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Big` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day12_1/main.rs:89:20 [INFO] [stdout] | [INFO] [stdout] 89 | visited_caves: &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] 89 ~ visited_caves: &[String], [INFO] [stdout] 90 | current_cave_name: String, [INFO] [stdout] ... [INFO] [stdout] 111 | [INFO] [stdout] 112 ~ let mut new_visited_caves = visited_caves.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/bin/day12_1/main.rs:94:8 [INFO] [stdout] | [INFO] [stdout] 94 | if visited_caves.len() > 0 && matches!(current_cave.cave_type, CaveType::START) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!visited_caves.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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day12_1/main.rs:119:49 [INFO] [stdout] | [INFO] [stdout] 119 | path_count + follow_and_count_paths(&caves, &new_visited_caves, linked_cave.clone()) [INFO] [stdout] | ^^^^^^ help: change this to: `caves` [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day16_2/main.rs:72:17 [INFO] [stdout] | [INFO] [stdout] 72 | fn sum(packets: &Vec) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 72 - fn sum(packets: &Vec) -> usize { [INFO] [stdout] 72 + fn sum(packets: &[Packet]) -> usize { [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/day16_2/main.rs:76:21 [INFO] [stdout] | [INFO] [stdout] 76 | fn product(packets: &Vec) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 76 - fn product(packets: &Vec) -> usize { [INFO] [stdout] 76 + fn product(packets: &[Packet]) -> usize { [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/day16_2/main.rs:80:21 [INFO] [stdout] | [INFO] [stdout] 80 | fn maximum(packets: &Vec) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 80 - fn maximum(packets: &Vec) -> usize { [INFO] [stdout] 80 + fn maximum(packets: &[Packet]) -> usize { [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/day16_2/main.rs:86:21 [INFO] [stdout] | [INFO] [stdout] 86 | fn minimum(packets: &Vec) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 86 - fn minimum(packets: &Vec) -> usize { [INFO] [stdout] 86 + fn minimum(packets: &[Packet]) -> usize { [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/day16_2/main.rs:92:16 [INFO] [stdout] | [INFO] [stdout] 92 | fn lt(packets: &Vec) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 92 - fn lt(packets: &Vec) -> usize { [INFO] [stdout] 92 + fn lt(packets: &[Packet]) -> usize { [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/day16_2/main.rs:100:16 [INFO] [stdout] | [INFO] [stdout] 100 | fn gt(packets: &Vec) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 100 - fn gt(packets: &Vec) -> usize { [INFO] [stdout] 100 + fn gt(packets: &[Packet]) -> usize { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated associated function `std::array::IntoIter::::new`: use `IntoIterator::into_iter` instead [INFO] [stdout] --> src/bin/day10_1/main.rs:57:34 [INFO] [stdout] | [INFO] [stdout] 57 | HashMap::from_iter(IntoIter::new([ [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(deprecated)]` 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/day16_2/main.rs:108:16 [INFO] [stdout] | [INFO] [stdout] 108 | fn eq(packets: &Vec) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 108 - fn eq(packets: &Vec) -> usize { [INFO] [stdout] 108 + fn eq(packets: &[Packet]) -> usize { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day16_2/main.rs:170:39 [INFO] [stdout] | [INFO] [stdout] 170 | fn parse_literal_packet(binary_input: &String, mut current_index: usize) -> (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] 170 - fn parse_literal_packet(binary_input: &String, mut current_index: usize) -> (usize, usize) { [INFO] [stdout] 170 + fn parse_literal_packet(binary_input: &str, mut current_index: usize) -> (usize, usize) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/bin/day16_2/main.rs:213:57 [INFO] [stdout] | [INFO] [stdout] 213 | let sub_packets_end_index = current_index + length as usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `length` [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day16_2/main.rs:241:51 [INFO] [stdout] | [INFO] [stdout] 241 | fn transform_hex_string_to_binary(bits_hex_input: &Vec) -> String { [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] 241 - fn transform_hex_string_to_binary(bits_hex_input: &Vec) -> String { [INFO] [stdout] 241 + fn transform_hex_string_to_binary(bits_hex_input: &[String]) -> String { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/bin/day15_1/main.rs:57:1 [INFO] [stdout] | [INFO] [stdout] 57 | / fn explore_cave_to_get_risk_from_point( [INFO] [stdout] 58 | | cave_risk_map: &Vec>, [INFO] [stdout] 59 | | cave_min_risk_cache: &mut Vec>>, [INFO] [stdout] 60 | | previous_visited_caves: &HashMap<(i32, i32), bool>, [INFO] [stdout] ... | [INFO] [stdout] 65 | | previous_risk: i32, [INFO] [stdout] 66 | | ) -> i32 { [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: unneeded `return` statement [INFO] [stdout] --> src/bin/day15_1/main.rs:105:13 [INFO] [stdout] | [INFO] [stdout] 105 | return risk + current_risk; [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] 105 - return risk + current_risk; [INFO] [stdout] 105 + risk + current_risk [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/day15_1/main.rs:164:13 [INFO] [stdout] | [INFO] [stdout] 164 | return minimum_risk; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 164 - return minimum_risk; [INFO] [stdout] 164 + minimum_risk [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day10_1/main.rs:34:11 [INFO] [stdout] | [INFO] [stdout] 34 | line: &String, [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] 34 - line: &String, [INFO] [stdout] 34 + line: &str, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/bin/day16_2/main.rs:159:13 [INFO] [stdout] | [INFO] [stdout] 159 | version: version, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `version` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/bin/day16_2/main.rs:160:13 [INFO] [stdout] | [INFO] [stdout] 160 | type_id: type_id, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `type_id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/bin/day16_2/main.rs:161:13 [INFO] [stdout] | [INFO] [stdout] 161 | sub_packets: sub_packets, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `sub_packets` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/bin/day16_2/main.rs:162:13 [INFO] [stdout] | [INFO] [stdout] 162 | length_type: length_type, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `length_type` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/bin/day16_2/main.rs:164:13 [INFO] [stdout] | [INFO] [stdout] 164 | literal: literal, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `literal` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/bin/day8_2/main.rs:49:30 [INFO] [stdout] | [INFO] [stdout] 49 | entries.push(Entry { digits: digits }); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `digits` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/bin/day8_2/main.rs:66:21 [INFO] [stdout] | [INFO] [stdout] 66 | value: value, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `value` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/bin/day8_2/main.rs:78:21 [INFO] [stdout] | [INFO] [stdout] 78 | value: value, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `value` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/bin/day8_2/main.rs:90:21 [INFO] [stdout] | [INFO] [stdout] 90 | value: value, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `value` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/bin/day8_2/main.rs:102:21 [INFO] [stdout] | [INFO] [stdout] 102 | value: value, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `value` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/bin/day8_2/main.rs:126:25 [INFO] [stdout] | [INFO] [stdout] 126 | value: value, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `value` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/bin/day8_2/main.rs:163:25 [INFO] [stdout] | [INFO] [stdout] 163 | value: value, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `value` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/bin/day8_2/main.rs:172:25 [INFO] [stdout] | [INFO] [stdout] 172 | value: value, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `value` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/bin/day8_2/main.rs:181:25 [INFO] [stdout] | [INFO] [stdout] 181 | value: value, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `value` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/bin/day8_2/main.rs:210:25 [INFO] [stdout] | [INFO] [stdout] 210 | value: value, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `value` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/bin/day8_2/main.rs:219:25 [INFO] [stdout] | [INFO] [stdout] 219 | value: value, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `value` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/day3_2/main.rs:23:5 [INFO] [stdout] | [INFO] [stdout] 23 | return oxygen_rating * scrubber_rating; [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 oxygen_rating * scrubber_rating; [INFO] [stdout] 23 + oxygen_rating * scrubber_rating [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/day13_2/main.rs:62:47 [INFO] [stdout] | [INFO] [stdout] 62 | fn create_dots_paper(transparent_paper_input: &Vec) -> Vec> { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 62 - fn create_dots_paper(transparent_paper_input: &Vec) -> Vec> { [INFO] [stdout] 62 + fn create_dots_paper(transparent_paper_input: &[String]) -> Vec> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day13_2/main.rs:96:54 [INFO] [stdout] | [INFO] [stdout] 96 | fn create_fold_instructions(transparent_paper_input: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 96 - fn create_fold_instructions(transparent_paper_input: &Vec) -> Vec { [INFO] [stdout] 96 + fn create_fold_instructions(transparent_paper_input: &[String]) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day13_2/main.rs:115:27 [INFO] [stdout] | [INFO] [stdout] 115 | fn fold_paper(dots_paper: &mut Vec>, folds: &Vec) -> Vec> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 115 ~ fn fold_paper(dots_paper: &mut [Vec], folds: &Vec) -> Vec> { [INFO] [stdout] 116 ~ let mut folded_paper = dots_paper.to_owned(); [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/day13_2/main.rs:129:32 [INFO] [stdout] | [INFO] [stdout] 129 | fn fold_horizontal(dots_paper: &Vec>, fold_position: usize) -> Vec> { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 129 ~ fn fold_horizontal(dots_paper: &[Vec], fold_position: usize) -> Vec> { [INFO] [stdout] 130 ~ let mut folded_paper_first_part = dots_paper.to_owned(); [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/day13_2/main.rs:144:30 [INFO] [stdout] | [INFO] [stdout] 144 | fn fold_vertical(dots_paper: &Vec>, fold_position: usize) -> Vec> { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 144 - fn fold_vertical(dots_paper: &Vec>, fold_position: usize) -> Vec> { [INFO] [stdout] 144 + fn fold_vertical(dots_paper: &[Vec], fold_position: usize) -> Vec> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/day5_1/main.rs:42:5 [INFO] [stdout] | [INFO] [stdout] 42 | return vec![vec![0; max_y + 1]; max_y + 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] 42 - return vec![vec![0; max_y + 1]; max_y + 1]; [INFO] [stdout] 42 + vec![vec![0; max_y + 1]; max_y + 1] [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day5_1/main.rs:83:29 [INFO] [stdout] | [INFO] [stdout] 83 | fn check_vertical_vent(map: &mut Vec>, vent: &Vent) { [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] 83 - fn check_vertical_vent(map: &mut Vec>, vent: &Vent) { [INFO] [stdout] 83 + fn check_vertical_vent(map: &mut [Vec], vent: &Vent) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `map` [INFO] [stdout] --> src/bin/day5_1/main.rs:96:14 [INFO] [stdout] | [INFO] [stdout] 96 | for i in start..=end { [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] 96 - for i in start..=end { [INFO] [stdout] 96 + for in map.iter_mut().take(end + 1).skip(start) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day5_1/main.rs:101:31 [INFO] [stdout] | [INFO] [stdout] 101 | fn check_horizontal_vent(map: &mut Vec>, vent: &Vent) { [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] 101 - fn check_horizontal_vent(map: &mut Vec>, vent: &Vent) { [INFO] [stdout] 101 + fn check_horizontal_vent(map: &mut [Vec], vent: &Vent) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `map` [INFO] [stdout] --> src/bin/day5_1/main.rs:114:14 [INFO] [stdout] | [INFO] [stdout] 114 | for i in start..=end { [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] 114 - for i in start..=end { [INFO] [stdout] 114 + for in map.iter_mut().take(end + 1).skip(start) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/bin/day16_1/main.rs:94:13 [INFO] [stdout] | [INFO] [stdout] 94 | version: version, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `version` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/bin/day16_1/main.rs:95:13 [INFO] [stdout] | [INFO] [stdout] 95 | type_id: type_id, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `type_id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/bin/day16_1/main.rs:96:13 [INFO] [stdout] | [INFO] [stdout] 96 | sub_packets: sub_packets, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `sub_packets` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/bin/day16_1/main.rs:97:13 [INFO] [stdout] | [INFO] [stdout] 97 | length_type: length_type, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `length_type` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/bin/day16_1/main.rs:99:13 [INFO] [stdout] | [INFO] [stdout] 99 | literal: literal, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `literal` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/day2_1/main.rs:30:5 [INFO] [stdout] | [INFO] [stdout] 30 | return depth * horizontal_position; [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] 30 - return depth * horizontal_position; [INFO] [stdout] 30 + depth * horizontal_position [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/bin/day7_1/main.rs:24:12 [INFO] [stdout] | [INFO] [stdout] 24 | if minimum_fuel == None || minimum_fuel.unwrap() > spent_fuel { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `minimum_fuel.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] = note: `#[warn(clippy::partialeq_to_none)]` 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/day7_1/main.rs:34:50 [INFO] [stdout] | [INFO] [stdout] 34 | fn create_crabs_positions(crabs_positions_input: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 34 - fn create_crabs_positions(crabs_positions_input: &Vec) -> Vec { [INFO] [stdout] 34 + fn create_crabs_positions(crabs_positions_input: &[String]) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/day5_2/main.rs:42:5 [INFO] [stdout] | [INFO] [stdout] 42 | return vec![vec![0; max_y + 1]; max_y + 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] 42 - return vec![vec![0; max_y + 1]; max_y + 1]; [INFO] [stdout] 42 + vec![vec![0; max_y + 1]; max_y + 1] [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day5_2/main.rs:85:29 [INFO] [stdout] | [INFO] [stdout] 85 | fn check_vertical_vent(map: &mut Vec>, vent: &Vent) { [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] 85 - fn check_vertical_vent(map: &mut Vec>, vent: &Vent) { [INFO] [stdout] 85 + fn check_vertical_vent(map: &mut [Vec], vent: &Vent) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `map` [INFO] [stdout] --> src/bin/day5_2/main.rs:98:14 [INFO] [stdout] | [INFO] [stdout] 98 | for i in start..=end { [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] 98 - for i in start..=end { [INFO] [stdout] 98 + for in map.iter_mut().take(end + 1).skip(start) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day5_2/main.rs:103:31 [INFO] [stdout] | [INFO] [stdout] 103 | fn check_horizontal_vent(map: &mut Vec>, vent: &Vent) { [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] 103 - fn check_horizontal_vent(map: &mut Vec>, vent: &Vent) { [INFO] [stdout] 103 + fn check_horizontal_vent(map: &mut [Vec], vent: &Vent) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `map` [INFO] [stdout] --> src/bin/day5_2/main.rs:116:14 [INFO] [stdout] | [INFO] [stdout] 116 | for i in start..=end { [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] 116 - for i in start..=end { [INFO] [stdout] 116 + for in map.iter_mut().take(end + 1).skip(start) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day5_2/main.rs:121:29 [INFO] [stdout] | [INFO] [stdout] 121 | fn check_diagonal_vent(map: &mut Vec>, vent: &Vent) { [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] 121 - fn check_diagonal_vent(map: &mut Vec>, vent: &Vent) { [INFO] [stdout] 121 + fn check_diagonal_vent(map: &mut [Vec], vent: &Vent) { [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/day16_2/main.rs:72:17 [INFO] [stdout] | [INFO] [stdout] 72 | fn sum(packets: &Vec) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 72 - fn sum(packets: &Vec) -> usize { [INFO] [stdout] 72 + fn sum(packets: &[Packet]) -> usize { [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/day16_2/main.rs:76:21 [INFO] [stdout] | [INFO] [stdout] 76 | fn product(packets: &Vec) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 76 - fn product(packets: &Vec) -> usize { [INFO] [stdout] 76 + fn product(packets: &[Packet]) -> usize { [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/day16_2/main.rs:80:21 [INFO] [stdout] | [INFO] [stdout] 80 | fn maximum(packets: &Vec) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 80 - fn maximum(packets: &Vec) -> usize { [INFO] [stdout] 80 + fn maximum(packets: &[Packet]) -> usize { [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/day16_2/main.rs:86:21 [INFO] [stdout] | [INFO] [stdout] 86 | fn minimum(packets: &Vec) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 86 - fn minimum(packets: &Vec) -> usize { [INFO] [stdout] 86 + fn minimum(packets: &[Packet]) -> usize { [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/day16_2/main.rs:92:16 [INFO] [stdout] | [INFO] [stdout] 92 | fn lt(packets: &Vec) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 92 - fn lt(packets: &Vec) -> usize { [INFO] [stdout] 92 + fn lt(packets: &[Packet]) -> usize { [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/day16_2/main.rs:100:16 [INFO] [stdout] | [INFO] [stdout] 100 | fn gt(packets: &Vec) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 100 - fn gt(packets: &Vec) -> usize { [INFO] [stdout] 100 + fn gt(packets: &[Packet]) -> usize { [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/day16_2/main.rs:108:16 [INFO] [stdout] | [INFO] [stdout] 108 | fn eq(packets: &Vec) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 108 - fn eq(packets: &Vec) -> usize { [INFO] [stdout] 108 + fn eq(packets: &[Packet]) -> usize { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated associated function `std::array::IntoIter::::new`: use `IntoIterator::into_iter` instead [INFO] [stdout] --> src/bin/day10_1/main.rs:57:34 [INFO] [stdout] | [INFO] [stdout] 57 | HashMap::from_iter(IntoIter::new([ [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(deprecated)]` 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/day14/main.rs:43:40 [INFO] [stdout] | [INFO] [stdout] 43 | fn get_polymer_template(polymer_input: &Vec) -> String { [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_polymer_template(polymer_input: &Vec) -> String { [INFO] [stdout] 43 + fn get_polymer_template(polymer_input: &[String]) -> String { [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/day14/main.rs:47:39 [INFO] [stdout] | [INFO] [stdout] 47 | fn get_insertion_rules(polymer_input: &Vec) -> HashMap { [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] 47 ~ fn get_insertion_rules(polymer_input: &[String]) -> HashMap { [INFO] [stdout] 48 ~ let insertion_rules_input = polymer_input.to_owned().split_off(2); [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/day14/main.rs:65:49 [INFO] [stdout] | [INFO] [stdout] 65 | let polymer_template = get_polymer_template(&polymer_input); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `polymer_input` [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: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day16_2/main.rs:170:39 [INFO] [stdout] | [INFO] [stdout] 170 | fn parse_literal_packet(binary_input: &String, mut current_index: usize) -> (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] 170 - fn parse_literal_packet(binary_input: &String, mut current_index: usize) -> (usize, usize) { [INFO] [stdout] 170 + fn parse_literal_packet(binary_input: &str, mut current_index: usize) -> (usize, usize) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day10_1/main.rs:34:11 [INFO] [stdout] | [INFO] [stdout] 34 | line: &String, [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] 34 - line: &String, [INFO] [stdout] 34 + line: &str, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/bin/day16_2/main.rs:213:57 [INFO] [stdout] | [INFO] [stdout] 213 | let sub_packets_end_index = current_index + length as usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `length` [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day16_2/main.rs:241:51 [INFO] [stdout] | [INFO] [stdout] 241 | fn transform_hex_string_to_binary(bits_hex_input: &Vec) -> String { [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] 241 - fn transform_hex_string_to_binary(bits_hex_input: &Vec) -> String { [INFO] [stdout] 241 + fn transform_hex_string_to_binary(bits_hex_input: &[String]) -> String { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `START` contains a capitalized acronym [INFO] [stdout] --> src/bin/day12_2/main.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | START, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Start` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `END` contains a capitalized acronym [INFO] [stdout] --> src/bin/day12_2/main.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | END, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `End` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `SMALL` contains a capitalized acronym [INFO] [stdout] --> src/bin/day12_2/main.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | SMALL, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Small` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `BIG` contains a capitalized acronym [INFO] [stdout] --> src/bin/day12_2/main.rs:11:5 [INFO] [stdout] | [INFO] [stdout] 11 | BIG, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Big` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day12_2/main.rs:91:20 [INFO] [stdout] | [INFO] [stdout] 91 | visited_caves: &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] 91 ~ visited_caves: &[String], [INFO] [stdout] 92 | current_cave_name: String, [INFO] [stdout] ... [INFO] [stdout] 125 | [INFO] [stdout] 126 ~ let mut new_visited_caves = visited_caves.to_owned(); [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/day16_1/main.rs:45:26 [INFO] [stdout] | [INFO] [stdout] 45 | fn sum_versions(packets: &Vec) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 45 - fn sum_versions(packets: &Vec) -> usize { [INFO] [stdout] 45 + fn sum_versions(packets: &[Packet]) -> usize { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/bin/day12_2/main.rs:101:8 [INFO] [stdout] | [INFO] [stdout] 101 | if visited_caves.len() > 0 && matches!(current_cave.cave_type, CaveType::START) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!visited_caves.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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day12_2/main.rs:138:21 [INFO] [stdout] | [INFO] [stdout] 138 | &caves, [INFO] [stdout] | ^^^^^^ help: change this to: `caves` [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: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day16_1/main.rs:105:39 [INFO] [stdout] | [INFO] [stdout] 105 | fn parse_literal_packet(binary_input: &String, mut current_index: usize) -> (u64, 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] 105 - fn parse_literal_packet(binary_input: &String, mut current_index: usize) -> (u64, usize) { [INFO] [stdout] 105 + fn parse_literal_packet(binary_input: &str, mut current_index: usize) -> (u64, usize) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/bin/day16_1/main.rs:148:57 [INFO] [stdout] | [INFO] [stdout] 148 | let sub_packets_end_index = current_index + length as usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `length` [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day16_1/main.rs:176:51 [INFO] [stdout] | [INFO] [stdout] 176 | fn transform_hex_string_to_binary(bits_hex_input: &Vec) -> String { [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] 176 - fn transform_hex_string_to_binary(bits_hex_input: &Vec) -> String { [INFO] [stdout] 176 + fn transform_hex_string_to_binary(bits_hex_input: &[String]) -> String { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/day1_1/main.rs:28:5 [INFO] [stdout] | [INFO] [stdout] 28 | return distance_increased_count; [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 distance_increased_count; [INFO] [stdout] 28 + distance_increased_count [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `START` contains a capitalized acronym [INFO] [stdout] --> src/bin/day12_1/main.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | START, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Start` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `END` contains a capitalized acronym [INFO] [stdout] --> src/bin/day12_1/main.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | END, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `End` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `SMALL` contains a capitalized acronym [INFO] [stdout] --> src/bin/day12_1/main.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | SMALL, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Small` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `BIG` contains a capitalized acronym [INFO] [stdout] --> src/bin/day12_1/main.rs:11:5 [INFO] [stdout] | [INFO] [stdout] 11 | BIG, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Big` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day12_1/main.rs:89:20 [INFO] [stdout] | [INFO] [stdout] 89 | visited_caves: &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] 89 ~ visited_caves: &[String], [INFO] [stdout] 90 | current_cave_name: String, [INFO] [stdout] ... [INFO] [stdout] 111 | [INFO] [stdout] 112 ~ let mut new_visited_caves = visited_caves.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/bin/day12_1/main.rs:94:8 [INFO] [stdout] | [INFO] [stdout] 94 | if visited_caves.len() > 0 && matches!(current_cave.cave_type, CaveType::START) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!visited_caves.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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day12_1/main.rs:119:49 [INFO] [stdout] | [INFO] [stdout] 119 | path_count + follow_and_count_paths(&caves, &new_visited_caves, linked_cave.clone()) [INFO] [stdout] | ^^^^^^ help: change this to: `caves` [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: variable does not need to be mutable [INFO] [stdout] --> src/bin/day4_1/main.rs:77:17 [INFO] [stdout] | [INFO] [stdout] 77 | for mut bingo_cell in &mut *bingo_line { [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: binary comparison to literal `Option::None` [INFO] [stdout] --> src/bin/day7_2/main.rs:29:12 [INFO] [stdout] | [INFO] [stdout] 29 | if minimum_fuel == None || minimum_fuel.unwrap() > spent_fuel { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `minimum_fuel.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] = note: `#[warn(clippy::partialeq_to_none)]` 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/day7_2/main.rs:38:50 [INFO] [stdout] | [INFO] [stdout] 38 | fn create_crabs_positions(crabs_positions_input: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 38 - fn create_crabs_positions(crabs_positions_input: &Vec) -> Vec { [INFO] [stdout] 38 + fn create_crabs_positions(crabs_positions_input: &[String]) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/bin/day18_1/main.rs:271:24 [INFO] [stdout] | [INFO] [stdout] 271 | (SnailFishNumber { x: x, y: y }, current_index) [INFO] [stdout] | ^^^^ help: replace it with: `x` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/bin/day18_1/main.rs:271:30 [INFO] [stdout] | [INFO] [stdout] 271 | (SnailFishNumber { x: x, y: y }, current_index) [INFO] [stdout] | ^^^^ help: replace it with: `y` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/day2_2/main.rs:37:5 [INFO] [stdout] | [INFO] [stdout] 37 | return depth * horizontal_position; [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] 37 - return depth * horizontal_position; [INFO] [stdout] 37 + depth * horizontal_position [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/day4_1/main.rs:42:37 [INFO] [stdout] | [INFO] [stdout] 42 | fn parse_bingo_numbers(bingo_input: &Vec) -> 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] 42 - fn parse_bingo_numbers(bingo_input: &Vec) -> Vec<&str> { [INFO] [stdout] 42 + fn parse_bingo_numbers(bingo_input: &[String]) -> Vec<&str> { [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/day4_1/main.rs:46:36 [INFO] [stdout] | [INFO] [stdout] 46 | fn create_bingo_cards(bingo_input: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 46 - fn create_bingo_cards(bingo_input: &Vec) -> Vec { [INFO] [stdout] 46 + fn create_bingo_cards(bingo_input: &[String]) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `bingo_input` [INFO] [stdout] --> src/bin/day4_1/main.rs:50:14 [INFO] [stdout] | [INFO] [stdout] 50 | for i in 2..bingo_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 [INFO] [stdout] | [INFO] [stdout] 50 - for i in 2..bingo_input.len() { [INFO] [stdout] 50 + for in bingo_input.iter().skip(2) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/bin/day4_1/main.rs:53:12 [INFO] [stdout] | [INFO] [stdout] 53 | if line.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `line.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#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/day15_1/main.rs:57:1 [INFO] [stdout] | [INFO] [stdout] 57 | / fn explore_cave_to_get_risk_from_point( [INFO] [stdout] 58 | | cave_risk_map: &Vec>, [INFO] [stdout] 59 | | cave_min_risk_cache: &mut Vec>>, [INFO] [stdout] 60 | | previous_visited_caves: &HashMap<(i32, i32), bool>, [INFO] [stdout] ... | [INFO] [stdout] 65 | | previous_risk: i32, [INFO] [stdout] 66 | | ) -> i32 { [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: unneeded `return` statement [INFO] [stdout] --> src/bin/day15_1/main.rs:105:13 [INFO] [stdout] | [INFO] [stdout] 105 | return risk + current_risk; [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] 105 - return risk + current_risk; [INFO] [stdout] 105 + risk + current_risk [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/day15_1/main.rs:164:13 [INFO] [stdout] | [INFO] [stdout] 164 | return minimum_risk; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 164 - return minimum_risk; [INFO] [stdout] 164 + minimum_risk [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/bin/day8_2/main.rs:49:30 [INFO] [stdout] | [INFO] [stdout] 49 | entries.push(Entry { digits: digits }); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `digits` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/bin/day8_2/main.rs:66:21 [INFO] [stdout] | [INFO] [stdout] 66 | value: value, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `value` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/bin/day8_2/main.rs:78:21 [INFO] [stdout] | [INFO] [stdout] 78 | value: value, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `value` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/bin/day8_2/main.rs:90:21 [INFO] [stdout] | [INFO] [stdout] 90 | value: value, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `value` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/bin/day8_2/main.rs:102:21 [INFO] [stdout] | [INFO] [stdout] 102 | value: value, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `value` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/bin/day8_2/main.rs:126:25 [INFO] [stdout] | [INFO] [stdout] 126 | value: value, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `value` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/bin/day8_2/main.rs:163:25 [INFO] [stdout] | [INFO] [stdout] 163 | value: value, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `value` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/bin/day8_2/main.rs:172:25 [INFO] [stdout] | [INFO] [stdout] 172 | value: value, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `value` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/bin/day8_2/main.rs:181:25 [INFO] [stdout] | [INFO] [stdout] 181 | value: value, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `value` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/bin/day8_2/main.rs:210:25 [INFO] [stdout] | [INFO] [stdout] 210 | value: value, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `value` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/bin/day8_2/main.rs:219:25 [INFO] [stdout] | [INFO] [stdout] 219 | value: value, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `value` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day14/main.rs:43:40 [INFO] [stdout] | [INFO] [stdout] 43 | fn get_polymer_template(polymer_input: &Vec) -> String { [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_polymer_template(polymer_input: &Vec) -> String { [INFO] [stdout] 43 + fn get_polymer_template(polymer_input: &[String]) -> String { [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/day14/main.rs:47:39 [INFO] [stdout] | [INFO] [stdout] 47 | fn get_insertion_rules(polymer_input: &Vec) -> HashMap { [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] 47 ~ fn get_insertion_rules(polymer_input: &[String]) -> HashMap { [INFO] [stdout] 48 ~ let insertion_rules_input = polymer_input.to_owned().split_off(2); [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/day14/main.rs:65:49 [INFO] [stdout] | [INFO] [stdout] 65 | let polymer_template = get_polymer_template(&polymer_input); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `polymer_input` [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: name `START` contains a capitalized acronym [INFO] [stdout] --> src/bin/day12_2/main.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | START, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Start` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `END` contains a capitalized acronym [INFO] [stdout] --> src/bin/day12_2/main.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | END, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `End` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `SMALL` contains a capitalized acronym [INFO] [stdout] --> src/bin/day12_2/main.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | SMALL, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Small` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `BIG` contains a capitalized acronym [INFO] [stdout] --> src/bin/day12_2/main.rs:11:5 [INFO] [stdout] | [INFO] [stdout] 11 | BIG, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Big` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/bin/day18_1/main.rs:34:9 [INFO] [stdout] | [INFO] [stdout] 34 | let magnitude_x: i32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ created here [INFO] [stdout] 35 | let magnitude_y: i32; [INFO] [stdout] 36 | / magnitude_x = 3 * match &self.x { [INFO] [stdout] 37 | | SnailFishNumberOption::Complex(number) => number.magnitude(), [INFO] [stdout] 38 | | SnailFishNumberOption::Literal(number) => *number, [INFO] [stdout] 39 | | }; [INFO] [stdout] | |_________^ initialised here [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 `magnitude_x` here [INFO] [stdout] | [INFO] [stdout] 34 ~ [INFO] [stdout] 35 | let magnitude_y: i32; [INFO] [stdout] 36 ~ let magnitude_x: i32 = 3 * match &self.x { [INFO] [stdout] 37 + SnailFishNumberOption::Complex(number) => number.magnitude(), [INFO] [stdout] 38 + SnailFishNumberOption::Literal(number) => *number, [INFO] [stdout] 39 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/day2_2/main.rs:37:5 [INFO] [stdout] | [INFO] [stdout] 37 | return depth * horizontal_position; [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] 37 - return depth * horizontal_position; [INFO] [stdout] 37 + depth * horizontal_position [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/bin/day4_1/main.rs:77:17 [INFO] [stdout] | [INFO] [stdout] 77 | for mut bingo_cell in &mut *bingo_line { [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: unneeded late initialization [INFO] [stdout] --> src/bin/day18_1/main.rs:35:9 [INFO] [stdout] | [INFO] [stdout] 35 | let magnitude_y: i32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ created here [INFO] [stdout] ... [INFO] [stdout] 41 | / magnitude_y = 2 * match &self.y { [INFO] [stdout] 42 | | SnailFishNumberOption::Complex(number) => number.magnitude(), [INFO] [stdout] 43 | | SnailFishNumberOption::Literal(number) => *number, [INFO] [stdout] 44 | | }; [INFO] [stdout] | |_________^ initialised here [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 `magnitude_y` here [INFO] [stdout] | [INFO] [stdout] 35 ~ [INFO] [stdout] 36 | magnitude_x = 3 * match &self.x { [INFO] [stdout] ... [INFO] [stdout] 40 | [INFO] [stdout] 41 ~ let magnitude_y: i32 = 2 * match &self.y { [INFO] [stdout] 42 + SnailFishNumberOption::Complex(number) => number.magnitude(), [INFO] [stdout] 43 + SnailFishNumberOption::Literal(number) => *number, [INFO] [stdout] 44 ~ }; [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/day12_2/main.rs:91:20 [INFO] [stdout] | [INFO] [stdout] 91 | visited_caves: &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] 91 ~ visited_caves: &[String], [INFO] [stdout] 92 | current_cave_name: String, [INFO] [stdout] ... [INFO] [stdout] 125 | [INFO] [stdout] 126 ~ let mut new_visited_caves = visited_caves.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/bin/day18_1/main.rs:90:12 [INFO] [stdout] | [INFO] [stdout] 90 | if exploded_x != None && exploded_y != None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: use `Option::is_some()` instead: `exploded_x.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] = note: `#[warn(clippy::partialeq_to_none)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/bin/day18_1/main.rs:90:34 [INFO] [stdout] | [INFO] [stdout] 90 | if exploded_x != None && exploded_y != None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: use `Option::is_some()` instead: `exploded_y.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/bin/day18_1/main.rs:111:12 [INFO] [stdout] | [INFO] [stdout] 111 | if exploded_x != None && exploded_y != None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: use `Option::is_some()` instead: `exploded_x.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/bin/day18_1/main.rs:111:34 [INFO] [stdout] | [INFO] [stdout] 111 | if exploded_x != None && exploded_y != None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: use `Option::is_some()` instead: `exploded_y.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/bin/day12_2/main.rs:101:8 [INFO] [stdout] | [INFO] [stdout] 101 | if visited_caves.len() > 0 && matches!(current_cave.cave_type, CaveType::START) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!visited_caves.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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day12_2/main.rs:138:21 [INFO] [stdout] | [INFO] [stdout] 138 | &caves, [INFO] [stdout] | ^^^^^^ help: change this to: `caves` [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day4_1/main.rs:42:37 [INFO] [stdout] | [INFO] [stdout] 42 | fn parse_bingo_numbers(bingo_input: &Vec) -> 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] 42 - fn parse_bingo_numbers(bingo_input: &Vec) -> Vec<&str> { [INFO] [stdout] 42 + fn parse_bingo_numbers(bingo_input: &[String]) -> Vec<&str> { [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/day4_1/main.rs:46:36 [INFO] [stdout] | [INFO] [stdout] 46 | fn create_bingo_cards(bingo_input: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 46 - fn create_bingo_cards(bingo_input: &Vec) -> Vec { [INFO] [stdout] 46 + fn create_bingo_cards(bingo_input: &[String]) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `bingo_input` [INFO] [stdout] --> src/bin/day4_1/main.rs:50:14 [INFO] [stdout] | [INFO] [stdout] 50 | for i in 2..bingo_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 [INFO] [stdout] | [INFO] [stdout] 50 - for i in 2..bingo_input.len() { [INFO] [stdout] 50 + for in bingo_input.iter().skip(2) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/bin/day4_1/main.rs:53:12 [INFO] [stdout] | [INFO] [stdout] 53 | if line.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `line.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` 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/day18_1/main.rs:189:58 [INFO] [stdout] | [INFO] [stdout] 189 | fn calculate_magnitude_of_all_numbers(snailfish_numbers: &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] 189 - fn calculate_magnitude_of_all_numbers(snailfish_numbers: &Vec) -> i32 { [INFO] [stdout] 189 + fn calculate_magnitude_of_all_numbers(snailfish_numbers: &[SnailFishNumber]) -> i32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `snailfish_numbers` [INFO] [stdout] --> src/bin/day18_1/main.rs:192:14 [INFO] [stdout] | [INFO] [stdout] 192 | for i in 1..snailfish_numbers.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] 192 - for i in 1..snailfish_numbers.len() { [INFO] [stdout] 192 + for in snailfish_numbers.iter().skip(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/day18_1/main.rs:199:50 [INFO] [stdout] | [INFO] [stdout] 199 | fn find_max_magnitude_of_sums(snailfish_numbers: &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] help: change this to [INFO] [stdout] | [INFO] [stdout] 199 - fn find_max_magnitude_of_sums(snailfish_numbers: &Vec) -> i32 { [INFO] [stdout] 199 + fn find_max_magnitude_of_sums(snailfish_numbers: &[SnailFishNumber]) -> i32 { [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/day18_1/main.rs:218:43 [INFO] [stdout] | [INFO] [stdout] 218 | fn parse_snailfish_input(snailfish_input: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 218 - fn parse_snailfish_input(snailfish_input: &Vec) -> Vec { [INFO] [stdout] 218 + fn parse_snailfish_input(snailfish_input: &[String]) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day18_1/main.rs:280:13 [INFO] [stdout] | [INFO] [stdout] 280 | *literal = *literal + number; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `*literal += number` [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: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day18_1/main.rs:291:13 [INFO] [stdout] | [INFO] [stdout] 291 | *literal = *literal + number; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `*literal += number` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day13_1/main.rs:47:47 [INFO] [stdout] | [INFO] [stdout] 47 | fn create_dots_paper(transparent_paper_input: &Vec) -> Vec> { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 47 - fn create_dots_paper(transparent_paper_input: &Vec) -> Vec> { [INFO] [stdout] 47 + fn create_dots_paper(transparent_paper_input: &[String]) -> Vec> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day13_1/main.rs:81:54 [INFO] [stdout] | [INFO] [stdout] 81 | fn create_fold_instructions(transparent_paper_input: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 81 - fn create_fold_instructions(transparent_paper_input: &Vec) -> Vec { [INFO] [stdout] 81 + fn create_fold_instructions(transparent_paper_input: &[String]) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day13_1/main.rs:100:27 [INFO] [stdout] | [INFO] [stdout] 100 | fn fold_paper(dots_paper: &mut Vec>, folds: &Vec) -> Vec> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 100 ~ fn fold_paper(dots_paper: &mut [Vec], folds: &Vec) -> Vec> { [INFO] [stdout] 101 | let fold = &folds[0]; [INFO] [stdout] 102 ~ let mut folded_paper = dots_paper.to_owned(); [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/day13_1/main.rs:100:55 [INFO] [stdout] | [INFO] [stdout] 100 | fn fold_paper(dots_paper: &mut Vec>, folds: &Vec) -> Vec> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 100 - fn fold_paper(dots_paper: &mut Vec>, folds: &Vec) -> Vec> { [INFO] [stdout] 100 + fn fold_paper(dots_paper: &mut Vec>, folds: &[FoldInstruction]) -> Vec> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/day13_1/main.rs:113:32 [INFO] [stdout] | [INFO] [stdout] 113 | fn fold_horizontal(dots_paper: &Vec>, fold_position: usize) -> Vec> { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 113 ~ fn fold_horizontal(dots_paper: &[Vec], fold_position: usize) -> Vec> { [INFO] [stdout] 114 ~ let mut folded_paper_first_part = dots_paper.to_owned(); [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/day13_1/main.rs:128:30 [INFO] [stdout] | [INFO] [stdout] 128 | fn fold_vertical(dots_paper: &Vec>, fold_position: usize) -> Vec> { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 128 - fn fold_vertical(dots_paper: &Vec>, fold_position: usize) -> Vec> { [INFO] [stdout] 128 + fn fold_vertical(dots_paper: &[Vec], fold_position: usize) -> Vec> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/bin/day17/main.rs:52:19 [INFO] [stdout] | [INFO] [stdout] 52 | while current_y_velocity >= 0 [INFO] [stdout] | ___________________^ [INFO] [stdout] 53 | | || (current_y_velocity < 0 && y_for_step > target_area.start_y) [INFO] [stdout] | |_______________________________________________________________________________^ [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] help: try [INFO] [stdout] | [INFO] [stdout] 52 - while current_y_velocity >= 0 [INFO] [stdout] 53 - || (current_y_velocity < 0 && y_for_step > target_area.start_y) [INFO] [stdout] 52 + while !(current_y_velocity < 0 && y_for_step <= target_area.start_y) [INFO] [stdout] | [INFO] [stdout] 52 - while current_y_velocity >= 0 [INFO] [stdout] 53 - || (current_y_velocity < 0 && y_for_step > target_area.start_y) [INFO] [stdout] 52 + while current_y_velocity >= 0 || y_for_step > target_area.start_y [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/day17/main.rs:83:41 [INFO] [stdout] | [INFO] [stdout] 83 | fn parse_target_area(target_area_input: &Vec) -> TargetArea { [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] 83 - fn parse_target_area(target_area_input: &Vec) -> TargetArea { [INFO] [stdout] 83 + fn parse_target_area(target_area_input: &[String]) -> TargetArea { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/bin/day7_2/main.rs:29:12 [INFO] [stdout] | [INFO] [stdout] 29 | if minimum_fuel == None || minimum_fuel.unwrap() > spent_fuel { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `minimum_fuel.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] = note: `#[warn(clippy::partialeq_to_none)]` 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/day7_2/main.rs:38:50 [INFO] [stdout] | [INFO] [stdout] 38 | fn create_crabs_positions(crabs_positions_input: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 38 - fn create_crabs_positions(crabs_positions_input: &Vec) -> Vec { [INFO] [stdout] 38 + fn create_crabs_positions(crabs_positions_input: &[String]) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 1.38s [INFO] running `Command { std: "docker" "inspect" "9002998ff19f75563b4b25ae7799c13740639b2b8b158bc6aa24502fc0e6c658", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "9002998ff19f75563b4b25ae7799c13740639b2b8b158bc6aa24502fc0e6c658", kill_on_drop: false }` [INFO] [stdout] 9002998ff19f75563b4b25ae7799c13740639b2b8b158bc6aa24502fc0e6c658