[INFO] cloning repository https://github.com/mfoman/adventofcode [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/mfoman/adventofcode" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fmfoman%2Fadventofcode", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fmfoman%2Fadventofcode'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 274eb12b4058cce5cacfa6c8c94d9c760896f9d7 [INFO] linting mfoman/adventofcode against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fmfoman%2Fadventofcode" "/workspace/builds/worker-1-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-1-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/mfoman/adventofcode [INFO] finished tweaking git repo https://github.com/mfoman/adventofcode [INFO] tweaked toml for git repo https://github.com/mfoman/adventofcode written to /workspace/builds/worker-1-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/mfoman/adventofcode 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/mfoman/adventofcode 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-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-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] d2a4ceeb44a353638453902e17b7218c4333e6ba7b0a1f20b6014c6609cc87d6 [INFO] running `Command { std: "docker" "start" "-a" "d2a4ceeb44a353638453902e17b7218c4333e6ba7b0a1f20b6014c6609cc87d6", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "d2a4ceeb44a353638453902e17b7218c4333e6ba7b0a1f20b6014c6609cc87d6", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "d2a4ceeb44a353638453902e17b7218c4333e6ba7b0a1f20b6014c6609cc87d6", kill_on_drop: false }` [INFO] [stdout] d2a4ceeb44a353638453902e17b7218c4333e6ba7b0a1f20b6014c6609cc87d6 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-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] 6af21f382975ff0df4fb8d2072608539185fe696358fae427712c76023a590d2 [INFO] running `Command { std: "docker" "start" "-a" "6af21f382975ff0df4fb8d2072608539185fe696358fae427712c76023a590d2", kill_on_drop: false }` [INFO] [stderr] Checking adventofcode v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused imports: `Write`, `stdout`, `thread`, and `time::Duration` [INFO] [stdout] --> src/bin/d4-native.rs:2:10 [INFO] [stdout] | [INFO] [stdout] 2 | io::{stdout, Write}, [INFO] [stdout] | ^^^^^^ ^^^^^ [INFO] [stdout] 3 | thread, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 4 | time::Duration, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `solution_one` is never used [INFO] [stdout] --> src/bin/d4-native.rs:23:4 [INFO] [stdout] | [INFO] [stdout] 23 | fn solution_one(lines: &Vec) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/d4-native.rs:43:5 [INFO] [stdout] | [INFO] [stdout] 43 | return count; [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] 43 - return count; [INFO] [stdout] 43 + count [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/bin/d4-native.rs:23:24 [INFO] [stdout] | [INFO] [stdout] 23 | fn solution_one(lines: &Vec) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 23 - fn solution_one(lines: &Vec) -> usize { [INFO] [stdout] 23 + fn solution_one(lines: &[String]) -> usize { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/d4-native.rs:70:5 [INFO] [stdout] | [INFO] [stdout] 70 | return count; [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] 70 - return count; [INFO] [stdout] 70 + count [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/bin/d4-native.rs:46:24 [INFO] [stdout] | [INFO] [stdout] 46 | fn solution_two(lines: &Vec) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 46 - fn solution_two(lines: &Vec) -> usize { [INFO] [stdout] 46 + fn solution_two(lines: &[String]) -> usize { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/bin/d4-native.rs:160:24 [INFO] [stdout] | [INFO] [stdout] 160 | if !('a' <= c && c <= 'z') && !('0' <= c && c <= '9') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!('a' <= c && c <= 'z' || '0' <= c && c <= '9')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/bin/d4-native.rs:177:17 [INFO] [stdout] | [INFO] [stdout] 177 | / if x.len() != 9 { [INFO] [stdout] 178 | | // println!("invalid pid"); [INFO] [stdout] 179 | | return false; [INFO] [stdout] 180 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 176 ~ ["pid", x] [INFO] [stdout] 177 ~ if x.len() != 9 => { [INFO] [stdout] 178 | // println!("invalid pid"); [INFO] [stdout] 179 | return false; [INFO] [stdout] 180 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/bin/d4-native.rs:94:20 [INFO] [stdout] | [INFO] [stdout] 94 | if x < 1920 || 2002 < x { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: use: `!(1920..=2002).contains(&x)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/bin/d4-native.rs:103:20 [INFO] [stdout] | [INFO] [stdout] 103 | if x < 2010 || 2020 < x { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: use: `!(2010..=2020).contains(&x)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/bin/d4-native.rs:112:20 [INFO] [stdout] | [INFO] [stdout] 112 | if x < 2020 || 2030 < x { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: use: `!(2020..=2030).contains(&x)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/bin/d4-native.rs:129:28 [INFO] [stdout] | [INFO] [stdout] 129 | if x < 59 || 76 < x { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: use: `!(59..=76).contains(&x)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/bin/d4-native.rs:136:28 [INFO] [stdout] | [INFO] [stdout] 136 | if x < 150 || 193 < x { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: use: `!(150..=193).contains(&x)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/bin/d4-native.rs:160:25 [INFO] [stdout] | [INFO] [stdout] 160 | if !('a' <= c && c <= 'z') && !('0' <= c && c <= '9') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: use: `('a'..='z').contains(&c)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/bin/d4-native.rs:160:52 [INFO] [stdout] | [INFO] [stdout] 160 | if !('a' <= c && c <= 'z') && !('0' <= c && c <= '9') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: use: `('0'..='9').contains(&c)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/d3-native.rs:16:24 [INFO] [stdout] | [INFO] [stdout] 16 | fn solution_one(lines: &Vec, walk: &(usize, usize)) -> i64 { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 16 - fn solution_one(lines: &Vec, walk: &(usize, usize)) -> i64 { [INFO] [stdout] 16 + fn solution_one(lines: &[String], walk: &(usize, usize)) -> i64 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `(usize, usize)` which implements the `Copy` trait [INFO] [stdout] --> src/bin/d3-native.rs:19:31 [INFO] [stdout] | [INFO] [stdout] 19 | let travel: (usize, usize) = walk.clone(); [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*walk` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/d3-native.rs:47:29 [INFO] [stdout] | [INFO] [stdout] 47 | let answer = solution_one(&lines, walk); [INFO] [stdout] | ^^^^^^ help: change this to: `lines` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/bin/d4-native.rs:193:18 [INFO] [stdout] | [INFO] [stdout] 193 | .map(|x| String::from(x.replace('\n', " "))) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `x.replace('\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 `.fold` can be written more succinctly using another method [INFO] [stdout] --> src/bin/d3-native.rs:52:32 [INFO] [stdout] | [INFO] [stdout] 52 | let out: i64 = answers.iter().fold(1, |acc, x| acc * x); [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: redundant closure [INFO] [stdout] --> src/bin/d3-native.rs:64:34 [INFO] [stdout] | [INFO] [stdout] 64 | text.trim_end().split('\n').map(|x| String::from(x)).collect::>() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `String::from` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Write`, `stdout`, `thread`, and `time::Duration` [INFO] [stdout] --> src/bin/d4-native.rs:2:10 [INFO] [stdout] | [INFO] [stdout] 2 | io::{stdout, Write}, [INFO] [stdout] | ^^^^^^ ^^^^^ [INFO] [stdout] 3 | thread, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 4 | time::Duration, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) 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/bin/d3-native.rs:16:24 [INFO] [stdout] | [INFO] [stdout] 16 | fn solution_one(lines: &Vec, walk: &(usize, usize)) -> i64 { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 16 - fn solution_one(lines: &Vec, walk: &(usize, usize)) -> i64 { [INFO] [stdout] 16 + fn solution_one(lines: &[String], walk: &(usize, usize)) -> i64 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `(usize, usize)` which implements the `Copy` trait [INFO] [stdout] --> src/bin/d3-native.rs:19:31 [INFO] [stdout] | [INFO] [stdout] 19 | let travel: (usize, usize) = walk.clone(); [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*walk` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/d3-native.rs:47:29 [INFO] [stdout] | [INFO] [stdout] 47 | let answer = solution_one(&lines, walk); [INFO] [stdout] | ^^^^^^ help: change this to: `lines` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.fold` can be written more succinctly using another method [INFO] [stdout] --> src/bin/d3-native.rs:52:32 [INFO] [stdout] | [INFO] [stdout] 52 | let out: i64 = answers.iter().fold(1, |acc, x| acc * x); [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: redundant closure [INFO] [stdout] --> src/bin/d3-native.rs:64:34 [INFO] [stdout] | [INFO] [stdout] 64 | text.trim_end().split('\n').map(|x| String::from(x)).collect::>() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `String::from` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `solution_one` is never used [INFO] [stdout] --> src/bin/d4-native.rs:23:4 [INFO] [stdout] | [INFO] [stdout] 23 | fn solution_one(lines: &Vec) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/d4-native.rs:43:5 [INFO] [stdout] | [INFO] [stdout] 43 | return count; [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] 43 - return count; [INFO] [stdout] 43 + count [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/bin/d4-native.rs:23:24 [INFO] [stdout] | [INFO] [stdout] 23 | fn solution_one(lines: &Vec) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 23 - fn solution_one(lines: &Vec) -> usize { [INFO] [stdout] 23 + fn solution_one(lines: &[String]) -> usize { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/d4-native.rs:70:5 [INFO] [stdout] | [INFO] [stdout] 70 | return count; [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] 70 - return count; [INFO] [stdout] 70 + count [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/bin/d4-native.rs:46:24 [INFO] [stdout] | [INFO] [stdout] 46 | fn solution_two(lines: &Vec) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 46 - fn solution_two(lines: &Vec) -> usize { [INFO] [stdout] 46 + fn solution_two(lines: &[String]) -> usize { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/bin/d4-native.rs:160:24 [INFO] [stdout] | [INFO] [stdout] 160 | if !('a' <= c && c <= 'z') && !('0' <= c && c <= '9') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!('a' <= c && c <= 'z' || '0' <= c && c <= '9')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/bin/d4-native.rs:177:17 [INFO] [stdout] | [INFO] [stdout] 177 | / if x.len() != 9 { [INFO] [stdout] 178 | | // println!("invalid pid"); [INFO] [stdout] 179 | | return false; [INFO] [stdout] 180 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 176 ~ ["pid", x] [INFO] [stdout] 177 ~ if x.len() != 9 => { [INFO] [stdout] 178 | // println!("invalid pid"); [INFO] [stdout] 179 | return false; [INFO] [stdout] 180 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/bin/d4-native.rs:94:20 [INFO] [stdout] | [INFO] [stdout] 94 | if x < 1920 || 2002 < x { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: use: `!(1920..=2002).contains(&x)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/bin/d4-native.rs:103:20 [INFO] [stdout] | [INFO] [stdout] 103 | if x < 2010 || 2020 < x { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: use: `!(2010..=2020).contains(&x)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/bin/d4-native.rs:112:20 [INFO] [stdout] | [INFO] [stdout] 112 | if x < 2020 || 2030 < x { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: use: `!(2020..=2030).contains(&x)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/bin/d4-native.rs:129:28 [INFO] [stdout] | [INFO] [stdout] 129 | if x < 59 || 76 < x { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: use: `!(59..=76).contains(&x)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/bin/d4-native.rs:136:28 [INFO] [stdout] | [INFO] [stdout] 136 | if x < 150 || 193 < x { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: use: `!(150..=193).contains(&x)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/bin/d4-native.rs:160:25 [INFO] [stdout] | [INFO] [stdout] 160 | if !('a' <= c && c <= 'z') && !('0' <= c && c <= '9') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: use: `('a'..='z').contains(&c)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/bin/d4-native.rs:160:52 [INFO] [stdout] | [INFO] [stdout] 160 | if !('a' <= c && c <= 'z') && !('0' <= c && c <= '9') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: use: `('0'..='9').contains(&c)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/bin/d4-native.rs:193:18 [INFO] [stdout] | [INFO] [stdout] 193 | .map(|x| String::from(x.replace('\n', " "))) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `x.replace('\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] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.31s [INFO] running `Command { std: "docker" "inspect" "6af21f382975ff0df4fb8d2072608539185fe696358fae427712c76023a590d2", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "6af21f382975ff0df4fb8d2072608539185fe696358fae427712c76023a590d2", kill_on_drop: false }` [INFO] [stdout] 6af21f382975ff0df4fb8d2072608539185fe696358fae427712c76023a590d2