[INFO] cloning repository https://github.com/lkwinta/advent_of_code_2023 [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/lkwinta/advent_of_code_2023" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Flkwinta%2Fadvent_of_code_2023", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Flkwinta%2Fadvent_of_code_2023'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 148be33fdd9f3147aba764732d69e2b7b5b4e256 [INFO] linting lkwinta/advent_of_code_2023 against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Flkwinta%2Fadvent_of_code_2023" "/workspace/builds/worker-0-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-0-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/lkwinta/advent_of_code_2023 [INFO] finished tweaking git repo https://github.com/lkwinta/advent_of_code_2023 [INFO] tweaked toml for git repo https://github.com/lkwinta/advent_of_code_2023 written to /workspace/builds/worker-0-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/lkwinta/advent_of_code_2023 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/lkwinta/advent_of_code_2023 already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-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] f01ddebc74d16b9f9be8b8913ff6f0b6ac7fe675c8d89aa1ee2ee910f7d1e921 [INFO] running `Command { std: "docker" "start" "-a" "f01ddebc74d16b9f9be8b8913ff6f0b6ac7fe675c8d89aa1ee2ee910f7d1e921", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "f01ddebc74d16b9f9be8b8913ff6f0b6ac7fe675c8d89aa1ee2ee910f7d1e921", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "f01ddebc74d16b9f9be8b8913ff6f0b6ac7fe675c8d89aa1ee2ee910f7d1e921", kill_on_drop: false }` [INFO] [stdout] f01ddebc74d16b9f9be8b8913ff6f0b6ac7fe675c8d89aa1ee2ee910f7d1e921 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-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] 85d4eed465777fd2e79fb2b6ec83e673627d069496c9d86cd43eaeeae64b72b2 [INFO] running `Command { std: "docker" "start" "-a" "85d4eed465777fd2e79fb2b6ec83e673627d069496c9d86cd43eaeeae64b72b2", kill_on_drop: false }` [INFO] [stderr] Checking advent_of_code_2023 v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unnecessary `>= y + 1` or `x - 1 >=` [INFO] [stdout] --> src/solutions/day3.rs:70:50 [INFO] [stdout] | [INFO] [stdout] 70 | ... if (j == 0 || j == 1) && new_pos_j - 1 >= 0 && numbers_map.contains_key(&(new_pos_i as usize, (new_pos_j - 1) as usize)) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: change it to: `new_pos_j > 0` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#int_plus_one [INFO] [stdout] = note: `#[warn(clippy::int_plus_one)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `>= y + 1` or `x - 1 >=` [INFO] [stdout] --> src/solutions/day10.rs:102:9 [INFO] [stdout] | [INFO] [stdout] 102 | current.1 as i32 - 1 >= 0 && [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: change it to: `current.1 as i32 > 0` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#int_plus_one [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `>= y + 1` or `x - 1 >=` [INFO] [stdout] --> src/solutions/day10.rs:108:9 [INFO] [stdout] | [INFO] [stdout] 108 | current.0 as i32 - 1 >= 0 && [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: change it to: `current.0 as i32 > 0` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#int_plus_one [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `>= y + 1` or `x - 1 >=` [INFO] [stdout] --> src/solutions/day3.rs:70:50 [INFO] [stdout] | [INFO] [stdout] 70 | ... if (j == 0 || j == 1) && new_pos_j - 1 >= 0 && numbers_map.contains_key(&(new_pos_i as usize, (new_pos_j - 1) as usize)) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: change it to: `new_pos_j > 0` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#int_plus_one [INFO] [stdout] = note: `#[warn(clippy::int_plus_one)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `>= y + 1` or `x - 1 >=` [INFO] [stdout] --> src/solutions/day10.rs:102:9 [INFO] [stdout] | [INFO] [stdout] 102 | current.1 as i32 - 1 >= 0 && [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: change it to: `current.1 as i32 > 0` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#int_plus_one [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `>= y + 1` or `x - 1 >=` [INFO] [stdout] --> src/solutions/day10.rs:108:9 [INFO] [stdout] | [INFO] [stdout] 108 | current.0 as i32 - 1 >= 0 && [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: change it to: `current.0 as i32 > 0` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#int_plus_one [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/solutions/day1.rs:4:30 [INFO] [stdout] | [INFO] [stdout] 4 | fn iterate_over_chars(line : &String) -> (Option, Option, usize, usize) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 4 - fn iterate_over_chars(line : &String) -> (Option, Option, usize, usize) { [INFO] [stdout] 4 + fn iterate_over_chars(line : &str) -> (Option, Option, usize, usize) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `first_digit` after checking its variant with `is_some` [INFO] [stdout] --> src/solutions/day1.rs:35:20 [INFO] [stdout] | [INFO] [stdout] 34 | if first_digit.is_some() && last_digit.is_some() { [INFO] [stdout] | --------------------- the check is happening here [INFO] [stdout] 35 | sum += first_digit.unwrap() * 10 + last_digit.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `last_digit` after checking its variant with `is_some` [INFO] [stdout] --> src/solutions/day1.rs:35:48 [INFO] [stdout] | [INFO] [stdout] 34 | if first_digit.is_some() && last_digit.is_some() { [INFO] [stdout] | -------------------- the check is happening here [INFO] [stdout] 35 | sum += first_digit.unwrap() * 10 + last_digit.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `first_digit` after checking its variant with `is_some` [INFO] [stdout] --> src/solutions/day1.rs:82:20 [INFO] [stdout] | [INFO] [stdout] 81 | if first_digit.is_some() && last_digit.is_some() { [INFO] [stdout] | --------------------- the check is happening here [INFO] [stdout] 82 | sum += first_digit.unwrap() * 10 + last_digit.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `last_digit` after checking its variant with `is_some` [INFO] [stdout] --> src/solutions/day1.rs:82:48 [INFO] [stdout] | [INFO] [stdout] 81 | if first_digit.is_some() && last_digit.is_some() { [INFO] [stdout] | -------------------- the check is happening here [INFO] [stdout] 82 | sum += first_digit.unwrap() * 10 + last_digit.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/solutions/day1.rs:4:30 [INFO] [stdout] | [INFO] [stdout] 4 | fn iterate_over_chars(line : &String) -> (Option, Option, usize, usize) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 4 - fn iterate_over_chars(line : &String) -> (Option, Option, usize, usize) { [INFO] [stdout] 4 + fn iterate_over_chars(line : &str) -> (Option, Option, usize, usize) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `first_digit` after checking its variant with `is_some` [INFO] [stdout] --> src/solutions/day1.rs:35:20 [INFO] [stdout] | [INFO] [stdout] 34 | if first_digit.is_some() && last_digit.is_some() { [INFO] [stdout] | --------------------- the check is happening here [INFO] [stdout] 35 | sum += first_digit.unwrap() * 10 + last_digit.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: found call to `str::trim` before `str::split_whitespace` [INFO] [stdout] --> src/solutions/day2.rs:15:39 [INFO] [stdout] | [INFO] [stdout] 15 | let split_color_data = color_str.trim().split_whitespace().collect::>(); [INFO] [stdout] | ^^^^^^^ help: remove `trim()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trim_split_whitespace [INFO] [stdout] = note: `#[warn(clippy::trim_split_whitespace)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `last_digit` after checking its variant with `is_some` [INFO] [stdout] --> src/solutions/day1.rs:35:48 [INFO] [stdout] | [INFO] [stdout] 34 | if first_digit.is_some() && last_digit.is_some() { [INFO] [stdout] | -------------------- the check is happening here [INFO] [stdout] 35 | sum += first_digit.unwrap() * 10 + last_digit.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `first_digit` after checking its variant with `is_some` [INFO] [stdout] --> src/solutions/day1.rs:82:20 [INFO] [stdout] | [INFO] [stdout] 81 | if first_digit.is_some() && last_digit.is_some() { [INFO] [stdout] | --------------------- the check is happening here [INFO] [stdout] 82 | sum += first_digit.unwrap() * 10 + last_digit.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `last_digit` after checking its variant with `is_some` [INFO] [stdout] --> src/solutions/day1.rs:82:48 [INFO] [stdout] | [INFO] [stdout] 81 | if first_digit.is_some() && last_digit.is_some() { [INFO] [stdout] | -------------------- the check is happening here [INFO] [stdout] 82 | sum += first_digit.unwrap() * 10 + last_digit.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: found call to `str::trim` before `str::split_whitespace` [INFO] [stdout] --> src/solutions/day2.rs:15:39 [INFO] [stdout] | [INFO] [stdout] 15 | let split_color_data = color_str.trim().split_whitespace().collect::>(); [INFO] [stdout] | ^^^^^^^ help: remove `trim()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trim_split_whitespace [INFO] [stdout] = note: `#[warn(clippy::trim_split_whitespace)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.fold` can be written more succinctly using another method [INFO] [stdout] --> src/solutions/day2.rs:65:43 [INFO] [stdout] | [INFO] [stdout] 65 | power_sum += color_count.values().fold(1, |sum, val| val*sum); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `product::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fold [INFO] [stdout] = note: `#[warn(clippy::unnecessary_fold)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/solutions/day3.rs:4:29 [INFO] [stdout] | [INFO] [stdout] 4 | fn check_neighbours(lines : &Vec, line_index : i32, char_index : i32) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 4 - fn check_neighbours(lines : &Vec, line_index : i32, char_index : i32) -> bool { [INFO] [stdout] 4 + fn check_neighbours(lines : &[String], line_index : i32, char_index : i32) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.fold` can be written more succinctly using another method [INFO] [stdout] --> src/solutions/day2.rs:65:43 [INFO] [stdout] | [INFO] [stdout] 65 | power_sum += color_count.values().fold(1, |sum, val| val*sum); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `product::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fold [INFO] [stdout] = note: `#[warn(clippy::unnecessary_fold)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/solutions/day3.rs:4:29 [INFO] [stdout] | [INFO] [stdout] 4 | fn check_neighbours(lines : &Vec, line_index : i32, char_index : i32) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 4 - fn check_neighbours(lines : &Vec, line_index : i32, char_index : i32) -> bool { [INFO] [stdout] 4 + fn check_neighbours(lines : &[String], line_index : i32, char_index : i32) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/solutions/day3.rs:68:17 [INFO] [stdout] | [INFO] [stdout] 68 | / ... if new_pos_i >= 0 && new_pos_j >= 0 { [INFO] [stdout] 69 | | ... if numbers_map.contains_key(&(new_pos_i as usize, new_pos_j as usize)) { [INFO] [stdout] 70 | | ... if (j == 0 || j == 1) && new_pos_j - 1 >= 0 && numbers_map.contains_key(&(new_pos_i as usize, (new_pos_j - 1) as usi... [INFO] [stdout] 71 | | ... continue [INFO] [stdout] ... | [INFO] [stdout] 79 | | ... } [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] 68 ~ if new_pos_i >= 0 && new_pos_j >= 0 [INFO] [stdout] 69 ~ && numbers_map.contains_key(&(new_pos_i as usize, new_pos_j as usize)) { [INFO] [stdout] 70 | if (j == 0 || j == 1) && new_pos_j - 1 >= 0 && numbers_map.contains_key(&(new_pos_i as usize, (new_pos_j - 1) as usize)) { [INFO] [stdout] ... [INFO] [stdout] 77 | counter += 1 [INFO] [stdout] 78 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/solutions/day3.rs:68:17 [INFO] [stdout] | [INFO] [stdout] 68 | / ... if new_pos_i >= 0 && new_pos_j >= 0 { [INFO] [stdout] 69 | | ... if numbers_map.contains_key(&(new_pos_i as usize, new_pos_j as usize)) { [INFO] [stdout] 70 | | ... if (j == 0 || j == 1) && new_pos_j - 1 >= 0 && numbers_map.contains_key(&(new_pos_i as usize, (new_pos_j - 1) as usi... [INFO] [stdout] 71 | | ... continue [INFO] [stdout] ... | [INFO] [stdout] 79 | | ... } [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] 68 ~ if new_pos_i >= 0 && new_pos_j >= 0 [INFO] [stdout] 69 ~ && numbers_map.contains_key(&(new_pos_i as usize, new_pos_j as usize)) { [INFO] [stdout] 70 | if (j == 0 || j == 1) && new_pos_j - 1 >= 0 && numbers_map.contains_key(&(new_pos_i as usize, (new_pos_j - 1) as usize)) { [INFO] [stdout] ... [INFO] [stdout] 77 | counter += 1 [INFO] [stdout] 78 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/solutions/day3.rs:101:20 [INFO] [stdout] | [INFO] [stdout] 101 | if current_number == "" { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `current_number.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] = note: `#[warn(clippy::comparison_to_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/solutions/day3.rs:101:20 [INFO] [stdout] | [INFO] [stdout] 101 | if current_number == "" { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `current_number.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] = note: `#[warn(clippy::comparison_to_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/solutions/day3.rs:116:12 [INFO] [stdout] | [INFO] [stdout] 116 | if current_number == "" { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `current_number.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/solutions/day3.rs:116:12 [INFO] [stdout] | [INFO] [stdout] 116 | if current_number == "" { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `current_number.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Option::None` [INFO] [stdout] --> src/solutions/day4.rs:46:34 [INFO] [stdout] | [INFO] [stdout] 46 | let current_card_count = cards_map.get(&card_id).unwrap_or_else(|| &0) + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations [INFO] [stdout] = note: `#[warn(clippy::unnecessary_lazy_evaluations)]` on by default [INFO] [stdout] help: use `unwrap_or` instead [INFO] [stdout] | [INFO] [stdout] 46 - let current_card_count = cards_map.get(&card_id).unwrap_or_else(|| &0) + 1; [INFO] [stdout] 46 + let current_card_count = cards_map.get(&card_id).unwrap_or(&0) + 1; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Option::None` [INFO] [stdout] --> src/solutions/day4.rs:50:33 [INFO] [stdout] | [INFO] [stdout] 50 | cards_map.insert(i, cards_map.get(&i).unwrap_or_else(|| &0) + current_card_count); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations [INFO] [stdout] help: use `unwrap_or` instead [INFO] [stdout] | [INFO] [stdout] 50 - cards_map.insert(i, cards_map.get(&i).unwrap_or_else(|| &0) + current_card_count); [INFO] [stdout] 50 + cards_map.insert(i, cards_map.get(&i).unwrap_or(&0) + current_card_count); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Option::None` [INFO] [stdout] --> src/solutions/day4.rs:46:34 [INFO] [stdout] | [INFO] [stdout] 46 | let current_card_count = cards_map.get(&card_id).unwrap_or_else(|| &0) + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations [INFO] [stdout] = note: `#[warn(clippy::unnecessary_lazy_evaluations)]` on by default [INFO] [stdout] help: use `unwrap_or` instead [INFO] [stdout] | [INFO] [stdout] 46 - let current_card_count = cards_map.get(&card_id).unwrap_or_else(|| &0) + 1; [INFO] [stdout] 46 + let current_card_count = cards_map.get(&card_id).unwrap_or(&0) + 1; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Option::None` [INFO] [stdout] --> src/solutions/day4.rs:50:33 [INFO] [stdout] | [INFO] [stdout] 50 | cards_map.insert(i, cards_map.get(&i).unwrap_or_else(|| &0) + current_card_count); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations [INFO] [stdout] help: use `unwrap_or` instead [INFO] [stdout] | [INFO] [stdout] 50 - cards_map.insert(i, cards_map.get(&i).unwrap_or_else(|| &0) + current_card_count); [INFO] [stdout] 50 + cards_map.insert(i, cards_map.get(&i).unwrap_or(&0) + current_card_count); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/solutions/day5.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | / return str.split(':') [INFO] [stdout] 7 | | .nth(1).unwrap() [INFO] [stdout] 8 | | .split(' ') [INFO] [stdout] 9 | | .filter(|seed| !seed.is_empty()) [INFO] [stdout] 10 | | .map(|seed| seed.trim().parse::().unwrap()) [INFO] [stdout] 11 | | .collect::>(); [INFO] [stdout] | |______________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 6 ~ str.split(':') [INFO] [stdout] 7 + .nth(1).unwrap() [INFO] [stdout] 8 + .split(' ') [INFO] [stdout] 9 + .filter(|seed| !seed.is_empty()) [INFO] [stdout] 10 + .map(|seed| seed.trim().parse::().unwrap()) [INFO] [stdout] 11 ~ .collect::>() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/solutions/day5.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | / return str.split(':') [INFO] [stdout] 7 | | .nth(1).unwrap() [INFO] [stdout] 8 | | .split(' ') [INFO] [stdout] 9 | | .filter(|seed| !seed.is_empty()) [INFO] [stdout] 10 | | .map(|seed| seed.trim().parse::().unwrap()) [INFO] [stdout] 11 | | .collect::>(); [INFO] [stdout] | |______________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 6 ~ str.split(':') [INFO] [stdout] 7 + .nth(1).unwrap() [INFO] [stdout] 8 + .split(' ') [INFO] [stdout] 9 + .filter(|seed| !seed.is_empty()) [INFO] [stdout] 10 + .map(|seed| seed.trim().parse::().unwrap()) [INFO] [stdout] 11 ~ .collect::>() [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/solutions/day5.rs:5:22 [INFO] [stdout] | [INFO] [stdout] 5 | fn seeds_parser(str: &String) -> 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] 5 - fn seeds_parser(str: &String) -> Vec { [INFO] [stdout] 5 + fn seeds_parser(str: &str) -> Vec { [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/solutions/day5.rs:5:22 [INFO] [stdout] | [INFO] [stdout] 5 | fn seeds_parser(str: &String) -> 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] 5 - fn seeds_parser(str: &String) -> Vec { [INFO] [stdout] 5 + fn seeds_parser(str: &str) -> Vec { [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/solutions/day5.rs:14:22 [INFO] [stdout] | [INFO] [stdout] 14 | fn range_parser(str: &String) -> (i64, 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] 14 - fn range_parser(str: &String) -> (i64, i64, i64) { [INFO] [stdout] 14 + fn range_parser(str: &str) -> (i64, i64, i64) { [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/solutions/day5.rs:14:22 [INFO] [stdout] | [INFO] [stdout] 14 | fn range_parser(str: &String) -> (i64, 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] 14 - fn range_parser(str: &String) -> (i64, i64, i64) { [INFO] [stdout] 14 + fn range_parser(str: &str) -> (i64, i64, i64) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/solutions/day5.rs:25:39 [INFO] [stdout] | [INFO] [stdout] 25 | let sections = lines.split(|line| line == "").collect::>(); [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#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/solutions/day5.rs:25:39 [INFO] [stdout] | [INFO] [stdout] 25 | let sections = lines.split(|line| line == "").collect::>(); [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#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `sections` [INFO] [stdout] --> src/solutions/day5.rs:32:14 [INFO] [stdout] | [INFO] [stdout] 32 | for i in 1..sections.len(){ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 32 - for i in 1..sections.len(){ [INFO] [stdout] 32 + for in sections.iter().skip(1){ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is only used to index `sections` [INFO] [stdout] --> src/solutions/day5.rs:33:18 [INFO] [stdout] | [INFO] [stdout] 33 | for j in 1..sections[i].len(){ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 33 - for j in 1..sections[i].len(){ [INFO] [stdout] 33 + for in sections.iter().take(sections[i].len()).skip(1){ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `sections` [INFO] [stdout] --> src/solutions/day5.rs:32:14 [INFO] [stdout] | [INFO] [stdout] 32 | for i in 1..sections.len(){ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 32 - for i in 1..sections.len(){ [INFO] [stdout] 32 + for in sections.iter().skip(1){ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is only used to index `sections` [INFO] [stdout] --> src/solutions/day5.rs:33:18 [INFO] [stdout] | [INFO] [stdout] 33 | for j in 1..sections[i].len(){ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 33 - for j in 1..sections[i].len(){ [INFO] [stdout] 33 + for in sections.iter().take(sections[i].len()).skip(1){ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/solutions/day5.rs:58:39 [INFO] [stdout] | [INFO] [stdout] 58 | let sections = lines.split(|line| line == "").collect::>(); [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#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/solutions/day5.rs:58:39 [INFO] [stdout] | [INFO] [stdout] 58 | let sections = lines.split(|line| line == "").collect::>(); [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#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `sections` [INFO] [stdout] --> src/solutions/day5.rs:69:14 [INFO] [stdout] | [INFO] [stdout] 69 | for i in 1..sections.len(){ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 69 - for i in 1..sections.len(){ [INFO] [stdout] 69 + for in sections.iter().skip(1){ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `sections` [INFO] [stdout] --> src/solutions/day5.rs:69:14 [INFO] [stdout] | [INFO] [stdout] 69 | for i in 1..sections.len(){ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 69 - for i in 1..sections.len(){ [INFO] [stdout] 69 + for in sections.iter().skip(1){ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is only used to index `sections` [INFO] [stdout] --> src/solutions/day5.rs:70:18 [INFO] [stdout] | [INFO] [stdout] 70 | for j in 1..sections[i].len(){ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 70 - for j in 1..sections[i].len(){ [INFO] [stdout] 70 + for in sections.iter().take(sections[i].len()).skip(1){ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is only used to index `sections` [INFO] [stdout] --> src/solutions/day5.rs:70:18 [INFO] [stdout] | [INFO] [stdout] 70 | for j in 1..sections[i].len(){ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 70 - for j in 1..sections[i].len(){ [INFO] [stdout] 70 + for in sections.iter().take(sections[i].len()).skip(1){ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/solutions/day6.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | / return str.split(": ") [INFO] [stdout] 7 | | .nth(1).unwrap() [INFO] [stdout] 8 | | .split(" ") [INFO] [stdout] 9 | | .filter(|&x| !x.is_empty()) [INFO] [stdout] 10 | | .map(|x| x.parse::().unwrap()) [INFO] [stdout] 11 | | .collect::>(); [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] 6 ~ str.split(": ") [INFO] [stdout] 7 + .nth(1).unwrap() [INFO] [stdout] 8 + .split(" ") [INFO] [stdout] 9 + .filter(|&x| !x.is_empty()) [INFO] [stdout] 10 + .map(|x| x.parse::().unwrap()) [INFO] [stdout] 11 ~ .collect::>() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/solutions/day6.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | / return str.split(": ") [INFO] [stdout] 7 | | .nth(1).unwrap() [INFO] [stdout] 8 | | .split(" ") [INFO] [stdout] 9 | | .filter(|&x| !x.is_empty()) [INFO] [stdout] 10 | | .map(|x| x.parse::().unwrap()) [INFO] [stdout] 11 | | .collect::>(); [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] 6 ~ str.split(": ") [INFO] [stdout] 7 + .nth(1).unwrap() [INFO] [stdout] 8 + .split(" ") [INFO] [stdout] 9 + .filter(|&x| !x.is_empty()) [INFO] [stdout] 10 + .map(|x| x.parse::().unwrap()) [INFO] [stdout] 11 ~ .collect::>() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/solutions/day6.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 15 | / return str [INFO] [stdout] 16 | | .split(": ") [INFO] [stdout] 17 | | .nth(1).unwrap() [INFO] [stdout] 18 | | .chars() [INFO] [stdout] 19 | | .filter(|c| !c.is_whitespace()) [INFO] [stdout] 20 | | .collect::() [INFO] [stdout] 21 | | .parse::().unwrap(); [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] 15 ~ str [INFO] [stdout] 16 + .split(": ") [INFO] [stdout] 17 + .nth(1).unwrap() [INFO] [stdout] 18 + .chars() [INFO] [stdout] 19 + .filter(|c| !c.is_whitespace()) [INFO] [stdout] 20 + .collect::() [INFO] [stdout] 21 ~ .parse::().unwrap() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/solutions/day6.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 15 | / return str [INFO] [stdout] 16 | | .split(": ") [INFO] [stdout] 17 | | .nth(1).unwrap() [INFO] [stdout] 18 | | .chars() [INFO] [stdout] 19 | | .filter(|c| !c.is_whitespace()) [INFO] [stdout] 20 | | .collect::() [INFO] [stdout] 21 | | .parse::().unwrap(); [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] 15 ~ str [INFO] [stdout] 16 + .split(": ") [INFO] [stdout] 17 + .nth(1).unwrap() [INFO] [stdout] 18 + .chars() [INFO] [stdout] 19 + .filter(|c| !c.is_whitespace()) [INFO] [stdout] 20 + .collect::() [INFO] [stdout] 21 ~ .parse::().unwrap() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the function definition [INFO] [stdout] --> src/solutions/day7a.rs:35:16 [INFO] [stdout] | [INFO] [stdout] 35 | pub fn new<'a>() -> Hand { [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] = note: `#[warn(clippy::extra_unused_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the function definition [INFO] [stdout] --> src/solutions/day7a.rs:35:16 [INFO] [stdout] | [INFO] [stdout] 35 | pub fn new<'a>() -> Hand { [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] = note: `#[warn(clippy::extra_unused_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/solutions/day7a.rs:46:9 [INFO] [stdout] | [INFO] [stdout] 46 | return self.hand_type == other.hand_type && self.hand == other.hand; [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] 46 - return self.hand_type == other.hand_type && self.hand == other.hand; [INFO] [stdout] 46 + self.hand_type == other.hand_type && self.hand == other.hand [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/solutions/day7a.rs:46:9 [INFO] [stdout] | [INFO] [stdout] 46 | return self.hand_type == other.hand_type && self.hand == other.hand; [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] 46 - return self.hand_type == other.hand_type && self.hand == other.hand; [INFO] [stdout] 46 + self.hand_type == other.hand_type && self.hand == other.hand [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/solutions/day7a.rs:60:9 [INFO] [stdout] | [INFO] [stdout] 60 | return self.hand_type.cmp(&other.hand_type); [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] 60 - return self.hand_type.cmp(&other.hand_type); [INFO] [stdout] 60 + self.hand_type.cmp(&other.hand_type) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/solutions/day7a.rs:60:9 [INFO] [stdout] | [INFO] [stdout] 60 | return self.hand_type.cmp(&other.hand_type); [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] 60 - return self.hand_type.cmp(&other.hand_type); [INFO] [stdout] 60 + self.hand_type.cmp(&other.hand_type) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/solutions/day7a.rs:106:20 [INFO] [stdout] | [INFO] [stdout] 106 | if (cnt1 == 1 && cnt2 == 1) || (cnt1 == 1 && cnt2 == 3) || (cnt1 == 3 && cnt2 == 1) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 106 - if (cnt1 == 1 && cnt2 == 1) || (cnt1 == 1 && cnt2 == 3) || (cnt1 == 3 && cnt2 == 1) { [INFO] [stdout] 106 + if !(cnt1 != 1 || cnt2 != 1 && cnt2 != 3) || (cnt1 == 3 && cnt2 == 1) { [INFO] [stdout] | [INFO] [stdout] 106 - if (cnt1 == 1 && cnt2 == 1) || (cnt1 == 1 && cnt2 == 3) || (cnt1 == 3 && cnt2 == 1) { [INFO] [stdout] 106 + if (cnt2 == 3 || cnt2 == 1) && cnt1 == 1 || (cnt1 == 3 && cnt2 == 1) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/solutions/day7a.rs:106:20 [INFO] [stdout] | [INFO] [stdout] 106 | if (cnt1 == 1 && cnt2 == 1) || (cnt1 == 1 && cnt2 == 3) || (cnt1 == 3 && cnt2 == 1) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 106 - if (cnt1 == 1 && cnt2 == 1) || (cnt1 == 1 && cnt2 == 3) || (cnt1 == 3 && cnt2 == 1) { [INFO] [stdout] 106 + if !(cnt1 != 1 || cnt2 != 1 && cnt2 != 3) || (cnt1 == 3 && cnt2 == 1) { [INFO] [stdout] | [INFO] [stdout] 106 - if (cnt1 == 1 && cnt2 == 1) || (cnt1 == 1 && cnt2 == 3) || (cnt1 == 3 && cnt2 == 1) { [INFO] [stdout] 106 + if (cnt2 == 3 || cnt2 == 1) && cnt1 == 1 || (cnt1 == 3 && cnt2 == 1) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/solutions/day7a.rs:104:29 [INFO] [stdout] | [INFO] [stdout] 104 | let cnt1 = *count_cards.iter().nth(0).unwrap().1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `count_cards.iter().next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] = note: `#[warn(clippy::iter_nth_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/solutions/day7a.rs:104:29 [INFO] [stdout] | [INFO] [stdout] 104 | let cnt1 = *count_cards.iter().nth(0).unwrap().1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `count_cards.iter().next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] = note: `#[warn(clippy::iter_nth_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/solutions/day7a.rs:113:28 [INFO] [stdout] | [INFO] [stdout] 113 | let cnt = *count_cards.iter().nth(0).unwrap().1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `count_cards.iter().next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/solutions/day7a.rs:113:28 [INFO] [stdout] | [INFO] [stdout] 113 | let cnt = *count_cards.iter().nth(0).unwrap().1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `count_cards.iter().next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the function definition [INFO] [stdout] --> src/solutions/day7b.rs:35:16 [INFO] [stdout] | [INFO] [stdout] 35 | pub fn new<'a>() -> Hand { [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the function definition [INFO] [stdout] --> src/solutions/day7b.rs:35:16 [INFO] [stdout] | [INFO] [stdout] 35 | pub fn new<'a>() -> Hand { [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/solutions/day7b.rs:46:9 [INFO] [stdout] | [INFO] [stdout] 46 | return self.hand_type == other.hand_type && self.hand == other.hand; [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] 46 - return self.hand_type == other.hand_type && self.hand == other.hand; [INFO] [stdout] 46 + self.hand_type == other.hand_type && self.hand == other.hand [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/solutions/day7b.rs:46:9 [INFO] [stdout] | [INFO] [stdout] 46 | return self.hand_type == other.hand_type && self.hand == other.hand; [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] 46 - return self.hand_type == other.hand_type && self.hand == other.hand; [INFO] [stdout] 46 + self.hand_type == other.hand_type && self.hand == other.hand [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/solutions/day7b.rs:60:9 [INFO] [stdout] | [INFO] [stdout] 60 | return self.hand_type.cmp(&other.hand_type); [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] 60 - return self.hand_type.cmp(&other.hand_type); [INFO] [stdout] 60 + self.hand_type.cmp(&other.hand_type) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/solutions/day7b.rs:60:9 [INFO] [stdout] | [INFO] [stdout] 60 | return self.hand_type.cmp(&other.hand_type); [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] 60 - return self.hand_type.cmp(&other.hand_type); [INFO] [stdout] 60 + self.hand_type.cmp(&other.hand_type) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/solutions/day7b.rs:103:46 [INFO] [stdout] | [INFO] [stdout] 103 | card_count_pairs.sort_by_key(|pair| -(*pair).1); [INFO] [stdout] | ^^^^^^^ help: try: `pair` [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: deref which would be done by auto-deref [INFO] [stdout] --> src/solutions/day7b.rs:103:46 [INFO] [stdout] | [INFO] [stdout] 103 | card_count_pairs.sort_by_key(|pair| -(*pair).1); [INFO] [stdout] | ^^^^^^^ help: try: `pair` [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: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/solutions/day8.rs:12:20 [INFO] [stdout] | [INFO] [stdout] 12 | let node = line_split.nth(0).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `line_split.next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/solutions/day8.rs:13:23 [INFO] [stdout] | [INFO] [stdout] 13 | let targets = line_split.nth(0).unwrap().replace("(", "").replace(")", ""); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `line_split.next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/solutions/day8.rs:12:20 [INFO] [stdout] | [INFO] [stdout] 12 | let node = line_split.nth(0).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `line_split.next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/solutions/day8.rs:13:23 [INFO] [stdout] | [INFO] [stdout] 13 | let targets = line_split.nth(0).unwrap().replace("(", "").replace(")", ""); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `line_split.next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/solutions/day8.rs:55:20 [INFO] [stdout] | [INFO] [stdout] 55 | let node = line_split.nth(0).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `line_split.next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/solutions/day8.rs:55:20 [INFO] [stdout] | [INFO] [stdout] 55 | let node = line_split.nth(0).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `line_split.next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/solutions/day8.rs:56:23 [INFO] [stdout] | [INFO] [stdout] 56 | let targets = line_split.nth(0).unwrap().replace("(", "").replace(")", ""); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `line_split.next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/solutions/day8.rs:56:23 [INFO] [stdout] | [INFO] [stdout] 56 | let targets = line_split.nth(0).unwrap().replace("(", "").replace(")", ""); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `line_split.next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `current_counter` [INFO] [stdout] --> src/solutions/day8.rs:90:14 [INFO] [stdout] | [INFO] [stdout] 90 | for i in 1..current_counter.len(){ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 90 - for i in 1..current_counter.len(){ [INFO] [stdout] 90 + for in current_counter.iter().skip(1){ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `current_counter` [INFO] [stdout] --> src/solutions/day8.rs:90:14 [INFO] [stdout] | [INFO] [stdout] 90 | for i in 1..current_counter.len(){ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 90 - for i in 1..current_counter.len(){ [INFO] [stdout] 90 + for in current_counter.iter().skip(1){ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant name ends with the enum's name [INFO] [stdout] --> src/solutions/day10.rs:13:5 [INFO] [stdout] | [INFO] [stdout] 13 | StartPipe = b'S', [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stdout] = note: `#[warn(clippy::enum_variant_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant name ends with the enum's name [INFO] [stdout] --> src/solutions/day10.rs:13:5 [INFO] [stdout] | [INFO] [stdout] 13 | StartPipe = b'S', [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stdout] = note: `#[warn(clippy::enum_variant_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/solutions/day10.rs:17:1 [INFO] [stdout] | [INFO] [stdout] 17 | impl Into for Pipe { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] = note: `#[warn(clippy::from_over_into)]` on by default [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 17 ~ impl From for char { [INFO] [stdout] 18 ~ fn from(val: Pipe) -> Self { [INFO] [stdout] 19 ~ val as u8 as char [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/solutions/day10.rs:17:1 [INFO] [stdout] | [INFO] [stdout] 17 | impl Into for Pipe { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] = note: `#[warn(clippy::from_over_into)]` on by default [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 17 ~ impl From for char { [INFO] [stdout] 18 ~ fn from(val: Pipe) -> Self { [INFO] [stdout] 19 ~ val as u8 as char [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/solutions/day10.rs:40:1 [INFO] [stdout] | [INFO] [stdout] 40 | impl Into for char { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 40 ~ impl From for Pipe { [INFO] [stdout] 41 ~ fn from(val: char) -> Self { [INFO] [stdout] 42 ~ Pipe::from_u8(val as u8) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/solutions/day10.rs:40:1 [INFO] [stdout] | [INFO] [stdout] 40 | impl Into for char { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 40 ~ impl From for Pipe { [INFO] [stdout] 41 ~ fn from(val: char) -> Self { [INFO] [stdout] 42 ~ Pipe::from_u8(val as u8) [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/solutions/day10.rs:52:26 [INFO] [stdout] | [INFO] [stdout] 52 | fn find_start_point(map: &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] 52 - fn find_start_point(map: &Vec>) -> (usize, usize) { [INFO] [stdout] 52 + fn find_start_point(map: &[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/solutions/day10.rs:52:26 [INFO] [stdout] | [INFO] [stdout] 52 | fn find_start_point(map: &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] 52 - fn find_start_point(map: &Vec>) -> (usize, usize) { [INFO] [stdout] 52 + fn find_start_point(map: &[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/solutions/day10.rs:100:38 [INFO] [stdout] | [INFO] [stdout] 100 | fn determine_starting_pipe_type(map: &Vec>, current: (usize, usize)) -> Pipe { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 100 - fn determine_starting_pipe_type(map: &Vec>, current: (usize, usize)) -> Pipe { [INFO] [stdout] 100 + fn determine_starting_pipe_type(map: &[Vec], current: (usize, usize)) -> Pipe { [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/solutions/day10.rs:100:38 [INFO] [stdout] | [INFO] [stdout] 100 | fn determine_starting_pipe_type(map: &Vec>, current: (usize, usize)) -> Pipe { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 100 - fn determine_starting_pipe_type(map: &Vec>, current: (usize, usize)) -> Pipe { [INFO] [stdout] 100 + fn determine_starting_pipe_type(map: &[Vec], current: (usize, usize)) -> Pipe { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `y` is used to index `map` [INFO] [stdout] --> src/solutions/day10.rs:185:14 [INFO] [stdout] | [INFO] [stdout] 185 | for y in 0..map.len() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 185 - for y in 0..map.len() { [INFO] [stdout] 185 + for (y, ) in map.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `y` is used to index `map` [INFO] [stdout] --> src/solutions/day10.rs:185:14 [INFO] [stdout] | [INFO] [stdout] 185 | for y in 0..map.len() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 185 - for y in 0..map.len() { [INFO] [stdout] 185 + for (y, ) in map.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `y` is used to index `map` [INFO] [stdout] --> src/solutions/day11.rs:14:14 [INFO] [stdout] | [INFO] [stdout] 14 | for y in 0..height{ [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 14 - for y in 0..height{ [INFO] [stdout] 14 + for (y, ) in map.iter().enumerate().take(height){ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `x` is used to index `map` [INFO] [stdout] --> src/solutions/day11.rs:21:23 [INFO] [stdout] | [INFO] [stdout] 21 | 'x_loop: for x in 0..width{ [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 21 - 'x_loop: for x in 0..width{ [INFO] [stdout] 21 + 'x_loop: for (x, ) in map.iter().enumerate().take(width){ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `y` is used to index `map` [INFO] [stdout] --> src/solutions/day11.rs:14:14 [INFO] [stdout] | [INFO] [stdout] 14 | for y in 0..height{ [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 14 - for y in 0..height{ [INFO] [stdout] 14 + for (y, ) in map.iter().enumerate().take(height){ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `x` is used to index `map` [INFO] [stdout] --> src/solutions/day11.rs:21:23 [INFO] [stdout] | [INFO] [stdout] 21 | 'x_loop: for x in 0..width{ [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 21 - 'x_loop: for x in 0..width{ [INFO] [stdout] 21 + 'x_loop: for (x, ) in map.iter().enumerate().take(width){ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `y` is only used to index `map` [INFO] [stdout] --> src/solutions/day11.rs:22:18 [INFO] [stdout] | [INFO] [stdout] 22 | for y in 0..height { [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] 22 - for y in 0..height { [INFO] [stdout] 22 + for in map.iter().take(height) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `y` is only used to index `map` [INFO] [stdout] --> src/solutions/day11.rs:22:18 [INFO] [stdout] | [INFO] [stdout] 22 | for y in 0..height { [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] 22 - for y in 0..height { [INFO] [stdout] 22 + for in map.iter().take(height) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `y` is used to index `map` [INFO] [stdout] --> src/solutions/day11.rs:33:14 [INFO] [stdout] | [INFO] [stdout] 33 | for y in 0..height { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 33 - for y in 0..height { [INFO] [stdout] 33 + for (y, ) in map.iter().enumerate().take(height) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `x` is used to index `map` [INFO] [stdout] --> src/solutions/day11.rs:34:18 [INFO] [stdout] | [INFO] [stdout] 34 | for x in 0..width { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 34 - for x in 0..width { [INFO] [stdout] 34 + for (x, ) in map.iter().enumerate().take(width) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `y` is used to index `map` [INFO] [stdout] --> src/solutions/day11.rs:33:14 [INFO] [stdout] | [INFO] [stdout] 33 | for y in 0..height { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 33 - for y in 0..height { [INFO] [stdout] 33 + for (y, ) in map.iter().enumerate().take(height) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `x` is used to index `map` [INFO] [stdout] --> src/solutions/day11.rs:34:18 [INFO] [stdout] | [INFO] [stdout] 34 | for x in 0..width { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 34 - for x in 0..width { [INFO] [stdout] 34 + for (x, ) in map.iter().enumerate().take(width) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/solutions/day12.rs:31:5 [INFO] [stdout] | [INFO] [stdout] 31 | return true; [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] 31 - return true; [INFO] [stdout] 31 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/solutions/day12.rs:31:5 [INFO] [stdout] | [INFO] [stdout] 31 | return true; [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] 31 - return true; [INFO] [stdout] 31 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/solutions/day12.rs:40:5 [INFO] [stdout] | [INFO] [stdout] 40 | / return if str_iterator == record.len() { [INFO] [stdout] 41 | | check_counts(record, counts) as i32 [INFO] [stdout] 42 | | } else { [INFO] [stdout] 43 | | let mut record_string = String::from(record); [INFO] [stdout] ... | [INFO] [stdout] 51 | | c1 + c2 [INFO] [stdout] 52 | | } [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] 40 ~ if str_iterator == record.len() { [INFO] [stdout] 41 + check_counts(record, counts) as i32 [INFO] [stdout] 42 + } else { [INFO] [stdout] 43 + let mut record_string = String::from(record); [INFO] [stdout] 44 + record_string.replace_range(str_iterator..str_iterator + 1, "."); [INFO] [stdout] 45 + [INFO] [stdout] 46 + let c1 = count_possibilities(record_string.as_str(), counts, str_iterator + 1); [INFO] [stdout] 47 + [INFO] [stdout] 48 + record_string.replace_range(str_iterator..str_iterator + 1, "#"); [INFO] [stdout] 49 + let c2 = count_possibilities(record_string.as_str(), counts, str_iterator + 1); [INFO] [stdout] 50 + [INFO] [stdout] 51 + c1 + c2 [INFO] [stdout] 52 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/solutions/day12.rs:40:5 [INFO] [stdout] | [INFO] [stdout] 40 | / return if str_iterator == record.len() { [INFO] [stdout] 41 | | check_counts(record, counts) as i32 [INFO] [stdout] 42 | | } else { [INFO] [stdout] 43 | | let mut record_string = String::from(record); [INFO] [stdout] ... | [INFO] [stdout] 51 | | c1 + c2 [INFO] [stdout] 52 | | } [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] 40 ~ if str_iterator == record.len() { [INFO] [stdout] 41 + check_counts(record, counts) as i32 [INFO] [stdout] 42 + } else { [INFO] [stdout] 43 + let mut record_string = String::from(record); [INFO] [stdout] 44 + record_string.replace_range(str_iterator..str_iterator + 1, "."); [INFO] [stdout] 45 + [INFO] [stdout] 46 + let c1 = count_possibilities(record_string.as_str(), counts, str_iterator + 1); [INFO] [stdout] 47 + [INFO] [stdout] 48 + record_string.replace_range(str_iterator..str_iterator + 1, "#"); [INFO] [stdout] 49 + let c2 = count_possibilities(record_string.as_str(), counts, str_iterator + 1); [INFO] [stdout] 50 + [INFO] [stdout] 51 + c1 + c2 [INFO] [stdout] 52 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/solutions/day12.rs:61:27 [INFO] [stdout] | [INFO] [stdout] 61 | let record_data = line_split.nth(0).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `line_split.next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/solutions/day12.rs:62:27 [INFO] [stdout] | [INFO] [stdout] 62 | let proper_data = line_split [INFO] [stdout] | ___________________________^ [INFO] [stdout] 63 | | .nth(0).unwrap() [INFO] [stdout] | |___________________^ help: try calling `.next()` instead of `.nth(0)`: `line_split.next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/solutions/day12.rs:61:27 [INFO] [stdout] | [INFO] [stdout] 61 | let record_data = line_split.nth(0).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `line_split.next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/solutions/day12.rs:80:27 [INFO] [stdout] | [INFO] [stdout] 80 | let record_data = line_split.nth(0).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `line_split.next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/solutions/day12.rs:81:27 [INFO] [stdout] | [INFO] [stdout] 81 | let proper_data = line_split [INFO] [stdout] | ___________________________^ [INFO] [stdout] 82 | | .nth(0).unwrap() [INFO] [stdout] | |___________________^ help: try calling `.next()` instead of `.nth(0)`: `line_split.next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/solutions/day12.rs:62:27 [INFO] [stdout] | [INFO] [stdout] 62 | let proper_data = line_split [INFO] [stdout] | ___________________________^ [INFO] [stdout] 63 | | .nth(0).unwrap() [INFO] [stdout] | |___________________^ help: try calling `.next()` instead of `.nth(0)`: `line_split.next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/solutions/day12.rs:80:27 [INFO] [stdout] | [INFO] [stdout] 80 | let record_data = line_split.nth(0).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `line_split.next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/solutions/day13.rs:23:5 [INFO] [stdout] | [INFO] [stdout] 23 | return diff == tolerance [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] 23 - return diff == tolerance [INFO] [stdout] 23 + diff == tolerance [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent [INFO] [stdout] --> src/solutions/day12.rs:81:27 [INFO] [stdout] | [INFO] [stdout] 81 | let proper_data = line_split [INFO] [stdout] | ___________________________^ [INFO] [stdout] 82 | | .nth(0).unwrap() [INFO] [stdout] | |___________________^ help: try calling `.next()` instead of `.nth(0)`: `line_split.next()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/solutions/day13.rs:45:5 [INFO] [stdout] | [INFO] [stdout] 45 | return diff == tolerance [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] 45 - return diff == tolerance [INFO] [stdout] 45 + diff == tolerance [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/solutions/day13.rs:23:5 [INFO] [stdout] | [INFO] [stdout] 23 | return diff == tolerance [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] 23 - return diff == tolerance [INFO] [stdout] 23 + diff == tolerance [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `y` is only used to index `image` [INFO] [stdout] --> src/solutions/day13.rs:34:22 [INFO] [stdout] | [INFO] [stdout] 34 | for y in 0..image.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 34 - for y in 0..image.len() { [INFO] [stdout] 34 + for in &image { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/solutions/day13.rs:45:5 [INFO] [stdout] | [INFO] [stdout] 45 | return diff == tolerance [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] 45 - return diff == tolerance [INFO] [stdout] 45 + diff == tolerance [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `y` is only used to index `image` [INFO] [stdout] --> src/solutions/day13.rs:34:22 [INFO] [stdout] | [INFO] [stdout] 34 | for y in 0..image.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 34 - for y in 0..image.len() { [INFO] [stdout] 34 + for in &image { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/solutions/day13.rs:50:34 [INFO] [stdout] | [INFO] [stdout] 50 | let images = lines.split(|v| *v == String::from("")).collect::>(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ try implementing the comparison without allocating [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] = note: `#[warn(clippy::cmp_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/solutions/day13.rs:74:34 [INFO] [stdout] | [INFO] [stdout] 74 | let images = lines.split(|v| *v == String::from("")).collect::>(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ try implementing the comparison without allocating [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/solutions/day13.rs:50:34 [INFO] [stdout] | [INFO] [stdout] 50 | let images = lines.split(|v| *v == String::from("")).collect::>(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ try implementing the comparison without allocating [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] = note: `#[warn(clippy::cmp_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/solutions/day13.rs:74:34 [INFO] [stdout] | [INFO] [stdout] 74 | let images = lines.split(|v| *v == String::from("")).collect::>(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ try implementing the comparison without allocating [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/file_reader/mod.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | return input_reader.lines().collect::>().unwrap(); [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] 8 - return input_reader.lines().collect::>().unwrap(); [INFO] [stdout] 8 + input_reader.lines().collect::>().unwrap() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/file_reader/mod.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | return input_reader.lines().collect::>().unwrap(); [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] 8 - return input_reader.lines().collect::>().unwrap(); [INFO] [stdout] 8 + input_reader.lines().collect::>().unwrap() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.65s [INFO] running `Command { std: "docker" "inspect" "85d4eed465777fd2e79fb2b6ec83e673627d069496c9d86cd43eaeeae64b72b2", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "85d4eed465777fd2e79fb2b6ec83e673627d069496c9d86cd43eaeeae64b72b2", kill_on_drop: false }` [INFO] [stdout] 85d4eed465777fd2e79fb2b6ec83e673627d069496c9d86cd43eaeeae64b72b2