[INFO] cloning repository https://github.com/cdgmachado0/exer-book [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/cdgmachado0/exer-book" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fcdgmachado0%2Fexer-book", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fcdgmachado0%2Fexer-book'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 1ee0e0dcc0cd5c87031c9ebb9d78e1a3e8ddb6fa [INFO] linting cdgmachado0/exer-book against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fcdgmachado0%2Fexer-book" "/workspace/builds/worker-3-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-3-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/cdgmachado0/exer-book [INFO] finished tweaking git repo https://github.com/cdgmachado0/exer-book [INFO] tweaked toml for git repo https://github.com/cdgmachado0/exer-book written to /workspace/builds/worker-3-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/cdgmachado0/exer-book 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/cdgmachado0/exer-book 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-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-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] 9d1e219519c51a2270b7391d1d033a5599d21ac04e94645561f999753cb38dad [INFO] running `Command { std: "docker" "start" "-a" "9d1e219519c51a2270b7391d1d033a5599d21ac04e94645561f999753cb38dad", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "9d1e219519c51a2270b7391d1d033a5599d21ac04e94645561f999753cb38dad", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "9d1e219519c51a2270b7391d1d033a5599d21ac04e94645561f999753cb38dad", kill_on_drop: false }` [INFO] [stdout] 9d1e219519c51a2270b7391d1d033a5599d21ac04e94645561f999753cb38dad [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-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] f0d557be9c271afce4636ffcff0eaceca8af8a906acc863a2cb25cef6f9e82ac [INFO] running `Command { std: "docker" "start" "-a" "f0d557be9c271afce4636ffcff0eaceca8af8a906acc863a2cb25cef6f9e82ac", kill_on_drop: false }` [INFO] [stderr] Checking exe-8 v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: field `1` is never read [INFO] [stdout] --> src/departments.rs:189:21 [INFO] [stdout] | [INFO] [stdout] 189 | Display(String, String), [INFO] [stdout] | ------- ^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 189 - Display(String, String), [INFO] [stdout] 189 + Display(String, ()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/mode.rs:3:23 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn get_mode(list: &mut Vec) { [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] 3 - pub fn get_mode(list: &mut Vec) { [INFO] [stdout] 3 + pub fn get_mode(list: &mut [i32]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `1` is never read [INFO] [stdout] --> src/departments.rs:189:21 [INFO] [stdout] | [INFO] [stdout] 189 | Display(String, String), [INFO] [stdout] | ------- ^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 189 - Display(String, String), [INFO] [stdout] 189 + Display(String, ()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `print!()` with a format string that ends in a single newline [INFO] [stdout] --> src/latin.rs:20:9 [INFO] [stdout] | [INFO] [stdout] 20 | print!("modified word: {}\n", mod_word); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_with_newline [INFO] [stdout] = note: `#[warn(clippy::print_with_newline)]` on by default [INFO] [stdout] help: use `println!` instead [INFO] [stdout] | [INFO] [stdout] 20 - print!("modified word: {}\n", mod_word); [INFO] [stdout] 20 + println!("modified word: {}", mod_word); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/latin.rs:23:55 [INFO] [stdout] | [INFO] [stdout] 23 | fn check_letter(letters: &[char], l: &char, word: &String) -> 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] help: change this to [INFO] [stdout] | [INFO] [stdout] 23 - fn check_letter(letters: &[char], l: &char, word: &String) -> bool { [INFO] [stdout] 23 + fn check_letter(letters: &[char], l: &char, word: &str) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/mode.rs:3:23 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn get_mode(list: &mut Vec) { [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] 3 - pub fn get_mode(list: &mut Vec) { [INFO] [stdout] 3 + pub fn get_mode(list: &mut [i32]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/departments.rs:49:16 [INFO] [stdout] | [INFO] [stdout] 49 | if i == 3 && ch == ' ' || i == 6 && ch == ' ' { [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] 49 - if i == 3 && ch == ' ' || i == 6 && ch == ' ' { [INFO] [stdout] 49 + if !(ch != ' ' || i != 3 && i != 6) { [INFO] [stdout] | [INFO] [stdout] 49 - if i == 3 && ch == ' ' || i == 6 && ch == ' ' { [INFO] [stdout] 49 + if (i == 6 || i == 3) && ch == ' ' { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_err()` [INFO] [stdout] --> src/departments.rs:14:16 [INFO] [stdout] | [INFO] [stdout] 14 | if let Err(_) = io::stdin().read_line(&mut user_input) { [INFO] [stdout] | -------^^^^^^----------------------------------------- help: try: `if io::stdin().read_line(&mut user_input).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/departments.rs:28:25 [INFO] [stdout] | [INFO] [stdout] 28 | / if action_or_dep == all { [INFO] [stdout] 29 | | show_employes(&mut company_record, action_or_dep); [INFO] [stdout] 30 | | } [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] 27 ~ Action::Display(all, _) [INFO] [stdout] 28 ~ if action_or_dep == all => { [INFO] [stdout] 29 | show_employes(&mut company_record, action_or_dep); [INFO] [stdout] 30 ~ }, [INFO] [stdout] | [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/departments.rs:26:17 [INFO] [stdout] | [INFO] [stdout] 26 | / match display { [INFO] [stdout] 27 | | Action::Display(all, _) => { [INFO] [stdout] 28 | | if action_or_dep == all { [INFO] [stdout] 29 | | show_employes(&mut company_record, action_or_dep); [INFO] [stdout] ... | [INFO] [stdout] 32 | | _ => () [INFO] [stdout] 33 | | } [INFO] [stdout] | |_________________^ [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] help: try [INFO] [stdout] | [INFO] [stdout] 26 ~ if let Action::Display(all, _) = display { [INFO] [stdout] 27 + if action_or_dep == all { [INFO] [stdout] 28 + show_employes(&mut company_record, action_or_dep); [INFO] [stdout] 29 + } [INFO] [stdout] 30 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/departments.rs:40:16 [INFO] [stdout] | [INFO] [stdout] 40 | } else if !user_input.starts_with("add") { [INFO] [stdout] | ________________^ [INFO] [stdout] 41 | | if !user_input.starts_with("remove") { [INFO] [stdout] 42 | | println!("Not a valid action. Valid is either ADD, REMOVE or LIST"); [INFO] [stdout] 43 | | } [INFO] [stdout] 44 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 40 ~ } else if !user_input.starts_with("add") [INFO] [stdout] 41 ~ && !user_input.starts_with("remove") { [INFO] [stdout] 42 | println!("Not a valid action. Valid is either ADD, REMOVE or LIST"); [INFO] [stdout] 43 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `print!()` with a format string that ends in a single newline [INFO] [stdout] --> src/latin.rs:20:9 [INFO] [stdout] | [INFO] [stdout] 20 | print!("modified word: {}\n", mod_word); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_with_newline [INFO] [stdout] = note: `#[warn(clippy::print_with_newline)]` on by default [INFO] [stdout] help: use `println!` instead [INFO] [stdout] | [INFO] [stdout] 20 - print!("modified word: {}\n", mod_word); [INFO] [stdout] 20 + println!("modified word: {}", mod_word); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/latin.rs:23:55 [INFO] [stdout] | [INFO] [stdout] 23 | fn check_letter(letters: &[char], l: &char, word: &String) -> 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] help: change this to [INFO] [stdout] | [INFO] [stdout] 23 - fn check_letter(letters: &[char], l: &char, word: &String) -> bool { [INFO] [stdout] 23 + fn check_letter(letters: &[char], l: &char, word: &str) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/departments.rs:49:16 [INFO] [stdout] | [INFO] [stdout] 49 | if i == 3 && ch == ' ' || i == 6 && ch == ' ' { [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] 49 - if i == 3 && ch == ' ' || i == 6 && ch == ' ' { [INFO] [stdout] 49 + if !(ch != ' ' || i != 3 && i != 6) { [INFO] [stdout] | [INFO] [stdout] 49 - if i == 3 && ch == ' ' || i == 6 && ch == ' ' { [INFO] [stdout] 49 + if (i == 6 || i == 3) && ch == ' ' { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_err()` [INFO] [stdout] --> src/departments.rs:14:16 [INFO] [stdout] | [INFO] [stdout] 14 | if let Err(_) = io::stdin().read_line(&mut user_input) { [INFO] [stdout] | -------^^^^^^----------------------------------------- help: try: `if io::stdin().read_line(&mut user_input).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/departments.rs:28:25 [INFO] [stdout] | [INFO] [stdout] 28 | / if action_or_dep == all { [INFO] [stdout] 29 | | show_employes(&mut company_record, action_or_dep); [INFO] [stdout] 30 | | } [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] 27 ~ Action::Display(all, _) [INFO] [stdout] 28 ~ if action_or_dep == all => { [INFO] [stdout] 29 | show_employes(&mut company_record, action_or_dep); [INFO] [stdout] 30 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/departments.rs:106:25 [INFO] [stdout] | [INFO] [stdout] 106 | return; [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] 105 - println!("Employee is already in this department"); [INFO] [stdout] 106 - return; [INFO] [stdout] 105 + println!("Employee is already in this department"); [INFO] [stdout] | [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/departments.rs:26:17 [INFO] [stdout] | [INFO] [stdout] 26 | / match display { [INFO] [stdout] 27 | | Action::Display(all, _) => { [INFO] [stdout] 28 | | if action_or_dep == all { [INFO] [stdout] 29 | | show_employes(&mut company_record, action_or_dep); [INFO] [stdout] ... | [INFO] [stdout] 32 | | _ => () [INFO] [stdout] 33 | | } [INFO] [stdout] | |_________________^ [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] help: try [INFO] [stdout] | [INFO] [stdout] 26 ~ if let Action::Display(all, _) = display { [INFO] [stdout] 27 + if action_or_dep == all { [INFO] [stdout] 28 + show_employes(&mut company_record, action_or_dep); [INFO] [stdout] 29 + } [INFO] [stdout] 30 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/departments.rs:40:16 [INFO] [stdout] | [INFO] [stdout] 40 | } else if !user_input.starts_with("add") { [INFO] [stdout] | ________________^ [INFO] [stdout] 41 | | if !user_input.starts_with("remove") { [INFO] [stdout] 42 | | println!("Not a valid action. Valid is either ADD, REMOVE or LIST"); [INFO] [stdout] 43 | | } [INFO] [stdout] 44 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 40 ~ } else if !user_input.starts_with("add") [INFO] [stdout] 41 ~ && !user_input.starts_with("remove") { [INFO] [stdout] 42 | println!("Not a valid action. Valid is either ADD, REMOVE or LIST"); [INFO] [stdout] 43 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/departments.rs:121:16 [INFO] [stdout] | [INFO] [stdout] 121 | if employees.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `employees.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: binary comparison to literal `Option::None` [INFO] [stdout] --> src/departments.rs:139:16 [INFO] [stdout] | [INFO] [stdout] 139 | if employees == None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `employees.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] = note: `#[warn(clippy::partialeq_to_none)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/departments.rs:106:25 [INFO] [stdout] | [INFO] [stdout] 106 | return; [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] 105 - println!("Employee is already in this department"); [INFO] [stdout] 106 - return; [INFO] [stdout] 105 + println!("Employee is already in this department"); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/departments.rs:164:13 [INFO] [stdout] | [INFO] [stdout] 164 | fn c(entry: &String) -> String { [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] 164 - fn c(entry: &String) -> String { [INFO] [stdout] 164 + fn c(entry: &str) -> String { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/departments.rs:121:16 [INFO] [stdout] | [INFO] [stdout] 121 | if employees.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `employees.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: binary comparison to literal `Option::None` [INFO] [stdout] --> src/departments.rs:139:16 [INFO] [stdout] | [INFO] [stdout] 139 | if employees == None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `employees.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] = note: `#[warn(clippy::partialeq_to_none)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/departments.rs:164:13 [INFO] [stdout] | [INFO] [stdout] 164 | fn c(entry: &String) -> String { [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] 164 - fn c(entry: &String) -> String { [INFO] [stdout] 164 + fn c(entry: &str) -> String { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.16s [INFO] running `Command { std: "docker" "inspect" "f0d557be9c271afce4636ffcff0eaceca8af8a906acc863a2cb25cef6f9e82ac", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "f0d557be9c271afce4636ffcff0eaceca8af8a906acc863a2cb25cef6f9e82ac", kill_on_drop: false }` [INFO] [stdout] f0d557be9c271afce4636ffcff0eaceca8af8a906acc863a2cb25cef6f9e82ac