[INFO] fetching crate sludge-cicd 0.1.33... [INFO] linting sludge-cicd-0.1.33 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate sludge-cicd 0.1.33 into /workspace/builds/worker-4-tc1/source [INFO] started tweaking crates.io crate sludge-cicd 0.1.33 [INFO] finished tweaking crates.io crate sludge-cicd 0.1.33 [INFO] tweaked toml for crates.io crate sludge-cicd 0.1.33 written to /workspace/builds/worker-4-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate sludge-cicd 0.1.33 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 crates.io crate sludge-cicd 0.1.33 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-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-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] e216c198f7a8eaa7df7dba4b42689e9afe015982f53305a33a04e470b8bc3d9c [INFO] running `Command { std: "docker" "start" "-a" "e216c198f7a8eaa7df7dba4b42689e9afe015982f53305a33a04e470b8bc3d9c", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "e216c198f7a8eaa7df7dba4b42689e9afe015982f53305a33a04e470b8bc3d9c", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "e216c198f7a8eaa7df7dba4b42689e9afe015982f53305a33a04e470b8bc3d9c", kill_on_drop: false }` [INFO] [stdout] e216c198f7a8eaa7df7dba4b42689e9afe015982f53305a33a04e470b8bc3d9c [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-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] dc580b3ceb46bf8866774432fe36587e16609e212bd8b75df22fc4e7b2c0d7b3 [INFO] running `Command { std: "docker" "start" "-a" "dc580b3ceb46bf8866774432fe36587e16609e212bd8b75df22fc4e7b2c0d7b3", kill_on_drop: false }` [INFO] [stderr] Checking sludge-cicd v0.1.33 (/opt/rustwide/workdir) [INFO] [stdout] warning: using a rest pattern to bind an entire slice to a local [INFO] [stdout] --> src/main.rs:447:13 [INFO] [stdout] | [INFO] [stdout] 447 | [ref multiple @ ..] => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: this is better represented with just the binding: `ref multiple` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_at_rest_pattern [INFO] [stdout] = note: `#[warn(clippy::redundant_at_rest_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using a rest pattern to bind an entire slice to a local [INFO] [stdout] --> src/main.rs:447:13 [INFO] [stdout] | [INFO] [stdout] 447 | [ref multiple @ ..] => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: this is better represented with just the binding: `ref multiple` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_at_rest_pattern [INFO] [stdout] = note: `#[warn(clippy::redundant_at_rest_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/toml.rs:37:39 [INFO] [stdout] | [INFO] [stdout] 37 | for (i, c) in v[1..].char_indices() { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/toml.rs:34:21 [INFO] [stdout] | [INFO] [stdout] 34 | if v.starts_with('"') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] = note: `#[warn(clippy::manual_strip)]` on by default [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 34 ~ if let Some() = v.strip_prefix('"') { [INFO] [stdout] 35 | let mut esc = false; [INFO] [stdout] 36 | let mut end = None; [INFO] [stdout] 37 ~ for (i, c) in .char_indices() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/utils.rs:9:17 [INFO] [stdout] | [INFO] [stdout] 9 | return None; [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] 9 - return None; [INFO] [stdout] 9 + None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: initializer for `thread_local` value can be made `const` [INFO] [stdout] --> src/tests.rs:42:38 [INFO] [stdout] | [INFO] [stdout] 42 | static OUTPUT: RefCell = RefCell::new(String::new()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `const { RefCell::new(String::new()) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_const_for_thread_local [INFO] [stdout] = note: `#[warn(clippy::missing_const_for_thread_local)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:225:16 [INFO] [stdout] | [INFO] [stdout] 225 | if !toml.get_field("description").is_ok() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `toml.get_field("description").is_err()` [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 boolean expression can be simplified [INFO] [stdout] --> src/main.rs:226:20 [INFO] [stdout] | [INFO] [stdout] 226 | && !toml.get_field("description.workspace").is_ok() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `toml.get_field("description.workspace").is_err()` [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: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:231:16 [INFO] [stdout] | [INFO] [stdout] 231 | if !toml.get_field("license").is_ok() && !toml.get_field("license.workspace").is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `toml.get_field("license").is_err()` [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: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:231:54 [INFO] [stdout] | [INFO] [stdout] 231 | if !toml.get_field("license").is_ok() && !toml.get_field("license.workspace").is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `toml.get_field("license.workspace").is_err()` [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: function call inside of `expect` [INFO] [stdout] --> src/main.rs:487:63 [INFO] [stdout] | [INFO] [stdout] 487 | let pkg = packages.iter_mut().find(|p| p.name == pkg).expect(&format!( [INFO] [stdout] | _______________________________________________________________^ [INFO] [stdout] 488 | | "`{k}` is set, but package {pkg} doesn't exist in the workspace" [INFO] [stdout] 489 | | )); [INFO] [stdout] | |__________^ help: try: `unwrap_or_else(|| panic!("`{k}` is set, but package {pkg} doesn't exist in the workspace"))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] = note: `#[warn(clippy::expect_fun_call)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/toml.rs:37:39 [INFO] [stdout] | [INFO] [stdout] 37 | for (i, c) in v[1..].char_indices() { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/toml.rs:34:21 [INFO] [stdout] | [INFO] [stdout] 34 | if v.starts_with('"') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] = note: `#[warn(clippy::manual_strip)]` on by default [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 34 ~ if let Some() = v.strip_prefix('"') { [INFO] [stdout] 35 | let mut esc = false; [INFO] [stdout] 36 | let mut end = None; [INFO] [stdout] 37 ~ for (i, c) in .char_indices() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/utils.rs:9:17 [INFO] [stdout] | [INFO] [stdout] 9 | return None; [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] 9 - return None; [INFO] [stdout] 9 + None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this method chain can be written more clearly with `if .. else ..` [INFO] [stdout] --> src/main.rs:803:16 [INFO] [stdout] | [INFO] [stdout] 803 | sudo = sudo.then_some("sudo ").unwrap_or(""), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `if sudo { "sudo " } else { "" }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#obfuscated_if_else [INFO] [stdout] = note: `#[warn(clippy::obfuscated_if_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:225:16 [INFO] [stdout] | [INFO] [stdout] 225 | if !toml.get_field("description").is_ok() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `toml.get_field("description").is_err()` [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 boolean expression can be simplified [INFO] [stdout] --> src/main.rs:226:20 [INFO] [stdout] | [INFO] [stdout] 226 | && !toml.get_field("description.workspace").is_ok() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `toml.get_field("description.workspace").is_err()` [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: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:231:16 [INFO] [stdout] | [INFO] [stdout] 231 | if !toml.get_field("license").is_ok() && !toml.get_field("license.workspace").is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `toml.get_field("license").is_err()` [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: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:231:54 [INFO] [stdout] | [INFO] [stdout] 231 | if !toml.get_field("license").is_ok() && !toml.get_field("license.workspace").is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `toml.get_field("license.workspace").is_err()` [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: function call inside of `expect` [INFO] [stdout] --> src/main.rs:487:63 [INFO] [stdout] | [INFO] [stdout] 487 | let pkg = packages.iter_mut().find(|p| p.name == pkg).expect(&format!( [INFO] [stdout] | _______________________________________________________________^ [INFO] [stdout] 488 | | "`{k}` is set, but package {pkg} doesn't exist in the workspace" [INFO] [stdout] 489 | | )); [INFO] [stdout] | |__________^ help: try: `unwrap_or_else(|| panic!("`{k}` is set, but package {pkg} doesn't exist in the workspace"))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] = note: `#[warn(clippy::expect_fun_call)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this method chain can be written more clearly with `if .. else ..` [INFO] [stdout] --> src/main.rs:803:16 [INFO] [stdout] | [INFO] [stdout] 803 | sudo = sudo.then_some("sudo ").unwrap_or(""), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `if sudo { "sudo " } else { "" }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#obfuscated_if_else [INFO] [stdout] = note: `#[warn(clippy::obfuscated_if_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.42s [INFO] running `Command { std: "docker" "inspect" "dc580b3ceb46bf8866774432fe36587e16609e212bd8b75df22fc4e7b2c0d7b3", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "dc580b3ceb46bf8866774432fe36587e16609e212bd8b75df22fc4e7b2c0d7b3", kill_on_drop: false }` [INFO] [stdout] dc580b3ceb46bf8866774432fe36587e16609e212bd8b75df22fc4e7b2c0d7b3