[INFO] updating cached repository alex-ozdemir/notebk [INFO] running `"git" "fetch" "--all"` [INFO] [stdout] Fetching origin [INFO] [stderr] From git://github.com/alex-ozdemir/notebk [INFO] [stderr] * branch HEAD -> FETCH_HEAD [INFO] running `"git" "clone" "work/cache/sources/gh/alex-ozdemir/notebk" "work/ex/clippy-test-run/sources/stable/gh/alex-ozdemir/notebk"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable/gh/alex-ozdemir/notebk'... [INFO] [stderr] done. [INFO] running `"git" "clone" "work/cache/sources/gh/alex-ozdemir/notebk" "work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/alex-ozdemir/notebk"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/alex-ozdemir/notebk'... [INFO] [stderr] done. [INFO] running `"git" "rev-parse" "HEAD"` [INFO] [stdout] aae7d777ab4642feb2f0078561a5ba0644d13bea [INFO] sha for GitHub repo alex-ozdemir/notebk: aae7d777ab4642feb2f0078561a5ba0644d13bea [INFO] validating manifest of alex-ozdemir/notebk 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 alex-ozdemir/notebk 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 alex-ozdemir/notebk [INFO] finished frobbing alex-ozdemir/notebk [INFO] frobbed toml for alex-ozdemir/notebk written to work/ex/clippy-test-run/sources/stable/gh/alex-ozdemir/notebk/Cargo.toml [INFO] started frobbing alex-ozdemir/notebk [INFO] finished frobbing alex-ozdemir/notebk [INFO] frobbed toml for alex-ozdemir/notebk written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/alex-ozdemir/notebk/Cargo.toml [INFO] crate alex-ozdemir/notebk has a lockfile. skipping [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 alex-ozdemir/notebk against stable+rustflags=-Dclippy::into_iter_on_array for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-7/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/alex-ozdemir/notebk:/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 -Dclippy::into_iter_on_array" "-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] cf1d528fb8da4cc260b6bc679a6938d81a42dd50291bf435022356bbfcf6ca92 [INFO] running `"docker" "start" "-a" "cf1d528fb8da4cc260b6bc679a6938d81a42dd50291bf435022356bbfcf6ca92"` [INFO] [stderr] Checking notebk v0.1.0 (/opt/crater/workdir) [INFO] [stderr] warning: use of deprecated item 'std::env::home_dir': This function's behavior is unexpected and probably not what you want. Consider using the home_dir function from https://crates.io/crates/dirs instead. [INFO] [stderr] --> src/main.rs:11:5 [INFO] [stderr] | [INFO] [stderr] 11 | env::home_dir().map(|mut p| { [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(deprecated)] on by default [INFO] [stderr] [INFO] [stderr] warning: use of deprecated item 'std::env::home_dir': This function's behavior is unexpected and probably not what you want. Consider using the home_dir function from https://crates.io/crates/dirs instead. [INFO] [stderr] --> src/main.rs:11:5 [INFO] [stderr] | [INFO] [stderr] 11 | env::home_dir().map(|mut p| { [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(deprecated)] on by default [INFO] [stderr] [INFO] [stderr] warning: use of `ok_or` followed by a function call [INFO] [stderr] --> src/main.rs:55:39 [INFO] [stderr] | [INFO] [stderr] 55 | entries()?.into_iter().nth(n - 1).ok_or(io::Error::new( [INFO] [stderr] | _______________________________________^ [INFO] [stderr] 56 | | io::ErrorKind::NotFound, [INFO] [stderr] 57 | | format!("There is no entry number {}", n), [INFO] [stderr] 58 | | )) [INFO] [stderr] | |______^ [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] help: try this [INFO] [stderr] | [INFO] [stderr] 55 | entries()?.into_iter().nth(n - 1).ok_or_else(|| io::Error::new( [INFO] [stderr] 56 | io::ErrorKind::NotFound, [INFO] [stderr] 57 | format!("There is no entry number {}", n), [INFO] [stderr] 58 | )) [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: called `filter(p).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(p)` instead. [INFO] [stderr] --> src/main.rs:63:26 [INFO] [stderr] | [INFO] [stderr] 63 | let first_line = std::io::BufReader::new(fs::File::open(entry.path())?) [INFO] [stderr] | __________________________^ [INFO] [stderr] 64 | | .lines() [INFO] [stderr] 65 | | .filter_map(Result::ok) [INFO] [stderr] 66 | | .filter(|r| r.len() > 0) [INFO] [stderr] 67 | | .next(); [INFO] [stderr] | |___________________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::filter_next)] on by default [INFO] [stderr] = note: replace `filter(|r| r.len() > 0).next()` with `find(|r| r.len() > 0)` [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_next [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/main.rs:66:25 [INFO] [stderr] | [INFO] [stderr] 66 | .filter(|r| r.len() > 0) [INFO] [stderr] | ^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `!r.is_empty()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::len_zero)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] warning: use of `ok_or` followed by a function call [INFO] [stderr] --> src/main.rs:103:10 [INFO] [stderr] | [INFO] [stderr] 103 | .ok_or(io::Error::new( [INFO] [stderr] | __________^ [INFO] [stderr] 104 | | io::ErrorKind::Other, [INFO] [stderr] 105 | | "expected a number as the second argument", [INFO] [stderr] 106 | | )) [INFO] [stderr] | |__________^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] help: try this [INFO] [stderr] | [INFO] [stderr] 103 | .ok_or_else(|| io::Error::new( [INFO] [stderr] 104 | io::ErrorKind::Other, [INFO] [stderr] 105 | "expected a number as the second argument", [INFO] [stderr] 106 | )) [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: use of `ok_or` followed by a function call [INFO] [stderr] --> src/main.rs:55:39 [INFO] [stderr] | [INFO] [stderr] 55 | entries()?.into_iter().nth(n - 1).ok_or(io::Error::new( [INFO] [stderr] | _______________________________________^ [INFO] [stderr] 56 | | io::ErrorKind::NotFound, [INFO] [stderr] 57 | | format!("There is no entry number {}", n), [INFO] [stderr] 58 | | )) [INFO] [stderr] | |______^ [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] help: try this [INFO] [stderr] | [INFO] [stderr] 55 | entries()?.into_iter().nth(n - 1).ok_or_else(|| io::Error::new( [INFO] [stderr] 56 | io::ErrorKind::NotFound, [INFO] [stderr] 57 | format!("There is no entry number {}", n), [INFO] [stderr] 58 | )) [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: called `filter(p).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(p)` instead. [INFO] [stderr] --> src/main.rs:63:26 [INFO] [stderr] | [INFO] [stderr] 63 | let first_line = std::io::BufReader::new(fs::File::open(entry.path())?) [INFO] [stderr] | __________________________^ [INFO] [stderr] 64 | | .lines() [INFO] [stderr] 65 | | .filter_map(Result::ok) [INFO] [stderr] 66 | | .filter(|r| r.len() > 0) [INFO] [stderr] 67 | | .next(); [INFO] [stderr] | |___________________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::filter_next)] on by default [INFO] [stderr] = note: replace `filter(|r| r.len() > 0).next()` with `find(|r| r.len() > 0)` [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_next [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/main.rs:66:25 [INFO] [stderr] | [INFO] [stderr] 66 | .filter(|r| r.len() > 0) [INFO] [stderr] | ^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `!r.is_empty()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::len_zero)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] warning: use of `ok_or` followed by a function call [INFO] [stderr] --> src/main.rs:103:10 [INFO] [stderr] | [INFO] [stderr] 103 | .ok_or(io::Error::new( [INFO] [stderr] | __________^ [INFO] [stderr] 104 | | io::ErrorKind::Other, [INFO] [stderr] 105 | | "expected a number as the second argument", [INFO] [stderr] 106 | | )) [INFO] [stderr] | |__________^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] help: try this [INFO] [stderr] | [INFO] [stderr] 103 | .ok_or_else(|| io::Error::new( [INFO] [stderr] 104 | io::ErrorKind::Other, [INFO] [stderr] 105 | "expected a number as the second argument", [INFO] [stderr] 106 | )) [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 1.10s [INFO] running `"docker" "inspect" "cf1d528fb8da4cc260b6bc679a6938d81a42dd50291bf435022356bbfcf6ca92"` [INFO] running `"docker" "rm" "-f" "cf1d528fb8da4cc260b6bc679a6938d81a42dd50291bf435022356bbfcf6ca92"` [INFO] [stdout] cf1d528fb8da4cc260b6bc679a6938d81a42dd50291bf435022356bbfcf6ca92