[INFO] cloning repository https://github.com/edupsousa/rust-coding-exercises [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/edupsousa/rust-coding-exercises" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fedupsousa%2Frust-coding-exercises", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fedupsousa%2Frust-coding-exercises'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 4e92e506c061c46fccee7074639e34248b29a2a7 [INFO] linting edupsousa/rust-coding-exercises/4e92e506c061c46fccee7074639e34248b29a2a7 against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fedupsousa%2Frust-coding-exercises" "/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/edupsousa/rust-coding-exercises [INFO] finished tweaking git repo https://github.com/edupsousa/rust-coding-exercises [INFO] tweaked toml for git repo https://github.com/edupsousa/rust-coding-exercises written to /workspace/builds/worker-0-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/edupsousa/rust-coding-exercises 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/edupsousa/rust-coding-exercises 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] 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] 99e15cdbf829bd5a02894896da4a7904177ffe829e64c912caf13c42f4a032a1 [INFO] running `Command { std: "docker" "start" "-a" "99e15cdbf829bd5a02894896da4a7904177ffe829e64c912caf13c42f4a032a1", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "99e15cdbf829bd5a02894896da4a7904177ffe829e64c912caf13c42f4a032a1", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "99e15cdbf829bd5a02894896da4a7904177ffe829e64c912caf13c42f4a032a1", kill_on_drop: false }` [INFO] [stdout] 99e15cdbf829bd5a02894896da4a7904177ffe829e64c912caf13c42f4a032a1 [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] ab386f91c7ffcfa7c510ddb243897f4809f102fd1c83f7f718765fff3f020ab1 [INFO] running `Command { std: "docker" "start" "-a" "ab386f91c7ffcfa7c510ddb243897f4809f102fd1c83f7f718765fff3f020ab1", kill_on_drop: false }` [INFO] [stderr] Checking rust-challenges v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> tests/haunted_matrix_sum.rs:18:3 [INFO] [stdout] | [INFO] [stdout] 18 | return sum; [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] 18 - return sum; [INFO] [stdout] 18 + sum [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/almost_increasing_sequence.rs:23:5 [INFO] [stdout] | [INFO] [stdout] 23 | assert_eq!(solution(vec![1, 3, 2, 1]), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_assert_comparison)]` on by default [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 23 - assert_eq!(solution(vec![1, 3, 2, 1]), false); [INFO] [stdout] 23 + assert!(!solution(vec![1, 3, 2, 1])); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/almost_increasing_sequence.rs:24:5 [INFO] [stdout] | [INFO] [stdout] 24 | assert_eq!(solution(vec![1, 3, 2]), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 24 - assert_eq!(solution(vec![1, 3, 2]), true); [INFO] [stdout] 24 + assert!(solution(vec![1, 3, 2])); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/almost_increasing_sequence.rs:25:5 [INFO] [stdout] | [INFO] [stdout] 25 | assert_eq!(solution(vec![1, 2, 1, 2]), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 25 - assert_eq!(solution(vec![1, 2, 1, 2]), false); [INFO] [stdout] 25 + assert!(!solution(vec![1, 2, 1, 2])); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/almost_increasing_sequence.rs:26:5 [INFO] [stdout] | [INFO] [stdout] 26 | assert_eq!(solution(vec![3, 6, 5, 8, 10, 20, 15]), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 26 - assert_eq!(solution(vec![3, 6, 5, 8, 10, 20, 15]), false); [INFO] [stdout] 26 + assert!(!solution(vec![3, 6, 5, 8, 10, 20, 15])); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/trie.rs:59:9 [INFO] [stdout] | [INFO] [stdout] 59 | assert_eq!(trie.search("apple".to_string()), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_assert_comparison)]` on by default [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 59 - assert_eq!(trie.search("apple".to_string()), true); [INFO] [stdout] 59 + assert!(trie.search("apple".to_string())); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/trie.rs:60:9 [INFO] [stdout] | [INFO] [stdout] 60 | assert_eq!(trie.search("app".to_string()), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 60 - assert_eq!(trie.search("app".to_string()), false); [INFO] [stdout] 60 + assert!(!trie.search("app".to_string())); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/trie.rs:61:9 [INFO] [stdout] | [INFO] [stdout] 61 | assert_eq!(trie.starts_with("app".to_string()), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 61 - assert_eq!(trie.starts_with("app".to_string()), true); [INFO] [stdout] 61 + assert!(trie.starts_with("app".to_string())); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/trie.rs:63:9 [INFO] [stdout] | [INFO] [stdout] 63 | assert_eq!(trie.search("app".to_string()), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 63 - assert_eq!(trie.search("app".to_string()), true); [INFO] [stdout] 63 + assert!(trie.search("app".to_string())); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> tests/longest_strings.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 5 | let output = input.into_iter().filter(|s| s.len() == longest).collect(); [INFO] [stdout] | ------------------------------------------------------------------------ unnecessary `let` binding [INFO] [stdout] 6 | output [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 5 ~ [INFO] [stdout] 6 ~ input.into_iter().filter(|s| s.len() == longest).collect() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> tests/longest_strings.rs:13:25 [INFO] [stdout] | [INFO] [stdout] 13 | let input_str = vec!["aba", "aa", "ad", "vcd", "aba"]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `["aba", "aa", "ad", "vcd", "aba"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> tests/longest_strings.rs:16:28 [INFO] [stdout] | [INFO] [stdout] 16 | let expected_str = vec!["aba", "vcd", "aba"]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `["aba", "vcd", "aba"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/is_lucky.rs:17:9 [INFO] [stdout] | [INFO] [stdout] 17 | assert_eq!(solution(123321), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_assert_comparison)]` on by default [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 17 - assert_eq!(solution(123321), true); [INFO] [stdout] 17 + assert!(solution(123321)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/is_lucky.rs:18:9 [INFO] [stdout] | [INFO] [stdout] 18 | assert_eq!(solution(1111), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 18 - assert_eq!(solution(1111), true); [INFO] [stdout] 18 + assert!(solution(1111)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/is_lucky.rs:19:9 [INFO] [stdout] | [INFO] [stdout] 19 | assert_eq!(solution(1230), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 19 - assert_eq!(solution(1230), true); [INFO] [stdout] 19 + assert!(solution(1230)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/is_lucky.rs:24:9 [INFO] [stdout] | [INFO] [stdout] 24 | assert_eq!(solution(1234), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 24 - assert_eq!(solution(1234), false); [INFO] [stdout] 24 + assert!(!solution(1234)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/is_lucky.rs:25:9 [INFO] [stdout] | [INFO] [stdout] 25 | assert_eq!(solution(123456), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 25 - assert_eq!(solution(123456), false); [INFO] [stdout] 25 + assert!(!solution(123456)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/is_lucky.rs:26:9 [INFO] [stdout] | [INFO] [stdout] 26 | assert_eq!(solution(1235), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 26 - assert_eq!(solution(1235), false); [INFO] [stdout] 26 + assert!(!solution(1235)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.43s [INFO] running `Command { std: "docker" "inspect" "ab386f91c7ffcfa7c510ddb243897f4809f102fd1c83f7f718765fff3f020ab1", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "ab386f91c7ffcfa7c510ddb243897f4809f102fd1c83f7f718765fff3f020ab1", kill_on_drop: false }` [INFO] [stdout] ab386f91c7ffcfa7c510ddb243897f4809f102fd1c83f7f718765fff3f020ab1