[INFO] cloning repository https://github.com/Lazy-poet/cli-bill-management [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/Lazy-poet/cli-bill-management" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FLazy-poet%2Fcli-bill-management", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FLazy-poet%2Fcli-bill-management'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] c7162073cec87f04b4795dd426c37d6c731df68e [INFO] linting Lazy-poet/cli-bill-management against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FLazy-poet%2Fcli-bill-management" "/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/Lazy-poet/cli-bill-management [INFO] finished tweaking git repo https://github.com/Lazy-poet/cli-bill-management [INFO] tweaked toml for git repo https://github.com/Lazy-poet/cli-bill-management written to /workspace/builds/worker-3-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/Lazy-poet/cli-bill-management 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/Lazy-poet/cli-bill-management 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] a5e1d5da471a2dc362bf2a3ea6f2c5cfb741ba3e61c9cad3d82d59b53b2d31e8 [INFO] running `Command { std: "docker" "start" "-a" "a5e1d5da471a2dc362bf2a3ea6f2c5cfb741ba3e61c9cad3d82d59b53b2d31e8", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "a5e1d5da471a2dc362bf2a3ea6f2c5cfb741ba3e61c9cad3d82d59b53b2d31e8", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "a5e1d5da471a2dc362bf2a3ea6f2c5cfb741ba3e61c9cad3d82d59b53b2d31e8", kill_on_drop: false }` [INFO] [stdout] a5e1d5da471a2dc362bf2a3ea6f2c5cfb741ba3e61c9cad3d82d59b53b2d31e8 [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] 600fa2bcce33dfa8a0c8e32d0f89f2a8ec5abe323f87f8fedfdb6115aa20313f [INFO] running `Command { std: "docker" "start" "-a" "600fa2bcce33dfa8a0c8e32d0f89f2a8ec5abe323f87f8fedfdb6115aa20313f", kill_on_drop: false }` [INFO] [stderr] Checking bill-management v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/actions.rs:42:5 [INFO] [stdout] | [INFO] [stdout] 42 | return name_copy; [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] 42 - return name_copy; [INFO] [stdout] 42 + name_copy [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/actions.rs:30:13 [INFO] [stdout] | [INFO] [stdout] 30 | / match get_input() { [INFO] [stdout] 31 | | Some(amount_input) => { [INFO] [stdout] 32 | | amount = amount_input.parse::().unwrap(); [INFO] [stdout] ... | [INFO] [stdout] 35 | | } [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] 30 ~ if let Some(amount_input) = get_input() { [INFO] [stdout] 31 + amount = amount_input.parse::().unwrap(); [INFO] [stdout] 32 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/actions.rs:54:16 [INFO] [stdout] | [INFO] [stdout] 54 | if !bills.get_mut(&name).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `bills.get_mut(&name).is_none()` [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 match could be written as a `let` statement [INFO] [stdout] --> src/actions.rs:62:13 [INFO] [stdout] | [INFO] [stdout] 62 | / match get_input().unwrap() { [INFO] [stdout] 63 | | amount_input => { [INFO] [stdout] 64 | | let amount = amount_input.parse::().unwrap(); [INFO] [stdout] 65 | | bill.update_amount(amount); [INFO] [stdout] ... | [INFO] [stdout] 68 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_single_binding [INFO] [stdout] = note: `#[warn(clippy::match_single_binding)]` on by default [INFO] [stdout] help: consider using a `let` statement [INFO] [stdout] | [INFO] [stdout] 62 ~ let amount_input = get_input().unwrap(); [INFO] [stdout] 63 + { [INFO] [stdout] 64 + let amount = amount_input.parse::().unwrap(); [INFO] [stdout] 65 + bill.update_amount(amount); [INFO] [stdout] 66 + println!("bill updated successfully") [INFO] [stdout] 67 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/actions.rs:89:16 [INFO] [stdout] | [INFO] [stdout] 89 | if !key.is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `key.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [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/actions.rs:75:5 [INFO] [stdout] | [INFO] [stdout] 75 | / match get_input() { [INFO] [stdout] 76 | | Some(name) => { [INFO] [stdout] 77 | | println!("this is a destructive action and cannot be reversed"); [INFO] [stdout] 78 | | println!("Do you want to proceed ? (Y / any other key to cancel)"); [INFO] [stdout] ... | [INFO] [stdout] 95 | | _ => (), [INFO] [stdout] 96 | | } [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] help: try [INFO] [stdout] | [INFO] [stdout] 75 ~ if let Some(name) = get_input() { [INFO] [stdout] 76 + println!("this is a destructive action and cannot be reversed"); [INFO] [stdout] 77 + println!("Do you want to proceed ? (Y / any other key to cancel)"); [INFO] [stdout] 78 + match get_input().unwrap() { [INFO] [stdout] 79 + input => { [INFO] [stdout] 80 + if input.to_lowercase() != "y" { [INFO] [stdout] 81 + println!("cancelled"); [INFO] [stdout] 82 + return; [INFO] [stdout] 83 + } [INFO] [stdout] 84 + } [INFO] [stdout] 85 + } [INFO] [stdout] 86 + [INFO] [stdout] 87 + let key = bills.remove(name.as_str()); [INFO] [stdout] 88 + if !key.is_some() { [INFO] [stdout] 89 + println!("User {:?} not found", name) [INFO] [stdout] 90 + } else { [INFO] [stdout] 91 + println!("{} removed successfully", name) [INFO] [stdout] 92 + } [INFO] [stdout] 93 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this match could be written as a `let` statement [INFO] [stdout] --> src/actions.rs:79:13 [INFO] [stdout] | [INFO] [stdout] 79 | / match get_input().unwrap() { [INFO] [stdout] 80 | | input => { [INFO] [stdout] 81 | | if input.to_lowercase() != "y" { [INFO] [stdout] 82 | | println!("cancelled"); [INFO] [stdout] ... | [INFO] [stdout] 86 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_single_binding [INFO] [stdout] help: consider using a `let` statement [INFO] [stdout] | [INFO] [stdout] 79 ~ let input = get_input().unwrap(); [INFO] [stdout] 80 + if input.to_lowercase() != "y" { [INFO] [stdout] 81 + println!("cancelled"); [INFO] [stdout] 82 + return; [INFO] [stdout] 83 + }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/utils.rs:10:8 [INFO] [stdout] | [INFO] [stdout] 10 | if input == "" { [INFO] [stdout] | ^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `input.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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/main.rs:19:9 [INFO] [stdout] | [INFO] [stdout] 19 | / match get_action() { [INFO] [stdout] 20 | | Some(action) => match action { [INFO] [stdout] 21 | | Add => { [INFO] [stdout] 22 | | let new_name = add_bill(&mut bills); [INFO] [stdout] ... | [INFO] [stdout] 40 | | _ => (), [INFO] [stdout] 41 | | } [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] help: try [INFO] [stdout] | [INFO] [stdout] 19 ~ if let Some(action) = get_action() { match action { [INFO] [stdout] 20 + Add => { [INFO] [stdout] 21 + let new_name = add_bill(&mut bills); [INFO] [stdout] 22 + println!("bill for {} added successully", new_name); [INFO] [stdout] 23 + } [INFO] [stdout] 24 + View => { [INFO] [stdout] 25 + if bills.len() == 0 { [INFO] [stdout] 26 + println!("There are currently no entries") [INFO] [stdout] 27 + } else { [INFO] [stdout] 28 + println!("here are the registered bills"); [INFO] [stdout] 29 + view_bills(&mut bills) [INFO] [stdout] 30 + } [INFO] [stdout] 31 + } [INFO] [stdout] 32 + Edit => edit_bill(&mut bills), [INFO] [stdout] 33 + Remove => remove_bill(&mut bills), [INFO] [stdout] 34 + Cancel => { [INFO] [stdout] 35 + println!("thanks for using our service, bye"); [INFO] [stdout] 36 + break; [INFO] [stdout] 37 + } [INFO] [stdout] 38 + } } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/main.rs:26:24 [INFO] [stdout] | [INFO] [stdout] 26 | if bills.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `bills.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: unneeded `return` statement [INFO] [stdout] --> src/actions.rs:42:5 [INFO] [stdout] | [INFO] [stdout] 42 | return name_copy; [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] 42 - return name_copy; [INFO] [stdout] 42 + name_copy [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/actions.rs:30:13 [INFO] [stdout] | [INFO] [stdout] 30 | / match get_input() { [INFO] [stdout] 31 | | Some(amount_input) => { [INFO] [stdout] 32 | | amount = amount_input.parse::().unwrap(); [INFO] [stdout] ... | [INFO] [stdout] 35 | | } [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] 30 ~ if let Some(amount_input) = get_input() { [INFO] [stdout] 31 + amount = amount_input.parse::().unwrap(); [INFO] [stdout] 32 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/actions.rs:54:16 [INFO] [stdout] | [INFO] [stdout] 54 | if !bills.get_mut(&name).is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `bills.get_mut(&name).is_none()` [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 match could be written as a `let` statement [INFO] [stdout] --> src/actions.rs:62:13 [INFO] [stdout] | [INFO] [stdout] 62 | / match get_input().unwrap() { [INFO] [stdout] 63 | | amount_input => { [INFO] [stdout] 64 | | let amount = amount_input.parse::().unwrap(); [INFO] [stdout] 65 | | bill.update_amount(amount); [INFO] [stdout] ... | [INFO] [stdout] 68 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_single_binding [INFO] [stdout] = note: `#[warn(clippy::match_single_binding)]` on by default [INFO] [stdout] help: consider using a `let` statement [INFO] [stdout] | [INFO] [stdout] 62 ~ let amount_input = get_input().unwrap(); [INFO] [stdout] 63 + { [INFO] [stdout] 64 + let amount = amount_input.parse::().unwrap(); [INFO] [stdout] 65 + bill.update_amount(amount); [INFO] [stdout] 66 + println!("bill updated successfully") [INFO] [stdout] 67 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/actions.rs:89:16 [INFO] [stdout] | [INFO] [stdout] 89 | if !key.is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `key.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [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/actions.rs:75:5 [INFO] [stdout] | [INFO] [stdout] 75 | / match get_input() { [INFO] [stdout] 76 | | Some(name) => { [INFO] [stdout] 77 | | println!("this is a destructive action and cannot be reversed"); [INFO] [stdout] 78 | | println!("Do you want to proceed ? (Y / any other key to cancel)"); [INFO] [stdout] ... | [INFO] [stdout] 95 | | _ => (), [INFO] [stdout] 96 | | } [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] help: try [INFO] [stdout] | [INFO] [stdout] 75 ~ if let Some(name) = get_input() { [INFO] [stdout] 76 + println!("this is a destructive action and cannot be reversed"); [INFO] [stdout] 77 + println!("Do you want to proceed ? (Y / any other key to cancel)"); [INFO] [stdout] 78 + match get_input().unwrap() { [INFO] [stdout] 79 + input => { [INFO] [stdout] 80 + if input.to_lowercase() != "y" { [INFO] [stdout] 81 + println!("cancelled"); [INFO] [stdout] 82 + return; [INFO] [stdout] 83 + } [INFO] [stdout] 84 + } [INFO] [stdout] 85 + } [INFO] [stdout] 86 + [INFO] [stdout] 87 + let key = bills.remove(name.as_str()); [INFO] [stdout] 88 + if !key.is_some() { [INFO] [stdout] 89 + println!("User {:?} not found", name) [INFO] [stdout] 90 + } else { [INFO] [stdout] 91 + println!("{} removed successfully", name) [INFO] [stdout] 92 + } [INFO] [stdout] 93 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this match could be written as a `let` statement [INFO] [stdout] --> src/actions.rs:79:13 [INFO] [stdout] | [INFO] [stdout] 79 | / match get_input().unwrap() { [INFO] [stdout] 80 | | input => { [INFO] [stdout] 81 | | if input.to_lowercase() != "y" { [INFO] [stdout] 82 | | println!("cancelled"); [INFO] [stdout] ... | [INFO] [stdout] 86 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_single_binding [INFO] [stdout] help: consider using a `let` statement [INFO] [stdout] | [INFO] [stdout] 79 ~ let input = get_input().unwrap(); [INFO] [stdout] 80 + if input.to_lowercase() != "y" { [INFO] [stdout] 81 + println!("cancelled"); [INFO] [stdout] 82 + return; [INFO] [stdout] 83 + }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/utils.rs:10:8 [INFO] [stdout] | [INFO] [stdout] 10 | if input == "" { [INFO] [stdout] | ^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `input.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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/main.rs:19:9 [INFO] [stdout] | [INFO] [stdout] 19 | / match get_action() { [INFO] [stdout] 20 | | Some(action) => match action { [INFO] [stdout] 21 | | Add => { [INFO] [stdout] 22 | | let new_name = add_bill(&mut bills); [INFO] [stdout] ... | [INFO] [stdout] 40 | | _ => (), [INFO] [stdout] 41 | | } [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] help: try [INFO] [stdout] | [INFO] [stdout] 19 ~ if let Some(action) = get_action() { match action { [INFO] [stdout] 20 + Add => { [INFO] [stdout] 21 + let new_name = add_bill(&mut bills); [INFO] [stdout] 22 + println!("bill for {} added successully", new_name); [INFO] [stdout] 23 + } [INFO] [stdout] 24 + View => { [INFO] [stdout] 25 + if bills.len() == 0 { [INFO] [stdout] 26 + println!("There are currently no entries") [INFO] [stdout] 27 + } else { [INFO] [stdout] 28 + println!("here are the registered bills"); [INFO] [stdout] 29 + view_bills(&mut bills) [INFO] [stdout] 30 + } [INFO] [stdout] 31 + } [INFO] [stdout] 32 + Edit => edit_bill(&mut bills), [INFO] [stdout] 33 + Remove => remove_bill(&mut bills), [INFO] [stdout] 34 + Cancel => { [INFO] [stdout] 35 + println!("thanks for using our service, bye"); [INFO] [stdout] 36 + break; [INFO] [stdout] 37 + } [INFO] [stdout] 38 + } } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/main.rs:26:24 [INFO] [stdout] | [INFO] [stdout] 26 | if bills.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `bills.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] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.24s [INFO] running `Command { std: "docker" "inspect" "600fa2bcce33dfa8a0c8e32d0f89f2a8ec5abe323f87f8fedfdb6115aa20313f", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "600fa2bcce33dfa8a0c8e32d0f89f2a8ec5abe323f87f8fedfdb6115aa20313f", kill_on_drop: false }` [INFO] [stdout] 600fa2bcce33dfa8a0c8e32d0f89f2a8ec5abe323f87f8fedfdb6115aa20313f