[INFO] cloning repository https://github.com/Creator13/AdventOfCode2021 [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/Creator13/AdventOfCode2021" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FCreator13%2FAdventOfCode2021", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FCreator13%2FAdventOfCode2021'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 52916411067a2488b6f81a939259735092b8cfc1 [INFO] linting Creator13/AdventOfCode2021 against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FCreator13%2FAdventOfCode2021" "/workspace/builds/worker-3-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-3-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/Creator13/AdventOfCode2021 [INFO] finished tweaking git repo https://github.com/Creator13/AdventOfCode2021 [INFO] tweaked toml for git repo https://github.com/Creator13/AdventOfCode2021 written to /workspace/builds/worker-3-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/Creator13/AdventOfCode2021 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/Creator13/AdventOfCode2021 already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] d96f32af16680cd739b31a199e607a4b3941bd6446f5bcd1d9143e76d902904b [INFO] running `Command { std: "docker" "start" "-a" "d96f32af16680cd739b31a199e607a4b3941bd6446f5bcd1d9143e76d902904b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "d96f32af16680cd739b31a199e607a4b3941bd6446f5bcd1d9143e76d902904b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "d96f32af16680cd739b31a199e607a4b3941bd6446f5bcd1d9143e76d902904b", kill_on_drop: false }` [INFO] [stdout] d96f32af16680cd739b31a199e607a4b3941bd6446f5bcd1d9143e76d902904b [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 2b075295f9fab2c2db1398de1b7519b6b219fa7930d87af78c51ed418da67ef5 [INFO] running `Command { std: "docker" "start" "-a" "2b075295f9fab2c2db1398de1b7519b6b219fa7930d87af78c51ed418da67ef5", kill_on_drop: false }` [INFO] [stderr] Checking aoc2021 v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused variable: `step` [INFO] [stdout] --> src/challenge11.rs:94:9 [INFO] [stdout] | [INFO] [stdout] 94 | for step in 0..steps { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_step` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `OutputLine` is never constructed [INFO] [stdout] --> src/challenge8.rs:10:8 [INFO] [stdout] | [INFO] [stdout] 10 | struct OutputLine { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `get_at` and `reset_flashed` are never used [INFO] [stdout] --> src/challenge11.rs:9:12 [INFO] [stdout] | [INFO] [stdout] 8 | impl Grid { [INFO] [stdout] | --------- methods in this implementation [INFO] [stdout] 9 | pub fn get_at(&self, x: usize, y: usize) -> u8 { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 54 | pub fn reset_flashed(&mut self) { [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/challenge1.rs:36:31 [INFO] [stdout] | [INFO] [stdout] 36 | pub fn count_increments(nums: &Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 36 - pub fn count_increments(nums: &Vec) -> i32 { [INFO] [stdout] 36 + pub fn count_increments(nums: &[i32]) -> i32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/challenge1.rs:43:39 [INFO] [stdout] | [INFO] [stdout] 43 | pub fn count_increments_windows(nums: &Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 43 - pub fn count_increments_windows(nums: &Vec) -> i32 { [INFO] [stdout] 43 + pub fn count_increments_windows(nums: &[i32]) -> i32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/challenge2.rs:41:27 [INFO] [stdout] | [INFO] [stdout] 41 | fn map_to_commands(input: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 41 - fn map_to_commands(input: &Vec) -> Vec { [INFO] [stdout] 41 + fn map_to_commands(input: &[String]) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `repeat().take()` can be written more concisely [INFO] [stdout] --> src/challenge3.rs:275:33 [INFO] [stdout] | [INFO] [stdout] 275 | let mut counter: Vec = std::iter::repeat(0).take(bit_count).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n(0, bit_count)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n [INFO] [stdout] = note: `#[warn(clippy::manual_repeat_n)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `repeat().take()` can be written more concisely [INFO] [stdout] --> src/challenge3.rs:295:33 [INFO] [stdout] | [INFO] [stdout] 295 | let mut counter: Vec = std::iter::repeat(0).take(bit_count).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n(0, bit_count)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/challenge4.rs:256:21 [INFO] [stdout] | [INFO] [stdout] 256 | None => return, [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: replace `return` with a unit value [INFO] [stdout] | [INFO] [stdout] 256 - None => return, [INFO] [stdout] 256 + None => (), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> src/challenge4.rs:264:49 [INFO] [stdout] | [INFO] [stdout] 264 | .any(|chunk| chunk.iter().all(|val| *val == true)); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `*val` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `repeat().take()` can be written more concisely [INFO] [stdout] --> src/challenge4.rs:306:23 [INFO] [stdout] | [INFO] [stdout] 306 | let markers = std::iter::repeat(false).take(values.len()).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n(false, values.len())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/challenge4.rs:334:5 [INFO] [stdout] | [INFO] [stdout] 334 | return (draws, boards); [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] 334 - return (draws, boards); [INFO] [stdout] 334 + (draws, boards) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this manual char comparison can be written more succinctly [INFO] [stdout] --> src/challenge4.rs:326:16 [INFO] [stdout] | [INFO] [stdout] 326 | .split(|char| char == ',') [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: consider using a `char`: `','` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_pattern_char_comparison [INFO] [stdout] = note: `#[warn(clippy::manual_pattern_char_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/challenge4.rs:331:14 [INFO] [stdout] | [INFO] [stdout] 331 | .map(|board_slice| Board::from(board_slice)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Board::from` [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 `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/challenge4.rs:337:54 [INFO] [stdout] | [INFO] [stdout] 337 | pub fn first_winning_board<'a>(draws: &[u8], boards: &'a mut Vec) -> (&'a Board, 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] 337 - pub fn first_winning_board<'a>(draws: &[u8], boards: &'a mut Vec) -> (&'a Board, u8) { [INFO] [stdout] 337 + pub fn first_winning_board<'a>(draws: &[u8], boards: &'a mut [Board]) -> (&'a Board, u8) { [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/challenge4.rs:354:49 [INFO] [stdout] | [INFO] [stdout] 354 | fn last_winning_board<'a>(draws: &[u8], boards: &'a mut Vec) -> (&'a Board, 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] 354 - fn last_winning_board<'a>(draws: &[u8], boards: &'a mut Vec) -> (&'a Board, u8) { [INFO] [stdout] 354 + fn last_winning_board<'a>(draws: &[u8], boards: &'a mut [Board]) -> (&'a Board, u8) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this looks like you are swapping `start_x` and `end_x` manually [INFO] [stdout] --> src/challenge5.rs:120:17 [INFO] [stdout] | [INFO] [stdout] 120 | / let tmp = start_x; [INFO] [stdout] 121 | | start_x = end_x; [INFO] [stdout] 122 | | end_x = tmp; [INFO] [stdout] | |____________________________^ help: try: `std::mem::swap(&mut start_x, &mut end_x);` [INFO] [stdout] | [INFO] [stdout] = note: or maybe you should use `std::mem::replace`? [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_swap [INFO] [stdout] = note: `#[warn(clippy::manual_swap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `visits` [INFO] [stdout] --> src/challenge5.rs:125:22 [INFO] [stdout] | [INFO] [stdout] 125 | for i in (start_x + width * y)..=(end_x + width * y) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 125 - for i in (start_x + width * y)..=(end_x + width * y) { [INFO] [stdout] 125 + for in visits.iter_mut().take(end_x + width * y + 1).skip((start_x + width * y)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this looks like you are swapping `start_y` and `end_y` manually [INFO] [stdout] --> src/challenge5.rs:134:17 [INFO] [stdout] | [INFO] [stdout] 134 | / let tmp = start_y; [INFO] [stdout] 135 | | start_y = end_y; [INFO] [stdout] 136 | | end_y = tmp; [INFO] [stdout] | |____________________________^ help: try: `std::mem::swap(&mut start_y, &mut end_y);` [INFO] [stdout] | [INFO] [stdout] = note: or maybe you should use `std::mem::replace`? [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_swap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `y` is used as a loop counter [INFO] [stdout] --> src/challenge5.rs:159:17 [INFO] [stdout] | [INFO] [stdout] 159 | for x in min(start_x, end_x)..=max(start_x, end_x) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (y, x) in (min(start_y, end_y)..).zip((min(start_x, end_x)..=max(start_x, end_x)))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] = note: `#[warn(clippy::explicit_counter_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `y` is used as a loop counter [INFO] [stdout] --> src/challenge5.rs:165:17 [INFO] [stdout] | [INFO] [stdout] 165 | for x in (min(start_x, end_x)..=max(start_x, end_x)).rev() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (y, x) in (min(start_y, end_y)..).zip((min(start_x, end_x)..=max(start_x, end_x)).rev())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this looks like you are swapping `start_x` and `end_x` manually [INFO] [stdout] --> src/challenge5.rs:176:21 [INFO] [stdout] | [INFO] [stdout] 176 | / let tmp = start_x; [INFO] [stdout] 177 | | start_x = end_x; [INFO] [stdout] 178 | | end_x = tmp; [INFO] [stdout] | |________________________________^ help: try: `std::mem::swap(&mut start_x, &mut end_x);` [INFO] [stdout] | [INFO] [stdout] = note: or maybe you should use `std::mem::replace`? [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_swap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `visits` [INFO] [stdout] --> src/challenge5.rs:181:26 [INFO] [stdout] | [INFO] [stdout] 181 | for i in (start_x + width * y)..=(end_x + width * y) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 181 - for i in (start_x + width * y)..=(end_x + width * y) { [INFO] [stdout] 181 + for in visits.iter_mut().take(end_x + width * y + 1).skip((start_x + width * y)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this looks like you are swapping `start_y` and `end_y` manually [INFO] [stdout] --> src/challenge5.rs:190:21 [INFO] [stdout] | [INFO] [stdout] 190 | / let tmp = start_y; [INFO] [stdout] 191 | | start_y = end_y; [INFO] [stdout] 192 | | end_y = tmp; [INFO] [stdout] | |________________________________^ help: try: `std::mem::swap(&mut start_y, &mut end_y);` [INFO] [stdout] | [INFO] [stdout] = note: or maybe you should use `std::mem::replace`? [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_swap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/challenge6.rs:27:26 [INFO] [stdout] | [INFO] [stdout] 27 | pub fn challenge1(input: &String, days: 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] 27 - pub fn challenge1(input: &String, days: usize) -> usize { [INFO] [stdout] 27 + pub fn challenge1(input: &str, days: usize) -> usize { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/challenge6.rs:39:26 [INFO] [stdout] | [INFO] [stdout] 39 | pub fn challenge2(input: &String, days: usize) -> 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] 39 - pub fn challenge2(input: &String, days: usize) -> u64 { [INFO] [stdout] 39 + pub fn challenge2(input: &str, days: usize) -> u64 { [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/challenge8.rs:15:22 [INFO] [stdout] | [INFO] [stdout] 15 | fn parse_line(input: &String) -> InputLine { [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] 15 - fn parse_line(input: &String) -> InputLine { [INFO] [stdout] 15 + fn parse_line(input: &str) -> InputLine { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/challenge8.rs:45:31 [INFO] [stdout] | [INFO] [stdout] 45 | .filter(|seg| match seg.len() { [INFO] [stdout] | _______________________________^ [INFO] [stdout] 46 | | 2 | 3 | 4 | 7 => true, [INFO] [stdout] 47 | | _ => false, [INFO] [stdout] 48 | | }) [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 45 - .filter(|seg| match seg.len() { [INFO] [stdout] 46 - 2 | 3 | 4 | 7 => true, [INFO] [stdout] 47 - _ => false, [INFO] [stdout] 48 - }) [INFO] [stdout] 45 + .filter(|seg| matches!(seg.len(), 2 | 3 | 4 | 7)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/challenge8.rs:55:34 [INFO] [stdout] | [INFO] [stdout] 55 | let input = input.iter().map(|val| parse_line(val)).collect::>(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `parse_line` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/challenge9.rs:76:15 [INFO] [stdout] | [INFO] [stdout] 76 | while open_list.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!open_list.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/challenge9.rs:83:17 [INFO] [stdout] | [INFO] [stdout] 83 | / if left < 9 { [INFO] [stdout] 84 | | if !open_list.contains(&coords) && !visited.contains(&coords) { [INFO] [stdout] 85 | | open_list.push_back(coords) [INFO] [stdout] 86 | | } [INFO] [stdout] 87 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 83 ~ if left < 9 [INFO] [stdout] 84 ~ && !open_list.contains(&coords) && !visited.contains(&coords) { [INFO] [stdout] 85 | open_list.push_back(coords) [INFO] [stdout] 86 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/challenge9.rs:92:17 [INFO] [stdout] | [INFO] [stdout] 92 | / if right < 9 { [INFO] [stdout] 93 | | if !open_list.contains(&coords) && !visited.contains(&coords) { [INFO] [stdout] 94 | | open_list.push_back(coords) [INFO] [stdout] 95 | | } [INFO] [stdout] 96 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 92 ~ if right < 9 [INFO] [stdout] 93 ~ && !open_list.contains(&coords) && !visited.contains(&coords) { [INFO] [stdout] 94 | open_list.push_back(coords) [INFO] [stdout] 95 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/challenge9.rs:101:17 [INFO] [stdout] | [INFO] [stdout] 101 | / if up < 9 { [INFO] [stdout] 102 | | if !open_list.contains(&coords) && !visited.contains(&coords) { [INFO] [stdout] 103 | | open_list.push_back(coords) [INFO] [stdout] 104 | | } [INFO] [stdout] 105 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 101 ~ if up < 9 [INFO] [stdout] 102 ~ && !open_list.contains(&coords) && !visited.contains(&coords) { [INFO] [stdout] 103 | open_list.push_back(coords) [INFO] [stdout] 104 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/challenge9.rs:110:17 [INFO] [stdout] | [INFO] [stdout] 110 | / if down < 9 { [INFO] [stdout] 111 | | if !open_list.contains(&coords) && !visited.contains(&coords) { [INFO] [stdout] 112 | | open_list.push_back(coords) [INFO] [stdout] 113 | | } [INFO] [stdout] 114 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 110 ~ if down < 9 [INFO] [stdout] 111 ~ && !open_list.contains(&coords) && !visited.contains(&coords) { [INFO] [stdout] 112 | open_list.push_back(coords) [INFO] [stdout] 113 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/challenge10.rs:44:12 [INFO] [stdout] | [INFO] [stdout] 44 | if stack.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `stack.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 boolean expression can be simplified [INFO] [stdout] --> src/challenge11.rs:29:20 [INFO] [stdout] | [INFO] [stdout] 29 | if !(n_y == y && n_x == x) && !self.flashed[self.get_index(n_x, n_y)] { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!(self.flashed[self.get_index(n_x, n_y)] || n_y == y && n_x == x)` [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 creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/challenge11.rs:90:26 [INFO] [stdout] | [INFO] [stdout] 90 | let mut grid = parse(&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: length comparison to zero [INFO] [stdout] --> src/challenge11.rs:115:15 [INFO] [stdout] | [INFO] [stdout] 115 | while unflashed_in_grid.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!unflashed_in_grid.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/challenge11.rs:143:26 [INFO] [stdout] | [INFO] [stdout] 143 | let mut grid = parse(&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: length comparison to zero [INFO] [stdout] --> src/challenge11.rs:154:15 [INFO] [stdout] | [INFO] [stdout] 154 | while unflashed_in_grid.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!unflashed_in_grid.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: unused variable: `step` [INFO] [stdout] --> src/challenge11.rs:94:9 [INFO] [stdout] | [INFO] [stdout] 94 | for step in 0..steps { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_step` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `OutputLine` is never constructed [INFO] [stdout] --> src/challenge8.rs:10:8 [INFO] [stdout] | [INFO] [stdout] 10 | struct OutputLine { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `get_at` and `reset_flashed` are never used [INFO] [stdout] --> src/challenge11.rs:9:12 [INFO] [stdout] | [INFO] [stdout] 8 | impl Grid { [INFO] [stdout] | --------- methods in this implementation [INFO] [stdout] 9 | pub fn get_at(&self, x: usize, y: usize) -> u8 { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 54 | pub fn reset_flashed(&mut self) { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: items after a test module [INFO] [stdout] --> src/challenge1.rs:2:1 [INFO] [stdout] | [INFO] [stdout] 2 | mod tests_increments { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 36 | pub fn count_increments(nums: &Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 43 | pub fn count_increments_windows(nums: &Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#items_after_test_module [INFO] [stdout] = note: `#[warn(clippy::items_after_test_module)]` 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/challenge1.rs:36:31 [INFO] [stdout] | [INFO] [stdout] 36 | pub fn count_increments(nums: &Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 36 - pub fn count_increments(nums: &Vec) -> i32 { [INFO] [stdout] 36 + pub fn count_increments(nums: &[i32]) -> i32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/challenge1.rs:43:39 [INFO] [stdout] | [INFO] [stdout] 43 | pub fn count_increments_windows(nums: &Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 43 - pub fn count_increments_windows(nums: &Vec) -> i32 { [INFO] [stdout] 43 + pub fn count_increments_windows(nums: &[i32]) -> i32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: items after a test module [INFO] [stdout] --> src/challenge2.rs:2:1 [INFO] [stdout] | [INFO] [stdout] 2 | mod tests { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 35 | enum Command { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 41 | fn map_to_commands(input: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 56 | pub fn move_directly(input: &Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 73 | pub fn move_by_aim(input: &Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#items_after_test_module [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/challenge2.rs:41:27 [INFO] [stdout] | [INFO] [stdout] 41 | fn map_to_commands(input: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 41 - fn map_to_commands(input: &Vec) -> Vec { [INFO] [stdout] 41 + fn map_to_commands(input: &[String]) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `repeat().take()` can be written more concisely [INFO] [stdout] --> src/challenge3.rs:275:33 [INFO] [stdout] | [INFO] [stdout] 275 | let mut counter: Vec = std::iter::repeat(0).take(bit_count).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n(0, bit_count)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n [INFO] [stdout] = note: `#[warn(clippy::manual_repeat_n)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `repeat().take()` can be written more concisely [INFO] [stdout] --> src/challenge3.rs:295:33 [INFO] [stdout] | [INFO] [stdout] 295 | let mut counter: Vec = std::iter::repeat(0).take(bit_count).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n(0, bit_count)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `repeat().take()` can be written more concisely [INFO] [stdout] --> src/challenge4.rs:38:23 [INFO] [stdout] | [INFO] [stdout] 38 | let markers = std::iter::repeat(false).take(values.len()).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n(false, values.len())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/challenge4.rs:95:9 [INFO] [stdout] | [INFO] [stdout] 95 | assert_eq!(board.wins(), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_assert_comparison)]` on by default [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 95 - assert_eq!(board.wins(), true); [INFO] [stdout] 95 + assert!(board.wins()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/challenge4.rs:109:9 [INFO] [stdout] | [INFO] [stdout] 109 | assert_eq!(board.wins(), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 109 - assert_eq!(board.wins(), true); [INFO] [stdout] 109 + assert!(board.wins()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/challenge4.rs:123:37 [INFO] [stdout] | [INFO] [stdout] 123 | assert_eq!(board.summary(), 22 + 13 + 17 + 0 + 8 + 23 + 24 + 9 + 14 + 7 + 6 + 10 + 3 + 5 + 1 + 20); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: consider reducing it to: `(22 + 13 + 17)` [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: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/challenge4.rs:137:9 [INFO] [stdout] | [INFO] [stdout] 137 | assert_eq!(board.wins(), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 137 - assert_eq!(board.wins(), false); [INFO] [stdout] 137 + assert!(!board.wins()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/challenge4.rs:154:9 [INFO] [stdout] | [INFO] [stdout] 154 | assert_eq!(board.wins(), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 154 - assert_eq!(board.wins(), true); [INFO] [stdout] 154 + assert!(board.wins()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/challenge4.rs:172:9 [INFO] [stdout] | [INFO] [stdout] 172 | assert_eq!(board.wins(), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 172 - assert_eq!(board.wins(), false); [INFO] [stdout] 172 + assert!(!board.wins()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/challenge4.rs:256:21 [INFO] [stdout] | [INFO] [stdout] 256 | None => return, [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: replace `return` with a unit value [INFO] [stdout] | [INFO] [stdout] 256 - None => return, [INFO] [stdout] 256 + None => (), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> src/challenge4.rs:264:49 [INFO] [stdout] | [INFO] [stdout] 264 | .any(|chunk| chunk.iter().all(|val| *val == true)); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `*val` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `repeat().take()` can be written more concisely [INFO] [stdout] --> src/challenge4.rs:306:23 [INFO] [stdout] | [INFO] [stdout] 306 | let markers = std::iter::repeat(false).take(values.len()).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n(false, values.len())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/challenge4.rs:334:5 [INFO] [stdout] | [INFO] [stdout] 334 | return (draws, boards); [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] 334 - return (draws, boards); [INFO] [stdout] 334 + (draws, boards) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this manual char comparison can be written more succinctly [INFO] [stdout] --> src/challenge4.rs:326:16 [INFO] [stdout] | [INFO] [stdout] 326 | .split(|char| char == ',') [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: consider using a `char`: `','` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_pattern_char_comparison [INFO] [stdout] = note: `#[warn(clippy::manual_pattern_char_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/challenge4.rs:331:14 [INFO] [stdout] | [INFO] [stdout] 331 | .map(|board_slice| Board::from(board_slice)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Board::from` [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 `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/challenge4.rs:337:54 [INFO] [stdout] | [INFO] [stdout] 337 | pub fn first_winning_board<'a>(draws: &[u8], boards: &'a mut Vec) -> (&'a Board, 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] 337 - pub fn first_winning_board<'a>(draws: &[u8], boards: &'a mut Vec) -> (&'a Board, u8) { [INFO] [stdout] 337 + pub fn first_winning_board<'a>(draws: &[u8], boards: &'a mut [Board]) -> (&'a Board, u8) { [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/challenge4.rs:354:49 [INFO] [stdout] | [INFO] [stdout] 354 | fn last_winning_board<'a>(draws: &[u8], boards: &'a mut Vec) -> (&'a Board, 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] 354 - fn last_winning_board<'a>(draws: &[u8], boards: &'a mut Vec) -> (&'a Board, u8) { [INFO] [stdout] 354 + fn last_winning_board<'a>(draws: &[u8], boards: &'a mut [Board]) -> (&'a Board, u8) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this looks like you are swapping `start_x` and `end_x` manually [INFO] [stdout] --> src/challenge5.rs:120:17 [INFO] [stdout] | [INFO] [stdout] 120 | / let tmp = start_x; [INFO] [stdout] 121 | | start_x = end_x; [INFO] [stdout] 122 | | end_x = tmp; [INFO] [stdout] | |____________________________^ help: try: `std::mem::swap(&mut start_x, &mut end_x);` [INFO] [stdout] | [INFO] [stdout] = note: or maybe you should use `std::mem::replace`? [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_swap [INFO] [stdout] = note: `#[warn(clippy::manual_swap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `visits` [INFO] [stdout] --> src/challenge5.rs:125:22 [INFO] [stdout] | [INFO] [stdout] 125 | for i in (start_x + width * y)..=(end_x + width * y) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 125 - for i in (start_x + width * y)..=(end_x + width * y) { [INFO] [stdout] 125 + for in visits.iter_mut().take(end_x + width * y + 1).skip((start_x + width * y)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this looks like you are swapping `start_y` and `end_y` manually [INFO] [stdout] --> src/challenge5.rs:134:17 [INFO] [stdout] | [INFO] [stdout] 134 | / let tmp = start_y; [INFO] [stdout] 135 | | start_y = end_y; [INFO] [stdout] 136 | | end_y = tmp; [INFO] [stdout] | |____________________________^ help: try: `std::mem::swap(&mut start_y, &mut end_y);` [INFO] [stdout] | [INFO] [stdout] = note: or maybe you should use `std::mem::replace`? [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_swap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `y` is used as a loop counter [INFO] [stdout] --> src/challenge5.rs:159:17 [INFO] [stdout] | [INFO] [stdout] 159 | for x in min(start_x, end_x)..=max(start_x, end_x) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (y, x) in (min(start_y, end_y)..).zip((min(start_x, end_x)..=max(start_x, end_x)))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] = note: `#[warn(clippy::explicit_counter_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `y` is used as a loop counter [INFO] [stdout] --> src/challenge5.rs:165:17 [INFO] [stdout] | [INFO] [stdout] 165 | for x in (min(start_x, end_x)..=max(start_x, end_x)).rev() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (y, x) in (min(start_y, end_y)..).zip((min(start_x, end_x)..=max(start_x, end_x)).rev())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this looks like you are swapping `start_x` and `end_x` manually [INFO] [stdout] --> src/challenge5.rs:176:21 [INFO] [stdout] | [INFO] [stdout] 176 | / let tmp = start_x; [INFO] [stdout] 177 | | start_x = end_x; [INFO] [stdout] 178 | | end_x = tmp; [INFO] [stdout] | |________________________________^ help: try: `std::mem::swap(&mut start_x, &mut end_x);` [INFO] [stdout] | [INFO] [stdout] = note: or maybe you should use `std::mem::replace`? [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_swap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `visits` [INFO] [stdout] --> src/challenge5.rs:181:26 [INFO] [stdout] | [INFO] [stdout] 181 | for i in (start_x + width * y)..=(end_x + width * y) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 181 - for i in (start_x + width * y)..=(end_x + width * y) { [INFO] [stdout] 181 + for in visits.iter_mut().take(end_x + width * y + 1).skip((start_x + width * y)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this looks like you are swapping `start_y` and `end_y` manually [INFO] [stdout] --> src/challenge5.rs:190:21 [INFO] [stdout] | [INFO] [stdout] 190 | / let tmp = start_y; [INFO] [stdout] 191 | | start_y = end_y; [INFO] [stdout] 192 | | end_y = tmp; [INFO] [stdout] | |________________________________^ help: try: `std::mem::swap(&mut start_y, &mut end_y);` [INFO] [stdout] | [INFO] [stdout] = note: or maybe you should use `std::mem::replace`? [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_swap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: items after a test module [INFO] [stdout] --> src/challenge6.rs:2:1 [INFO] [stdout] | [INFO] [stdout] 2 | mod tests { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 27 | pub fn challenge1(input: &String, days: usize) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 39 | pub fn challenge2(input: &String, days: usize) -> u64 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#items_after_test_module [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/challenge6.rs:27:26 [INFO] [stdout] | [INFO] [stdout] 27 | pub fn challenge1(input: &String, days: 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] 27 - pub fn challenge1(input: &String, days: usize) -> usize { [INFO] [stdout] 27 + pub fn challenge1(input: &str, days: usize) -> usize { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/challenge6.rs:39:26 [INFO] [stdout] | [INFO] [stdout] 39 | pub fn challenge2(input: &String, days: usize) -> 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] 39 - pub fn challenge2(input: &String, days: usize) -> u64 { [INFO] [stdout] 39 + pub fn challenge2(input: &str, days: usize) -> u64 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: items after a test module [INFO] [stdout] --> src/challenge7.rs:2:1 [INFO] [stdout] | [INFO] [stdout] 2 | mod tests { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 28 | use std::cmp; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] 29 | [INFO] [stdout] 30 | pub fn challenge1(input: &[i32]) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 44 | pub fn challenge2(input: &[i32]) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#items_after_test_module [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/challenge8.rs:15:22 [INFO] [stdout] | [INFO] [stdout] 15 | fn parse_line(input: &String) -> InputLine { [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] 15 - fn parse_line(input: &String) -> InputLine { [INFO] [stdout] 15 + fn parse_line(input: &str) -> InputLine { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/challenge8.rs:45:31 [INFO] [stdout] | [INFO] [stdout] 45 | .filter(|seg| match seg.len() { [INFO] [stdout] | _______________________________^ [INFO] [stdout] 46 | | 2 | 3 | 4 | 7 => true, [INFO] [stdout] 47 | | _ => false, [INFO] [stdout] 48 | | }) [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 45 - .filter(|seg| match seg.len() { [INFO] [stdout] 46 - 2 | 3 | 4 | 7 => true, [INFO] [stdout] 47 - _ => false, [INFO] [stdout] 48 - }) [INFO] [stdout] 45 + .filter(|seg| matches!(seg.len(), 2 | 3 | 4 | 7)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/challenge8.rs:55:34 [INFO] [stdout] | [INFO] [stdout] 55 | let input = input.iter().map(|val| parse_line(val)).collect::>(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `parse_line` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/challenge9.rs:76:15 [INFO] [stdout] | [INFO] [stdout] 76 | while open_list.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!open_list.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/challenge9.rs:83:17 [INFO] [stdout] | [INFO] [stdout] 83 | / if left < 9 { [INFO] [stdout] 84 | | if !open_list.contains(&coords) && !visited.contains(&coords) { [INFO] [stdout] 85 | | open_list.push_back(coords) [INFO] [stdout] 86 | | } [INFO] [stdout] 87 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 83 ~ if left < 9 [INFO] [stdout] 84 ~ && !open_list.contains(&coords) && !visited.contains(&coords) { [INFO] [stdout] 85 | open_list.push_back(coords) [INFO] [stdout] 86 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/challenge9.rs:92:17 [INFO] [stdout] | [INFO] [stdout] 92 | / if right < 9 { [INFO] [stdout] 93 | | if !open_list.contains(&coords) && !visited.contains(&coords) { [INFO] [stdout] 94 | | open_list.push_back(coords) [INFO] [stdout] 95 | | } [INFO] [stdout] 96 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 92 ~ if right < 9 [INFO] [stdout] 93 ~ && !open_list.contains(&coords) && !visited.contains(&coords) { [INFO] [stdout] 94 | open_list.push_back(coords) [INFO] [stdout] 95 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/challenge9.rs:101:17 [INFO] [stdout] | [INFO] [stdout] 101 | / if up < 9 { [INFO] [stdout] 102 | | if !open_list.contains(&coords) && !visited.contains(&coords) { [INFO] [stdout] 103 | | open_list.push_back(coords) [INFO] [stdout] 104 | | } [INFO] [stdout] 105 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 101 ~ if up < 9 [INFO] [stdout] 102 ~ && !open_list.contains(&coords) && !visited.contains(&coords) { [INFO] [stdout] 103 | open_list.push_back(coords) [INFO] [stdout] 104 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/challenge9.rs:110:17 [INFO] [stdout] | [INFO] [stdout] 110 | / if down < 9 { [INFO] [stdout] 111 | | if !open_list.contains(&coords) && !visited.contains(&coords) { [INFO] [stdout] 112 | | open_list.push_back(coords) [INFO] [stdout] 113 | | } [INFO] [stdout] 114 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 110 ~ if down < 9 [INFO] [stdout] 111 ~ && !open_list.contains(&coords) && !visited.contains(&coords) { [INFO] [stdout] 112 | open_list.push_back(coords) [INFO] [stdout] 113 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/challenge10.rs:44:12 [INFO] [stdout] | [INFO] [stdout] 44 | if stack.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `stack.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 boolean expression can be simplified [INFO] [stdout] --> src/challenge11.rs:29:20 [INFO] [stdout] | [INFO] [stdout] 29 | if !(n_y == y && n_x == x) && !self.flashed[self.get_index(n_x, n_y)] { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!(self.flashed[self.get_index(n_x, n_y)] || n_y == y && n_x == x)` [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 creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/challenge11.rs:90:26 [INFO] [stdout] | [INFO] [stdout] 90 | let mut grid = parse(&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: length comparison to zero [INFO] [stdout] --> src/challenge11.rs:115:15 [INFO] [stdout] | [INFO] [stdout] 115 | while unflashed_in_grid.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!unflashed_in_grid.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/challenge11.rs:143:26 [INFO] [stdout] | [INFO] [stdout] 143 | let mut grid = parse(&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: length comparison to zero [INFO] [stdout] --> src/challenge11.rs:154:15 [INFO] [stdout] | [INFO] [stdout] 154 | while unflashed_in_grid.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!unflashed_in_grid.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: useless use of `vec!` [INFO] [stdout] --> src/challenge8.rs:108:27 [INFO] [stdout] | [INFO] [stdout] 108 | input_values: vec![ [INFO] [stdout] | ___________________________^ [INFO] [stdout] 109 | | "gcafb", "gcf", "dcaebfg", "ecagb", "gf", "abcdeg", "gaef", "cafbge", "fdbac", [INFO] [stdout] 110 | | "fegbdc", [INFO] [stdout] 111 | | ] [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] 108 ~ input_values: ["gcafb", "gcf", "dcaebfg", "ecagb", "gf", "abcdeg", "gaef", "cafbge", "fdbac", [INFO] [stdout] 109 + "fegbdc"] [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/challenge8.rs:115:28 [INFO] [stdout] | [INFO] [stdout] 115 | output_values: vec!["fgae", "cfgab", "fg", "bagce"] [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `["fgae", "cfgab", "fg", "bagce"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:61:48 [INFO] [stdout] | [INFO] [stdout] 61 | let result = challenge2::move_directly(&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/main.rs:68:46 [INFO] [stdout] | [INFO] [stdout] 68 | let result = challenge2::move_by_aim(&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/main.rs:92:57 [INFO] [stdout] | [INFO] [stdout] 92 | let result = challenge3::get_power_rates_binary(&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/main.rs:99:58 [INFO] [stdout] | [INFO] [stdout] 99 | let result = challenge3::get_power_rates_logical(&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/main.rs:106:49 [INFO] [stdout] | [INFO] [stdout] 106 | let result = challenge3::get_life_rates(&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/main.rs:128:45 [INFO] [stdout] | [INFO] [stdout] 128 | let result = challenge4::challenge1(&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/main.rs:135:45 [INFO] [stdout] | [INFO] [stdout] 135 | let result = challenge4::challenge2(&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/main.rs:159:63 [INFO] [stdout] | [INFO] [stdout] 159 | let result = challenge5::challenge1(parse_coordinates(&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/main.rs:166:63 [INFO] [stdout] | [INFO] [stdout] 166 | let result = challenge5::challenge2(parse_coordinates(&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/main.rs:189:45 [INFO] [stdout] | [INFO] [stdout] 189 | let result = challenge6::challenge2(&input, 80); [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/main.rs:196:45 [INFO] [stdout] | [INFO] [stdout] 196 | let result = challenge6::challenge2(&input, 256); [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/main.rs:218:45 [INFO] [stdout] | [INFO] [stdout] 218 | let result = challenge7::challenge1(&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/main.rs:225:45 [INFO] [stdout] | [INFO] [stdout] 225 | let result = challenge7::challenge2(&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/main.rs:247:45 [INFO] [stdout] | [INFO] [stdout] 247 | let result = challenge8::challenge1(&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/main.rs:254:45 [INFO] [stdout] | [INFO] [stdout] 254 | let result = challenge8::challenge2(&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/main.rs:276:45 [INFO] [stdout] | [INFO] [stdout] 276 | let result = challenge9::challenge1(&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/main.rs:283:45 [INFO] [stdout] | [INFO] [stdout] 283 | let result = challenge9::challenge2(&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/main.rs:305:46 [INFO] [stdout] | [INFO] [stdout] 305 | let result = challenge10::challenge1(&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/main.rs:312:46 [INFO] [stdout] | [INFO] [stdout] 312 | let result = challenge10::challenge2(&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/main.rs:334:46 [INFO] [stdout] | [INFO] [stdout] 334 | let result = challenge11::challenge1(&input, 100); [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/main.rs:341:46 [INFO] [stdout] | [INFO] [stdout] 341 | let result = challenge11::challenge2(&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/main.rs:61:48 [INFO] [stdout] | [INFO] [stdout] 61 | let result = challenge2::move_directly(&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/main.rs:68:46 [INFO] [stdout] | [INFO] [stdout] 68 | let result = challenge2::move_by_aim(&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/main.rs:92:57 [INFO] [stdout] | [INFO] [stdout] 92 | let result = challenge3::get_power_rates_binary(&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/main.rs:99:58 [INFO] [stdout] | [INFO] [stdout] 99 | let result = challenge3::get_power_rates_logical(&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/main.rs:106:49 [INFO] [stdout] | [INFO] [stdout] 106 | let result = challenge3::get_life_rates(&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/main.rs:128:45 [INFO] [stdout] | [INFO] [stdout] 128 | let result = challenge4::challenge1(&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/main.rs:135:45 [INFO] [stdout] | [INFO] [stdout] 135 | let result = challenge4::challenge2(&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/main.rs:159:63 [INFO] [stdout] | [INFO] [stdout] 159 | let result = challenge5::challenge1(parse_coordinates(&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/main.rs:166:63 [INFO] [stdout] | [INFO] [stdout] 166 | let result = challenge5::challenge2(parse_coordinates(&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/main.rs:189:45 [INFO] [stdout] | [INFO] [stdout] 189 | let result = challenge6::challenge2(&input, 80); [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/main.rs:196:45 [INFO] [stdout] | [INFO] [stdout] 196 | let result = challenge6::challenge2(&input, 256); [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/main.rs:218:45 [INFO] [stdout] | [INFO] [stdout] 218 | let result = challenge7::challenge1(&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/main.rs:225:45 [INFO] [stdout] | [INFO] [stdout] 225 | let result = challenge7::challenge2(&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/main.rs:247:45 [INFO] [stdout] | [INFO] [stdout] 247 | let result = challenge8::challenge1(&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/main.rs:254:45 [INFO] [stdout] | [INFO] [stdout] 254 | let result = challenge8::challenge2(&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/main.rs:276:45 [INFO] [stdout] | [INFO] [stdout] 276 | let result = challenge9::challenge1(&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/main.rs:283:45 [INFO] [stdout] | [INFO] [stdout] 283 | let result = challenge9::challenge2(&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/main.rs:305:46 [INFO] [stdout] | [INFO] [stdout] 305 | let result = challenge10::challenge1(&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/main.rs:312:46 [INFO] [stdout] | [INFO] [stdout] 312 | let result = challenge10::challenge2(&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/main.rs:334:46 [INFO] [stdout] | [INFO] [stdout] 334 | let result = challenge11::challenge1(&input, 100); [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/main.rs:341:46 [INFO] [stdout] | [INFO] [stdout] 341 | let result = challenge11::challenge2(&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] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.73s [INFO] running `Command { std: "docker" "inspect" "2b075295f9fab2c2db1398de1b7519b6b219fa7930d87af78c51ed418da67ef5", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "2b075295f9fab2c2db1398de1b7519b6b219fa7930d87af78c51ed418da67ef5", kill_on_drop: false }` [INFO] [stdout] 2b075295f9fab2c2db1398de1b7519b6b219fa7930d87af78c51ed418da67ef5