[INFO] updating cached repository PurpleMyst/oxygen_bot [INFO] running `"git" "fetch" "--all"` [INFO] [stdout] Fetching origin [INFO] [stderr] From git://github.com/PurpleMyst/oxygen_bot [INFO] [stderr] * branch HEAD -> FETCH_HEAD [INFO] running `"git" "clone" "work/cache/sources/gh/PurpleMyst/oxygen_bot" "work/ex/clippy-test-run/sources/stable/gh/PurpleMyst/oxygen_bot"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable/gh/PurpleMyst/oxygen_bot'... [INFO] [stderr] done. [INFO] running `"git" "clone" "work/cache/sources/gh/PurpleMyst/oxygen_bot" "work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/PurpleMyst/oxygen_bot"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/PurpleMyst/oxygen_bot'... [INFO] [stderr] done. [INFO] running `"git" "rev-parse" "HEAD"` [INFO] [stdout] d8ab96f4e52bedd44499e5daecd127b97fbfffa3 [INFO] sha for GitHub repo PurpleMyst/oxygen_bot: d8ab96f4e52bedd44499e5daecd127b97fbfffa3 [INFO] validating manifest of PurpleMyst/oxygen_bot 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 PurpleMyst/oxygen_bot 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 PurpleMyst/oxygen_bot [INFO] finished frobbing PurpleMyst/oxygen_bot [INFO] frobbed toml for PurpleMyst/oxygen_bot written to work/ex/clippy-test-run/sources/stable/gh/PurpleMyst/oxygen_bot/Cargo.toml [INFO] started frobbing PurpleMyst/oxygen_bot [INFO] finished frobbing PurpleMyst/oxygen_bot [INFO] frobbed toml for PurpleMyst/oxygen_bot written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/PurpleMyst/oxygen_bot/Cargo.toml [INFO] crate PurpleMyst/oxygen_bot 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 PurpleMyst/oxygen_bot 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/PurpleMyst/oxygen_bot:/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] 53f47d5cf51a1b32fdf9c19971132b89294b5e02da6cac1a9e289d7c2d903b38 [INFO] running `"docker" "start" "-a" "53f47d5cf51a1b32fdf9c19971132b89294b5e02da6cac1a9e289d7c2d903b38"` [INFO] [stderr] Checking libc v0.2.28 [INFO] [stderr] Checking memchr v1.0.1 [INFO] [stderr] Checking aho-corasick v0.6.3 [INFO] [stderr] Checking regex v0.2.2 [INFO] [stderr] Checking oxygen_bot v0.2.0 (/opt/crater/workdir) [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/main.rs:56:13 [INFO] [stderr] | [INFO] [stderr] 56 | sender: sender, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `sender` [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/main.rs:114:13 [INFO] [stderr] | [INFO] [stderr] 114 | factoids: factoids, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `factoids` [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/main.rs:147:13 [INFO] [stderr] | [INFO] [stderr] 147 | nickname: nickname, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `nickname` [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/main.rs:148:13 [INFO] [stderr] | [INFO] [stderr] 148 | channels: channels, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `channels` [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: using `write!()` with a format string that ends in a single newline, consider using `writeln!()` instead [INFO] [stderr] --> src/main.rs:169:9 [INFO] [stderr] | [INFO] [stderr] 169 | write!(self.stream, "{}\r\n", line).expect("Could not send to the server."); [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: redundant field names in struct initialization [INFO] [stderr] --> src/main.rs:56:13 [INFO] [stderr] | [INFO] [stderr] 56 | sender: sender, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `sender` [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/main.rs:114:13 [INFO] [stderr] | [INFO] [stderr] 114 | factoids: factoids, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `factoids` [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/main.rs:147:13 [INFO] [stderr] | [INFO] [stderr] 147 | nickname: nickname, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `nickname` [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/main.rs:148:13 [INFO] [stderr] | [INFO] [stderr] 148 | channels: channels, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `channels` [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: using `write!()` with a format string that ends in a single newline, consider using `writeln!()` instead [INFO] [stderr] --> src/main.rs:169:9 [INFO] [stderr] | [INFO] [stderr] 169 | write!(self.stream, "{}\r\n", line).expect("Could not send to the server."); [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: unneeded return statement [INFO] [stderr] --> src/main.rs:165:9 [INFO] [stderr] | [INFO] [stderr] 165 | return lines_buf.split("\r\n").map(String::from).collect(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove `return` as shown: `lines_buf.split("\r\n").map(String::from).collect()` [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:165:9 [INFO] [stderr] | [INFO] [stderr] 165 | return lines_buf.split("\r\n").map(String::from).collect(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove `return` as shown: `lines_buf.split("\r\n").map(String::from).collect()` [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: redundant pattern matching, consider using `is_none()` [INFO] [stderr] --> src/main.rs:44:16 [INFO] [stderr] | [INFO] [stderr] 44 | if let None = captures.get(1) { [INFO] [stderr] | _________- ^^^^ [INFO] [stderr] 45 | | // This happens only for PING messages AFAIK. [INFO] [stderr] 46 | | sender = Sender::Nobody; [INFO] [stderr] 47 | | } else { [INFO] [stderr] ... | [INFO] [stderr] 52 | | } [INFO] [stderr] 53 | | } [INFO] [stderr] | |_________- help: try this: `if captures.get(1).is_none()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::redundant_pattern_matching)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stderr] [INFO] [stderr] warning: single-character string constant used as pattern [INFO] [stderr] --> src/main.rs:68:33 [INFO] [stderr] | [INFO] [stderr] 68 | if part.starts_with(":") { [INFO] [stderr] | ^^^ help: try using a char instead: `':'` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::single_char_pattern)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern [INFO] [stderr] [INFO] [stderr] warning: single-character string constant used as pattern [INFO] [stderr] --> src/main.rs:102:40 [INFO] [stderr] | [INFO] [stderr] 102 | for line in contents.split("\n") { [INFO] [stderr] | ^^^^ help: try using a char instead: `'\n'` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern [INFO] [stderr] [INFO] [stderr] warning: single-character string constant used as pattern [INFO] [stderr] --> src/main.rs:173:43 [INFO] [stderr] | [INFO] [stderr] 173 | if !message.params[1].starts_with("$") { return; } [INFO] [stderr] | ^^^ help: try using a char instead: `'$'` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/main.rs:268:20 [INFO] [stderr] | [INFO] [stderr] 268 | if line.len() == 0 { break; } [INFO] [stderr] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `line.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: redundant pattern matching, consider using `is_none()` [INFO] [stderr] --> src/main.rs:44:16 [INFO] [stderr] | [INFO] [stderr] 44 | if let None = captures.get(1) { [INFO] [stderr] | _________- ^^^^ [INFO] [stderr] 45 | | // This happens only for PING messages AFAIK. [INFO] [stderr] 46 | | sender = Sender::Nobody; [INFO] [stderr] 47 | | } else { [INFO] [stderr] ... | [INFO] [stderr] 52 | | } [INFO] [stderr] 53 | | } [INFO] [stderr] | |_________- help: try this: `if captures.get(1).is_none()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::redundant_pattern_matching)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stderr] [INFO] [stderr] warning: single-character string constant used as pattern [INFO] [stderr] --> src/main.rs:68:33 [INFO] [stderr] | [INFO] [stderr] 68 | if part.starts_with(":") { [INFO] [stderr] | ^^^ help: try using a char instead: `':'` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::single_char_pattern)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern [INFO] [stderr] [INFO] [stderr] warning: single-character string constant used as pattern [INFO] [stderr] --> src/main.rs:102:40 [INFO] [stderr] | [INFO] [stderr] 102 | for line in contents.split("\n") { [INFO] [stderr] | ^^^^ help: try using a char instead: `'\n'` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern [INFO] [stderr] [INFO] [stderr] warning: single-character string constant used as pattern [INFO] [stderr] --> src/main.rs:173:43 [INFO] [stderr] | [INFO] [stderr] 173 | if !message.params[1].starts_with("$") { return; } [INFO] [stderr] | ^^^ help: try using a char instead: `'$'` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/main.rs:268:20 [INFO] [stderr] | [INFO] [stderr] 268 | if line.len() == 0 { break; } [INFO] [stderr] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `line.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] Finished dev [unoptimized + debuginfo] target(s) in 5.93s [INFO] running `"docker" "inspect" "53f47d5cf51a1b32fdf9c19971132b89294b5e02da6cac1a9e289d7c2d903b38"` [INFO] running `"docker" "rm" "-f" "53f47d5cf51a1b32fdf9c19971132b89294b5e02da6cac1a9e289d7c2d903b38"` [INFO] [stdout] 53f47d5cf51a1b32fdf9c19971132b89294b5e02da6cac1a9e289d7c2d903b38