[INFO] updating cached repository Matt8898/junkedit [INFO] running `"git" "fetch" "--all"` [INFO] [stdout] Fetching origin [INFO] [stderr] From git://github.com/Matt8898/junkedit [INFO] [stderr] * branch HEAD -> FETCH_HEAD [INFO] running `"git" "clone" "work/cache/sources/gh/Matt8898/junkedit" "work/ex/clippy-test-run/sources/stable/gh/Matt8898/junkedit"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable/gh/Matt8898/junkedit'... [INFO] [stderr] done. [INFO] running `"git" "clone" "work/cache/sources/gh/Matt8898/junkedit" "work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/Matt8898/junkedit"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/Matt8898/junkedit'... [INFO] [stderr] done. [INFO] running `"git" "rev-parse" "HEAD"` [INFO] [stdout] 69292d0442ab847701ef137f077d7f822c238f80 [INFO] sha for GitHub repo Matt8898/junkedit: 69292d0442ab847701ef137f077d7f822c238f80 [INFO] validating manifest of Matt8898/junkedit 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 Matt8898/junkedit 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 Matt8898/junkedit [INFO] finished frobbing Matt8898/junkedit [INFO] frobbed toml for Matt8898/junkedit written to work/ex/clippy-test-run/sources/stable/gh/Matt8898/junkedit/Cargo.toml [INFO] started frobbing Matt8898/junkedit [INFO] finished frobbing Matt8898/junkedit [INFO] frobbed toml for Matt8898/junkedit written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/Matt8898/junkedit/Cargo.toml [INFO] crate Matt8898/junkedit 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 Matt8898/junkedit 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/Matt8898/junkedit:/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] 5ebddfae6ff23748251ce7760dbe76a02222ccb903b89c04707cb6bf52c1bca9 [INFO] running `"docker" "start" "-a" "5ebddfae6ff23748251ce7760dbe76a02222ccb903b89c04707cb6bf52c1bca9"` [INFO] [stderr] Checking junkedit v0.1.0 (/opt/crater/workdir) [INFO] [stderr] warning: Consider removing unnecessary double parentheses [INFO] [stderr] --> src/main.rs:27:13 [INFO] [stderr] | [INFO] [stderr] 27 | buf[((0x1dc + (slot * 12)))] = id_write[1]; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::double_parens)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_parens [INFO] [stderr] [INFO] [stderr] warning: Consider removing unnecessary double parentheses [INFO] [stderr] --> src/main.rs:28:13 [INFO] [stderr] | [INFO] [stderr] 28 | buf[((0x1dc + (slot * 12) + 1))] = id_write[0]; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_parens [INFO] [stderr] [INFO] [stderr] warning: Consider removing unnecessary double parentheses [INFO] [stderr] --> src/main.rs:30:13 [INFO] [stderr] | [INFO] [stderr] 30 | buf[((0x1dc + (slot * 12) + 2))] = amount_write[0]; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_parens [INFO] [stderr] [INFO] [stderr] warning: Consider removing unnecessary double parentheses [INFO] [stderr] --> src/main.rs:31:13 [INFO] [stderr] | [INFO] [stderr] 31 | buf[((0x1dc + (slot * 12) + 3))] = amount_write[1]; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_parens [INFO] [stderr] [INFO] [stderr] warning: Consider removing unnecessary double parentheses [INFO] [stderr] --> src/main.rs:32:13 [INFO] [stderr] | [INFO] [stderr] 32 | buf[((0x1dc + (slot * 12) + 4))] = amount_write[2]; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_parens [INFO] [stderr] [INFO] [stderr] warning: Consider removing unnecessary double parentheses [INFO] [stderr] --> src/main.rs:33:13 [INFO] [stderr] | [INFO] [stderr] 33 | buf[((0x1dc + (slot * 12) + 5))] = amount_write[3]; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_parens [INFO] [stderr] [INFO] [stderr] warning: unneeded return statement [INFO] [stderr] --> src/main.rs:40:5 [INFO] [stderr] | [INFO] [stderr] 40 | / return stdin [INFO] [stderr] 41 | | .lock() [INFO] [stderr] 42 | | .lines() [INFO] [stderr] 43 | | .next() [INFO] [stderr] 44 | | .expect("there was no next line") [INFO] [stderr] 45 | | .expect("the line could not be read"); [INFO] [stderr] | |__________________________________________________^ [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] help: remove `return` as shown [INFO] [stderr] | [INFO] [stderr] 40 | stdin [INFO] [stderr] 41 | .lock() [INFO] [stderr] 42 | .lines() [INFO] [stderr] 43 | .next() [INFO] [stderr] 44 | .expect("there was no next line") [INFO] [stderr] 45 | .expect("the line could not be read") [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: Consider removing unnecessary double parentheses [INFO] [stderr] --> src/main.rs:27:13 [INFO] [stderr] | [INFO] [stderr] 27 | buf[((0x1dc + (slot * 12)))] = id_write[1]; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::double_parens)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_parens [INFO] [stderr] [INFO] [stderr] warning: Consider removing unnecessary double parentheses [INFO] [stderr] --> src/main.rs:28:13 [INFO] [stderr] | [INFO] [stderr] 28 | buf[((0x1dc + (slot * 12) + 1))] = id_write[0]; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_parens [INFO] [stderr] [INFO] [stderr] warning: Consider removing unnecessary double parentheses [INFO] [stderr] --> src/main.rs:30:13 [INFO] [stderr] | [INFO] [stderr] 30 | buf[((0x1dc + (slot * 12) + 2))] = amount_write[0]; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_parens [INFO] [stderr] [INFO] [stderr] warning: Consider removing unnecessary double parentheses [INFO] [stderr] --> src/main.rs:31:13 [INFO] [stderr] | [INFO] [stderr] 31 | buf[((0x1dc + (slot * 12) + 3))] = amount_write[1]; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_parens [INFO] [stderr] [INFO] [stderr] warning: Consider removing unnecessary double parentheses [INFO] [stderr] --> src/main.rs:32:13 [INFO] [stderr] | [INFO] [stderr] 32 | buf[((0x1dc + (slot * 12) + 4))] = amount_write[2]; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_parens [INFO] [stderr] [INFO] [stderr] warning: Consider removing unnecessary double parentheses [INFO] [stderr] --> src/main.rs:33:13 [INFO] [stderr] | [INFO] [stderr] 33 | buf[((0x1dc + (slot * 12) + 5))] = amount_write[3]; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_parens [INFO] [stderr] [INFO] [stderr] warning: unneeded return statement [INFO] [stderr] --> src/main.rs:40:5 [INFO] [stderr] | [INFO] [stderr] 40 | / return stdin [INFO] [stderr] 41 | | .lock() [INFO] [stderr] 42 | | .lines() [INFO] [stderr] 43 | | .next() [INFO] [stderr] 44 | | .expect("there was no next line") [INFO] [stderr] 45 | | .expect("the line could not be read"); [INFO] [stderr] | |__________________________________________________^ [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] help: remove `return` as shown [INFO] [stderr] | [INFO] [stderr] 40 | stdin [INFO] [stderr] 41 | .lock() [INFO] [stderr] 42 | .lines() [INFO] [stderr] 43 | .next() [INFO] [stderr] 44 | .expect("there was no next line") [INFO] [stderr] 45 | .expect("the line could not be read") [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: single-character string constant used as pattern [INFO] [stderr] --> src/main.rs:12:28 [INFO] [stderr] | [INFO] [stderr] warning: single-character string constant used as pattern [INFO] [stderr] 12 | for line in data.split("\n") { [INFO] [stderr] | ^^^^ help: try using a char instead: `'\n'` [INFO] [stderr] --> src/main.rs:12:28 [INFO] [stderr] | [INFO] [stderr] 12 | for line in data.split("\n") { [INFO] [stderr] | ^^^^ help: try using a char instead: `'\n'` [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] = note: #[warn(clippy::single_char_pattern)] on by default [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: the function has a cyclomatic complexity of 27 [INFO] [stderr] --> src/main.rs:49:1 [INFO] [stderr] | [INFO] [stderr] 49 | / fn main() { [INFO] [stderr] 50 | | let args: Vec = env::args().collect(); [INFO] [stderr] 51 | | let mut name_map = HashMap::new(); [INFO] [stderr] 52 | | parse_data(&mut name_map); [INFO] [stderr] ... | [INFO] [stderr] 274 | | } [INFO] [stderr] 275 | | } [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] warning: the function has a cyclomatic complexity of 27 [INFO] [stderr] --> src/main.rs:49:1 [INFO] [stderr] | [INFO] [stderr] 49 | / fn main() { [INFO] [stderr] 50 | | let args: Vec = env::args().collect(); [INFO] [stderr] 51 | | let mut name_map = HashMap::new(); [INFO] [stderr] 52 | | parse_data(&mut name_map); [INFO] [stderr] ... | [INFO] [stderr] 274 | | } [INFO] [stderr] 275 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::cyclomatic_complexity)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cyclomatic_complexity [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] [INFO] [stderr] warning: `if _ { .. } else { .. }` is an expression [INFO] [stderr] --> src/main.rs:115:21 [INFO] [stderr] | [INFO] [stderr] 115 | / let mut id: u16 = 0; [INFO] [stderr] 116 | | if number { [INFO] [stderr] 117 | | println!("The item you selected is: {}, please enter the amount:", name_map[&num]); [INFO] [stderr] 118 | | id = match name_map.get(&num) { [INFO] [stderr] ... | [INFO] [stderr] 137 | | } [INFO] [stderr] 138 | | } [INFO] [stderr] | |_____________________^ [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] help: it is more idiomatic to write [INFO] [stderr] | [INFO] [stderr] 115 | let id = if number { ..; match name_map.get(&num) { [INFO] [stderr] 116 | Some(_) => { [INFO] [stderr] 117 | found = true; [INFO] [stderr] 118 | num [INFO] [stderr] 119 | }, [INFO] [stderr] 120 | None => { [INFO] [stderr] ... [INFO] [stderr] [INFO] [stderr] warning: single-character string constant used as pattern [INFO] [stderr] --> src/main.rs:173:56 [INFO] [stderr] | [INFO] [stderr] 173 | let id_strings: Vec<&str> = line.split(",").collect(); [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: `if _ { .. } else { .. }` is an expression [INFO] [stderr] --> src/main.rs:186:21 [INFO] [stderr] | [INFO] [stderr] 186 | / let mut item_id = 0; [INFO] [stderr] 187 | | if number { [INFO] [stderr] 188 | | item_id = match name_map.get(&num) { [INFO] [stderr] 189 | | Some(_) => { [INFO] [stderr] ... | [INFO] [stderr] 206 | | } [INFO] [stderr] 207 | | } [INFO] [stderr] | |_____________________^ [INFO] [stderr] | [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] help: it is more idiomatic to write [INFO] [stderr] | [INFO] [stderr] 186 | let item_id = if number { match name_map.get(&num) { [INFO] [stderr] 187 | Some(_) => { [INFO] [stderr] 188 | found = true; [INFO] [stderr] 189 | num [INFO] [stderr] 190 | }, [INFO] [stderr] 191 | None => { [INFO] [stderr] ... [INFO] [stderr] [INFO] [stderr] warning: `if _ { .. } else { .. }` is an expression [INFO] [stderr] --> src/main.rs:115:21 [INFO] [stderr] | [INFO] [stderr] 115 | / let mut id: u16 = 0; [INFO] [stderr] 116 | | if number { [INFO] [stderr] 117 | | println!("The item you selected is: {}, please enter the amount:", name_map[&num]); [INFO] [stderr] 118 | | id = match name_map.get(&num) { [INFO] [stderr] ... | [INFO] [stderr] 137 | | } [INFO] [stderr] 138 | | } [INFO] [stderr] | |_____________________^ [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] help: it is more idiomatic to write [INFO] [stderr] | [INFO] [stderr] 115 | let id = if number { ..; match name_map.get(&num) { [INFO] [stderr] 116 | Some(_) => { [INFO] [stderr] 117 | found = true; [INFO] [stderr] 118 | num [INFO] [stderr] 119 | }, [INFO] [stderr] 120 | None => { [INFO] [stderr] ... [INFO] [stderr] [INFO] [stderr] warning: the variable `index` is used as a loop counter. Consider using `for (index, item) in ids.enumerate()` or similar iterators [INFO] [stderr] --> src/main.rs:260:27 [INFO] [stderr] | [INFO] [stderr] 260 | for id in ids { [INFO] [stderr] | ^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::explicit_counter_loop)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stderr] [INFO] [stderr] warning: single-character string constant used as pattern [INFO] [stderr] --> src/main.rs:173:56 [INFO] [stderr] | [INFO] [stderr] 173 | let id_strings: Vec<&str> = line.split(",").collect(); [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: `if _ { .. } else { .. }` is an expression [INFO] [stderr] --> src/main.rs:186:21 [INFO] [stderr] | [INFO] [stderr] 186 | / let mut item_id = 0; [INFO] [stderr] 187 | | if number { [INFO] [stderr] 188 | | item_id = match name_map.get(&num) { [INFO] [stderr] 189 | | Some(_) => { [INFO] [stderr] ... | [INFO] [stderr] 206 | | } [INFO] [stderr] 207 | | } [INFO] [stderr] | |_____________________^ [INFO] [stderr] | [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] help: it is more idiomatic to write [INFO] [stderr] | [INFO] [stderr] 186 | let item_id = if number { match name_map.get(&num) { [INFO] [stderr] 187 | Some(_) => { [INFO] [stderr] 188 | found = true; [INFO] [stderr] 189 | num [INFO] [stderr] 190 | }, [INFO] [stderr] 191 | None => { [INFO] [stderr] ... [INFO] [stderr] [INFO] [stderr] warning: the variable `index` is used as a loop counter. Consider using `for (index, item) in ids.enumerate()` or similar iterators [INFO] [stderr] --> src/main.rs:260:27 [INFO] [stderr] | [INFO] [stderr] 260 | for id in ids { [INFO] [stderr] | ^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::explicit_counter_loop)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stderr] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 0.64s [INFO] running `"docker" "inspect" "5ebddfae6ff23748251ce7760dbe76a02222ccb903b89c04707cb6bf52c1bca9"` [INFO] running `"docker" "rm" "-f" "5ebddfae6ff23748251ce7760dbe76a02222ccb903b89c04707cb6bf52c1bca9"` [INFO] [stdout] 5ebddfae6ff23748251ce7760dbe76a02222ccb903b89c04707cb6bf52c1bca9