[INFO] cloning repository https://github.com/Kartikeya-sudo/Calc [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/Kartikeya-sudo/Calc" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FKartikeya-sudo%2FCalc", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FKartikeya-sudo%2FCalc'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 52419c3cb8334e76bd0fdc06a66fbd5a0e705083 [INFO] linting Kartikeya-sudo/Calc against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FKartikeya-sudo%2FCalc" "/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/Kartikeya-sudo/Calc [INFO] finished tweaking git repo https://github.com/Kartikeya-sudo/Calc [INFO] tweaked toml for git repo https://github.com/Kartikeya-sudo/Calc written to /workspace/builds/worker-3-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/Kartikeya-sudo/Calc 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/Kartikeya-sudo/Calc 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] aafd153b097b9e3a0d484c63bcd7223cfdbb72903992b7e067b86e2dfd7955ab [INFO] running `Command { std: "docker" "start" "-a" "aafd153b097b9e3a0d484c63bcd7223cfdbb72903992b7e067b86e2dfd7955ab", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "aafd153b097b9e3a0d484c63bcd7223cfdbb72903992b7e067b86e2dfd7955ab", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "aafd153b097b9e3a0d484c63bcd7223cfdbb72903992b7e067b86e2dfd7955ab", kill_on_drop: false }` [INFO] [stdout] aafd153b097b9e3a0d484c63bcd7223cfdbb72903992b7e067b86e2dfd7955ab [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] c3fffb2fb7559cb80585ce411b8070758f78d80adf1d70ceb99479bc1f1dc309 [INFO] running `Command { std: "docker" "start" "-a" "c3fffb2fb7559cb80585ce411b8070758f78d80adf1d70ceb99479bc1f1dc309", kill_on_drop: false }` [INFO] [stderr] Checking calculator v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/main.rs:20:9 [INFO] [stdout] | [INFO] [stdout] 20 | Num(f64), [INFO] [stdout] | --- ^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `Token` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [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] 20 - Num(f64), [INFO] [stdout] 20 + Num(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/main.rs:21:8 [INFO] [stdout] | [INFO] [stdout] 21 | Op(Operators), [INFO] [stdout] | -- ^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `Token` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [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] 21 - Op(Operators), [INFO] [stdout] 21 + Op(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:39:12 [INFO] [stdout] | [INFO] [stdout] 39 | if !num_token.is_err() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `num_token.is_ok()` [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: called `unwrap` on `num_token` after checking its variant with `is_err` [INFO] [stdout] --> src/main.rs:40:33 [INFO] [stdout] | [INFO] [stdout] 39 | if !num_token.is_err() { [INFO] [stdout] | ------------------ the check is happening here [INFO] [stdout] 40 | res.push(Token::Num(num_token.unwrap() as f64)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:52:5 [INFO] [stdout] | [INFO] [stdout] 52 | return Ok(res); [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] 52 - return Ok(res); [INFO] [stdout] 52 + Ok(res) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/main.rs:31:28 [INFO] [stdout] | [INFO] [stdout] 31 | if input.trim_end() == String::from("quit") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `"quit"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] = note: `#[warn(clippy::cmp_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f64` -> `f64`) [INFO] [stdout] --> src/main.rs:40:33 [INFO] [stdout] | [INFO] [stdout] 40 | res.push(Token::Num(num_token.unwrap() as f64)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `num_token.unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:70:18 [INFO] [stdout] | [INFO] [stdout] 70 | Ok(_) => 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] help: replace `return` with a unit value [INFO] [stdout] | [INFO] [stdout] 70 - Ok(_) => return, [INFO] [stdout] 70 + Ok(_) => (), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:73:13 [INFO] [stdout] | [INFO] [stdout] 73 | 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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 72 - println!("Error occured: {}", e); [INFO] [stdout] 73 - return; [INFO] [stdout] 72 + println!("Error occured: {}", e); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/main.rs:20:9 [INFO] [stdout] | [INFO] [stdout] 20 | Num(f64), [INFO] [stdout] | --- ^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `Token` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [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] 20 - Num(f64), [INFO] [stdout] 20 + Num(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/main.rs:21:8 [INFO] [stdout] | [INFO] [stdout] 21 | Op(Operators), [INFO] [stdout] | -- ^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `Token` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [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] 21 - Op(Operators), [INFO] [stdout] 21 + Op(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:39:12 [INFO] [stdout] | [INFO] [stdout] 39 | if !num_token.is_err() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `num_token.is_ok()` [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: called `unwrap` on `num_token` after checking its variant with `is_err` [INFO] [stdout] --> src/main.rs:40:33 [INFO] [stdout] | [INFO] [stdout] 39 | if !num_token.is_err() { [INFO] [stdout] | ------------------ the check is happening here [INFO] [stdout] 40 | res.push(Token::Num(num_token.unwrap() as f64)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:52:5 [INFO] [stdout] | [INFO] [stdout] 52 | return Ok(res); [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] 52 - return Ok(res); [INFO] [stdout] 52 + Ok(res) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/main.rs:31:28 [INFO] [stdout] | [INFO] [stdout] 31 | if input.trim_end() == String::from("quit") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `"quit"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] = note: `#[warn(clippy::cmp_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f64` -> `f64`) [INFO] [stdout] --> src/main.rs:40:33 [INFO] [stdout] | [INFO] [stdout] 40 | res.push(Token::Num(num_token.unwrap() as f64)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `num_token.unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:70:18 [INFO] [stdout] | [INFO] [stdout] 70 | Ok(_) => 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] help: replace `return` with a unit value [INFO] [stdout] | [INFO] [stdout] 70 - Ok(_) => return, [INFO] [stdout] 70 + Ok(_) => (), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:73:13 [INFO] [stdout] | [INFO] [stdout] 73 | 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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 72 - println!("Error occured: {}", e); [INFO] [stdout] 73 - return; [INFO] [stdout] 72 + println!("Error occured: {}", e); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.16s [INFO] running `Command { std: "docker" "inspect" "c3fffb2fb7559cb80585ce411b8070758f78d80adf1d70ceb99479bc1f1dc309", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "c3fffb2fb7559cb80585ce411b8070758f78d80adf1d70ceb99479bc1f1dc309", kill_on_drop: false }` [INFO] [stdout] c3fffb2fb7559cb80585ce411b8070758f78d80adf1d70ceb99479bc1f1dc309