[INFO] crate raft-consensus 0.4.0 is already in cache [INFO] extracting crate raft-consensus 0.4.0 into work/ex/clippy-test-run/sources/stable/reg/raft-consensus/0.4.0 [INFO] extracting crate raft-consensus 0.4.0 into work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/raft-consensus/0.4.0 [INFO] validating manifest of raft-consensus-0.4.0 on toolchain stable [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "read-manifest" "--manifest-path" "Cargo.toml"` [INFO] validating manifest of raft-consensus-0.4.0 on toolchain stable+rustflags=-Dclippy::into_iter_on_array [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "read-manifest" "--manifest-path" "Cargo.toml"` [INFO] started frobbing raft-consensus-0.4.0 [INFO] finished frobbing raft-consensus-0.4.0 [INFO] frobbed toml for raft-consensus-0.4.0 written to work/ex/clippy-test-run/sources/stable/reg/raft-consensus/0.4.0/Cargo.toml [INFO] started frobbing raft-consensus-0.4.0 [INFO] finished frobbing raft-consensus-0.4.0 [INFO] frobbed toml for raft-consensus-0.4.0 written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/raft-consensus/0.4.0/Cargo.toml [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "generate-lockfile" "--manifest-path" "Cargo.toml" "-Zno-index-update"` [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "generate-lockfile" "--manifest-path" "Cargo.toml" "-Zno-index-update"` [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "fetch" "--locked" "--manifest-path" "Cargo.toml"` [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "fetch" "--locked" "--manifest-path" "Cargo.toml"` [INFO] linting raft-consensus-0.4.0 against stable for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-0/stable:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable/reg/raft-consensus/0.4.0:/opt/crater/workdir:ro,Z" "-v" "/mnt/big/crater/work/local/cargo-home:/opt/crater/cargo-home:ro,Z" "-v" "/mnt/big/crater/work/local/rustup-home:/opt/crater/rustup-home:ro,Z" "-e" "USER_ID=1000" "-e" "SOURCE_DIR=/opt/crater/workdir" "-e" "MAP_USER_ID=1000" "-e" "CARGO_TARGET_DIR=/opt/crater/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/crater/cargo-home" "-e" "RUSTUP_HOME=/opt/crater/rustup-home" "-w" "/opt/crater/workdir" "-m" "1536M" "--network" "none" "rustops/crates-build-env" "/opt/crater/cargo-home/bin/cargo" "+stable" "clippy" "--frozen" "--all" "--all-targets"` [INFO] [stdout] 9b17d0408e987638587292ced6bb1bd4371c20bbf06813d8a124e90a80dc368b [INFO] running `"docker" "start" "-a" "9b17d0408e987638587292ced6bb1bd4371c20bbf06813d8a124e90a80dc368b"` [INFO] [stderr] Compiling raft-consensus v0.4.0 (/opt/crater/workdir) [INFO] [stderr] Checking log v0.4.6 [INFO] [stderr] Checking uuid v0.5.1 [INFO] [stderr] Checking env_logger v0.5.13 [INFO] [stderr] warning: unneeded unit return type [INFO] [stderr] --> src/state_machine/channel.rs:36:56 [INFO] [stderr] | [INFO] [stderr] 36 | fn restore_snapshot(&mut self, _snapshot: Vec) -> () { [INFO] [stderr] | ^^^^^ help: remove the `-> ()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::unused_unit)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stderr] [INFO] [stderr] warning: unneeded unit expression [INFO] [stderr] --> src/state_machine/channel.rs:37:9 [INFO] [stderr] | [INFO] [stderr] 37 | () [INFO] [stderr] | ^^ help: remove the final `()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stderr] [INFO] [stderr] warning: unneeded unit expression [INFO] [stderr] --> src/state_machine/null.rs:21:9 [INFO] [stderr] | [INFO] [stderr] 21 | () [INFO] [stderr] | ^^ help: remove the final `()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stderr] [INFO] [stderr] Checking pretty_env_logger v0.2.5 [INFO] [stderr] warning: this .into_iter() call is equivalent to .iter() and will not move the Vec [INFO] [stderr] --> src/consensus.rs:185:49 [INFO] [stderr] | [INFO] [stderr] 185 | entries.into_iter().map(move |entry| { [INFO] [stderr] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::into_iter_on_ref)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stderr] [INFO] [stderr] warning: use of `expect` followed by a function call [INFO] [stderr] --> src/consensus.rs:899:14 [INFO] [stderr] | [INFO] [stderr] 899 | .expect(&format!("unable to support {} cluster members", peers)); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| panic!("unable to support {} cluster members", peers))` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::expect_fun_call)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/state.rs:90:51 [INFO] [stderr] | [INFO] [stderr] 90 | pub(crate) fn next_index(&mut self, follower: &ServerId) -> LogIndex { [INFO] [stderr] | ^^^^^^^^^ help: consider passing by value instead: `ServerId` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::trivially_copy_pass_by_ref)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: unneeded unit return type [INFO] [stderr] --> src/state_machine/channel.rs:36:56 [INFO] [stderr] | [INFO] [stderr] 36 | fn restore_snapshot(&mut self, _snapshot: Vec) -> () { [INFO] [stderr] | ^^^^^ help: remove the `-> ()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::unused_unit)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stderr] [INFO] [stderr] warning: unneeded unit expression [INFO] [stderr] --> src/state_machine/channel.rs:37:9 [INFO] [stderr] | [INFO] [stderr] 37 | () [INFO] [stderr] | ^^ help: remove the final `()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stderr] [INFO] [stderr] warning: unneeded unit expression [INFO] [stderr] --> src/state_machine/null.rs:21:9 [INFO] [stderr] | [INFO] [stderr] 21 | () [INFO] [stderr] | ^^ help: remove the final `()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stderr] [INFO] [stderr] warning: the loop variable `i` is used to index `expected` [INFO] [stderr] --> src/persistent_log/fs.rs:304:18 [INFO] [stderr] | [INFO] [stderr] 304 | for i in 0..expected.len() { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::needless_range_loop)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stderr] help: consider using an iterator [INFO] [stderr] | [INFO] [stderr] 304 | for (i, ) in expected.iter().enumerate() { [INFO] [stderr] | ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: this .into_iter() call is equivalent to .iter() and will not move the Vec [INFO] [stderr] --> src/consensus.rs:185:49 [INFO] [stderr] | [INFO] [stderr] 185 | entries.into_iter().map(move |entry| { [INFO] [stderr] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::into_iter_on_ref)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stderr] [INFO] [stderr] warning: use of `expect` followed by a function call [INFO] [stderr] --> src/consensus.rs:899:14 [INFO] [stderr] | [INFO] [stderr] 899 | .expect(&format!("unable to support {} cluster members", peers)); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| panic!("unable to support {} cluster members", peers))` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::expect_fun_call)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/consensus.rs:1115:42 [INFO] [stderr] | [INFO] [stderr] 1115 | queue.push_back((peer.clone(), to, message)); [INFO] [stderr] | ^^^^^^^^^^^^ help: try dereferencing it: `*peer` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::clone_on_copy)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] warning: use of `or_insert` followed by a function call [INFO] [stderr] --> src/consensus.rs:1119:62 [INFO] [stderr] | [INFO] [stderr] 1119 | let mut entry = timeouts.entry(peer.clone()).or_insert(HashSet::new()); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `or_insert_with(HashSet::new)` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::or_fun_call)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/consensus.rs:1136:42 [INFO] [stderr] | [INFO] [stderr] 1136 | queue.push_back((peer_consensus.inner.id.clone(), to, message)); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `peer_consensus.inner.id` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] warning: use of `or_insert` followed by a function call [INFO] [stderr] --> src/consensus.rs:1143:22 [INFO] [stderr] | [INFO] [stderr] 1143 | .or_insert(HashSet::new()); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `or_insert_with(HashSet::new)` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/consensus.rs:1142:28 [INFO] [stderr] | [INFO] [stderr] 1142 | .entry(peer_consensus.inner.id.clone()) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `peer_consensus.inner.id` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/consensus.rs:1246:60 [INFO] [stderr] | [INFO] [stderr] 1246 | .apply_timeout(ConsensusTimeout::Heartbeat(follower_id.clone())) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*follower_id` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/consensus.rs:1277:41 [INFO] [stderr] | [INFO] [stderr] 1277 | ConsensusTimeout::Heartbeat(follower_id.clone()) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*follower_id` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/state.rs:90:51 [INFO] [stderr] | [INFO] [stderr] 90 | pub(crate) fn next_index(&mut self, follower: &ServerId) -> LogIndex { [INFO] [stderr] | ^^^^^^^^^ help: consider passing by value instead: `ServerId` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::trivially_copy_pass_by_ref)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 8.52s [INFO] running `"docker" "inspect" "9b17d0408e987638587292ced6bb1bd4371c20bbf06813d8a124e90a80dc368b"` [INFO] running `"docker" "rm" "-f" "9b17d0408e987638587292ced6bb1bd4371c20bbf06813d8a124e90a80dc368b"` [INFO] [stdout] 9b17d0408e987638587292ced6bb1bd4371c20bbf06813d8a124e90a80dc368b