[INFO] cloning repository https://github.com/Basillica/state-machine [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/Basillica/state-machine" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FBasillica%2Fstate-machine", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FBasillica%2Fstate-machine'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] bcaab79443ba2214b0c068fcbaef3863d7c9a71f [INFO] linting Basillica/state-machine against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FBasillica%2Fstate-machine" "/workspace/builds/worker-2-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-2-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/Basillica/state-machine [INFO] removed 0 missing tests [INFO] finished tweaking git repo https://github.com/Basillica/state-machine [INFO] tweaked toml for git repo https://github.com/Basillica/state-machine written to /workspace/builds/worker-2-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/Basillica/state-machine 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/Basillica/state-machine 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-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-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] 54a6248b58e2e1c49bc78a856cf8380aa7b1ebf2fcc7524cd4bca6adade9bdb1 [INFO] running `Command { std: "docker" "start" "-a" "54a6248b58e2e1c49bc78a856cf8380aa7b1ebf2fcc7524cd4bca6adade9bdb1", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "54a6248b58e2e1c49bc78a856cf8380aa7b1ebf2fcc7524cd4bca6adade9bdb1", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "54a6248b58e2e1c49bc78a856cf8380aa7b1ebf2fcc7524cd4bca6adade9bdb1", kill_on_drop: false }` [INFO] [stdout] 54a6248b58e2e1c49bc78a856cf8380aa7b1ebf2fcc7524cd4bca6adade9bdb1 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-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] 18132c9a0a0d7d1274e7271a083921544a4689a6b13398df5cae0435f311c0ef [INFO] running `Command { std: "docker" "start" "-a" "18132c9a0a0d7d1274e7271a083921544a4689a6b13398df5cae0435f311c0ef", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.71 [INFO] [stderr] Compiling serde v1.0.193 [INFO] [stderr] Compiling serde_json v1.0.108 [INFO] [stderr] Checking itoa v1.0.10 [INFO] [stderr] Checking ryu v1.0.16 [INFO] [stderr] Compiling quote v1.0.33 [INFO] [stderr] Compiling syn v2.0.42 [INFO] [stderr] Compiling serde_derive v1.0.193 [INFO] [stderr] Checking sfn-machine v0.1.3 (/opt/rustwide/workdir) [INFO] [stdout] warning: empty lines after doc comment [INFO] [stdout] --> src/machine/state.rs:11:1 [INFO] [stdout] | [INFO] [stdout] 11 | / /// A logger method [INFO] [stdout] ... | [INFO] [stdout] 28 | | [INFO] [stdout] | |_^ [INFO] [stdout] ... [INFO] [stdout] 33 | pub enum State { [INFO] [stdout] | -------------- the comment documents this enum [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 lines are unintentional, remove them [INFO] [stdout] help: if the doc comment should not document enum `State` then comment it out [INFO] [stdout] | [INFO] [stdout] 11 | // /// A logger method [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty lines after doc comment [INFO] [stdout] --> src/machine/state.rs:11:1 [INFO] [stdout] | [INFO] [stdout] 11 | / /// A logger method [INFO] [stdout] ... | [INFO] [stdout] 28 | | [INFO] [stdout] | |_^ [INFO] [stdout] ... [INFO] [stdout] 33 | pub enum State { [INFO] [stdout] | -------------- the comment documents this enum [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 lines are unintentional, remove them [INFO] [stdout] help: if the doc comment should not document enum `State` then comment it out [INFO] [stdout] | [INFO] [stdout] 11 | // /// A logger method [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/machine/state.rs:161:5 [INFO] [stdout] | [INFO] [stdout] 161 | pub fn step(&mut self, id: &str, state: State, state_function: StateFunction, next: Option>, catch: Option>>, retry: Option>, end: Option) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/machine/state.rs:239:47 [INFO] [stdout] | [INFO] [stdout] 239 | if self.error_string.is_some() && !node.catch.is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `node.catch.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: called `unwrap` on `node.catch` after checking its variant with `is_some` [INFO] [stdout] --> src/machine/state.rs:246:29 [INFO] [stdout] | [INFO] [stdout] 245 | if self.error_string.is_some() && node.catch.is_some() { [INFO] [stdout] | -------------------- the check is happening here [INFO] [stdout] 246 | let catch = node.catch.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: this function has too many arguments (8/7) [INFO] [stdout] --> src/machine/state.rs:161:5 [INFO] [stdout] | [INFO] [stdout] 161 | pub fn step(&mut self, id: &str, state: State, state_function: StateFunction, next: Option>, catch: Option>>, retry: Option>, end: Option) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/machine/state.rs:239:47 [INFO] [stdout] | [INFO] [stdout] 239 | if self.error_string.is_some() && !node.catch.is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `node.catch.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: called `unwrap` on `node.catch` after checking its variant with `is_some` [INFO] [stdout] --> src/machine/state.rs:246:29 [INFO] [stdout] | [INFO] [stdout] 245 | if self.error_string.is_some() && node.catch.is_some() { [INFO] [stdout] | -------------------- the check is happening here [INFO] [stdout] 246 | let catch = node.catch.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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/machine/state.rs:248:51 [INFO] [stdout] | [INFO] [stdout] 248 | if val.error_equals.contains(&self.error_string.as_ref().unwrap()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `self.error_string.as_ref().unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` 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/machine/state.rs:263:17 [INFO] [stdout] | [INFO] [stdout] 263 | / match Some(node.next) { [INFO] [stdout] 264 | | Some(v) => { [INFO] [stdout] 265 | | let fffn = v.unwrap(); [INFO] [stdout] 266 | | match fffn(self.shared_data) { [INFO] [stdout] ... | [INFO] [stdout] 276 | | None => (), [INFO] [stdout] 277 | | } [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] 263 ~ if let Some(v) = Some(node.next) { [INFO] [stdout] 264 + let fffn = v.unwrap(); [INFO] [stdout] 265 + match fffn(self.shared_data) { [INFO] [stdout] 266 + Ok(_) => (), [INFO] [stdout] 267 + Err(e) => { [INFO] [stdout] 268 + self.error_string = Some(e.to_string()); [INFO] [stdout] 269 + return Err(error::StateMachineError { [INFO] [stdout] 270 + message: format!("{:?}", self.error_string), [INFO] [stdout] 271 + }) [INFO] [stdout] 272 + } [INFO] [stdout] 273 + }; [INFO] [stdout] 274 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/machine/state.rs:248:51 [INFO] [stdout] | [INFO] [stdout] 248 | if val.error_equals.contains(&self.error_string.as_ref().unwrap()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `self.error_string.as_ref().unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` 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/machine/state.rs:263:17 [INFO] [stdout] | [INFO] [stdout] 263 | / match Some(node.next) { [INFO] [stdout] 264 | | Some(v) => { [INFO] [stdout] 265 | | let fffn = v.unwrap(); [INFO] [stdout] 266 | | match fffn(self.shared_data) { [INFO] [stdout] ... | [INFO] [stdout] 276 | | None => (), [INFO] [stdout] 277 | | } [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] 263 ~ if let Some(v) = Some(node.next) { [INFO] [stdout] 264 + let fffn = v.unwrap(); [INFO] [stdout] 265 + match fffn(self.shared_data) { [INFO] [stdout] 266 + Ok(_) => (), [INFO] [stdout] 267 + Err(e) => { [INFO] [stdout] 268 + self.error_string = Some(e.to_string()); [INFO] [stdout] 269 + return Err(error::StateMachineError { [INFO] [stdout] 270 + message: format!("{:?}", self.error_string), [INFO] [stdout] 271 + }) [INFO] [stdout] 272 + } [INFO] [stdout] 273 + }; [INFO] [stdout] 274 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> tests/basic.rs:22:50 [INFO] [stdout] | [INFO] [stdout] 22 | fn match_vecs(a: &Vec, b: &Vec) -> 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] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 22 - fn match_vecs(a: &Vec, b: &Vec) -> bool { [INFO] [stdout] 22 + fn match_vecs(a: &[T], b: &Vec) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> tests/basic.rs:22:62 [INFO] [stdout] | [INFO] [stdout] 22 | fn match_vecs(a: &Vec, b: &Vec) -> 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] 22 - fn match_vecs(a: &Vec, b: &Vec) -> bool { [INFO] [stdout] 22 + fn match_vecs(a: &Vec, b: &[T]) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `index` is only used to index `a` [INFO] [stdout] --> tests/basic.rs:24:18 [INFO] [stdout] | [INFO] [stdout] 24 | for index in 0..a.len() { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 24 - for index in 0..a.len() { [INFO] [stdout] 24 + for in &a { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/basic.rs:75:5 [INFO] [stdout] | [INFO] [stdout] 75 | assert_eq!(match_vecs(&ids, &set), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_assert_comparison)]` on by default [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 75 - assert_eq!(match_vecs(&ids, &set), true); [INFO] [stdout] 75 + assert!(match_vecs(&ids, &set)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 11.54s [INFO] running `Command { std: "docker" "inspect" "18132c9a0a0d7d1274e7271a083921544a4689a6b13398df5cae0435f311c0ef", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "18132c9a0a0d7d1274e7271a083921544a4689a6b13398df5cae0435f311c0ef", kill_on_drop: false }` [INFO] [stdout] 18132c9a0a0d7d1274e7271a083921544a4689a6b13398df5cae0435f311c0ef