[INFO] cloning repository https://github.com/Alaina-Rhodes/advent-calender [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/Alaina-Rhodes/advent-calender" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FAlaina-Rhodes%2Fadvent-calender", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FAlaina-Rhodes%2Fadvent-calender'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 417865aa6c2ccb5fd822a903f21f6b795866b131 [INFO] linting Alaina-Rhodes/advent-calender against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FAlaina-Rhodes%2Fadvent-calender" "/workspace/builds/worker-4-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-4-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/Alaina-Rhodes/advent-calender [INFO] finished tweaking git repo https://github.com/Alaina-Rhodes/advent-calender [INFO] tweaked toml for git repo https://github.com/Alaina-Rhodes/advent-calender written to /workspace/builds/worker-4-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/Alaina-Rhodes/advent-calender 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/Alaina-Rhodes/advent-calender already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] b06f2b5f81d2c57d8c8e239f6caa45b0ab1bda7dda8ee417d117f65aa8712dc5 [INFO] running `Command { std: "docker" "start" "-a" "b06f2b5f81d2c57d8c8e239f6caa45b0ab1bda7dda8ee417d117f65aa8712dc5", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "b06f2b5f81d2c57d8c8e239f6caa45b0ab1bda7dda8ee417d117f65aa8712dc5", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "b06f2b5f81d2c57d8c8e239f6caa45b0ab1bda7dda8ee417d117f65aa8712dc5", kill_on_drop: false }` [INFO] [stdout] b06f2b5f81d2c57d8c8e239f6caa45b0ab1bda7dda8ee417d117f65aa8712dc5 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 639cf413a01b12b17fc03357f063b4be0bbafd8c8f86fd8d81d1481ae9b88370 [INFO] running `Command { std: "docker" "start" "-a" "639cf413a01b12b17fc03357f063b4be0bbafd8c8f86fd8d81d1481ae9b88370", kill_on_drop: false }` [INFO] [stderr] Checking advent v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `std::result` [INFO] [stdout] --> src/main.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::result; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/twenty_three/one.rs:6:1 [INFO] [stdout] | [INFO] [stdout] 6 | / /// [INFO] [stdout] 7 | | [INFO] [stdout] | |_^ [INFO] [stdout] 8 | pub mod day_one { [INFO] [stdout] | --------------- the comment documents this module [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the comment should document the parent module use an inner doc comment [INFO] [stdout] | [INFO] [stdout] 1 ~ //! [INFO] [stdout] 2 ~ //! Day One Problem: Derive numbers from strings by getting the first and last digit [INFO] [stdout] 3 ~ //! [INFO] [stdout] 4 ~ //! Solution: Both functions use a two direction approach with the first checking one [INFO] [stdout] 5 ~ //! by one for a numeric digit and the second including the spellings of digits. [INFO] [stdout] 6 ~ //! [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::result` [INFO] [stdout] --> src/main.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::result; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/twenty_three/one.rs:6:1 [INFO] [stdout] | [INFO] [stdout] 6 | / /// [INFO] [stdout] 7 | | [INFO] [stdout] | |_^ [INFO] [stdout] 8 | pub mod day_one { [INFO] [stdout] | --------------- the comment documents this module [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the comment should document the parent module use an inner doc comment [INFO] [stdout] | [INFO] [stdout] 1 ~ //! [INFO] [stdout] 2 ~ //! Day One Problem: Derive numbers from strings by getting the first and last digit [INFO] [stdout] 3 ~ //! [INFO] [stdout] 4 ~ //! Solution: Both functions use a two direction approach with the first checking one [INFO] [stdout] 5 ~ //! by one for a numeric digit and the second including the spellings of digits. [INFO] [stdout] 6 ~ //! [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> src/twenty_three/one.rs:15:9 [INFO] [stdout] | [INFO] [stdout] 15 | / loop { [INFO] [stdout] 16 | | match chars.next() { [INFO] [stdout] 17 | | Some(char) => { [INFO] [stdout] 18 | | if char.is_numeric() { [INFO] [stdout] ... | [INFO] [stdout] 26 | | } [INFO] [stdout] | |_________^ help: try: `while let Some(char) = chars.next() { .. }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] = note: `#[warn(clippy::while_let_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> src/twenty_three/one.rs:28:9 [INFO] [stdout] | [INFO] [stdout] 28 | / loop { [INFO] [stdout] 29 | | match chars.next() { [INFO] [stdout] 30 | | Some(char) => { [INFO] [stdout] 31 | | if char.is_numeric() { [INFO] [stdout] ... | [INFO] [stdout] 38 | | } [INFO] [stdout] | |_________^ help: try: `while let Some(char) = chars.next() { .. }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> src/twenty_three/one.rs:46:9 [INFO] [stdout] | [INFO] [stdout] 46 | / 'first: loop { [INFO] [stdout] 47 | | match chars.next() { [INFO] [stdout] 48 | | Some(val) => { [INFO] [stdout] 49 | | if val.1.is_numeric() { [INFO] [stdout] ... | [INFO] [stdout] 70 | | } [INFO] [stdout] | |_________^ help: try: `while let Some(val) = chars.next() { .. }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> src/twenty_three/one.rs:72:9 [INFO] [stdout] | [INFO] [stdout] 72 | / 'second: loop { [INFO] [stdout] 73 | | match chars.next() { [INFO] [stdout] 74 | | Some(val) => { [INFO] [stdout] 75 | | if val.1.is_numeric() { [INFO] [stdout] ... | [INFO] [stdout] 94 | | } [INFO] [stdout] | |_________^ help: try: `while let Some(val) = chars.next() { .. }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is only used to index `games` [INFO] [stdout] --> src/twenty_three/two.rs:16:22 [INFO] [stdout] | [INFO] [stdout] 16 | for j in 0..games.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] 16 - for j in 0..games.len() { [INFO] [stdout] 16 + for in &games { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/twenty_three/two.rs:29:20 [INFO] [stdout] | [INFO] [stdout] 29 | if str.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!str.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: the variable `game_number` is used as a loop counter [INFO] [stdout] --> src/twenty_three/two.rs:42:9 [INFO] [stdout] | [INFO] [stdout] 42 | for i in games { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: consider using: `for (game_number, i) in (1..).zip(games.into_iter())` [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 borrowed expression implements the required traits [INFO] [stdout] --> src/twenty_three/three.rs:14:28 [INFO] [stdout] | [INFO] [stdout] 14 | if string.contains(&['*', '#', '$', '%', '&', '@', '-', '+', '=', '/']) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `['*', '#', '$', '%', '&', '@', '-', '+', '=', '/']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> src/twenty_three/three.rs:25:13 [INFO] [stdout] | [INFO] [stdout] 25 | / loop { [INFO] [stdout] 26 | | match chars.next() { [INFO] [stdout] 27 | | Some(x) => { [INFO] [stdout] 28 | | let (index, char) = x; [INFO] [stdout] ... | [INFO] [stdout] 48 | | } [INFO] [stdout] | |_____________^ help: try: `while let Some(x) = chars.next() { .. }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> src/twenty_three/three.rs:58:13 [INFO] [stdout] | [INFO] [stdout] 58 | / loop { [INFO] [stdout] 59 | | match chars.next() { [INFO] [stdout] 60 | | Some(x) => { [INFO] [stdout] 61 | | let (index, char) = x; [INFO] [stdout] ... | [INFO] [stdout] 90 | | } [INFO] [stdout] | |_____________^ help: try: `while let Some(x) = chars.next() { .. }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/twenty_three/three.rs:77:37 [INFO] [stdout] | [INFO] [stdout] 77 | / ... match k.parse::() { [INFO] [stdout] 78 | | ... Ok(num) => nums.push(num), [INFO] [stdout] 79 | | ... Err(_) => {} [INFO] [stdout] 80 | | ... } [INFO] [stdout] | |_______________________^ help: try: `if let Ok(num) = k.parse::() { nums.push(num) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> src/twenty_three/four.rs:47:9 [INFO] [stdout] | [INFO] [stdout] 47 | / loop { [INFO] [stdout] 48 | | match it.next() { [INFO] [stdout] 49 | | Some(k) => { [INFO] [stdout] 50 | | let wins = winning_numbers(*k); [INFO] [stdout] ... | [INFO] [stdout] 58 | | } [INFO] [stdout] | |_________^ help: try: `while let Some(k) = it.next() { .. }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/twenty_three/four.rs:50:48 [INFO] [stdout] | [INFO] [stdout] 50 | let wins = winning_numbers(*k); [INFO] [stdout] | ^^ help: try: `k` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] = note: `#[warn(clippy::explicit_auto_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::str::Split<'_, &str>` [INFO] [stdout] --> src/twenty_three/five.rs:37:30 [INFO] [stdout] | [INFO] [stdout] 37 | let mut ranges = i.split("\n").into_iter(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `i.split("\n")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> src/twenty_three/five.rs:40:13 [INFO] [stdout] | [INFO] [stdout] 40 | / loop { [INFO] [stdout] 41 | | match ranges.next() { [INFO] [stdout] 42 | | Some(range) => { [INFO] [stdout] 43 | | let nums: Vec = range.split(' ').collect::>().iter().flat_map(|x| x.parse::()).collect(); [INFO] [stdout] ... | [INFO] [stdout] 48 | | } [INFO] [stdout] | |_____________^ help: try: `while let Some(range) = ranges.next() { .. }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::str::Split<'_, &str>` [INFO] [stdout] --> src/twenty_three/five.rs:78:30 [INFO] [stdout] | [INFO] [stdout] 78 | let mut ranges = i.split("\n").into_iter(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `i.split("\n")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> src/twenty_three/five.rs:81:13 [INFO] [stdout] | [INFO] [stdout] 81 | / ... loop { [INFO] [stdout] 82 | | ... match ranges.next() { [INFO] [stdout] 83 | | ... Some(range) => { [INFO] [stdout] 84 | | ... let nums: Vec = range.split(' ').collect::>().iter().flat_map(|x| x.parse::()).collect(); [INFO] [stdout] ... | [INFO] [stdout] 110 | | ... } [INFO] [stdout] | |_______^ help: try: `while let Some(range) = ranges.next() { .. }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/twenty_three/six.rs:13:15 [INFO] [stdout] | [INFO] [stdout] 13 | while !(seconds_held * (seconds - seconds_held) > distance) && seconds_held < seconds / 2 + 1 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(seconds_held * (seconds - seconds_held) <= distance)` [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: length comparison to zero [INFO] [stdout] --> src/twenty_three/seven.rs:62:16 [INFO] [stdout] | [INFO] [stdout] 62 | if card_nums.len() == 0 && jokers == 5 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `card_nums.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: unneeded `return` statement [INFO] [stdout] --> src/twenty_three/seven.rs:104:50 [INFO] [stdout] | [INFO] [stdout] 104 | if self.hand_type > card.hand_type { return Ordering::Greater; } else { return Ordering::Less; } [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] 104 - if self.hand_type > card.hand_type { return Ordering::Greater; } else { return Ordering::Less; } [INFO] [stdout] 104 + if self.hand_type > card.hand_type { Ordering::Greater} else { return Ordering::Less; } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/twenty_three/seven.rs:104:85 [INFO] [stdout] | [INFO] [stdout] 104 | if self.hand_type > card.hand_type { return Ordering::Greater; } else { return Ordering::Less; } [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] 104 - if self.hand_type > card.hand_type { return Ordering::Greater; } else { return Ordering::Less; } [INFO] [stdout] 104 + if self.hand_type > card.hand_type { return Ordering::Greater; } else { Ordering::Less} [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/twenty_three/nine.rs:11:16 [INFO] [stdout] | [INFO] [stdout] 11 | if !(*i == 0) { [INFO] [stdout] | ^^^^^^^^^^ help: try: `(*i != 0)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> src/twenty_three/one.rs:15:9 [INFO] [stdout] | [INFO] [stdout] 15 | / loop { [INFO] [stdout] 16 | | match chars.next() { [INFO] [stdout] 17 | | Some(char) => { [INFO] [stdout] 18 | | if char.is_numeric() { [INFO] [stdout] ... | [INFO] [stdout] 26 | | } [INFO] [stdout] | |_________^ help: try: `while let Some(char) = chars.next() { .. }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] = note: `#[warn(clippy::while_let_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> src/twenty_three/one.rs:28:9 [INFO] [stdout] | [INFO] [stdout] 28 | / loop { [INFO] [stdout] 29 | | match chars.next() { [INFO] [stdout] 30 | | Some(char) => { [INFO] [stdout] 31 | | if char.is_numeric() { [INFO] [stdout] ... | [INFO] [stdout] 38 | | } [INFO] [stdout] | |_________^ help: try: `while let Some(char) = chars.next() { .. }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> src/twenty_three/one.rs:46:9 [INFO] [stdout] | [INFO] [stdout] 46 | / 'first: loop { [INFO] [stdout] 47 | | match chars.next() { [INFO] [stdout] 48 | | Some(val) => { [INFO] [stdout] 49 | | if val.1.is_numeric() { [INFO] [stdout] ... | [INFO] [stdout] 70 | | } [INFO] [stdout] | |_________^ help: try: `while let Some(val) = chars.next() { .. }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> src/twenty_three/one.rs:72:9 [INFO] [stdout] | [INFO] [stdout] 72 | / 'second: loop { [INFO] [stdout] 73 | | match chars.next() { [INFO] [stdout] 74 | | Some(val) => { [INFO] [stdout] 75 | | if val.1.is_numeric() { [INFO] [stdout] ... | [INFO] [stdout] 94 | | } [INFO] [stdout] | |_________^ help: try: `while let Some(val) = chars.next() { .. }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is only used to index `games` [INFO] [stdout] --> src/twenty_three/two.rs:16:22 [INFO] [stdout] | [INFO] [stdout] 16 | for j in 0..games.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] 16 - for j in 0..games.len() { [INFO] [stdout] 16 + for in &games { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/twenty_three/two.rs:29:20 [INFO] [stdout] | [INFO] [stdout] 29 | if str.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!str.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: the variable `game_number` is used as a loop counter [INFO] [stdout] --> src/twenty_three/two.rs:42:9 [INFO] [stdout] | [INFO] [stdout] 42 | for i in games { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: consider using: `for (game_number, i) in (1..).zip(games.into_iter())` [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 borrowed expression implements the required traits [INFO] [stdout] --> src/twenty_three/three.rs:14:28 [INFO] [stdout] | [INFO] [stdout] 14 | if string.contains(&['*', '#', '$', '%', '&', '@', '-', '+', '=', '/']) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `['*', '#', '$', '%', '&', '@', '-', '+', '=', '/']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> src/twenty_three/three.rs:25:13 [INFO] [stdout] | [INFO] [stdout] 25 | / loop { [INFO] [stdout] 26 | | match chars.next() { [INFO] [stdout] 27 | | Some(x) => { [INFO] [stdout] 28 | | let (index, char) = x; [INFO] [stdout] ... | [INFO] [stdout] 48 | | } [INFO] [stdout] | |_____________^ help: try: `while let Some(x) = chars.next() { .. }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> src/twenty_three/three.rs:58:13 [INFO] [stdout] | [INFO] [stdout] 58 | / loop { [INFO] [stdout] 59 | | match chars.next() { [INFO] [stdout] 60 | | Some(x) => { [INFO] [stdout] 61 | | let (index, char) = x; [INFO] [stdout] ... | [INFO] [stdout] 90 | | } [INFO] [stdout] | |_____________^ help: try: `while let Some(x) = chars.next() { .. }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/twenty_three/three.rs:77:37 [INFO] [stdout] | [INFO] [stdout] 77 | / ... match k.parse::() { [INFO] [stdout] 78 | | ... Ok(num) => nums.push(num), [INFO] [stdout] 79 | | ... Err(_) => {} [INFO] [stdout] 80 | | ... } [INFO] [stdout] | |_______________________^ help: try: `if let Ok(num) = k.parse::() { nums.push(num) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> src/twenty_three/four.rs:47:9 [INFO] [stdout] | [INFO] [stdout] 47 | / loop { [INFO] [stdout] 48 | | match it.next() { [INFO] [stdout] 49 | | Some(k) => { [INFO] [stdout] 50 | | let wins = winning_numbers(*k); [INFO] [stdout] ... | [INFO] [stdout] 58 | | } [INFO] [stdout] | |_________^ help: try: `while let Some(k) = it.next() { .. }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/twenty_three/four.rs:50:48 [INFO] [stdout] | [INFO] [stdout] 50 | let wins = winning_numbers(*k); [INFO] [stdout] | ^^ help: try: `k` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] = note: `#[warn(clippy::explicit_auto_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::str::Split<'_, &str>` [INFO] [stdout] --> src/twenty_three/five.rs:37:30 [INFO] [stdout] | [INFO] [stdout] 37 | let mut ranges = i.split("\n").into_iter(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `i.split("\n")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> src/twenty_three/five.rs:40:13 [INFO] [stdout] | [INFO] [stdout] 40 | / loop { [INFO] [stdout] 41 | | match ranges.next() { [INFO] [stdout] 42 | | Some(range) => { [INFO] [stdout] 43 | | let nums: Vec = range.split(' ').collect::>().iter().flat_map(|x| x.parse::()).collect(); [INFO] [stdout] ... | [INFO] [stdout] 48 | | } [INFO] [stdout] | |_____________^ help: try: `while let Some(range) = ranges.next() { .. }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::str::Split<'_, &str>` [INFO] [stdout] --> src/twenty_three/five.rs:78:30 [INFO] [stdout] | [INFO] [stdout] 78 | let mut ranges = i.split("\n").into_iter(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `i.split("\n")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> src/twenty_three/five.rs:81:13 [INFO] [stdout] | [INFO] [stdout] 81 | / ... loop { [INFO] [stdout] 82 | | ... match ranges.next() { [INFO] [stdout] 83 | | ... Some(range) => { [INFO] [stdout] 84 | | ... let nums: Vec = range.split(' ').collect::>().iter().flat_map(|x| x.parse::()).collect(); [INFO] [stdout] ... | [INFO] [stdout] 110 | | ... } [INFO] [stdout] | |_______^ help: try: `while let Some(range) = ranges.next() { .. }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/twenty_three/six.rs:13:15 [INFO] [stdout] | [INFO] [stdout] 13 | while !(seconds_held * (seconds - seconds_held) > distance) && seconds_held < seconds / 2 + 1 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(seconds_held * (seconds - seconds_held) <= distance)` [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: length comparison to zero [INFO] [stdout] --> src/twenty_three/seven.rs:62:16 [INFO] [stdout] | [INFO] [stdout] 62 | if card_nums.len() == 0 && jokers == 5 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `card_nums.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: unneeded `return` statement [INFO] [stdout] --> src/twenty_three/seven.rs:104:50 [INFO] [stdout] | [INFO] [stdout] 104 | if self.hand_type > card.hand_type { return Ordering::Greater; } else { return Ordering::Less; } [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] 104 - if self.hand_type > card.hand_type { return Ordering::Greater; } else { return Ordering::Less; } [INFO] [stdout] 104 + if self.hand_type > card.hand_type { Ordering::Greater} else { return Ordering::Less; } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/twenty_three/seven.rs:104:85 [INFO] [stdout] | [INFO] [stdout] 104 | if self.hand_type > card.hand_type { return Ordering::Greater; } else { return Ordering::Less; } [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] 104 - if self.hand_type > card.hand_type { return Ordering::Greater; } else { return Ordering::Less; } [INFO] [stdout] 104 + if self.hand_type > card.hand_type { return Ordering::Greater; } else { Ordering::Less} [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/twenty_three/nine.rs:11:16 [INFO] [stdout] | [INFO] [stdout] 11 | if !(*i == 0) { [INFO] [stdout] | ^^^^^^^^^^ help: try: `(*i != 0)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.46s [INFO] running `Command { std: "docker" "inspect" "639cf413a01b12b17fc03357f063b4be0bbafd8c8f86fd8d81d1481ae9b88370", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "639cf413a01b12b17fc03357f063b4be0bbafd8c8f86fd8d81d1481ae9b88370", kill_on_drop: false }` [INFO] [stdout] 639cf413a01b12b17fc03357f063b4be0bbafd8c8f86fd8d81d1481ae9b88370