[INFO] crate cactus 1.0.3 is already in cache [INFO] extracting crate cactus 1.0.3 into work/ex/clippy-test-run/sources/stable/reg/cactus/1.0.3 [INFO] extracting crate cactus 1.0.3 into work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/cactus/1.0.3 [INFO] validating manifest of cactus-1.0.3 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 cactus-1.0.3 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 cactus-1.0.3 [INFO] finished frobbing cactus-1.0.3 [INFO] frobbed toml for cactus-1.0.3 written to work/ex/clippy-test-run/sources/stable/reg/cactus/1.0.3/Cargo.toml [INFO] started frobbing cactus-1.0.3 [INFO] finished frobbing cactus-1.0.3 [INFO] frobbed toml for cactus-1.0.3 written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/cactus/1.0.3/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 cactus-1.0.3 against stable for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-1/stable:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable/reg/cactus/1.0.3:/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] f5856cde554a508c890239a4b3d34d853042bdc74bd94d254f89cc0b7cf58fc1 [INFO] running `"docker" "start" "-a" "f5856cde554a508c890239a4b3d34d853042bdc74bd94d254f89cc0b7cf58fc1"` [INFO] [stderr] Checking cactus v1.0.3 (/opt/crater/workdir) [INFO] [stderr] warning: called `map(f)` on an Option value where `f` is a unit closure [INFO] [stderr] --> src/lib.rs:245:13 [INFO] [stderr] | [INFO] [stderr] 245 | si.take().map(|n| si = n.parent.as_ref()); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^- [INFO] [stderr] | | [INFO] [stderr] | help: try this: `if let Some(n) = si.take() { ... }` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::option_map_unit_fn)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stderr] [INFO] [stderr] warning: called `map(f)` on an Option value where `f` is a unit closure [INFO] [stderr] --> src/lib.rs:246:13 [INFO] [stderr] | [INFO] [stderr] 246 | oi.take().map(|n| oi = n.parent.as_ref()); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^- [INFO] [stderr] | | [INFO] [stderr] | help: try this: `if let Some(n) = oi.take() { ... }` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stderr] [INFO] [stderr] warning: this if-then-else expression returns a bool literal [INFO] [stderr] --> src/lib.rs:248:9 [INFO] [stderr] | [INFO] [stderr] 248 | / if si.is_some() || oi.is_some() { [INFO] [stderr] 249 | | // One of the iterators finished before the other, meaning that the two cactuses were [INFO] [stderr] 250 | | // of different length and thus unequal by definition [INFO] [stderr] 251 | | false [INFO] [stderr] 252 | | } else { [INFO] [stderr] 253 | | true [INFO] [stderr] 254 | | } [INFO] [stderr] | |_________^ help: you can reduce it to: `!(si.is_some() || oi.is_some())` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::needless_bool)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stderr] [INFO] [stderr] warning: called `map(f)` on an Option value where `f` is a unit closure [INFO] [stderr] --> src/lib.rs:245:13 [INFO] [stderr] | [INFO] [stderr] 245 | si.take().map(|n| si = n.parent.as_ref()); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^- [INFO] [stderr] | | [INFO] [stderr] | help: try this: `if let Some(n) = si.take() { ... }` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::option_map_unit_fn)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stderr] [INFO] [stderr] warning: called `map(f)` on an Option value where `f` is a unit closure [INFO] [stderr] --> src/lib.rs:246:13 [INFO] [stderr] | [INFO] [stderr] 246 | oi.take().map(|n| oi = n.parent.as_ref()); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^- [INFO] [stderr] | | [INFO] [stderr] | help: try this: `if let Some(n) = oi.take() { ... }` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stderr] [INFO] [stderr] warning: this if-then-else expression returns a bool literal [INFO] [stderr] --> src/lib.rs:248:9 [INFO] [stderr] | [INFO] [stderr] 248 | / if si.is_some() || oi.is_some() { [INFO] [stderr] 249 | | // One of the iterators finished before the other, meaning that the two cactuses were [INFO] [stderr] 250 | | // of different length and thus unequal by definition [INFO] [stderr] 251 | | false [INFO] [stderr] 252 | | } else { [INFO] [stderr] 253 | | true [INFO] [stderr] 254 | | } [INFO] [stderr] | |_________^ help: you can reduce it to: `!(si.is_some() || oi.is_some())` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::needless_bool)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stderr] [INFO] [stderr] warning: called `skip(x).next()` on an iterator. This is more succinctly expressed by calling `nth(x)` [INFO] [stderr] --> src/lib.rs:321:20 [INFO] [stderr] | [INFO] [stderr] 321 | assert_eq!(c.nodes().skip(1).next().unwrap(), Cactus::new().child(3).child(2)); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::iter_skip_next)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_skip_next [INFO] [stderr] [INFO] [stderr] warning: called `skip(x).next()` on an iterator. This is more succinctly expressed by calling `nth(x)` [INFO] [stderr] --> src/lib.rs:322:20 [INFO] [stderr] | [INFO] [stderr] 322 | assert_eq!(c.nodes().skip(2).next().unwrap(), Cactus::new().child(3)); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_skip_next [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/lib.rs:352:54 [INFO] [stderr] | [INFO] [stderr] 352 | assert_eq!(c.try_unwrap().unwrap_or_else(|c| c.val().unwrap().clone()), 3); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*c.val().unwrap()` [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] Finished dev [unoptimized + debuginfo] target(s) in 1.46s [INFO] running `"docker" "inspect" "f5856cde554a508c890239a4b3d34d853042bdc74bd94d254f89cc0b7cf58fc1"` [INFO] running `"docker" "rm" "-f" "f5856cde554a508c890239a4b3d34d853042bdc74bd94d254f89cc0b7cf58fc1"` [INFO] [stdout] f5856cde554a508c890239a4b3d34d853042bdc74bd94d254f89cc0b7cf58fc1