[INFO] cloning repository https://github.com/mGarbowski/neetcode [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/mGarbowski/neetcode" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FmGarbowski%2Fneetcode", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FmGarbowski%2Fneetcode'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] ef9745605de6dcaaabd912884bedbaceb0c68257 [INFO] linting mGarbowski/neetcode against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FmGarbowski%2Fneetcode" "/workspace/builds/worker-6-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-6-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/mGarbowski/neetcode [INFO] finished tweaking git repo https://github.com/mGarbowski/neetcode [INFO] tweaked toml for git repo https://github.com/mGarbowski/neetcode written to /workspace/builds/worker-6-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/mGarbowski/neetcode 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/mGarbowski/neetcode 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-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-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] a3a141271f1473b2206f5bcea4c8498f0dae0bd2ad9d8d8940139cf5adc2122f [INFO] running `Command { std: "docker" "start" "-a" "a3a141271f1473b2206f5bcea4c8498f0dae0bd2ad9d8d8940139cf5adc2122f", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "a3a141271f1473b2206f5bcea4c8498f0dae0bd2ad9d8d8940139cf5adc2122f", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "a3a141271f1473b2206f5bcea4c8498f0dae0bd2ad9d8d8940139cf5adc2122f", kill_on_drop: false }` [INFO] [stdout] a3a141271f1473b2206f5bcea4c8498f0dae0bd2ad9d8d8940139cf5adc2122f [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-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] 1a3d9b79b4403cdb35184e50bd5e7c1ecba8afa90cdc0e550d0761af9c5166a4 [INFO] running `Command { std: "docker" "start" "-a" "1a3d9b79b4403cdb35184e50bd5e7c1ecba8afa90cdc0e550d0761af9c5166a4", kill_on_drop: false }` [INFO] [stderr] Checking neetcode v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/arrays_and_hashing/valid_sudoku.rs:46:65 [INFO] [stdout] | [INFO] [stdout] 46 | fn is_valid_square(square_row: usize, square_col: usize, board: &Vec>) -> 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] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 46 - fn is_valid_square(square_row: usize, square_col: usize, board: &Vec>) -> bool { [INFO] [stdout] 46 + fn is_valid_square(square_row: usize, square_col: usize, board: &[Vec]) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/arrays_and_hashing/top_k_frequent.rs:18:12 [INFO] [stdout] | [INFO] [stdout] 18 | if bucket.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!bucket.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: you should consider adding a `Default` implementation for `MinStack` [INFO] [stdout] --> src/stack/min_stack.rs:13:5 [INFO] [stdout] | [INFO] [stdout] 13 | / pub fn new() -> Self { [INFO] [stdout] 14 | | Self { [INFO] [stdout] 15 | | items: vec![] [INFO] [stdout] 16 | | } [INFO] [stdout] 17 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 12 + impl Default for MinStack { [INFO] [stdout] 13 + fn default() -> Self { [INFO] [stdout] 14 + Self::new() [INFO] [stdout] 15 + } [INFO] [stdout] 16 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/stack/car_fleet.rs:16:15 [INFO] [stdout] | [INFO] [stdout] 16 | while !stack.last().is_none() && *stack.last().unwrap() <= time { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `stack.last().is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual check for common ascii range [INFO] [stdout] --> src/two_pointers/valid_palindrome.rs:6:24 [INFO] [stdout] | [INFO] [stdout] 6 | .filter(|char| ('a'..='z').contains(char) || ('0'..='9').contains(char)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_ascii_check [INFO] [stdout] = note: `#[warn(clippy::manual_is_ascii_check)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 6 - .filter(|char| ('a'..='z').contains(char) || ('0'..='9').contains(char)) [INFO] [stdout] 6 + .filter(|char: &char| char.is_ascii_lowercase() || ('0'..='9').contains(char)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual check for common ascii range [INFO] [stdout] --> src/two_pointers/valid_palindrome.rs:6:54 [INFO] [stdout] | [INFO] [stdout] 6 | .filter(|char| ('a'..='z').contains(char) || ('0'..='9').contains(char)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_ascii_check [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 6 - .filter(|char| ('a'..='z').contains(char) || ('0'..='9').contains(char)) [INFO] [stdout] 6 + .filter(|char: &char| ('a'..='z').contains(char) || char.is_ascii_digit()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/two_pointers/valid_palindrome.rs:9:8 [INFO] [stdout] | [INFO] [stdout] 9 | if clean_string.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `clean_string.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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/arrays_and_hashing/valid_sudoku.rs:46:65 [INFO] [stdout] | [INFO] [stdout] 46 | fn is_valid_square(square_row: usize, square_col: usize, board: &Vec>) -> 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] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 46 - fn is_valid_square(square_row: usize, square_col: usize, board: &Vec>) -> bool { [INFO] [stdout] 46 + fn is_valid_square(square_row: usize, square_col: usize, board: &[Vec]) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/arrays_and_hashing/top_k_frequent.rs:18:12 [INFO] [stdout] | [INFO] [stdout] 18 | if bucket.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!bucket.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: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/arrays_and_hashing/contains_duplicate.rs:23:9 [INFO] [stdout] | [INFO] [stdout] 23 | assert_eq!(true, contains_duplicate(vec)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_assert_comparison)]` on by default [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 23 - assert_eq!(true, contains_duplicate(vec)) [INFO] [stdout] 23 + assert!(contains_duplicate(vec)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/arrays_and_hashing/contains_duplicate.rs:29:9 [INFO] [stdout] | [INFO] [stdout] 29 | assert_eq!(false, contains_duplicate(vec)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 29 - assert_eq!(false, contains_duplicate(vec)) [INFO] [stdout] 29 + assert!(!contains_duplicate(vec)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `MinStack` [INFO] [stdout] --> src/stack/min_stack.rs:13:5 [INFO] [stdout] | [INFO] [stdout] 13 | / pub fn new() -> Self { [INFO] [stdout] 14 | | Self { [INFO] [stdout] 15 | | items: vec![] [INFO] [stdout] 16 | | } [INFO] [stdout] 17 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 12 + impl Default for MinStack { [INFO] [stdout] 13 + fn default() -> Self { [INFO] [stdout] 14 + Self::new() [INFO] [stdout] 15 + } [INFO] [stdout] 16 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/stack/car_fleet.rs:16:15 [INFO] [stdout] | [INFO] [stdout] 16 | while !stack.last().is_none() && *stack.last().unwrap() <= time { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `stack.last().is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual check for common ascii range [INFO] [stdout] --> src/two_pointers/valid_palindrome.rs:6:24 [INFO] [stdout] | [INFO] [stdout] 6 | .filter(|char| ('a'..='z').contains(char) || ('0'..='9').contains(char)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_ascii_check [INFO] [stdout] = note: `#[warn(clippy::manual_is_ascii_check)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 6 - .filter(|char| ('a'..='z').contains(char) || ('0'..='9').contains(char)) [INFO] [stdout] 6 + .filter(|char: &char| char.is_ascii_lowercase() || ('0'..='9').contains(char)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual check for common ascii range [INFO] [stdout] --> src/two_pointers/valid_palindrome.rs:6:54 [INFO] [stdout] | [INFO] [stdout] 6 | .filter(|char| ('a'..='z').contains(char) || ('0'..='9').contains(char)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_ascii_check [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 6 - .filter(|char| ('a'..='z').contains(char) || ('0'..='9').contains(char)) [INFO] [stdout] 6 + .filter(|char: &char| ('a'..='z').contains(char) || char.is_ascii_digit()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/two_pointers/valid_palindrome.rs:9:8 [INFO] [stdout] | [INFO] [stdout] 9 | if clean_string.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `clean_string.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] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.44s [INFO] running `Command { std: "docker" "inspect" "1a3d9b79b4403cdb35184e50bd5e7c1ecba8afa90cdc0e550d0761af9c5166a4", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "1a3d9b79b4403cdb35184e50bd5e7c1ecba8afa90cdc0e550d0761af9c5166a4", kill_on_drop: false }` [INFO] [stdout] 1a3d9b79b4403cdb35184e50bd5e7c1ecba8afa90cdc0e550d0761af9c5166a4