[INFO] cloning repository https://github.com/kade-robertson/advent-of-code-2021 [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/kade-robertson/advent-of-code-2021" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fkade-robertson%2Fadvent-of-code-2021", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fkade-robertson%2Fadvent-of-code-2021'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 6976a0ded9d2d7905fadba1b21c12c51e3ce8099 [INFO] linting kade-robertson/advent-of-code-2021 against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fkade-robertson%2Fadvent-of-code-2021" "/workspace/builds/worker-4-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-4-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/kade-robertson/advent-of-code-2021 [INFO] finished tweaking git repo https://github.com/kade-robertson/advent-of-code-2021 [INFO] tweaked toml for git repo https://github.com/kade-robertson/advent-of-code-2021 written to /workspace/builds/worker-4-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/kade-robertson/advent-of-code-2021 on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/kade-robertson/advent-of-code-2021 already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 47c9ce0afcd4f16b927b120453a3ee0b360d9bbb9039602312552af820b47773 [INFO] running `Command { std: "docker" "start" "-a" "47c9ce0afcd4f16b927b120453a3ee0b360d9bbb9039602312552af820b47773", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "47c9ce0afcd4f16b927b120453a3ee0b360d9bbb9039602312552af820b47773", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "47c9ce0afcd4f16b927b120453a3ee0b360d9bbb9039602312552af820b47773", kill_on_drop: false }` [INFO] [stdout] 47c9ce0afcd4f16b927b120453a3ee0b360d9bbb9039602312552af820b47773 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 7950ec92ccf44d48fec59157dab68d6d4fcc1265c516cd826b6235c1a54d4842 [INFO] running `Command { std: "docker" "start" "-a" "7950ec92ccf44d48fec59157dab68d6d4fcc1265c516cd826b6235c1a54d4842", kill_on_drop: false }` [INFO] [stderr] Checking advent-of-code-2021 v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/problem_01.rs:17:42 [INFO] [stdout] | [INFO] [stdout] 17 | fn solve_actual(&self, measurements: &Vec) -> i64 { [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] 17 - fn solve_actual(&self, measurements: &Vec) -> i64 { [INFO] [stdout] 17 + fn solve_actual(&self, measurements: &[i64]) -> i64 { [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/problem_01.rs:28:48 [INFO] [stdout] | [INFO] [stdout] 28 | fn solve_actual_part2(&self, measurements: &Vec) -> i64 { [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] 28 - fn solve_actual_part2(&self, measurements: &Vec) -> i64 { [INFO] [stdout] 28 + fn solve_actual_part2(&self, measurements: &[i64]) -> i64 { [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/problem_02.rs:27:38 [INFO] [stdout] | [INFO] [stdout] 27 | fn solve_actual(&self, commands: &Vec) -> i64 { [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] 27 - fn solve_actual(&self, commands: &Vec) -> i64 { [INFO] [stdout] 27 + fn solve_actual(&self, commands: &[Command]) -> i64 { [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/problem_02.rs:41:44 [INFO] [stdout] | [INFO] [stdout] 41 | fn solve_actual_part2(&self, commands: &Vec) -> i64 { [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] 41 - fn solve_actual_part2(&self, commands: &Vec) -> i64 { [INFO] [stdout] 41 + fn solve_actual_part2(&self, commands: &[Command]) -> i64 { [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/problem_03.rs:30:41 [INFO] [stdout] | [INFO] [stdout] 30 | fn solve_actual(&self, diagnostics: &Vec>) -> i64 { [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] 30 - fn solve_actual(&self, diagnostics: &Vec>) -> i64 { [INFO] [stdout] 30 + fn solve_actual(&self, diagnostics: &[Vec]) -> i64 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/problem_03.rs:31:12 [INFO] [stdout] | [INFO] [stdout] 31 | if diagnostics.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `diagnostics.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: manual implementation of an assign operation [INFO] [stdout] --> src/problem_03.rs:50:17 [INFO] [stdout] | [INFO] [stdout] 50 | gamma_rate = gamma_rate << 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `gamma_rate <<= 1` [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/problem_03.rs:58:40 [INFO] [stdout] | [INFO] [stdout] 58 | fn calculate_rating(&self, values: &Vec>, invert: bool, index: usize) -> i64 { [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] 58 - fn calculate_rating(&self, values: &Vec>, invert: bool, index: usize) -> i64 { [INFO] [stdout] 58 + fn calculate_rating(&self, values: &[Vec], invert: bool, index: usize) -> i64 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/problem_03.rs:73:64 [INFO] [stdout] | [INFO] [stdout] 73 | if ones_count > halfway || ((ones_count == halfway) && (values.len() % 2 == 0)) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `values.len().is_multiple_of(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/problem_03.rs:89:12 [INFO] [stdout] | [INFO] [stdout] 89 | if diagnostics.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `diagnostics.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] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/problem_03.rs:93:51 [INFO] [stdout] | [INFO] [stdout] 93 | let oxygen_rating = self.calculate_rating(&diagnostics, false, 0); [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `diagnostics` [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/problem_03.rs:94:53 [INFO] [stdout] | [INFO] [stdout] 94 | let scrubber_rating = self.calculate_rating(&diagnostics, true, 0); [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `diagnostics` [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/problem_04.rs:12:23 [INFO] [stdout] | [INFO] [stdout] 12 | pub fn new(board: &Vec>) -> BingoBoard { [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] 12 - pub fn new(board: &Vec>) -> BingoBoard { [INFO] [stdout] 12 + pub fn new(board: &[Vec]) -> BingoBoard { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i64` which implements the `Copy` trait [INFO] [stdout] --> src/problem_04.rs:18:37 [INFO] [stdout] | [INFO] [stdout] 18 | actual_board.insert(num.clone(), (row_index.clone(), col_index.clone())); [INFO] [stdout] | ^^^^^^^^^^^ help: try dereferencing it: `*num` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/problem_04.rs:18:51 [INFO] [stdout] | [INFO] [stdout] 18 | actual_board.insert(num.clone(), (row_index.clone(), col_index.clone())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `row_index` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/problem_04.rs:18:70 [INFO] [stdout] | [INFO] [stdout] 18 | actual_board.insert(num.clone(), (row_index.clone(), col_index.clone())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `col_index` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/problem_04.rs:19:38 [INFO] [stdout] | [INFO] [stdout] 19 | marked_board.insert((row_index.clone(), col_index.clone()), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `row_index` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/problem_04.rs:19:57 [INFO] [stdout] | [INFO] [stdout] 19 | marked_board.insert((row_index.clone(), col_index.clone()), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `col_index` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/problem_04.rs:31:43 [INFO] [stdout] | [INFO] [stdout] 31 | if self.actual_board.contains_key(&num) { [INFO] [stdout] | ^^^^ help: change this to: `num` [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/problem_04.rs:32:60 [INFO] [stdout] | [INFO] [stdout] 32 | (*self.marked_board.get_mut(&self.actual_board[&num]).unwrap()) = true; [INFO] [stdout] | ^^^^ help: change this to: `num` [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: inequality checks against true can be replaced by a negation [INFO] [stdout] --> src/problem_04.rs:39:16 [INFO] [stdout] | [INFO] [stdout] 39 | if self.marked_board[&(row_index, col_index)] != true { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!self.marked_board[&(row_index, col_index)]` [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: inequality checks against true can be replaced by a negation [INFO] [stdout] --> src/problem_04.rs:51:16 [INFO] [stdout] | [INFO] [stdout] 51 | if self.marked_board[&(row_index, col_index)] != true { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!self.marked_board[&(row_index, col_index)]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against false can be replaced by a negation [INFO] [stdout] --> src/problem_04.rs:75:16 [INFO] [stdout] | [INFO] [stdout] 75 | if self.marked_board[position] == false { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!self.marked_board[position]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/problem_04.rs:88:25 [INFO] [stdout] | [INFO] [stdout] 88 | board_size: self.board_size.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.board_size` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/problem_04.rs:110:15 [INFO] [stdout] | [INFO] [stdout] 110 | while !lines.next().is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `lines.next().is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/problem_04.rs:152:41 [INFO] [stdout] | [INFO] [stdout] 152 | for (board_index, board) in (&mut *bingo_boards).iter_mut().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: change this to: `(*bingo_boards)` [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: deref which would be done by auto-deref [INFO] [stdout] --> src/problem_04.rs:152:41 [INFO] [stdout] | [INFO] [stdout] 152 | for (board_index, board) in (&mut *bingo_boards).iter_mut().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `bingo_boards` [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/problem_05.rs:84:45 [INFO] [stdout] | [INFO] [stdout] 84 | fn solve_actual(&self, submarine_lines: &Vec, include_diagonals: bool) -> i64 { [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] 84 - fn solve_actual(&self, submarine_lines: &Vec, include_diagonals: bool) -> i64 { [INFO] [stdout] 84 + fn solve_actual(&self, submarine_lines: &[Line], include_diagonals: bool) -> i64 { [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/problem_06.rs:17:42 [INFO] [stdout] | [INFO] [stdout] 17 | fn solve_actual(&self, initial_fish: &Vec, simulation_days: i64) -> i64 { [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] 17 - fn solve_actual(&self, initial_fish: &Vec, simulation_days: i64) -> i64 { [INFO] [stdout] 17 + fn solve_actual(&self, initial_fish: &[i64], simulation_days: i64) -> i64 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/problem_07.rs:36:13 [INFO] [stdout] | [INFO] [stdout] 36 | positions.iter().fold(0, |acc, crab| acc + crab) as i64 / positions.len() as i64; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `positions.iter().fold(0, |acc, crab| acc + crab)` [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: this `.fold` can be written more succinctly using another method [INFO] [stdout] --> src/problem_07.rs:36:30 [INFO] [stdout] | [INFO] [stdout] 36 | positions.iter().fold(0, |acc, crab| acc + crab) as i64 / positions.len() as i64; [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 `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/problem_08.rs:10:29 [INFO] [stdout] | [INFO] [stdout] 10 | fn pattern_to_bits(pattern: &String) -> u8 { [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] 10 - fn pattern_to_bits(pattern: &String) -> u8 { [INFO] [stdout] 10 + fn pattern_to_bits(pattern: &str) -> u8 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/problem_08.rs:119:27 [INFO] [stdout] | [INFO] [stdout] 119 | input.lines().map(|line| SignalNote::new(line)).collect() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `SignalNote::new` [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/problem_08.rs:122:42 [INFO] [stdout] | [INFO] [stdout] 122 | fn solve_actual(&self, signal_notes: &Vec) -> i64 { [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] 122 - fn solve_actual(&self, signal_notes: &Vec) -> i64 { [INFO] [stdout] 122 + fn solve_actual(&self, signal_notes: &[SignalNote]) -> i64 { [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/problem_08.rs:133:48 [INFO] [stdout] | [INFO] [stdout] 133 | fn solve_actual_part2(&self, signal_notes: &Vec) -> i64 { [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] 133 - fn solve_actual_part2(&self, signal_notes: &Vec) -> i64 { [INFO] [stdout] 133 + fn solve_actual_part2(&self, signal_notes: &[SignalNote]) -> i64 { [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/problem_09.rs:19:40 [INFO] [stdout] | [INFO] [stdout] 19 | fn basin_centers(&self, heightmap: &Vec>) -> Vec<(usize, usize)> { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 19 - fn basin_centers(&self, heightmap: &Vec>) -> Vec<(usize, usize)> { [INFO] [stdout] 19 + fn basin_centers(&self, heightmap: &[Vec]) -> Vec<(usize, 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/problem_09.rs:52:36 [INFO] [stdout] | [INFO] [stdout] 52 | fn basin_bfs(&self, heightmap: &Vec>, basin_center: (usize, usize)) -> i64 { [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] 52 - fn basin_bfs(&self, heightmap: &Vec>, basin_center: (usize, usize)) -> i64 { [INFO] [stdout] 52 + fn basin_bfs(&self, heightmap: &[Vec], basin_center: (usize, usize)) -> i64 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/problem_09.rs:59:15 [INFO] [stdout] | [INFO] [stdout] 59 | while to_be_checked.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!to_be_checked.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] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/problem_10.rs:40:25 [INFO] [stdout] | [INFO] [stdout] 40 | / if char_stack.pop().unwrap() != closed_map[&c] { [INFO] [stdout] 41 | | score += scoring[&c]; [INFO] [stdout] 42 | | corrupt = true; [INFO] [stdout] 43 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 39 ~ ')' | ']' | '}' | '>' [INFO] [stdout] 40 ~ if char_stack.pop().unwrap() != closed_map[&c] => { [INFO] [stdout] 41 | score += scoring[&c]; [INFO] [stdout] 42 | corrupt = true; [INFO] [stdout] 43 ~ } [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/problem_11.rs:19:43 [INFO] [stdout] | [INFO] [stdout] 19 | fn simulate_step(&self, octopus_grid: &mut Vec>) -> i64 { [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] 19 - fn simulate_step(&self, octopus_grid: &mut Vec>) -> i64 { [INFO] [stdout] 19 + fn simulate_step(&self, octopus_grid: &mut [Vec]) -> i64 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `row` is used to index `octopus_grid` [INFO] [stdout] --> src/problem_11.rs:24:20 [INFO] [stdout] | [INFO] [stdout] 24 | for row in 0..octopus_grid.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 24 - for row in 0..octopus_grid.len() { [INFO] [stdout] 24 + for (row, ) in octopus_grid.iter_mut().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/problem_11.rs:34:15 [INFO] [stdout] | [INFO] [stdout] 34 | while to_be_flashed.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!to_be_flashed.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] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `u16` which implements the `Copy` trait [INFO] [stdout] --> src/problem_12.rs:47:60 [INFO] [stdout] | [INFO] [stdout] 47 | (*edges.get_mut(&first).unwrap()).push(second.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `second` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `u16` which implements the `Copy` trait [INFO] [stdout] --> src/problem_12.rs:49:34 [INFO] [stdout] | [INFO] [stdout] 49 | edges.insert(first.clone(), vec![second.clone()]); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try removing the `clone` call: `first` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `u16` which implements the `Copy` trait [INFO] [stdout] --> src/problem_12.rs:49:54 [INFO] [stdout] | [INFO] [stdout] 49 | edges.insert(first.clone(), vec![second.clone()]); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `second` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> src/problem_12.rs:53:17 [INFO] [stdout] | [INFO] [stdout] 53 | / if edges.contains_key(&second) { [INFO] [stdout] 54 | | (*edges.get_mut(&second).unwrap()).push(first); [INFO] [stdout] 55 | | } else { [INFO] [stdout] 56 | | edges.insert(second, vec![first]); [INFO] [stdout] 57 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry [INFO] [stdout] = note: `#[warn(clippy::map_entry)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 53 ~ if let std::collections::hash_map::Entry::Vacant(e) = edges.entry(second) { [INFO] [stdout] 54 + e.insert(vec![first]); [INFO] [stdout] 55 + } else { [INFO] [stdout] 56 + (*edges.get_mut(&second).unwrap()).push(first); [INFO] [stdout] 57 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/problem_12.rs:72:15 [INFO] [stdout] | [INFO] [stdout] 72 | while states_to_check.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!states_to_check.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] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `u16` which implements the `Copy` trait [INFO] [stdout] --> src/problem_12.rs:76:35 [INFO] [stdout] | [INFO] [stdout] 76 | seen_nodes.insert(current_node.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `current_node` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/problem_13.rs:94:9 [INFO] [stdout] | [INFO] [stdout] 94 | while let Some(line) = lines.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for line in lines.by_ref()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] = note: `#[warn(clippy::while_let_on_iterator)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/problem_13.rs:95:16 [INFO] [stdout] | [INFO] [stdout] 95 | 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] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/problem_13.rs:105:9 [INFO] [stdout] | [INFO] [stdout] 105 | while let Some(line) = lines.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for line in lines` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> src/problem_14.rs:23:9 [INFO] [stdout] | [INFO] [stdout] 23 | / if self.contains_key(&k) { [INFO] [stdout] 24 | | (*self.get_mut(&k).unwrap()) += v; [INFO] [stdout] 25 | | } else { [INFO] [stdout] 26 | | self.insert(k, v); [INFO] [stdout] 27 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: consider using the `Entry` API: https://doc.rust-lang.org/std/collections/struct.HashMap.html#entry-api [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/problem_14.rs:43:9 [INFO] [stdout] | [INFO] [stdout] 43 | while let Some(rule) = lines.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for rule in lines` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/problem_14.rs:52:27 [INFO] [stdout] | [INFO] [stdout] 52 | polymer_template: &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] 52 - polymer_template: &String, [INFO] [stdout] 52 + polymer_template: &str, [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/problem_14.rs:75:53 [INFO] [stdout] | [INFO] [stdout] 75 | fn build_polymer_pairs(&self, polymer_template: &String) -> 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] 75 - fn build_polymer_pairs(&self, polymer_template: &String) -> HashMap { [INFO] [stdout] 75 + fn build_polymer_pairs(&self, polymer_template: &str) -> HashMap { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/problem_14.rs:79:9 [INFO] [stdout] | [INFO] [stdout] 79 | while let Some(chars) = window.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for chars in window` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/problem_15.rs:46:40 [INFO] [stdout] | [INFO] [stdout] 46 | fn expand_grid(&self, risk_levels: &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 expand_grid(&self, risk_levels: &Vec>) -> Vec> { [INFO] [stdout] 46 + fn expand_grid(&self, risk_levels: &[Vec]) -> 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/problem_15.rs:67:49 [INFO] [stdout] | [INFO] [stdout] 67 | fn get_lowest_risk_cost(&self, risk_levels: &Vec>) -> i64 { [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] 67 - fn get_lowest_risk_cost(&self, risk_levels: &Vec>) -> i64 { [INFO] [stdout] 67 + fn get_lowest_risk_cost(&self, risk_levels: &[Vec]) -> i64 { [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/problem_16.rs:43:25 [INFO] [stdout] | [INFO] [stdout] 43 | fn parse_packet(packet: &Vec, packet_limit: usize, bit_limit: usize) -> (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] 43 - fn parse_packet(packet: &Vec, packet_limit: usize, bit_limit: usize) -> (Vec, usize) { [INFO] [stdout] 43 + fn parse_packet(packet: &[u8], packet_limit: usize, bit_limit: usize) -> (Vec, usize) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/problem_16.rs:126:14 [INFO] [stdout] | [INFO] [stdout] 126 | .map(|c| { [INFO] [stdout] | ______________^ [INFO] [stdout] 127 | | let parsed = c.to_digit(16).unwrap() as u8; [INFO] [stdout] 128 | | vec![ [INFO] [stdout] 129 | | (parsed & 0x8) >> 3, [INFO] [stdout] ... | [INFO] [stdout] 134 | | }) [INFO] [stdout] 135 | | .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] = note: `#[warn(clippy::map_flatten)]` on by default [INFO] [stdout] help: try replacing `map` with `flat_map` and remove the `.flatten()` [INFO] [stdout] | [INFO] [stdout] 126 ~ .flat_map(|c| { [INFO] [stdout] 127 + let parsed = c.to_digit(16).unwrap() as u8; [INFO] [stdout] 128 + vec![ [INFO] [stdout] 129 + (parsed & 0x8) >> 3, [INFO] [stdout] 130 + (parsed & 0x4) >> 2, [INFO] [stdout] 131 + (parsed & 0x2) >> 1, [INFO] [stdout] 132 + parsed & 0x1, [INFO] [stdout] 133 + ] [INFO] [stdout] 134 + }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `ok` [INFO] [stdout] --> src/util.rs:6:30 [INFO] [stdout] | [INFO] [stdout] 6 | let file: Option = match File::open(path) { [INFO] [stdout] | ______________________________^ [INFO] [stdout] 7 | | Ok(valid_file) => Some(valid_file), [INFO] [stdout] 8 | | Err(_e) => None, [INFO] [stdout] 9 | | }; [INFO] [stdout] | |_____^ help: replace with: `File::open(path).ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_ok_err [INFO] [stdout] = note: `#[warn(clippy::manual_ok_err)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this block may be rewritten with the `?` operator [INFO] [stdout] --> src/util.rs:11:5 [INFO] [stdout] | [INFO] [stdout] 11 | / if file.is_none() { [INFO] [stdout] 12 | | return None; [INFO] [stdout] 13 | | } [INFO] [stdout] | |_____^ help: replace it with: `file.as_ref()?;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] = note: `#[warn(clippy::question_mark)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/main.rs:64:9 [INFO] [stdout] | [INFO] [stdout] 64 | / match part2_result.1 { [INFO] [stdout] 65 | | Some(additional) => println!("{}", additional), [INFO] [stdout] 66 | | None => (), [INFO] [stdout] 67 | | } [INFO] [stdout] | |_________^ help: try: `if let Some(additional) = part2_result.1 { println!("{}", additional) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` 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/problem_01.rs:17:42 [INFO] [stdout] | [INFO] [stdout] 17 | fn solve_actual(&self, measurements: &Vec) -> i64 { [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] 17 - fn solve_actual(&self, measurements: &Vec) -> i64 { [INFO] [stdout] 17 + fn solve_actual(&self, measurements: &[i64]) -> i64 { [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/problem_01.rs:28:48 [INFO] [stdout] | [INFO] [stdout] 28 | fn solve_actual_part2(&self, measurements: &Vec) -> i64 { [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] 28 - fn solve_actual_part2(&self, measurements: &Vec) -> i64 { [INFO] [stdout] 28 + fn solve_actual_part2(&self, measurements: &[i64]) -> i64 { [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/problem_02.rs:27:38 [INFO] [stdout] | [INFO] [stdout] 27 | fn solve_actual(&self, commands: &Vec) -> i64 { [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] 27 - fn solve_actual(&self, commands: &Vec) -> i64 { [INFO] [stdout] 27 + fn solve_actual(&self, commands: &[Command]) -> i64 { [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/problem_02.rs:41:44 [INFO] [stdout] | [INFO] [stdout] 41 | fn solve_actual_part2(&self, commands: &Vec) -> i64 { [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] 41 - fn solve_actual_part2(&self, commands: &Vec) -> i64 { [INFO] [stdout] 41 + fn solve_actual_part2(&self, commands: &[Command]) -> i64 { [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/problem_03.rs:30:41 [INFO] [stdout] | [INFO] [stdout] 30 | fn solve_actual(&self, diagnostics: &Vec>) -> i64 { [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] 30 - fn solve_actual(&self, diagnostics: &Vec>) -> i64 { [INFO] [stdout] 30 + fn solve_actual(&self, diagnostics: &[Vec]) -> i64 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/problem_03.rs:31:12 [INFO] [stdout] | [INFO] [stdout] 31 | if diagnostics.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `diagnostics.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: manual implementation of an assign operation [INFO] [stdout] --> src/problem_03.rs:50:17 [INFO] [stdout] | [INFO] [stdout] 50 | gamma_rate = gamma_rate << 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `gamma_rate <<= 1` [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/problem_03.rs:58:40 [INFO] [stdout] | [INFO] [stdout] 58 | fn calculate_rating(&self, values: &Vec>, invert: bool, index: usize) -> i64 { [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] 58 - fn calculate_rating(&self, values: &Vec>, invert: bool, index: usize) -> i64 { [INFO] [stdout] 58 + fn calculate_rating(&self, values: &[Vec], invert: bool, index: usize) -> i64 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/problem_03.rs:73:64 [INFO] [stdout] | [INFO] [stdout] 73 | if ones_count > halfway || ((ones_count == halfway) && (values.len() % 2 == 0)) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `values.len().is_multiple_of(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/problem_03.rs:89:12 [INFO] [stdout] | [INFO] [stdout] 89 | if diagnostics.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `diagnostics.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] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/problem_03.rs:93:51 [INFO] [stdout] | [INFO] [stdout] 93 | let oxygen_rating = self.calculate_rating(&diagnostics, false, 0); [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `diagnostics` [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/problem_03.rs:94:53 [INFO] [stdout] | [INFO] [stdout] 94 | let scrubber_rating = self.calculate_rating(&diagnostics, true, 0); [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `diagnostics` [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/problem_04.rs:12:23 [INFO] [stdout] | [INFO] [stdout] 12 | pub fn new(board: &Vec>) -> BingoBoard { [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] 12 - pub fn new(board: &Vec>) -> BingoBoard { [INFO] [stdout] 12 + pub fn new(board: &[Vec]) -> BingoBoard { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `i64` which implements the `Copy` trait [INFO] [stdout] --> src/problem_04.rs:18:37 [INFO] [stdout] | [INFO] [stdout] 18 | actual_board.insert(num.clone(), (row_index.clone(), col_index.clone())); [INFO] [stdout] | ^^^^^^^^^^^ help: try dereferencing it: `*num` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/problem_04.rs:18:51 [INFO] [stdout] | [INFO] [stdout] 18 | actual_board.insert(num.clone(), (row_index.clone(), col_index.clone())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `row_index` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/problem_04.rs:18:70 [INFO] [stdout] | [INFO] [stdout] 18 | actual_board.insert(num.clone(), (row_index.clone(), col_index.clone())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `col_index` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/problem_04.rs:19:38 [INFO] [stdout] | [INFO] [stdout] 19 | marked_board.insert((row_index.clone(), col_index.clone()), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `row_index` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/problem_04.rs:19:57 [INFO] [stdout] | [INFO] [stdout] 19 | marked_board.insert((row_index.clone(), col_index.clone()), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `col_index` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/problem_04.rs:31:43 [INFO] [stdout] | [INFO] [stdout] 31 | if self.actual_board.contains_key(&num) { [INFO] [stdout] | ^^^^ help: change this to: `num` [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/problem_04.rs:32:60 [INFO] [stdout] | [INFO] [stdout] 32 | (*self.marked_board.get_mut(&self.actual_board[&num]).unwrap()) = true; [INFO] [stdout] | ^^^^ help: change this to: `num` [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: inequality checks against true can be replaced by a negation [INFO] [stdout] --> src/problem_04.rs:39:16 [INFO] [stdout] | [INFO] [stdout] 39 | if self.marked_board[&(row_index, col_index)] != true { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!self.marked_board[&(row_index, col_index)]` [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: inequality checks against true can be replaced by a negation [INFO] [stdout] --> src/problem_04.rs:51:16 [INFO] [stdout] | [INFO] [stdout] 51 | if self.marked_board[&(row_index, col_index)] != true { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!self.marked_board[&(row_index, col_index)]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against false can be replaced by a negation [INFO] [stdout] --> src/problem_04.rs:75:16 [INFO] [stdout] | [INFO] [stdout] 75 | if self.marked_board[position] == false { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!self.marked_board[position]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/problem_04.rs:88:25 [INFO] [stdout] | [INFO] [stdout] 88 | board_size: self.board_size.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.board_size` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/problem_04.rs:110:15 [INFO] [stdout] | [INFO] [stdout] 110 | while !lines.next().is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `lines.next().is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/problem_04.rs:152:41 [INFO] [stdout] | [INFO] [stdout] 152 | for (board_index, board) in (&mut *bingo_boards).iter_mut().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: change this to: `(*bingo_boards)` [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: deref which would be done by auto-deref [INFO] [stdout] --> src/problem_04.rs:152:41 [INFO] [stdout] | [INFO] [stdout] 152 | for (board_index, board) in (&mut *bingo_boards).iter_mut().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `bingo_boards` [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/problem_05.rs:84:45 [INFO] [stdout] | [INFO] [stdout] 84 | fn solve_actual(&self, submarine_lines: &Vec, include_diagonals: bool) -> i64 { [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] 84 - fn solve_actual(&self, submarine_lines: &Vec, include_diagonals: bool) -> i64 { [INFO] [stdout] 84 + fn solve_actual(&self, submarine_lines: &[Line], include_diagonals: bool) -> i64 { [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/problem_06.rs:17:42 [INFO] [stdout] | [INFO] [stdout] 17 | fn solve_actual(&self, initial_fish: &Vec, simulation_days: i64) -> i64 { [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] 17 - fn solve_actual(&self, initial_fish: &Vec, simulation_days: i64) -> i64 { [INFO] [stdout] 17 + fn solve_actual(&self, initial_fish: &[i64], simulation_days: i64) -> i64 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/problem_07.rs:36:13 [INFO] [stdout] | [INFO] [stdout] 36 | positions.iter().fold(0, |acc, crab| acc + crab) as i64 / positions.len() as i64; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `positions.iter().fold(0, |acc, crab| acc + crab)` [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: this `.fold` can be written more succinctly using another method [INFO] [stdout] --> src/problem_07.rs:36:30 [INFO] [stdout] | [INFO] [stdout] 36 | positions.iter().fold(0, |acc, crab| acc + crab) as i64 / positions.len() as i64; [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 `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/problem_08.rs:10:29 [INFO] [stdout] | [INFO] [stdout] 10 | fn pattern_to_bits(pattern: &String) -> u8 { [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] 10 - fn pattern_to_bits(pattern: &String) -> u8 { [INFO] [stdout] 10 + fn pattern_to_bits(pattern: &str) -> u8 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/problem_08.rs:119:27 [INFO] [stdout] | [INFO] [stdout] 119 | input.lines().map(|line| SignalNote::new(line)).collect() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `SignalNote::new` [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/problem_08.rs:122:42 [INFO] [stdout] | [INFO] [stdout] 122 | fn solve_actual(&self, signal_notes: &Vec) -> i64 { [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] 122 - fn solve_actual(&self, signal_notes: &Vec) -> i64 { [INFO] [stdout] 122 + fn solve_actual(&self, signal_notes: &[SignalNote]) -> i64 { [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/problem_08.rs:133:48 [INFO] [stdout] | [INFO] [stdout] 133 | fn solve_actual_part2(&self, signal_notes: &Vec) -> i64 { [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] 133 - fn solve_actual_part2(&self, signal_notes: &Vec) -> i64 { [INFO] [stdout] 133 + fn solve_actual_part2(&self, signal_notes: &[SignalNote]) -> i64 { [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/problem_09.rs:19:40 [INFO] [stdout] | [INFO] [stdout] 19 | fn basin_centers(&self, heightmap: &Vec>) -> Vec<(usize, usize)> { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 19 - fn basin_centers(&self, heightmap: &Vec>) -> Vec<(usize, usize)> { [INFO] [stdout] 19 + fn basin_centers(&self, heightmap: &[Vec]) -> Vec<(usize, 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/problem_09.rs:52:36 [INFO] [stdout] | [INFO] [stdout] 52 | fn basin_bfs(&self, heightmap: &Vec>, basin_center: (usize, usize)) -> i64 { [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] 52 - fn basin_bfs(&self, heightmap: &Vec>, basin_center: (usize, usize)) -> i64 { [INFO] [stdout] 52 + fn basin_bfs(&self, heightmap: &[Vec], basin_center: (usize, usize)) -> i64 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/problem_09.rs:59:15 [INFO] [stdout] | [INFO] [stdout] 59 | while to_be_checked.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!to_be_checked.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] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/problem_10.rs:40:25 [INFO] [stdout] | [INFO] [stdout] 40 | / if char_stack.pop().unwrap() != closed_map[&c] { [INFO] [stdout] 41 | | score += scoring[&c]; [INFO] [stdout] 42 | | corrupt = true; [INFO] [stdout] 43 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 39 ~ ')' | ']' | '}' | '>' [INFO] [stdout] 40 ~ if char_stack.pop().unwrap() != closed_map[&c] => { [INFO] [stdout] 41 | score += scoring[&c]; [INFO] [stdout] 42 | corrupt = true; [INFO] [stdout] 43 ~ } [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/problem_11.rs:19:43 [INFO] [stdout] | [INFO] [stdout] 19 | fn simulate_step(&self, octopus_grid: &mut Vec>) -> i64 { [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] 19 - fn simulate_step(&self, octopus_grid: &mut Vec>) -> i64 { [INFO] [stdout] 19 + fn simulate_step(&self, octopus_grid: &mut [Vec]) -> i64 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `row` is used to index `octopus_grid` [INFO] [stdout] --> src/problem_11.rs:24:20 [INFO] [stdout] | [INFO] [stdout] 24 | for row in 0..octopus_grid.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 24 - for row in 0..octopus_grid.len() { [INFO] [stdout] 24 + for (row, ) in octopus_grid.iter_mut().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/problem_11.rs:34:15 [INFO] [stdout] | [INFO] [stdout] 34 | while to_be_flashed.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!to_be_flashed.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] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `u16` which implements the `Copy` trait [INFO] [stdout] --> src/problem_12.rs:47:60 [INFO] [stdout] | [INFO] [stdout] 47 | (*edges.get_mut(&first).unwrap()).push(second.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `second` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `u16` which implements the `Copy` trait [INFO] [stdout] --> src/problem_12.rs:49:34 [INFO] [stdout] | [INFO] [stdout] 49 | edges.insert(first.clone(), vec![second.clone()]); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try removing the `clone` call: `first` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `u16` which implements the `Copy` trait [INFO] [stdout] --> src/problem_12.rs:49:54 [INFO] [stdout] | [INFO] [stdout] 49 | edges.insert(first.clone(), vec![second.clone()]); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `second` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> src/problem_12.rs:53:17 [INFO] [stdout] | [INFO] [stdout] 53 | / if edges.contains_key(&second) { [INFO] [stdout] 54 | | (*edges.get_mut(&second).unwrap()).push(first); [INFO] [stdout] 55 | | } else { [INFO] [stdout] 56 | | edges.insert(second, vec![first]); [INFO] [stdout] 57 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry [INFO] [stdout] = note: `#[warn(clippy::map_entry)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 53 ~ if let std::collections::hash_map::Entry::Vacant(e) = edges.entry(second) { [INFO] [stdout] 54 + e.insert(vec![first]); [INFO] [stdout] 55 + } else { [INFO] [stdout] 56 + (*edges.get_mut(&second).unwrap()).push(first); [INFO] [stdout] 57 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/problem_12.rs:72:15 [INFO] [stdout] | [INFO] [stdout] 72 | while states_to_check.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!states_to_check.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] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `u16` which implements the `Copy` trait [INFO] [stdout] --> src/problem_12.rs:76:35 [INFO] [stdout] | [INFO] [stdout] 76 | seen_nodes.insert(current_node.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `current_node` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/problem_13.rs:94:9 [INFO] [stdout] | [INFO] [stdout] 94 | while let Some(line) = lines.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for line in lines.by_ref()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] = note: `#[warn(clippy::while_let_on_iterator)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/problem_13.rs:95:16 [INFO] [stdout] | [INFO] [stdout] 95 | 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] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/problem_13.rs:105:9 [INFO] [stdout] | [INFO] [stdout] 105 | while let Some(line) = lines.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for line in lines` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> src/problem_14.rs:23:9 [INFO] [stdout] | [INFO] [stdout] 23 | / if self.contains_key(&k) { [INFO] [stdout] 24 | | (*self.get_mut(&k).unwrap()) += v; [INFO] [stdout] 25 | | } else { [INFO] [stdout] 26 | | self.insert(k, v); [INFO] [stdout] 27 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: consider using the `Entry` API: https://doc.rust-lang.org/std/collections/struct.HashMap.html#entry-api [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/problem_14.rs:43:9 [INFO] [stdout] | [INFO] [stdout] 43 | while let Some(rule) = lines.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for rule in lines` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/problem_14.rs:52:27 [INFO] [stdout] | [INFO] [stdout] 52 | polymer_template: &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] 52 - polymer_template: &String, [INFO] [stdout] 52 + polymer_template: &str, [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/problem_14.rs:75:53 [INFO] [stdout] | [INFO] [stdout] 75 | fn build_polymer_pairs(&self, polymer_template: &String) -> 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] 75 - fn build_polymer_pairs(&self, polymer_template: &String) -> HashMap { [INFO] [stdout] 75 + fn build_polymer_pairs(&self, polymer_template: &str) -> HashMap { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/problem_14.rs:79:9 [INFO] [stdout] | [INFO] [stdout] 79 | while let Some(chars) = window.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for chars in window` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/problem_15.rs:46:40 [INFO] [stdout] | [INFO] [stdout] 46 | fn expand_grid(&self, risk_levels: &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 expand_grid(&self, risk_levels: &Vec>) -> Vec> { [INFO] [stdout] 46 + fn expand_grid(&self, risk_levels: &[Vec]) -> 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/problem_15.rs:67:49 [INFO] [stdout] | [INFO] [stdout] 67 | fn get_lowest_risk_cost(&self, risk_levels: &Vec>) -> i64 { [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] 67 - fn get_lowest_risk_cost(&self, risk_levels: &Vec>) -> i64 { [INFO] [stdout] 67 + fn get_lowest_risk_cost(&self, risk_levels: &[Vec]) -> i64 { [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/problem_16.rs:43:25 [INFO] [stdout] | [INFO] [stdout] 43 | fn parse_packet(packet: &Vec, packet_limit: usize, bit_limit: usize) -> (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] 43 - fn parse_packet(packet: &Vec, packet_limit: usize, bit_limit: usize) -> (Vec, usize) { [INFO] [stdout] 43 + fn parse_packet(packet: &[u8], packet_limit: usize, bit_limit: usize) -> (Vec, usize) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/problem_16.rs:126:14 [INFO] [stdout] | [INFO] [stdout] 126 | .map(|c| { [INFO] [stdout] | ______________^ [INFO] [stdout] 127 | | let parsed = c.to_digit(16).unwrap() as u8; [INFO] [stdout] 128 | | vec![ [INFO] [stdout] 129 | | (parsed & 0x8) >> 3, [INFO] [stdout] ... | [INFO] [stdout] 134 | | }) [INFO] [stdout] 135 | | .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] = note: `#[warn(clippy::map_flatten)]` on by default [INFO] [stdout] help: try replacing `map` with `flat_map` and remove the `.flatten()` [INFO] [stdout] | [INFO] [stdout] 126 ~ .flat_map(|c| { [INFO] [stdout] 127 + let parsed = c.to_digit(16).unwrap() as u8; [INFO] [stdout] 128 + vec![ [INFO] [stdout] 129 + (parsed & 0x8) >> 3, [INFO] [stdout] 130 + (parsed & 0x4) >> 2, [INFO] [stdout] 131 + (parsed & 0x2) >> 1, [INFO] [stdout] 132 + parsed & 0x1, [INFO] [stdout] 133 + ] [INFO] [stdout] 134 + }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `ok` [INFO] [stdout] --> src/util.rs:6:30 [INFO] [stdout] | [INFO] [stdout] 6 | let file: Option = match File::open(path) { [INFO] [stdout] | ______________________________^ [INFO] [stdout] 7 | | Ok(valid_file) => Some(valid_file), [INFO] [stdout] 8 | | Err(_e) => None, [INFO] [stdout] 9 | | }; [INFO] [stdout] | |_____^ help: replace with: `File::open(path).ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_ok_err [INFO] [stdout] = note: `#[warn(clippy::manual_ok_err)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this block may be rewritten with the `?` operator [INFO] [stdout] --> src/util.rs:11:5 [INFO] [stdout] | [INFO] [stdout] 11 | / if file.is_none() { [INFO] [stdout] 12 | | return None; [INFO] [stdout] 13 | | } [INFO] [stdout] | |_____^ help: replace it with: `file.as_ref()?;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] = note: `#[warn(clippy::question_mark)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/main.rs:64:9 [INFO] [stdout] | [INFO] [stdout] 64 | / match part2_result.1 { [INFO] [stdout] 65 | | Some(additional) => println!("{}", additional), [INFO] [stdout] 66 | | None => (), [INFO] [stdout] 67 | | } [INFO] [stdout] | |_________^ help: try: `if let Some(additional) = part2_result.1 { println!("{}", additional) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.90s [INFO] running `Command { std: "docker" "inspect" "7950ec92ccf44d48fec59157dab68d6d4fcc1265c516cd826b6235c1a54d4842", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "7950ec92ccf44d48fec59157dab68d6d4fcc1265c516cd826b6235c1a54d4842", kill_on_drop: false }` [INFO] [stdout] 7950ec92ccf44d48fec59157dab68d6d4fcc1265c516cd826b6235c1a54d4842