[INFO] cloning repository https://github.com/eatmyrust/rust-advent [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/eatmyrust/rust-advent" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Featmyrust%2Frust-advent", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Featmyrust%2Frust-advent'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 7c0457be077e3c52a94f9de48aa60364cf7fb19e [INFO] linting eatmyrust/rust-advent against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Featmyrust%2Frust-advent" "/workspace/builds/worker-2-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-2-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/eatmyrust/rust-advent [INFO] finished tweaking git repo https://github.com/eatmyrust/rust-advent [INFO] tweaked toml for git repo https://github.com/eatmyrust/rust-advent written to /workspace/builds/worker-2-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/eatmyrust/rust-advent 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/eatmyrust/rust-advent already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-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] 395e67c8cca5203d03b43c9d2d21e5fe47d3da7a02ee6df8113db0f57b4c1ef6 [INFO] running `Command { std: "docker" "start" "-a" "395e67c8cca5203d03b43c9d2d21e5fe47d3da7a02ee6df8113db0f57b4c1ef6", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "395e67c8cca5203d03b43c9d2d21e5fe47d3da7a02ee6df8113db0f57b4c1ef6", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "395e67c8cca5203d03b43c9d2d21e5fe47d3da7a02ee6df8113db0f57b4c1ef6", kill_on_drop: false }` [INFO] [stdout] 395e67c8cca5203d03b43c9d2d21e5fe47d3da7a02ee6df8113db0f57b4c1ef6 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-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] ba861431b79e4812af758f0648d2150f6aec1d7c7a68f9f24c86888b2ef1e592 [INFO] running `Command { std: "docker" "start" "-a" "ba861431b79e4812af758f0648d2150f6aec1d7c7a68f9f24c86888b2ef1e592", kill_on_drop: false }` [INFO] [stderr] Checking rust-advent v0.2.1 (/opt/rustwide/workdir) [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/advent/y2022/day2.rs:18:13 [INFO] [stdout] | [INFO] [stdout] 18 | parsed_input: parsed_input, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `parsed_input` [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/advent/y2022/day2.rs:18:13 [INFO] [stdout] | [INFO] [stdout] 18 | parsed_input: parsed_input, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `parsed_input` [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: you don't need to add `&` to all patterns [INFO] [stdout] --> src/advent/y2022/day2.rs:104:9 [INFO] [stdout] | [INFO] [stdout] 104 | / match self { [INFO] [stdout] 105 | | &RockPaperScissors::Rock => 1, [INFO] [stdout] 106 | | &RockPaperScissors::Paper => 2, [INFO] [stdout] 107 | | &RockPaperScissors::Scissors => 3, [INFO] [stdout] 108 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] = note: `#[warn(clippy::match_ref_pats)]` on by default [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 104 ~ match *self { [INFO] [stdout] 105 ~ RockPaperScissors::Rock => 1, [INFO] [stdout] 106 ~ RockPaperScissors::Paper => 2, [INFO] [stdout] 107 ~ RockPaperScissors::Scissors => 3, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> src/advent/y2022/day2.rs:132:9 [INFO] [stdout] | [INFO] [stdout] 132 | / match self { [INFO] [stdout] 133 | | &WinLossDraw::Loss => 0, [INFO] [stdout] 134 | | &WinLossDraw::Draw => 3, [INFO] [stdout] 135 | | &WinLossDraw::Win => 6, [INFO] [stdout] 136 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 132 ~ match *self { [INFO] [stdout] 133 ~ WinLossDraw::Loss => 0, [INFO] [stdout] 134 ~ WinLossDraw::Draw => 3, [INFO] [stdout] 135 ~ WinLossDraw::Win => 6, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/advent/y2022/day3.rs:57:25 [INFO] [stdout] | [INFO] [stdout] 57 | fn split_string_in_half<'a>(string_to_split: &'a str) -> (&'a str, &'a str) { [INFO] [stdout] | ^^ ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 57 - fn split_string_in_half<'a>(string_to_split: &'a str) -> (&'a str, &'a str) { [INFO] [stdout] 57 + fn split_string_in_half(string_to_split: &str) -> (&str, &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/advent/y2022/day3.rs:75:67 [INFO] [stdout] | [INFO] [stdout] 75 | fn calculate_sum_of_priorities_for_items_to_reorganize(rucksacks: &Vec) -> u32 { [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] 75 - fn calculate_sum_of_priorities_for_items_to_reorganize(rucksacks: &Vec) -> u32 { [INFO] [stdout] 75 + fn calculate_sum_of_priorities_for_items_to_reorganize(rucksacks: &[String]) -> u32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/advent/y2022/day3.rs:81:17 [INFO] [stdout] | [INFO] [stdout] 81 | &rucksack_compartments.0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `rucksack_compartments.0` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/advent/y2022/day3.rs:82:17 [INFO] [stdout] | [INFO] [stdout] 82 | &rucksack_compartments.1, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `rucksack_compartments.1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/advent/y2022/day3.rs:90:53 [INFO] [stdout] | [INFO] [stdout] 90 | fn calculate_sum_of_priorities_of_badges(rucksacks: &Vec) -> u32 { [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] 90 - fn calculate_sum_of_priorities_of_badges(rucksacks: &Vec) -> u32 { [INFO] [stdout] 90 + fn calculate_sum_of_priorities_of_badges(rucksacks: &[String]) -> u32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/advent/y2022/day4.rs:80:10 [INFO] [stdout] | [INFO] [stdout] 80 | (&self.start_zone <= &other.start_zone && &self.end_zone >= &other.end_zone) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] = note: `#[warn(clippy::op_ref)]` on by default [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 80 - (&self.start_zone <= &other.start_zone && &self.end_zone >= &other.end_zone) [INFO] [stdout] 80 + (self.start_zone <= other.start_zone && &self.end_zone >= &other.end_zone) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/advent/y2022/day4.rs:80:51 [INFO] [stdout] | [INFO] [stdout] 80 | (&self.start_zone <= &other.start_zone && &self.end_zone >= &other.end_zone) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 80 - (&self.start_zone <= &other.start_zone && &self.end_zone >= &other.end_zone) [INFO] [stdout] 80 + (&self.start_zone <= &other.start_zone && self.end_zone >= other.end_zone) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/advent/y2022/day4.rs:81:17 [INFO] [stdout] | [INFO] [stdout] 81 | || (&self.start_zone >= &other.start_zone && &self.end_zone <= &other.end_zone) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 81 - || (&self.start_zone >= &other.start_zone && &self.end_zone <= &other.end_zone) [INFO] [stdout] 81 + || (self.start_zone >= other.start_zone && &self.end_zone <= &other.end_zone) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/advent/y2022/day4.rs:81:58 [INFO] [stdout] | [INFO] [stdout] 81 | || (&self.start_zone >= &other.start_zone && &self.end_zone <= &other.end_zone) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 81 - || (&self.start_zone >= &other.start_zone && &self.end_zone <= &other.end_zone) [INFO] [stdout] 81 + || (&self.start_zone >= &other.start_zone && self.end_zone <= other.end_zone) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/advent/y2022/day4.rs:85:10 [INFO] [stdout] | [INFO] [stdout] 85 | (&self.start_zone >= &other.start_zone && &self.start_zone <= &other.end_zone) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 85 - (&self.start_zone >= &other.start_zone && &self.start_zone <= &other.end_zone) [INFO] [stdout] 85 + (self.start_zone >= other.start_zone && &self.start_zone <= &other.end_zone) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/advent/y2022/day4.rs:85:51 [INFO] [stdout] | [INFO] [stdout] 85 | (&self.start_zone >= &other.start_zone && &self.start_zone <= &other.end_zone) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 85 - (&self.start_zone >= &other.start_zone && &self.start_zone <= &other.end_zone) [INFO] [stdout] 85 + (&self.start_zone >= &other.start_zone && self.start_zone <= other.end_zone) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/advent/y2022/day4.rs:86:17 [INFO] [stdout] | [INFO] [stdout] 86 | || (&self.end_zone >= &other.start_zone && &self.end_zone <= &other.end_zone) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 86 - || (&self.end_zone >= &other.start_zone && &self.end_zone <= &other.end_zone) [INFO] [stdout] 86 + || (self.end_zone >= other.start_zone && &self.end_zone <= &other.end_zone) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/advent/y2022/day4.rs:86:56 [INFO] [stdout] | [INFO] [stdout] 86 | || (&self.end_zone >= &other.start_zone && &self.end_zone <= &other.end_zone) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 86 - || (&self.end_zone >= &other.start_zone && &self.end_zone <= &other.end_zone) [INFO] [stdout] 86 + || (&self.end_zone >= &other.start_zone && self.end_zone <= other.end_zone) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/advent/y2022/day4.rs:87:47 [INFO] [stdout] | [INFO] [stdout] 87 | || (self.contains_or_contained_in(&other)) [INFO] [stdout] | ^^^^^^ help: change this to: `other` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/advent/y2022/day4.rs:92:38 [INFO] [stdout] | [INFO] [stdout] 92 | cleaning_assingments_to_compare: &Vec<(CleaningAssignment, CleaningAssignment)>, [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 - cleaning_assingments_to_compare: &Vec<(CleaningAssignment, CleaningAssignment)>, [INFO] [stdout] 92 + cleaning_assingments_to_compare: &[(CleaningAssignment, CleaningAssignment)], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/advent/y2022/day5.rs:81:14 [INFO] [stdout] | [INFO] [stdout] 81 | .map(|l| parse_rearrangement_procedure_line(l)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `parse_rearrangement_procedure_line` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/advent/y2023/day1.rs:69:57 [INFO] [stdout] | [INFO] [stdout] 69 | .map(|x| extract_first_and_last_number_into_int(&x)) [INFO] [stdout] | ^^ help: change this to: `x` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/advent/y2023/day2.rs:135:51 [INFO] [stdout] | [INFO] [stdout] 135 | fn check_if_game_is_valid(cubes_revealed_in_game: &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] 135 - fn check_if_game_is_valid(cubes_revealed_in_game: &Vec) -> bool { [INFO] [stdout] 135 + fn check_if_game_is_valid(cubes_revealed_in_game: &[RevealedCubes]) -> 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/advent/y2023/day2.rs:141:50 [INFO] [stdout] | [INFO] [stdout] 141 | fn find_sum_of_identifiers_of_valid_games(games: &Vec) -> u32 { [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] 141 - fn find_sum_of_identifiers_of_valid_games(games: &Vec) -> u32 { [INFO] [stdout] 141 + fn find_sum_of_identifiers_of_valid_games(games: &[Game]) -> u32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/advent/y2023/day3.rs:55:12 [INFO] [stdout] | [INFO] [stdout] 55 | if !current_value.parse::().is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `current_value.parse::().is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/advent/y2023/day3.rs:46:55 [INFO] [stdout] | [INFO] [stdout] 46 | fn combine_split_part_number_descending(split_number: &Vec, start_index: usize) -> 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] 46 - fn combine_split_part_number_descending(split_number: &Vec, start_index: usize) -> String { [INFO] [stdout] 46 + fn combine_split_part_number_descending(split_number: &[String], start_index: usize) -> String { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/advent/y2023/day3.rs:73:12 [INFO] [stdout] | [INFO] [stdout] 73 | if !current_value.parse::().is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `current_value.parse::().is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/advent/y2023/day3.rs:64:54 [INFO] [stdout] | [INFO] [stdout] 64 | fn combine_split_part_number_ascending(split_number: &Vec, start_index: usize) -> 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] 64 - fn combine_split_part_number_ascending(split_number: &Vec, start_index: usize) -> String { [INFO] [stdout] 64 + fn combine_split_part_number_ascending(split_number: &[String], start_index: usize) -> String { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/advent/y2023/day3.rs:84:45 [INFO] [stdout] | [INFO] [stdout] 84 | combine_split_part_number_ascending(&split_number, index_of_digit_in_number); [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `split_number` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/advent/y2023/day3.rs:86:46 [INFO] [stdout] | [INFO] [stdout] 86 | combine_split_part_number_descending(&split_number, index_of_digit_in_number); [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `split_number` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/advent/y2023/day3.rs:97:23 [INFO] [stdout] | [INFO] [stdout] 97 | engine_schematic: &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] 97 - engine_schematic: &Vec>, [INFO] [stdout] 97 + engine_schematic: &[Vec], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/advent/y2023/day4.rs:31:53 [INFO] [stdout] | [INFO] [stdout] 31 | let mut split_card_line = card_line.split(": ").map(|x| x.split(" | ")).flatten(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(|x| x.split(" | "))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] = note: `#[warn(clippy::map_flatten)]` 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/advent/y2023/day4.rs:92:40 [INFO] [stdout] | [INFO] [stdout] 92 | fn calculate_sum_of_card_worths(cards: &Vec) -> u32 { [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 calculate_sum_of_card_worths(cards: &Vec) -> u32 { [INFO] [stdout] 92 + fn calculate_sum_of_card_worths(cards: &[Card]) -> u32 { [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/advent/y2023/day4.rs:100:36 [INFO] [stdout] | [INFO] [stdout] 100 | fn calculate_count_of_cards(cards: &Vec) -> u32 { [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 calculate_count_of_cards(cards: &Vec) -> u32 { [INFO] [stdout] 100 + fn calculate_count_of_cards(cards: &[Card]) -> u32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/advent/y2023/day4.rs:105:48 [INFO] [stdout] | [INFO] [stdout] 105 | card_counts[index + j as usize] += 1 * card_counts[index]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `card_counts[index]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] = note: `#[warn(clippy::identity_op)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/advent/y2023/day5.rs:105:9 [INFO] [stdout] | [INFO] [stdout] 105 | return conversion_rule_source_range.contains(&source_category_number); [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 conversion_rule_source_range.contains(&source_category_number); [INFO] [stdout] 105 + conversion_rule_source_range.contains(&source_category_number) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/advent/y2023/day5.rs:155:9 [INFO] [stdout] | [INFO] [stdout] 155 | / return ( [INFO] [stdout] 156 | | (self.destination_range_start, new_range), [INFO] [stdout] 157 | | (source_category_range.0, undershoot), [INFO] [stdout] 158 | | ); [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] 155 ~ ( [INFO] [stdout] 156 + (self.destination_range_start, new_range), [INFO] [stdout] 157 + (source_category_range.0, undershoot), [INFO] [stdout] 158 ~ ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/advent/y2023/day5.rs:163:9 [INFO] [stdout] | [INFO] [stdout] 162 | let converted_range = (self.destination_range_start, self.range); [INFO] [stdout] | ----------------------------------------------------------------- unnecessary `let` binding [INFO] [stdout] 163 | converted_range [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 162 ~ [INFO] [stdout] 163 ~ (self.destination_range_start, self.range) [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/advent/y2023/day5.rs:181:12 [INFO] [stdout] | [INFO] [stdout] 181 | seeds: &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] 181 - seeds: &Vec, [INFO] [stdout] 181 + seeds: &[u64], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/advent/y2023/day5.rs:189:56 [INFO] [stdout] | [INFO] [stdout] 189 | convert_between_almanac_categories(&almanac_conversion, converted_value) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: change this to: `almanac_conversion` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/advent/y2023/day5.rs:197:42 [INFO] [stdout] | [INFO] [stdout] 197 | fn extract_seed_ranges_from_seeds(seeds: &Vec) -> Vec<(u64, u64)> { [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] 197 - fn extract_seed_ranges_from_seeds(seeds: &Vec) -> Vec<(u64, u64)> { [INFO] [stdout] 197 + fn extract_seed_ranges_from_seeds(seeds: &[u64]) -> Vec<(u64, u64)> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/advent/y2023/day5.rs:260:10 [INFO] [stdout] | [INFO] [stdout] 260 | .map(|x| { [INFO] [stdout] | __________^ [INFO] [stdout] 261 | | let mut converted_ranges = vec![*x]; [INFO] [stdout] 262 | | for almanac_conversion in almanac_conversions { [INFO] [stdout] 263 | | converted_ranges = [INFO] [stdout] ... | [INFO] [stdout] 267 | | }) [INFO] [stdout] 268 | | .flatten() [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] help: try replacing `map` with `flat_map` and remove the `.flatten()` [INFO] [stdout] | [INFO] [stdout] 260 ~ .flat_map(|x| { [INFO] [stdout] 261 + let mut converted_ranges = vec![*x]; [INFO] [stdout] 262 + for almanac_conversion in almanac_conversions { [INFO] [stdout] 263 + converted_ranges = [INFO] [stdout] 264 + convert_range_between_almanac_categories(almanac_conversion, converted_ranges); [INFO] [stdout] 265 + } [INFO] [stdout] 266 + converted_ranges [INFO] [stdout] 267 + }) [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/advent/y2023/day6.rs:98:47 [INFO] [stdout] | [INFO] [stdout] 98 | fn calculate_margin_of_error(allocated_times: &Vec, distance_records: &Vec) -> u64 { [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] 98 - fn calculate_margin_of_error(allocated_times: &Vec, distance_records: &Vec) -> u64 { [INFO] [stdout] 98 + fn calculate_margin_of_error(allocated_times: &[u64], distance_records: &Vec) -> u64 { [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/advent/y2023/day6.rs:98:76 [INFO] [stdout] | [INFO] [stdout] 98 | fn calculate_margin_of_error(allocated_times: &Vec, distance_records: &Vec) -> u64 { [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] 98 - fn calculate_margin_of_error(allocated_times: &Vec, distance_records: &Vec) -> u64 { [INFO] [stdout] 98 + fn calculate_margin_of_error(allocated_times: &Vec, distance_records: &[u64]) -> u64 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/advent/y2023/day7.rs:62:12 [INFO] [stdout] | [INFO] [stdout] 62 | if let Some(_) = pair_counts.get(&5) { [INFO] [stdout] | -------^^^^^^^---------------------- help: try: `if pair_counts.get(&5).is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/advent/y2023/day7.rs:65:12 [INFO] [stdout] | [INFO] [stdout] 65 | if let Some(_) = pair_counts.get(&4) { [INFO] [stdout] | -------^^^^^^^---------------------- help: try: `if pair_counts.get(&4).is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/advent/y2023/day7.rs:103:56 [INFO] [stdout] | [INFO] [stdout] 103 | fn calculate_character_position_additional_score(hand: &Vec, part_two: bool) -> u32 { [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 calculate_character_position_additional_score(hand: &Vec, part_two: bool) -> u32 { [INFO] [stdout] 103 + fn calculate_character_position_additional_score(hand: &[Card], part_two: bool) -> u32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/advent/y2023/day7.rs:123:13 [INFO] [stdout] | [INFO] [stdout] 123 | let hand_score: u32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] = note: `#[warn(clippy::needless_late_init)]` on by default [INFO] [stdout] help: move the declaration `hand_score` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 123 ~ [INFO] [stdout] 124 ~ let hand_score: u32 = if part_two && char_counts.get(&'J').is_some() { [INFO] [stdout] 125 ~ calculate_hand_score_with_jokers(char_counts) [INFO] [stdout] 126 | } else { [INFO] [stdout] 127 ~ calculate_hand_score(&char_counts) [INFO] [stdout] 128 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `get(&'J').is_some()` [INFO] [stdout] --> src/advent/y2023/day7.rs:124:40 [INFO] [stdout] | [INFO] [stdout] 124 | if part_two && char_counts.get(&'J').is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace it with: `contains_key(&'J')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_get_then_check [INFO] [stdout] = note: `#[warn(clippy::unnecessary_get_then_check)]` 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/advent/y2023/day7.rs:188:36 [INFO] [stdout] | [INFO] [stdout] 188 | fn calculate_total_winnings(hands: &Vec) -> u32 { [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] 188 - fn calculate_total_winnings(hands: &Vec) -> u32 { [INFO] [stdout] 188 + fn calculate_total_winnings(hands: &[Hand]) -> u32 { [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/advent/y2023/day8.rs:87:12 [INFO] [stdout] | [INFO] [stdout] 87 | moves: &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] 87 - moves: &Vec, [INFO] [stdout] 87 + moves: &[LeftRight], [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/advent/y2023/day8.rs:110:12 [INFO] [stdout] | [INFO] [stdout] 110 | moves: &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] 110 - moves: &Vec, [INFO] [stdout] 110 + moves: &[LeftRight], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should use the `ends_with` method [INFO] [stdout] --> src/advent/y2023/day8.rs:115:21 [INFO] [stdout] | [INFO] [stdout] 115 | .filter(|x| x.chars().next_back().unwrap() == 'A') [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `x.ends_with('A')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#chars_last_cmp [INFO] [stdout] = note: `#[warn(clippy::chars_last_cmp)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should use the `ends_with` method [INFO] [stdout] --> src/advent/y2023/day8.rs:122:15 [INFO] [stdout] | [INFO] [stdout] 122 | while node.chars().next_back().unwrap() != 'Z' { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `!node.ends_with('Z')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#chars_last_cmp [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/advent/y2023/day9.rs:54:15 [INFO] [stdout] | [INFO] [stdout] 54 | sequence: &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] 54 ~ sequence: &[i64], [INFO] [stdout] 55 | prediction_direction: PredictionDirection, [INFO] [stdout] 56 | ) -> i64 { [INFO] [stdout] 57 ~ let mut sequences_of_differences = vec![sequence.to_owned()]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:34:9 [INFO] [stdout] | [INFO] [stdout] 34 | / return Ok(CLIParams { [INFO] [stdout] 35 | | year_of_puzzle, [INFO] [stdout] 36 | | day_to_run, [INFO] [stdout] 37 | | input_path, [INFO] [stdout] 38 | | }); [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] 34 ~ Ok(CLIParams { [INFO] [stdout] 35 + year_of_puzzle, [INFO] [stdout] 36 + day_to_run, [INFO] [stdout] 37 + input_path, [INFO] [stdout] 38 ~ }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/lib.rs:62:5 [INFO] [stdout] | [INFO] [stdout] 61 | let puzzle_days = HashMap::from([("2022", puzzle_days_2022), ("2023", puzzle_days_2023)]); [INFO] [stdout] | ------------------------------------------------------------------------------------------ unnecessary `let` binding [INFO] [stdout] 62 | puzzle_days [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 61 ~ [INFO] [stdout] 62 ~ HashMap::from([("2022", puzzle_days_2022), ("2023", puzzle_days_2023)]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/lib.rs:72:48 [INFO] [stdout] | [INFO] [stdout] 72 | let advent_day = puzzle_to_run.parse_input(&*cli_params.input_path)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&cli_params.input_path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] = note: `#[warn(clippy::explicit_auto_deref)]` 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/advent/y2022/day1.rs:88:41 [INFO] [stdout] | [INFO] [stdout] 88 | let actual = parse_elf_calories(&input)?; [INFO] [stdout] | ^^^^^^ help: change this to: `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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/advent/y2022/day1.rs:108:41 [INFO] [stdout] | [INFO] [stdout] 108 | let actual = parse_elf_calories(&input); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/advent/y2022/day1.rs:128:41 [INFO] [stdout] | [INFO] [stdout] 128 | let actual = parse_elf_calories(&input); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> src/advent/y2022/day2.rs:104:9 [INFO] [stdout] | [INFO] [stdout] 104 | / match self { [INFO] [stdout] 105 | | &RockPaperScissors::Rock => 1, [INFO] [stdout] 106 | | &RockPaperScissors::Paper => 2, [INFO] [stdout] 107 | | &RockPaperScissors::Scissors => 3, [INFO] [stdout] 108 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] = note: `#[warn(clippy::match_ref_pats)]` on by default [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 104 ~ match *self { [INFO] [stdout] 105 ~ RockPaperScissors::Rock => 1, [INFO] [stdout] 106 ~ RockPaperScissors::Paper => 2, [INFO] [stdout] 107 ~ RockPaperScissors::Scissors => 3, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> src/advent/y2022/day2.rs:132:9 [INFO] [stdout] | [INFO] [stdout] 132 | / match self { [INFO] [stdout] 133 | | &WinLossDraw::Loss => 0, [INFO] [stdout] 134 | | &WinLossDraw::Draw => 3, [INFO] [stdout] 135 | | &WinLossDraw::Win => 6, [INFO] [stdout] 136 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 132 ~ match *self { [INFO] [stdout] 133 ~ WinLossDraw::Loss => 0, [INFO] [stdout] 134 ~ WinLossDraw::Draw => 3, [INFO] [stdout] 135 ~ WinLossDraw::Win => 6, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/advent/y2022/day2.rs:536:51 [INFO] [stdout] | [INFO] [stdout] 536 | let actual = extract_letters_and_validate(&input)?; [INFO] [stdout] | ^^^^^^ help: change this to: `input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/advent/y2022/day2.rs:545:51 [INFO] [stdout] | [INFO] [stdout] 545 | let actual = extract_letters_and_validate(&input); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/advent/y2022/day2.rs:553:51 [INFO] [stdout] | [INFO] [stdout] 553 | let actual = extract_letters_and_validate(&input); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/advent/y2022/day2.rs:561:51 [INFO] [stdout] | [INFO] [stdout] 561 | let actual = extract_letters_and_validate(&input); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/advent/y2022/day2.rs:569:51 [INFO] [stdout] | [INFO] [stdout] 569 | let actual = extract_letters_and_validate(&input); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/advent/y2022/day2.rs:577:51 [INFO] [stdout] | [INFO] [stdout] 577 | let actual = extract_letters_and_validate(&input); [INFO] [stdout] | ^^^^^^ help: change this to: `input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/advent/y2022/day2.rs:594:54 [INFO] [stdout] | [INFO] [stdout] 594 | let actual = parse_rock_paper_scissors_games(&input)?; [INFO] [stdout] | ^^^^^^ help: change this to: `input` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/advent/y2022/day3.rs:57:25 [INFO] [stdout] | [INFO] [stdout] 57 | fn split_string_in_half<'a>(string_to_split: &'a str) -> (&'a str, &'a str) { [INFO] [stdout] | ^^ ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 57 - fn split_string_in_half<'a>(string_to_split: &'a str) -> (&'a str, &'a str) { [INFO] [stdout] 57 + fn split_string_in_half(string_to_split: &str) -> (&str, &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/advent/y2022/day3.rs:75:67 [INFO] [stdout] | [INFO] [stdout] 75 | fn calculate_sum_of_priorities_for_items_to_reorganize(rucksacks: &Vec) -> u32 { [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] 75 - fn calculate_sum_of_priorities_for_items_to_reorganize(rucksacks: &Vec) -> u32 { [INFO] [stdout] 75 + fn calculate_sum_of_priorities_for_items_to_reorganize(rucksacks: &[String]) -> u32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/advent/y2022/day3.rs:81:17 [INFO] [stdout] | [INFO] [stdout] 81 | &rucksack_compartments.0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `rucksack_compartments.0` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/advent/y2022/day3.rs:82:17 [INFO] [stdout] | [INFO] [stdout] 82 | &rucksack_compartments.1, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `rucksack_compartments.1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/advent/y2022/day3.rs:90:53 [INFO] [stdout] | [INFO] [stdout] 90 | fn calculate_sum_of_priorities_of_badges(rucksacks: &Vec) -> u32 { [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] 90 - fn calculate_sum_of_priorities_of_badges(rucksacks: &Vec) -> u32 { [INFO] [stdout] 90 + fn calculate_sum_of_priorities_of_badges(rucksacks: &[String]) -> u32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/advent/y2022/day4.rs:80:10 [INFO] [stdout] | [INFO] [stdout] 80 | (&self.start_zone <= &other.start_zone && &self.end_zone >= &other.end_zone) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] = note: `#[warn(clippy::op_ref)]` on by default [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 80 - (&self.start_zone <= &other.start_zone && &self.end_zone >= &other.end_zone) [INFO] [stdout] 80 + (self.start_zone <= other.start_zone && &self.end_zone >= &other.end_zone) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/advent/y2022/day4.rs:80:51 [INFO] [stdout] | [INFO] [stdout] 80 | (&self.start_zone <= &other.start_zone && &self.end_zone >= &other.end_zone) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 80 - (&self.start_zone <= &other.start_zone && &self.end_zone >= &other.end_zone) [INFO] [stdout] 80 + (&self.start_zone <= &other.start_zone && self.end_zone >= other.end_zone) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/advent/y2022/day4.rs:81:17 [INFO] [stdout] | [INFO] [stdout] 81 | || (&self.start_zone >= &other.start_zone && &self.end_zone <= &other.end_zone) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 81 - || (&self.start_zone >= &other.start_zone && &self.end_zone <= &other.end_zone) [INFO] [stdout] 81 + || (self.start_zone >= other.start_zone && &self.end_zone <= &other.end_zone) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/advent/y2022/day4.rs:81:58 [INFO] [stdout] | [INFO] [stdout] 81 | || (&self.start_zone >= &other.start_zone && &self.end_zone <= &other.end_zone) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 81 - || (&self.start_zone >= &other.start_zone && &self.end_zone <= &other.end_zone) [INFO] [stdout] 81 + || (&self.start_zone >= &other.start_zone && self.end_zone <= other.end_zone) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/advent/y2022/day4.rs:85:10 [INFO] [stdout] | [INFO] [stdout] 85 | (&self.start_zone >= &other.start_zone && &self.start_zone <= &other.end_zone) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 85 - (&self.start_zone >= &other.start_zone && &self.start_zone <= &other.end_zone) [INFO] [stdout] 85 + (self.start_zone >= other.start_zone && &self.start_zone <= &other.end_zone) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/advent/y2022/day4.rs:85:51 [INFO] [stdout] | [INFO] [stdout] 85 | (&self.start_zone >= &other.start_zone && &self.start_zone <= &other.end_zone) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 85 - (&self.start_zone >= &other.start_zone && &self.start_zone <= &other.end_zone) [INFO] [stdout] 85 + (&self.start_zone >= &other.start_zone && self.start_zone <= other.end_zone) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/advent/y2022/day4.rs:86:17 [INFO] [stdout] | [INFO] [stdout] 86 | || (&self.end_zone >= &other.start_zone && &self.end_zone <= &other.end_zone) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 86 - || (&self.end_zone >= &other.start_zone && &self.end_zone <= &other.end_zone) [INFO] [stdout] 86 + || (self.end_zone >= other.start_zone && &self.end_zone <= &other.end_zone) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/advent/y2022/day4.rs:86:56 [INFO] [stdout] | [INFO] [stdout] 86 | || (&self.end_zone >= &other.start_zone && &self.end_zone <= &other.end_zone) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 86 - || (&self.end_zone >= &other.start_zone && &self.end_zone <= &other.end_zone) [INFO] [stdout] 86 + || (&self.end_zone >= &other.start_zone && self.end_zone <= other.end_zone) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/advent/y2022/day4.rs:87:47 [INFO] [stdout] | [INFO] [stdout] 87 | || (self.contains_or_contained_in(&other)) [INFO] [stdout] | ^^^^^^ help: change this to: `other` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/advent/y2022/day4.rs:92:38 [INFO] [stdout] | [INFO] [stdout] 92 | cleaning_assingments_to_compare: &Vec<(CleaningAssignment, CleaningAssignment)>, [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 - cleaning_assingments_to_compare: &Vec<(CleaningAssignment, CleaningAssignment)>, [INFO] [stdout] 92 + cleaning_assingments_to_compare: &[(CleaningAssignment, CleaningAssignment)], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/advent/y2022/day5.rs:81:14 [INFO] [stdout] | [INFO] [stdout] 81 | .map(|l| parse_rearrangement_procedure_line(l)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `parse_rearrangement_procedure_line` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/advent/y2023/day1.rs:69:57 [INFO] [stdout] | [INFO] [stdout] 69 | .map(|x| extract_first_and_last_number_into_int(&x)) [INFO] [stdout] | ^^ help: change this to: `x` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/advent/y2023/day2.rs:135:51 [INFO] [stdout] | [INFO] [stdout] 135 | fn check_if_game_is_valid(cubes_revealed_in_game: &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] 135 - fn check_if_game_is_valid(cubes_revealed_in_game: &Vec) -> bool { [INFO] [stdout] 135 + fn check_if_game_is_valid(cubes_revealed_in_game: &[RevealedCubes]) -> 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/advent/y2023/day2.rs:141:50 [INFO] [stdout] | [INFO] [stdout] 141 | fn find_sum_of_identifiers_of_valid_games(games: &Vec) -> u32 { [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] 141 - fn find_sum_of_identifiers_of_valid_games(games: &Vec) -> u32 { [INFO] [stdout] 141 + fn find_sum_of_identifiers_of_valid_games(games: &[Game]) -> u32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/advent/y2023/day3.rs:55:12 [INFO] [stdout] | [INFO] [stdout] 55 | if !current_value.parse::().is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `current_value.parse::().is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/advent/y2023/day3.rs:46:55 [INFO] [stdout] | [INFO] [stdout] 46 | fn combine_split_part_number_descending(split_number: &Vec, start_index: usize) -> 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] 46 - fn combine_split_part_number_descending(split_number: &Vec, start_index: usize) -> String { [INFO] [stdout] 46 + fn combine_split_part_number_descending(split_number: &[String], start_index: usize) -> String { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/advent/y2023/day3.rs:73:12 [INFO] [stdout] | [INFO] [stdout] 73 | if !current_value.parse::().is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `current_value.parse::().is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/advent/y2023/day3.rs:64:54 [INFO] [stdout] | [INFO] [stdout] 64 | fn combine_split_part_number_ascending(split_number: &Vec, start_index: usize) -> 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] 64 - fn combine_split_part_number_ascending(split_number: &Vec, start_index: usize) -> String { [INFO] [stdout] 64 + fn combine_split_part_number_ascending(split_number: &[String], start_index: usize) -> String { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/advent/y2023/day3.rs:84:45 [INFO] [stdout] | [INFO] [stdout] 84 | combine_split_part_number_ascending(&split_number, index_of_digit_in_number); [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `split_number` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/advent/y2023/day3.rs:86:46 [INFO] [stdout] | [INFO] [stdout] 86 | combine_split_part_number_descending(&split_number, index_of_digit_in_number); [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `split_number` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/advent/y2023/day3.rs:97:23 [INFO] [stdout] | [INFO] [stdout] 97 | engine_schematic: &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] 97 - engine_schematic: &Vec>, [INFO] [stdout] 97 + engine_schematic: &[Vec], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/advent/y2023/day4.rs:31:53 [INFO] [stdout] | [INFO] [stdout] 31 | let mut split_card_line = card_line.split(": ").map(|x| x.split(" | ")).flatten(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(|x| x.split(" | "))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] = note: `#[warn(clippy::map_flatten)]` 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/advent/y2023/day4.rs:92:40 [INFO] [stdout] | [INFO] [stdout] 92 | fn calculate_sum_of_card_worths(cards: &Vec) -> u32 { [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 calculate_sum_of_card_worths(cards: &Vec) -> u32 { [INFO] [stdout] 92 + fn calculate_sum_of_card_worths(cards: &[Card]) -> u32 { [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/advent/y2023/day4.rs:100:36 [INFO] [stdout] | [INFO] [stdout] 100 | fn calculate_count_of_cards(cards: &Vec) -> u32 { [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 calculate_count_of_cards(cards: &Vec) -> u32 { [INFO] [stdout] 100 + fn calculate_count_of_cards(cards: &[Card]) -> u32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/advent/y2023/day4.rs:105:48 [INFO] [stdout] | [INFO] [stdout] 105 | card_counts[index + j as usize] += 1 * card_counts[index]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `card_counts[index]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] = note: `#[warn(clippy::identity_op)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/advent/y2023/day5.rs:105:9 [INFO] [stdout] | [INFO] [stdout] 105 | return conversion_rule_source_range.contains(&source_category_number); [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 conversion_rule_source_range.contains(&source_category_number); [INFO] [stdout] 105 + conversion_rule_source_range.contains(&source_category_number) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/advent/y2023/day5.rs:155:9 [INFO] [stdout] | [INFO] [stdout] 155 | / return ( [INFO] [stdout] 156 | | (self.destination_range_start, new_range), [INFO] [stdout] 157 | | (source_category_range.0, undershoot), [INFO] [stdout] 158 | | ); [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] 155 ~ ( [INFO] [stdout] 156 + (self.destination_range_start, new_range), [INFO] [stdout] 157 + (source_category_range.0, undershoot), [INFO] [stdout] 158 ~ ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/advent/y2023/day5.rs:163:9 [INFO] [stdout] | [INFO] [stdout] 162 | let converted_range = (self.destination_range_start, self.range); [INFO] [stdout] | ----------------------------------------------------------------- unnecessary `let` binding [INFO] [stdout] 163 | converted_range [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 162 ~ [INFO] [stdout] 163 ~ (self.destination_range_start, self.range) [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/advent/y2023/day5.rs:181:12 [INFO] [stdout] | [INFO] [stdout] 181 | seeds: &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] 181 - seeds: &Vec, [INFO] [stdout] 181 + seeds: &[u64], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/advent/y2023/day5.rs:189:56 [INFO] [stdout] | [INFO] [stdout] 189 | convert_between_almanac_categories(&almanac_conversion, converted_value) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: change this to: `almanac_conversion` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/advent/y2023/day5.rs:197:42 [INFO] [stdout] | [INFO] [stdout] 197 | fn extract_seed_ranges_from_seeds(seeds: &Vec) -> Vec<(u64, u64)> { [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] 197 - fn extract_seed_ranges_from_seeds(seeds: &Vec) -> Vec<(u64, u64)> { [INFO] [stdout] 197 + fn extract_seed_ranges_from_seeds(seeds: &[u64]) -> Vec<(u64, u64)> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/advent/y2023/day5.rs:260:10 [INFO] [stdout] | [INFO] [stdout] 260 | .map(|x| { [INFO] [stdout] | __________^ [INFO] [stdout] 261 | | let mut converted_ranges = vec![*x]; [INFO] [stdout] 262 | | for almanac_conversion in almanac_conversions { [INFO] [stdout] 263 | | converted_ranges = [INFO] [stdout] ... | [INFO] [stdout] 267 | | }) [INFO] [stdout] 268 | | .flatten() [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] help: try replacing `map` with `flat_map` and remove the `.flatten()` [INFO] [stdout] | [INFO] [stdout] 260 ~ .flat_map(|x| { [INFO] [stdout] 261 + let mut converted_ranges = vec![*x]; [INFO] [stdout] 262 + for almanac_conversion in almanac_conversions { [INFO] [stdout] 263 + converted_ranges = [INFO] [stdout] 264 + convert_range_between_almanac_categories(almanac_conversion, converted_ranges); [INFO] [stdout] 265 + } [INFO] [stdout] 266 + converted_ranges [INFO] [stdout] 267 + }) [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/advent/y2023/day6.rs:98:47 [INFO] [stdout] | [INFO] [stdout] 98 | fn calculate_margin_of_error(allocated_times: &Vec, distance_records: &Vec) -> u64 { [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] 98 - fn calculate_margin_of_error(allocated_times: &Vec, distance_records: &Vec) -> u64 { [INFO] [stdout] 98 + fn calculate_margin_of_error(allocated_times: &[u64], distance_records: &Vec) -> u64 { [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/advent/y2023/day6.rs:98:76 [INFO] [stdout] | [INFO] [stdout] 98 | fn calculate_margin_of_error(allocated_times: &Vec, distance_records: &Vec) -> u64 { [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] 98 - fn calculate_margin_of_error(allocated_times: &Vec, distance_records: &Vec) -> u64 { [INFO] [stdout] 98 + fn calculate_margin_of_error(allocated_times: &Vec, distance_records: &[u64]) -> u64 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/advent/y2023/day7.rs:62:12 [INFO] [stdout] | [INFO] [stdout] 62 | if let Some(_) = pair_counts.get(&5) { [INFO] [stdout] | -------^^^^^^^---------------------- help: try: `if pair_counts.get(&5).is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/advent/y2023/day7.rs:65:12 [INFO] [stdout] | [INFO] [stdout] 65 | if let Some(_) = pair_counts.get(&4) { [INFO] [stdout] | -------^^^^^^^---------------------- help: try: `if pair_counts.get(&4).is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/advent/y2023/day7.rs:103:56 [INFO] [stdout] | [INFO] [stdout] 103 | fn calculate_character_position_additional_score(hand: &Vec, part_two: bool) -> u32 { [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 calculate_character_position_additional_score(hand: &Vec, part_two: bool) -> u32 { [INFO] [stdout] 103 + fn calculate_character_position_additional_score(hand: &[Card], part_two: bool) -> u32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/advent/y2023/day7.rs:123:13 [INFO] [stdout] | [INFO] [stdout] 123 | let hand_score: u32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] = note: `#[warn(clippy::needless_late_init)]` on by default [INFO] [stdout] help: move the declaration `hand_score` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 123 ~ [INFO] [stdout] 124 ~ let hand_score: u32 = if part_two && char_counts.get(&'J').is_some() { [INFO] [stdout] 125 ~ calculate_hand_score_with_jokers(char_counts) [INFO] [stdout] 126 | } else { [INFO] [stdout] 127 ~ calculate_hand_score(&char_counts) [INFO] [stdout] 128 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `get(&'J').is_some()` [INFO] [stdout] --> src/advent/y2023/day7.rs:124:40 [INFO] [stdout] | [INFO] [stdout] 124 | if part_two && char_counts.get(&'J').is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace it with: `contains_key(&'J')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_get_then_check [INFO] [stdout] = note: `#[warn(clippy::unnecessary_get_then_check)]` 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/advent/y2023/day7.rs:188:36 [INFO] [stdout] | [INFO] [stdout] 188 | fn calculate_total_winnings(hands: &Vec) -> u32 { [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] 188 - fn calculate_total_winnings(hands: &Vec) -> u32 { [INFO] [stdout] 188 + fn calculate_total_winnings(hands: &[Hand]) -> u32 { [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/advent/y2023/day8.rs:87:12 [INFO] [stdout] | [INFO] [stdout] 87 | moves: &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] 87 - moves: &Vec, [INFO] [stdout] 87 + moves: &[LeftRight], [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/advent/y2023/day8.rs:110:12 [INFO] [stdout] | [INFO] [stdout] 110 | moves: &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] 110 - moves: &Vec, [INFO] [stdout] 110 + moves: &[LeftRight], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should use the `ends_with` method [INFO] [stdout] --> src/advent/y2023/day8.rs:115:21 [INFO] [stdout] | [INFO] [stdout] 115 | .filter(|x| x.chars().next_back().unwrap() == 'A') [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `x.ends_with('A')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#chars_last_cmp [INFO] [stdout] = note: `#[warn(clippy::chars_last_cmp)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should use the `ends_with` method [INFO] [stdout] --> src/advent/y2023/day8.rs:122:15 [INFO] [stdout] | [INFO] [stdout] 122 | while node.chars().next_back().unwrap() != 'Z' { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `!node.ends_with('Z')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#chars_last_cmp [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/advent/y2023/day9.rs:54:15 [INFO] [stdout] | [INFO] [stdout] 54 | sequence: &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] 54 ~ sequence: &[i64], [INFO] [stdout] 55 | prediction_direction: PredictionDirection, [INFO] [stdout] 56 | ) -> i64 { [INFO] [stdout] 57 ~ let mut sequences_of_differences = vec![sequence.to_owned()]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:34:9 [INFO] [stdout] | [INFO] [stdout] 34 | / return Ok(CLIParams { [INFO] [stdout] 35 | | year_of_puzzle, [INFO] [stdout] 36 | | day_to_run, [INFO] [stdout] 37 | | input_path, [INFO] [stdout] 38 | | }); [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] 34 ~ Ok(CLIParams { [INFO] [stdout] 35 + year_of_puzzle, [INFO] [stdout] 36 + day_to_run, [INFO] [stdout] 37 + input_path, [INFO] [stdout] 38 ~ }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/lib.rs:62:5 [INFO] [stdout] | [INFO] [stdout] 61 | let puzzle_days = HashMap::from([("2022", puzzle_days_2022), ("2023", puzzle_days_2023)]); [INFO] [stdout] | ------------------------------------------------------------------------------------------ unnecessary `let` binding [INFO] [stdout] 62 | puzzle_days [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 61 ~ [INFO] [stdout] 62 ~ HashMap::from([("2022", puzzle_days_2022), ("2023", puzzle_days_2023)]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/lib.rs:72:48 [INFO] [stdout] | [INFO] [stdout] 72 | let advent_day = puzzle_to_run.parse_input(&*cli_params.input_path)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&cli_params.input_path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] = note: `#[warn(clippy::explicit_auto_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/advent/y2022/day2.rs:438:21 [INFO] [stdout] | [INFO] [stdout] 438 | let games = vec![ [INFO] [stdout] | _____________________^ [INFO] [stdout] 439 | | (String::from("A"), String::from("Y")), [INFO] [stdout] 440 | | (String::from("B"), String::from("X")), [INFO] [stdout] 441 | | (String::from("C"), String::from("Z")), [INFO] [stdout] 442 | | ]; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] help: you can use an array directly [INFO] [stdout] | [INFO] [stdout] 438 ~ let games = [(String::from("A"), String::from("Y")), [INFO] [stdout] 439 + (String::from("B"), String::from("X")), [INFO] [stdout] 440 ~ (String::from("C"), String::from("Z"))]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/advent/y2022/day2.rs:452:21 [INFO] [stdout] | [INFO] [stdout] 452 | let games = vec![ [INFO] [stdout] | _____________________^ [INFO] [stdout] 453 | | (String::from("A"), String::from("Y")), [INFO] [stdout] 454 | | (String::from("B"), String::from("X")), [INFO] [stdout] 455 | | (String::from("C"), String::from("Z")), [INFO] [stdout] 456 | | ]; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] help: you can use an array directly [INFO] [stdout] | [INFO] [stdout] 452 ~ let games = [(String::from("A"), String::from("Y")), [INFO] [stdout] 453 + (String::from("B"), String::from("X")), [INFO] [stdout] 454 ~ (String::from("C"), String::from("Z"))]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/advent/y2023/day1.rs:227:21 [INFO] [stdout] | [INFO] [stdout] 227 | let input = vec![ [INFO] [stdout] | _____________________^ [INFO] [stdout] 228 | | String::from("1abc2"), [INFO] [stdout] 229 | | String::from("pqr3stu8vwx"), [INFO] [stdout] 230 | | String::from("a1b2c3d4e5f"), [INFO] [stdout] 231 | | String::from("treb7uchet"), [INFO] [stdout] 232 | | ]; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] help: you can use an array directly [INFO] [stdout] | [INFO] [stdout] 227 ~ let input = [String::from("1abc2"), [INFO] [stdout] 228 + String::from("pqr3stu8vwx"), [INFO] [stdout] 229 + String::from("a1b2c3d4e5f"), [INFO] [stdout] 230 ~ String::from("treb7uchet")]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/advent/y2023/day1.rs:373:21 [INFO] [stdout] | [INFO] [stdout] 373 | let input = vec![ [INFO] [stdout] | _____________________^ [INFO] [stdout] 374 | | String::from("21ninetwo19"), [INFO] [stdout] 375 | | String::from("8wothreeeightwo3"), [INFO] [stdout] 376 | | String::from("abc12threexyzabcone23xyz"), [INFO] [stdout] ... | [INFO] [stdout] 380 | | String::from("7pqrst6teen7pqrst6teen"), [INFO] [stdout] 381 | | ]; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] help: you can use an array directly [INFO] [stdout] | [INFO] [stdout] 373 ~ let input = [String::from("21ninetwo19"), [INFO] [stdout] 374 + String::from("8wothreeeightwo3"), [INFO] [stdout] 375 + String::from("abc12threexyzabcone23xyz"), [INFO] [stdout] 376 + String::from("x2ne3fourxtwone34"), [INFO] [stdout] 377 + String::from("49eightseven24nineeight72"), [INFO] [stdout] 378 + String::from("z1ight234zon8234"), [INFO] [stdout] 379 ~ String::from("7pqrst6teen7pqrst6teen")]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 1.24s [INFO] running `Command { std: "docker" "inspect" "ba861431b79e4812af758f0648d2150f6aec1d7c7a68f9f24c86888b2ef1e592", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "ba861431b79e4812af758f0648d2150f6aec1d7c7a68f9f24c86888b2ef1e592", kill_on_drop: false }` [INFO] [stdout] ba861431b79e4812af758f0648d2150f6aec1d7c7a68f9f24c86888b2ef1e592