[INFO] updating cached repository mmgeorge/ConnectFour [INFO] running `"git" "fetch" "--all"` [INFO] [stdout] Fetching origin [INFO] [stderr] From git://github.com/mmgeorge/ConnectFour [INFO] [stderr] * branch HEAD -> FETCH_HEAD [INFO] running `"git" "clone" "work/cache/sources/gh/mmgeorge/ConnectFour" "work/ex/clippy-test-run/sources/stable/gh/mmgeorge/ConnectFour"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable/gh/mmgeorge/ConnectFour'... [INFO] [stderr] done. [INFO] running `"git" "clone" "work/cache/sources/gh/mmgeorge/ConnectFour" "work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/mmgeorge/ConnectFour"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/mmgeorge/ConnectFour'... [INFO] [stderr] done. [INFO] running `"git" "rev-parse" "HEAD"` [INFO] [stdout] edee1618a34dedf6d3c43435125d2b02d8309e09 [INFO] sha for GitHub repo mmgeorge/ConnectFour: edee1618a34dedf6d3c43435125d2b02d8309e09 [INFO] validating manifest of mmgeorge/ConnectFour 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 mmgeorge/ConnectFour 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 mmgeorge/ConnectFour [INFO] finished frobbing mmgeorge/ConnectFour [INFO] frobbed toml for mmgeorge/ConnectFour written to work/ex/clippy-test-run/sources/stable/gh/mmgeorge/ConnectFour/Cargo.toml [INFO] started frobbing mmgeorge/ConnectFour [INFO] finished frobbing mmgeorge/ConnectFour [INFO] frobbed toml for mmgeorge/ConnectFour written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/mmgeorge/ConnectFour/Cargo.toml [INFO] crate mmgeorge/ConnectFour 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 mmgeorge/ConnectFour against stable for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-7/stable:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable/gh/mmgeorge/ConnectFour:/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] 9d3882f9d98b51560e2a19b45804406b13d253dc41c0c8a508edc2feb1b0488d [INFO] running `"docker" "start" "-a" "9d3882f9d98b51560e2a19b45804406b13d253dc41c0c8a508edc2feb1b0488d"` [INFO] [stderr] Checking connect_four v0.1.0 (/opt/crater/workdir) [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/game.rs:33:4 [INFO] [stderr] | [INFO] [stderr] 33 | width: width, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `width` [INFO] [stderr] | [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/game.rs:33:4 [INFO] [stderr] | [INFO] [stderr] 33 | width: width, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `width` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::redundant_field_names)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/game.rs:34:4 [INFO] [stderr] | [INFO] [stderr] 34 | height: height, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `height` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/game.rs:35:4 [INFO] [stderr] | [INFO] [stderr] 35 | k: k, [INFO] [stderr] | ^^^^ help: replace it with: `k` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/game.rs:36:4 [INFO] [stderr] | [INFO] [stderr] 36 | curr_player: curr_player, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `curr_player` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: literal with an empty format string [INFO] [stderr] --> src/game.rs:242:22 [INFO] [stderr] | [INFO] [stderr] 242 | println!("{}", "Player 1's Turn"); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::print_literal)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_literal [INFO] [stderr] [INFO] [stderr] warning: literal with an empty format string [INFO] [stderr] --> src/game.rs:244:22 [INFO] [stderr] | [INFO] [stderr] 244 | println!("{}", "Player 2's Turn"); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_literal [INFO] [stderr] [INFO] [stderr] warning: using `write!()` with a format string that ends in a single newline, consider using `writeln!()` instead [INFO] [stderr] --> src/game.rs:269:9 [INFO] [stderr] | [INFO] [stderr] 269 | write!(f, "{}\n", printable) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::write_with_newline)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stderr] [INFO] [stderr] warning: literal with an empty format string [INFO] [stderr] --> src/game.rs:375:22 [INFO] [stderr] | [INFO] [stderr] 375 | println!("{}", "Player 1's Turn"); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_literal [INFO] [stderr] [INFO] [stderr] warning: literal with an empty format string [INFO] [stderr] --> src/game.rs:377:22 [INFO] [stderr] | [INFO] [stderr] 377 | println!("{}", "Player 2's Turn"); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_literal [INFO] [stderr] [INFO] [stderr] = note: #[warn(clippy::redundant_field_names)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/game.rs:34:4 [INFO] [stderr] | [INFO] [stderr] 34 | height: height, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `height` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/game.rs:35:4 [INFO] [stderr] | [INFO] [stderr] 35 | k: k, [INFO] [stderr] | ^^^^ help: replace it with: `k` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/game.rs:36:4 [INFO] [stderr] | [INFO] [stderr] 36 | curr_player: curr_player, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `curr_player` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: literal with an empty format string [INFO] [stderr] --> src/game.rs:242:22 [INFO] [stderr] | [INFO] [stderr] 242 | println!("{}", "Player 1's Turn"); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::print_literal)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_literal [INFO] [stderr] [INFO] [stderr] warning: literal with an empty format string [INFO] [stderr] --> src/game.rs:244:22 [INFO] [stderr] | [INFO] [stderr] 244 | println!("{}", "Player 2's Turn"); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_literal [INFO] [stderr] [INFO] [stderr] warning: using `write!()` with a format string that ends in a single newline, consider using `writeln!()` instead [INFO] [stderr] --> src/game.rs:269:9 [INFO] [stderr] | [INFO] [stderr] 269 | write!(f, "{}\n", printable) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::write_with_newline)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stderr] [INFO] [stderr] warning: literal with an empty format string [INFO] [stderr] --> src/game.rs:375:22 [INFO] [stderr] | [INFO] [stderr] 375 | println!("{}", "Player 1's Turn"); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_literal [INFO] [stderr] [INFO] [stderr] warning: literal with an empty format string [INFO] [stderr] --> src/game.rs:377:22 [INFO] [stderr] | [INFO] [stderr] 377 | println!("{}", "Player 2's Turn"); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_literal [INFO] [stderr] [INFO] [stderr] warning: unneeded return statement [INFO] [stderr] --> src/game.rs:74:5 [INFO] [stderr] | [INFO] [stderr] 74 | return Ok(ri); [INFO] [stderr] | ^^^^^^^^^^^^^^ help: remove `return` as shown: `Ok(ri)` [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: unused imports: `ConnectK`, `Player` [INFO] [stderr] --> src/game.rs:361:14 [INFO] [stderr] | [INFO] [stderr] 361 | use super::{ConnectK,Player}; [INFO] [stderr] | ^^^^^^^^ ^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(unused_imports)] on by default [INFO] [stderr] [INFO] [stderr] warning: unneeded return statement [INFO] [stderr] --> src/game.rs:74:5 [INFO] [stderr] | [INFO] [stderr] 74 | return Ok(ri); [INFO] [stderr] | ^^^^^^^^^^^^^^ help: remove `return` as shown: `Ok(ri)` [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: using `clone` on a `Copy` type [INFO] [stderr] --> src/game.rs:48:32 [INFO] [stderr] | [INFO] [stderr] 48 | let row_index = self.insert(col_index.clone()).unwrap(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `col_index` [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] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/game.rs:49:46 [INFO] [stderr] | [INFO] [stderr] 49 | let check_if_win = self.clone().is_winner(col_index.clone(), row_index.clone()); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `col_index` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/game.rs:49:65 [INFO] [stderr] | [INFO] [stderr] 49 | let check_if_win = self.clone().is_winner(col_index.clone(), row_index.clone()); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `row_index` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] warning: methods called `is_*` usually take self by reference or no self; consider choosing a less ambiguous name [INFO] [stderr] --> src/game.rs:113:19 [INFO] [stderr] | [INFO] [stderr] 113 | pub fn is_winner(self, col_index: usize, row_index: usize) -> Option { [INFO] [stderr] | ^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::wrong_self_convention)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stderr] [INFO] [stderr] warning: the function has a cyclomatic complexity of 29 [INFO] [stderr] --> src/game.rs:113:2 [INFO] [stderr] | [INFO] [stderr] 113 | pub fn is_winner(self, col_index: usize, row_index: usize) -> Option { [INFO] [stderr] | _____^ [INFO] [stderr] 114 | | //check both players to see if there is a winner [INFO] [stderr] 115 | | let check_players = vec![Player::One, Player::Two]; [INFO] [stderr] 116 | | [INFO] [stderr] ... | [INFO] [stderr] 234 | | None [INFO] [stderr] 235 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::cyclomatic_complexity)] on by default [INFO] [stderr] = help: you could split it up into multiple smaller functions [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cyclomatic_complexity [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/game.rs:48:32 [INFO] [stderr] | [INFO] [stderr] 48 | let row_index = self.insert(col_index.clone()).unwrap(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `col_index` [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] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/game.rs:49:46 [INFO] [stderr] | [INFO] [stderr] 49 | let check_if_win = self.clone().is_winner(col_index.clone(), row_index.clone()); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `col_index` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/game.rs:49:65 [INFO] [stderr] | [INFO] [stderr] 49 | let check_if_win = self.clone().is_winner(col_index.clone(), row_index.clone()); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `row_index` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] warning: methods called `is_*` usually take self by reference or no self; consider choosing a less ambiguous name [INFO] [stderr] --> src/game.rs:113:19 [INFO] [stderr] | [INFO] [stderr] 113 | pub fn is_winner(self, col_index: usize, row_index: usize) -> Option { [INFO] [stderr] | ^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::wrong_self_convention)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stderr] [INFO] [stderr] warning: the function has a cyclomatic complexity of 29 [INFO] [stderr] --> src/game.rs:113:2 [INFO] [stderr] | [INFO] [stderr] 113 | pub fn is_winner(self, col_index: usize, row_index: usize) -> Option { [INFO] [stderr] | _____^ [INFO] [stderr] 114 | | //check both players to see if there is a winner [INFO] [stderr] 115 | | let check_players = vec![Player::One, Player::Two]; [INFO] [stderr] 116 | | [INFO] [stderr] ... | [INFO] [stderr] 234 | | None [INFO] [stderr] 235 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::cyclomatic_complexity)] on by default [INFO] [stderr] = help: you could split it up into multiple smaller functions [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cyclomatic_complexity [INFO] [stderr] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 1.23s [INFO] running `"docker" "inspect" "9d3882f9d98b51560e2a19b45804406b13d253dc41c0c8a508edc2feb1b0488d"` [INFO] running `"docker" "rm" "-f" "9d3882f9d98b51560e2a19b45804406b13d253dc41c0c8a508edc2feb1b0488d"` [INFO] [stdout] 9d3882f9d98b51560e2a19b45804406b13d253dc41c0c8a508edc2feb1b0488d