[INFO] cloning repository https://github.com/mbishram/simple-employees-database [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/mbishram/simple-employees-database" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fmbishram%2Fsimple-employees-database", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fmbishram%2Fsimple-employees-database'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 76ea6d4f09eadf871f1f6d144355b851cbd91079 [INFO] linting mbishram/simple-employees-database against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fmbishram%2Fsimple-employees-database" "/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/mbishram/simple-employees-database [INFO] finished tweaking git repo https://github.com/mbishram/simple-employees-database [INFO] tweaked toml for git repo https://github.com/mbishram/simple-employees-database written to /workspace/builds/worker-6-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/mbishram/simple-employees-database 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/mbishram/simple-employees-database 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] Downloading crates ... [INFO] [stderr] Downloaded comfy-table v7.1.0 [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] 607e2284a1bf4af399eb9d14e2046a8876f4cc34d77b531b0420c6da84956b22 [INFO] running `Command { std: "docker" "start" "-a" "607e2284a1bf4af399eb9d14e2046a8876f4cc34d77b531b0420c6da84956b22", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "607e2284a1bf4af399eb9d14e2046a8876f4cc34d77b531b0420c6da84956b22", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "607e2284a1bf4af399eb9d14e2046a8876f4cc34d77b531b0420c6da84956b22", kill_on_drop: false }` [INFO] [stdout] 607e2284a1bf4af399eb9d14e2046a8876f4cc34d77b531b0420c6da84956b22 [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] b1c43ea2cf8aa29bba2d2f17f641f27ef27e60aa90d796e0c15e32bc2bf30eeb [INFO] running `Command { std: "docker" "start" "-a" "b1c43ea2cf8aa29bba2d2f17f641f27ef27e60aa90d796e0c15e32bc2bf30eeb", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.152 [INFO] [stderr] Checking smallvec v1.13.1 [INFO] [stderr] Checking bitflags v2.4.2 [INFO] [stderr] Checking strum v0.25.0 [INFO] [stderr] Checking colored v2.1.0 [INFO] [stderr] Compiling syn v2.0.48 [INFO] [stderr] Checking parking_lot_core v0.9.9 [INFO] [stderr] Checking parking_lot v0.12.1 [INFO] [stderr] Checking crossterm v0.27.0 [INFO] [stderr] Compiling strum_macros v0.25.3 [INFO] [stderr] Checking comfy-table v7.1.0 [INFO] [stderr] Checking employees_database v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/employees_database.rs:29:16 [INFO] [stdout] | [INFO] [stdout] 29 | if (department != "" && department_name == department) || department == "" { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 29 - if (department != "" && department_name == department) || department == "" { [INFO] [stdout] 29 + if !(department != "" && department_name != department) { [INFO] [stdout] | [INFO] [stdout] 29 - if (department != "" && department_name == department) || department == "" { [INFO] [stdout] 29 + if department == "" || department_name == department { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/employees_database.rs:29:17 [INFO] [stdout] | [INFO] [stdout] 29 | if (department != "" && department_name == department) || department == "" { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!department.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] = note: `#[warn(clippy::comparison_to_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/employees_database.rs:29:71 [INFO] [stdout] | [INFO] [stdout] 29 | if (department != "" && department_name == department) || department == "" { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `department.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: iterating on a map's keys [INFO] [stdout] --> src/employees_database.rs:79:13 [INFO] [stdout] | [INFO] [stdout] 79 | self.0.iter().map(|(department, _)| [department]).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.0.keys().map(|department| [department])` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_kv_map [INFO] [stdout] = note: `#[warn(clippy::iter_kv_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: found call to `str::trim` before `str::split_whitespace` [INFO] [stdout] --> src/main.rs:43:38 [INFO] [stdout] | [INFO] [stdout] 43 | let input: Vec<&str> = input.trim().split_whitespace().collect(); [INFO] [stdout] | ^^^^^^^ help: remove `trim()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trim_split_whitespace [INFO] [stdout] = note: `#[warn(clippy::trim_split_whitespace)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `input.get(0)` [INFO] [stdout] --> src/main.rs:45:23 [INFO] [stdout] | [INFO] [stdout] 45 | let command = input.get(0).unwrap_or(&"").to_lowercase(); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `input.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/main.rs:57:20 [INFO] [stdout] | [INFO] [stdout] 57 | if name == "" { [INFO] [stdout] | ^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `name.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/main.rs:62:20 [INFO] [stdout] | [INFO] [stdout] 62 | if department == "" { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `department.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/main.rs:86:20 [INFO] [stdout] | [INFO] [stdout] 86 | if name == "" { [INFO] [stdout] | ^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `name.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/main.rs:93:20 [INFO] [stdout] | [INFO] [stdout] 93 | if department == "" { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `department.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/main.rs:140:28 [INFO] [stdout] | [INFO] [stdout] 140 | if sub_kind == "" { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `sub_kind.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/employees_database.rs:29:16 [INFO] [stdout] | [INFO] [stdout] 29 | if (department != "" && department_name == department) || department == "" { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 29 - if (department != "" && department_name == department) || department == "" { [INFO] [stdout] 29 + if !(department != "" && department_name != department) { [INFO] [stdout] | [INFO] [stdout] 29 - if (department != "" && department_name == department) || department == "" { [INFO] [stdout] 29 + if department == "" || department_name == department { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/employees_database.rs:29:17 [INFO] [stdout] | [INFO] [stdout] 29 | if (department != "" && department_name == department) || department == "" { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!department.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] = note: `#[warn(clippy::comparison_to_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/employees_database.rs:29:71 [INFO] [stdout] | [INFO] [stdout] 29 | if (department != "" && department_name == department) || department == "" { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `department.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: iterating on a map's keys [INFO] [stdout] --> src/employees_database.rs:79:13 [INFO] [stdout] | [INFO] [stdout] 79 | self.0.iter().map(|(department, _)| [department]).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.0.keys().map(|department| [department])` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_kv_map [INFO] [stdout] = note: `#[warn(clippy::iter_kv_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: found call to `str::trim` before `str::split_whitespace` [INFO] [stdout] --> src/main.rs:43:38 [INFO] [stdout] | [INFO] [stdout] 43 | let input: Vec<&str> = input.trim().split_whitespace().collect(); [INFO] [stdout] | ^^^^^^^ help: remove `trim()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trim_split_whitespace [INFO] [stdout] = note: `#[warn(clippy::trim_split_whitespace)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `input.get(0)` [INFO] [stdout] --> src/main.rs:45:23 [INFO] [stdout] | [INFO] [stdout] 45 | let command = input.get(0).unwrap_or(&"").to_lowercase(); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `input.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/main.rs:57:20 [INFO] [stdout] | [INFO] [stdout] 57 | if name == "" { [INFO] [stdout] | ^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `name.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/main.rs:62:20 [INFO] [stdout] | [INFO] [stdout] 62 | if department == "" { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `department.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/main.rs:86:20 [INFO] [stdout] | [INFO] [stdout] 86 | if name == "" { [INFO] [stdout] | ^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `name.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/main.rs:93:20 [INFO] [stdout] | [INFO] [stdout] 93 | if department == "" { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `department.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/main.rs:140:28 [INFO] [stdout] | [INFO] [stdout] 140 | if sub_kind == "" { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `sub_kind.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 6.46s [INFO] running `Command { std: "docker" "inspect" "b1c43ea2cf8aa29bba2d2f17f641f27ef27e60aa90d796e0c15e32bc2bf30eeb", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "b1c43ea2cf8aa29bba2d2f17f641f27ef27e60aa90d796e0c15e32bc2bf30eeb", kill_on_drop: false }` [INFO] [stdout] b1c43ea2cf8aa29bba2d2f17f641f27ef27e60aa90d796e0c15e32bc2bf30eeb