[INFO] updating cached repository fila90/typing-speed [INFO] running `"git" "fetch" "--all"` [INFO] [stdout] Fetching origin [INFO] [stderr] From git://github.com/fila90/typing-speed [INFO] [stderr] * branch HEAD -> FETCH_HEAD [INFO] running `"git" "clone" "work/cache/sources/gh/fila90/typing-speed" "work/ex/clippy-test-run/sources/stable/gh/fila90/typing-speed"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable/gh/fila90/typing-speed'... [INFO] [stderr] done. [INFO] running `"git" "clone" "work/cache/sources/gh/fila90/typing-speed" "work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/fila90/typing-speed"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/fila90/typing-speed'... [INFO] [stderr] done. [INFO] running `"git" "rev-parse" "HEAD"` [INFO] [stdout] 69537d2fb1b361f8a057e51cf195919d03ad986c [INFO] sha for GitHub repo fila90/typing-speed: 69537d2fb1b361f8a057e51cf195919d03ad986c [INFO] validating manifest of fila90/typing-speed 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 fila90/typing-speed 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 fila90/typing-speed [INFO] finished frobbing fila90/typing-speed [INFO] frobbed toml for fila90/typing-speed written to work/ex/clippy-test-run/sources/stable/gh/fila90/typing-speed/Cargo.toml [INFO] started frobbing fila90/typing-speed [INFO] finished frobbing fila90/typing-speed [INFO] frobbed toml for fila90/typing-speed written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/fila90/typing-speed/Cargo.toml [INFO] crate fila90/typing-speed 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 fila90/typing-speed 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-3/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/fila90/typing-speed:/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] 0cd220ccdd7ab6840dccdbb9a10cf88e367b7002f3de1c105750288cc1c15749 [INFO] running `"docker" "start" "-a" "0cd220ccdd7ab6840dccdbb9a10cf88e367b7002f3de1c105750288cc1c15749"` [INFO] [stderr] Checking fasttyping v0.1.0 (/opt/crater/workdir) [INFO] [stderr] warning: `if _ { .. } else { .. }` is an expression [INFO] [stderr] --> src/lib.rs:14:3 [INFO] [stderr] | [INFO] [stderr] 14 | let mut text= String::new(); [INFO] [stderr] | _________^ [INFO] [stderr] 15 | | [INFO] [stderr] 16 | | // if file not specified, use default text [INFO] [stderr] 17 | | if args.len() < 2 { [INFO] [stderr] ... | [INFO] [stderr] 22 | | f.read_to_string(&mut text).expect("Can't rad file!"); [INFO] [stderr] 23 | | } [INFO] [stderr] | |_________^ help: it is more idiomatic to write: `let text = if args.len() < 2 { String::from("On the other hand, we denounce with righteous indignation and dislike men who are so beguiled and demoralized by the charms of pleasure of the moment, so blinded by desire, that they cannot foresee the pain and trouble that are bound to ensue; and equal blame belongs to those who fail in their duty through weakness of will, which is the same as saying through shrinking from toil and pain. These cases are perfectly simple and easy to distinguish. In a free hour, when our power of choice is untrammelled and when nothing prevents our being able to do what we like best, every pleasure is to be welcomed and every pain avoided. But in certain circumstances and owing to the claims of duty or the obligations of business it will frequently occur that pleasures have to be repudiated and annoyances accepted. The wise man therefore always holds in these matters to this principle of selection: he rejects pleasures to secure other greater pleasures, or else he endures pains to avoid worse pains.") } else { ..; String::new() };` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::useless_let_if_seq)] on by default [INFO] [stderr] = note: you might not need `mut` at all [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_let_if_seq [INFO] [stderr] [INFO] [stderr] warning: this creates an owned instance just for comparison [INFO] [stderr] --> src/lib.rs:43:47 [INFO] [stderr] | [INFO] [stderr] 43 | let index = words.iter().position(|ref w| w.to_string() == guess); [INFO] [stderr] | ^^^^^^^^^^^^^ help: try: `*w` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::cmp_owned)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stderr] [INFO] [stderr] warning: you seem to be trying to use match for destructuring a single pattern. Consider using `if let` [INFO] [stderr] --> src/lib.rs:45:5 [INFO] [stderr] | [INFO] [stderr] 45 | / match index { [INFO] [stderr] 46 | | Some(i) => { [INFO] [stderr] 47 | | words.remove(i); [INFO] [stderr] 48 | | Some(i); [INFO] [stderr] 49 | | }, [INFO] [stderr] 50 | | None => (), [INFO] [stderr] 51 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::single_match)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stderr] help: try this [INFO] [stderr] | [INFO] [stderr] 45 | if let Some(i) = index { [INFO] [stderr] 46 | words.remove(i); [INFO] [stderr] 47 | Some(i); [INFO] [stderr] 48 | } [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: statement with no effect [INFO] [stderr] --> src/lib.rs:48:7 [INFO] [stderr] | [INFO] [stderr] 48 | Some(i); [INFO] [stderr] | ^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::no_effect)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect [INFO] [stderr] [INFO] [stderr] warning: `if _ { .. } else { .. }` is an expression [INFO] [stderr] --> src/lib.rs:14:3 [INFO] [stderr] | [INFO] [stderr] 14 | let mut text= String::new(); [INFO] [stderr] | _________^ [INFO] [stderr] 15 | | [INFO] [stderr] 16 | | // if file not specified, use default text [INFO] [stderr] 17 | | if args.len() < 2 { [INFO] [stderr] ... | [INFO] [stderr] 22 | | f.read_to_string(&mut text).expect("Can't rad file!"); [INFO] [stderr] 23 | | } [INFO] [stderr] | |_________^ help: it is more idiomatic to write: `let text = if args.len() < 2 { String::from("On the other hand, we denounce with righteous indignation and dislike men who are so beguiled and demoralized by the charms of pleasure of the moment, so blinded by desire, that they cannot foresee the pain and trouble that are bound to ensue; and equal blame belongs to those who fail in their duty through weakness of will, which is the same as saying through shrinking from toil and pain. These cases are perfectly simple and easy to distinguish. In a free hour, when our power of choice is untrammelled and when nothing prevents our being able to do what we like best, every pleasure is to be welcomed and every pain avoided. But in certain circumstances and owing to the claims of duty or the obligations of business it will frequently occur that pleasures have to be repudiated and annoyances accepted. The wise man therefore always holds in these matters to this principle of selection: he rejects pleasures to secure other greater pleasures, or else he endures pains to avoid worse pains.") } else { ..; String::new() };` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::useless_let_if_seq)] on by default [INFO] [stderr] = note: you might not need `mut` at all [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_let_if_seq [INFO] [stderr] [INFO] [stderr] warning: this creates an owned instance just for comparison [INFO] [stderr] --> src/lib.rs:43:47 [INFO] [stderr] | [INFO] [stderr] 43 | let index = words.iter().position(|ref w| w.to_string() == guess); [INFO] [stderr] | ^^^^^^^^^^^^^ help: try: `*w` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::cmp_owned)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stderr] [INFO] [stderr] warning: you seem to be trying to use match for destructuring a single pattern. Consider using `if let` [INFO] [stderr] --> src/lib.rs:45:5 [INFO] [stderr] | [INFO] [stderr] 45 | / match index { [INFO] [stderr] 46 | | Some(i) => { [INFO] [stderr] 47 | | words.remove(i); [INFO] [stderr] 48 | | Some(i); [INFO] [stderr] 49 | | }, [INFO] [stderr] 50 | | None => (), [INFO] [stderr] 51 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::single_match)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stderr] help: try this [INFO] [stderr] | [INFO] [stderr] 45 | if let Some(i) = index { [INFO] [stderr] 46 | words.remove(i); [INFO] [stderr] 47 | Some(i); [INFO] [stderr] 48 | } [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: statement with no effect [INFO] [stderr] --> src/lib.rs:48:7 [INFO] [stderr] | [INFO] [stderr] 48 | Some(i); [INFO] [stderr] | ^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::no_effect)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect [INFO] [stderr] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 1.18s [INFO] running `"docker" "inspect" "0cd220ccdd7ab6840dccdbb9a10cf88e367b7002f3de1c105750288cc1c15749"` [INFO] running `"docker" "rm" "-f" "0cd220ccdd7ab6840dccdbb9a10cf88e367b7002f3de1c105750288cc1c15749"` [INFO] [stdout] 0cd220ccdd7ab6840dccdbb9a10cf88e367b7002f3de1c105750288cc1c15749