[INFO] updating cached repository WendySanarwanto/rust-tutorial-ownership [INFO] running `"git" "fetch" "--all"` [INFO] [stdout] Fetching origin [INFO] [stderr] From git://github.com/WendySanarwanto/rust-tutorial-ownership [INFO] [stderr] * branch HEAD -> FETCH_HEAD [INFO] running `"git" "clone" "work/cache/sources/gh/WendySanarwanto/rust-tutorial-ownership" "work/ex/clippy-test-run/sources/stable/gh/WendySanarwanto/rust-tutorial-ownership"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable/gh/WendySanarwanto/rust-tutorial-ownership'... [INFO] [stderr] done. [INFO] running `"git" "clone" "work/cache/sources/gh/WendySanarwanto/rust-tutorial-ownership" "work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/WendySanarwanto/rust-tutorial-ownership"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/WendySanarwanto/rust-tutorial-ownership'... [INFO] [stderr] done. [INFO] running `"git" "rev-parse" "HEAD"` [INFO] [stdout] 3bd42283681c46b29c3c250ab688878421f12223 [INFO] sha for GitHub repo WendySanarwanto/rust-tutorial-ownership: 3bd42283681c46b29c3c250ab688878421f12223 [INFO] validating manifest of WendySanarwanto/rust-tutorial-ownership 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 WendySanarwanto/rust-tutorial-ownership 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 WendySanarwanto/rust-tutorial-ownership [INFO] finished frobbing WendySanarwanto/rust-tutorial-ownership [INFO] frobbed toml for WendySanarwanto/rust-tutorial-ownership written to work/ex/clippy-test-run/sources/stable/gh/WendySanarwanto/rust-tutorial-ownership/Cargo.toml [INFO] started frobbing WendySanarwanto/rust-tutorial-ownership [INFO] finished frobbing WendySanarwanto/rust-tutorial-ownership [INFO] frobbed toml for WendySanarwanto/rust-tutorial-ownership written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/WendySanarwanto/rust-tutorial-ownership/Cargo.toml [INFO] crate WendySanarwanto/rust-tutorial-ownership 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 WendySanarwanto/rust-tutorial-ownership 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/WendySanarwanto/rust-tutorial-ownership:/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] 5bacdf52ed45c3e3fcc0f62f3d86dacbb5acf98b3eb066f8458973391f472084 [INFO] running `"docker" "start" "-a" "5bacdf52ed45c3e3fcc0f62f3d86dacbb5acf98b3eb066f8458973391f472084"` [INFO] [stderr] Checking ownership v0.1.0 (/opt/crater/workdir) [INFO] [stderr] warning: unneeded return statement [INFO] [stderr] --> src/main.rs:67:5 [INFO] [stderr] | [INFO] [stderr] 67 | return text.len(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ help: remove `return` as shown: `text.len()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::needless_return)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stderr] [INFO] [stderr] warning: unneeded return statement [INFO] [stderr] --> src/main.rs:105:5 [INFO] [stderr] | [INFO] [stderr] 105 | return s1; [INFO] [stderr] | ^^^^^^^^^^ help: remove `return` as shown: `s1` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stderr] [INFO] [stderr] warning: this looks like an `else if` but the `else` is missing [INFO] [stderr] --> src/main.rs:215:10 [INFO] [stderr] | [INFO] [stderr] 215 | } if entered_key == 1 { [INFO] [stderr] | ^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::suspicious_else_formatting)] on by default [INFO] [stderr] = note: to remove this lint, add the missing `else` or add a new line before the second `if` [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_else_formatting [INFO] [stderr] [INFO] [stderr] warning: unneeded return statement [INFO] [stderr] --> src/main.rs:67:5 [INFO] [stderr] | [INFO] [stderr] 67 | return text.len(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ help: remove `return` as shown: `text.len()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::needless_return)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stderr] [INFO] [stderr] warning: unneeded return statement [INFO] [stderr] --> src/main.rs:105:5 [INFO] [stderr] | [INFO] [stderr] 105 | return s1; [INFO] [stderr] | ^^^^^^^^^^ help: remove `return` as shown: `s1` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stderr] [INFO] [stderr] warning: this looks like an `else if` but the `else` is missing [INFO] [stderr] --> src/main.rs:215:10 [INFO] [stderr] | [INFO] [stderr] 215 | } if entered_key == 1 { [INFO] [stderr] | ^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::suspicious_else_formatting)] on by default [INFO] [stderr] = note: to remove this lint, add the missing `else` or add a new line before the second `if` [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_else_formatting [INFO] [stderr] [INFO] [stderr] warning: writing `&String` instead of `&str` involves a new object where a slice will do. [INFO] [stderr] --> src/main.rs:66:21 [INFO] [stderr] | [INFO] [stderr] 66 | fn get_length(text: &String) -> usize { [INFO] [stderr] | ^^^^^^^ help: change this to: `&str` [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: writing `&String` instead of `&str` involves a new object where a slice will do. [INFO] [stderr] --> src/main.rs:121:25 [INFO] [stderr] | [INFO] [stderr] 121 | fn first_word(sentence: &String) -> &str { [INFO] [stderr] | ^^^^^^^ help: change this to: `&str` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: writing `&String` instead of `&str` involves a new object where a slice will do. [INFO] [stderr] --> src/main.rs:133:26 [INFO] [stderr] | [INFO] [stderr] 133 | fn second_word(sentence: &String) -> &str { [INFO] [stderr] | ^^^^^^^ help: change this to: `&str` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: writing `&String` instead of `&str` involves a new object where a slice will do. [INFO] [stderr] --> src/main.rs:66:21 [INFO] [stderr] | [INFO] [stderr] 66 | fn get_length(text: &String) -> usize { [INFO] [stderr] | ^^^^^^^ help: change this to: `&str` [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: writing `&String` instead of `&str` involves a new object where a slice will do. [INFO] [stderr] --> src/main.rs:121:25 [INFO] [stderr] | [INFO] [stderr] 121 | fn first_word(sentence: &String) -> &str { [INFO] [stderr] | ^^^^^^^ help: change this to: `&str` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: writing `&String` instead of `&str` involves a new object where a slice will do. [INFO] [stderr] --> src/main.rs:133:26 [INFO] [stderr] | [INFO] [stderr] 133 | fn second_word(sentence: &String) -> &str { [INFO] [stderr] | ^^^^^^^ help: change this to: `&str` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 0.93s [INFO] running `"docker" "inspect" "5bacdf52ed45c3e3fcc0f62f3d86dacbb5acf98b3eb066f8458973391f472084"` [INFO] running `"docker" "rm" "-f" "5bacdf52ed45c3e3fcc0f62f3d86dacbb5acf98b3eb066f8458973391f472084"` [INFO] [stdout] 5bacdf52ed45c3e3fcc0f62f3d86dacbb5acf98b3eb066f8458973391f472084