[INFO] cloning repository https://github.com/AuthForbidden/GodChoice [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/AuthForbidden/GodChoice" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FAuthForbidden%2FGodChoice", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FAuthForbidden%2FGodChoice'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] dfc680df42d8d3d7c1da70602f65d4a556a39cdd [INFO] linting AuthForbidden/GodChoice against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FAuthForbidden%2FGodChoice" "/workspace/builds/worker-1-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-1-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/AuthForbidden/GodChoice [INFO] finished tweaking git repo https://github.com/AuthForbidden/GodChoice [INFO] tweaked toml for git repo https://github.com/AuthForbidden/GodChoice written to /workspace/builds/worker-1-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/AuthForbidden/GodChoice 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/AuthForbidden/GodChoice 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 serde_derive v1.0.125 [INFO] [stderr] Downloaded rand_core v0.6.2 [INFO] [stderr] Downloaded proc-macro2 v1.0.26 [INFO] [stderr] Downloaded serde v1.0.125 [INFO] [stderr] Downloaded syn v1.0.71 [INFO] [stderr] Downloaded libc v0.2.94 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-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] 3bf391ca208cb6acf2aba1d3b6704a72fbe640c6401b283d8e940940cd344d49 [INFO] running `Command { std: "docker" "start" "-a" "3bf391ca208cb6acf2aba1d3b6704a72fbe640c6401b283d8e940940cd344d49", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "3bf391ca208cb6acf2aba1d3b6704a72fbe640c6401b283d8e940940cd344d49", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "3bf391ca208cb6acf2aba1d3b6704a72fbe640c6401b283d8e940940cd344d49", kill_on_drop: false }` [INFO] [stdout] 3bf391ca208cb6acf2aba1d3b6704a72fbe640c6401b283d8e940940cd344d49 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-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] fb7546cdfdefd6e97799582b0fa21ef140fa55a6e9048e4bd166d1b947259391 [INFO] running `Command { std: "docker" "start" "-a" "fb7546cdfdefd6e97799582b0fa21ef140fa55a6e9048e4bd166d1b947259391", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.94 [INFO] [stderr] Compiling proc-macro2 v1.0.26 [INFO] [stderr] Compiling getrandom v0.2.2 [INFO] [stderr] Compiling syn v1.0.71 [INFO] [stderr] Compiling serde v1.0.125 [INFO] [stderr] Compiling serde_derive v1.0.125 [INFO] [stderr] Checking ppv-lite86 v0.2.10 [INFO] [stderr] Checking rand_core v0.6.2 [INFO] [stderr] Compiling quote v1.0.9 [INFO] [stderr] Checking rand_chacha v0.3.0 [INFO] [stderr] Checking rand v0.8.3 [INFO] [stderr] Checking toml v0.5.8 [INFO] [stderr] Checking god_choice v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/main.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / /** [INFO] [stdout] 2 | | GodChoice [INFO] [stdout] 3 | | Copyright (C) 2021 AuthForbidden [INFO] [stdout] ... | [INFO] [stdout] 17 | | */ [INFO] [stdout] 18 | | [INFO] [stdout] | |_^ [INFO] [stdout] 19 | use std::{collections::BTreeMap, fs, io}; [INFO] [stdout] | - the comment documents this `use` import [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the comment should document the crate use an inner doc comment [INFO] [stdout] | [INFO] [stdout] 1 - /** [INFO] [stdout] 1 + /*! [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/main.rs:21:1 [INFO] [stdout] | [INFO] [stdout] 21 | use toml; [INFO] [stdout] | ^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] = note: `#[warn(clippy::single_component_path_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/main.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / /** [INFO] [stdout] 2 | | GodChoice [INFO] [stdout] 3 | | Copyright (C) 2021 AuthForbidden [INFO] [stdout] ... | [INFO] [stdout] 17 | | */ [INFO] [stdout] 18 | | [INFO] [stdout] | |_^ [INFO] [stdout] 19 | use std::{collections::BTreeMap, fs, io}; [INFO] [stdout] | - the comment documents this `use` import [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the comment should document the crate use an inner doc comment [INFO] [stdout] | [INFO] [stdout] 1 - /** [INFO] [stdout] 1 + /*! [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/main.rs:21:1 [INFO] [stdout] | [INFO] [stdout] 21 | use toml; [INFO] [stdout] | ^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] = note: `#[warn(clippy::single_component_path_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:82:8 [INFO] [stdout] | [INFO] [stdout] 82 | if ! choice.subchoices.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `choice.subchoices.is_some()` [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 `choice.subchoices` after checking its variant with `is_none` [INFO] [stdout] --> src/main.rs:83:28 [INFO] [stdout] | [INFO] [stdout] 82 | if ! choice.subchoices.is_none() { [INFO] [stdout] | --------------------------- the check is happening here [INFO] [stdout] 83 | decide_cli(locale, choice.subchoices.as_ref().unwrap()); [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/main.rs:39:59 [INFO] [stdout] | [INFO] [stdout] 39 | fn decide_cli(locale: &BTreeMap, choices: &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] 39 - fn decide_cli(locale: &BTreeMap, choices: &Vec) { [INFO] [stdout] 39 + fn decide_cli(locale: &BTreeMap, choices: &[Choice]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `choices.get(0)` [INFO] [stdout] --> src/main.rs:57:22 [INFO] [stdout] | [INFO] [stdout] 57 | let mut choice = choices.get(0).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `choices.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: match can be simplified with `.unwrap_or_default()` [INFO] [stdout] --> src/main.rs:63:35 [INFO] [stdout] | [INFO] [stdout] 63 | let choice_index: usize = match prompt.trim().parse() { [INFO] [stdout] | ___________________________________^ [INFO] [stdout] 64 | | Ok(choice_index) => choice_index, [INFO] [stdout] 65 | | Err(_) => 0, [INFO] [stdout] 66 | | }; [INFO] [stdout] | |_________^ help: ascribe the type usize and replace your expression with: `prompt.trim().parse().unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::manual_unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:82:8 [INFO] [stdout] | [INFO] [stdout] 82 | if ! choice.subchoices.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `choice.subchoices.is_some()` [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 `choice.subchoices` after checking its variant with `is_none` [INFO] [stdout] --> src/main.rs:83:28 [INFO] [stdout] | [INFO] [stdout] 82 | if ! choice.subchoices.is_none() { [INFO] [stdout] | --------------------------- the check is happening here [INFO] [stdout] 83 | decide_cli(locale, choice.subchoices.as_ref().unwrap()); [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/main.rs:39:59 [INFO] [stdout] | [INFO] [stdout] 39 | fn decide_cli(locale: &BTreeMap, choices: &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] 39 - fn decide_cli(locale: &BTreeMap, choices: &Vec) { [INFO] [stdout] 39 + fn decide_cli(locale: &BTreeMap, choices: &[Choice]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `choices.get(0)` [INFO] [stdout] --> src/main.rs:57:22 [INFO] [stdout] | [INFO] [stdout] 57 | let mut choice = choices.get(0).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `choices.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: match can be simplified with `.unwrap_or_default()` [INFO] [stdout] --> src/main.rs:63:35 [INFO] [stdout] | [INFO] [stdout] 63 | let choice_index: usize = match prompt.trim().parse() { [INFO] [stdout] | ___________________________________^ [INFO] [stdout] 64 | | Ok(choice_index) => choice_index, [INFO] [stdout] 65 | | Err(_) => 0, [INFO] [stdout] 66 | | }; [INFO] [stdout] | |_________^ help: ascribe the type usize and replace your expression with: `prompt.trim().parse().unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::manual_unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 14.04s [INFO] running `Command { std: "docker" "inspect" "fb7546cdfdefd6e97799582b0fa21ef140fa55a6e9048e4bd166d1b947259391", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "fb7546cdfdefd6e97799582b0fa21ef140fa55a6e9048e4bd166d1b947259391", kill_on_drop: false }` [INFO] [stdout] fb7546cdfdefd6e97799582b0fa21ef140fa55a6e9048e4bd166d1b947259391