[INFO] updating cached repository pottava/regex-replacer [INFO] running `"git" "fetch" "--all"` [INFO] [stdout] Fetching origin [INFO] [stderr] From git://github.com/pottava/regex-replacer [INFO] [stderr] * branch HEAD -> FETCH_HEAD [INFO] running `"git" "clone" "work/cache/sources/gh/pottava/regex-replacer" "work/ex/clippy-test-run/sources/stable/gh/pottava/regex-replacer"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable/gh/pottava/regex-replacer'... [INFO] [stderr] done. [INFO] running `"git" "clone" "work/cache/sources/gh/pottava/regex-replacer" "work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/pottava/regex-replacer"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/pottava/regex-replacer'... [INFO] [stderr] done. [INFO] running `"git" "rev-parse" "HEAD"` [INFO] [stdout] aea9b6e42ec596e2f1fae9017f1a2338b54f8359 [INFO] sha for GitHub repo pottava/regex-replacer: aea9b6e42ec596e2f1fae9017f1a2338b54f8359 [INFO] validating manifest of pottava/regex-replacer 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 pottava/regex-replacer 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 pottava/regex-replacer [INFO] finished frobbing pottava/regex-replacer [INFO] frobbed toml for pottava/regex-replacer written to work/ex/clippy-test-run/sources/stable/gh/pottava/regex-replacer/Cargo.toml [INFO] started frobbing pottava/regex-replacer [INFO] finished frobbing pottava/regex-replacer [INFO] frobbed toml for pottava/regex-replacer written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/pottava/regex-replacer/Cargo.toml [INFO] crate pottava/regex-replacer 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 pottava/regex-replacer 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-6/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/pottava/regex-replacer:/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] 1d511149ef12a588f2a5674117ac8f55ef23cfc58a423d7fb054ca8e55d11518 [INFO] running `"docker" "start" "-a" "1d511149ef12a588f2a5674117ac8f55ef23cfc58a423d7fb054ca8e55d11518"` [INFO] [stderr] Checking thread-id v3.1.0 [INFO] [stderr] Checking aho-corasick v0.6.3 [INFO] [stderr] Checking thread_local v0.3.3 [INFO] [stderr] Checking regex v0.2.1 [INFO] [stderr] Checking regex-replacer v0.0.1 (/opt/crater/workdir) [INFO] [stderr] warning: use of `unwrap_or` followed by a function call [INFO] [stderr] --> src/main.rs:10:19 [INFO] [stderr] | [INFO] [stderr] 10 | env::var(key).unwrap_or(String::from(def_value)) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|_| String::from(def_value))` [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: use of `unwrap_or` followed by a function call [INFO] [stderr] --> src/main.rs:17:23 [INFO] [stderr] | [INFO] [stderr] 17 | .map(|l| l.unwrap_or(String::from("---"))) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|_| String::from("---"))` [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: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/main.rs:21:44 [INFO] [stderr] | [INFO] [stderr] 21 | fn save_as>(path: P, lines: &Vec) -> Result<(), std::io::Error> { [INFO] [stderr] | ^^^^^^^^^^^^ help: change this to: `&[String]` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::ptr_arg)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: identical conversion [INFO] [stderr] --> src/main.rs:43:40 [INFO] [stderr] | [INFO] [stderr] 43 | let mut replaced = String::from(line); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `line` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::identity_conversion)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_conversion [INFO] [stderr] [INFO] [stderr] warning: use of `unwrap_or` followed by a function call [INFO] [stderr] --> src/main.rs:10:19 [INFO] [stderr] | [INFO] [stderr] 10 | env::var(key).unwrap_or(String::from(def_value)) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|_| String::from(def_value))` [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: use of `unwrap_or` followed by a function call [INFO] [stderr] --> src/main.rs:17:23 [INFO] [stderr] | [INFO] [stderr] 17 | .map(|l| l.unwrap_or(String::from("---"))) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|_| String::from("---"))` [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: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/main.rs:21:44 [INFO] [stderr] | [INFO] [stderr] 21 | fn save_as>(path: P, lines: &Vec) -> Result<(), std::io::Error> { [INFO] [stderr] | ^^^^^^^^^^^^ help: change this to: `&[String]` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::ptr_arg)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: identical conversion [INFO] [stderr] --> src/main.rs:43:40 [INFO] [stderr] | [INFO] [stderr] 43 | let mut replaced = String::from(line); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `line` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::identity_conversion)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_conversion [INFO] [stderr] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 3.34s [INFO] running `"docker" "inspect" "1d511149ef12a588f2a5674117ac8f55ef23cfc58a423d7fb054ca8e55d11518"` [INFO] running `"docker" "rm" "-f" "1d511149ef12a588f2a5674117ac8f55ef23cfc58a423d7fb054ca8e55d11518"` [INFO] [stdout] 1d511149ef12a588f2a5674117ac8f55ef23cfc58a423d7fb054ca8e55d11518