[INFO] updating cached repository Hand-of-Cthulhu/quiz_file_creator [INFO] running `"git" "fetch" "--all"` [INFO] [stdout] Fetching origin [INFO] [stderr] From git://github.com/Hand-of-Cthulhu/quiz_file_creator [INFO] [stderr] * branch HEAD -> FETCH_HEAD [INFO] running `"git" "clone" "work/cache/sources/gh/Hand-of-Cthulhu/quiz_file_creator" "work/ex/clippy-test-run/sources/stable/gh/Hand-of-Cthulhu/quiz_file_creator"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable/gh/Hand-of-Cthulhu/quiz_file_creator'... [INFO] [stderr] done. [INFO] running `"git" "clone" "work/cache/sources/gh/Hand-of-Cthulhu/quiz_file_creator" "work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/Hand-of-Cthulhu/quiz_file_creator"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/Hand-of-Cthulhu/quiz_file_creator'... [INFO] [stderr] done. [INFO] running `"git" "rev-parse" "HEAD"` [INFO] [stdout] b157581b3c5d4314f1bf8afacd4951ba3f10cf78 [INFO] sha for GitHub repo Hand-of-Cthulhu/quiz_file_creator: b157581b3c5d4314f1bf8afacd4951ba3f10cf78 [INFO] validating manifest of Hand-of-Cthulhu/quiz_file_creator 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 Hand-of-Cthulhu/quiz_file_creator 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 Hand-of-Cthulhu/quiz_file_creator [INFO] finished frobbing Hand-of-Cthulhu/quiz_file_creator [INFO] frobbed toml for Hand-of-Cthulhu/quiz_file_creator written to work/ex/clippy-test-run/sources/stable/gh/Hand-of-Cthulhu/quiz_file_creator/Cargo.toml [INFO] started frobbing Hand-of-Cthulhu/quiz_file_creator [INFO] finished frobbing Hand-of-Cthulhu/quiz_file_creator [INFO] frobbed toml for Hand-of-Cthulhu/quiz_file_creator written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/Hand-of-Cthulhu/quiz_file_creator/Cargo.toml [INFO] crate Hand-of-Cthulhu/quiz_file_creator 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 Hand-of-Cthulhu/quiz_file_creator against stable for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-5/stable:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable/gh/Hand-of-Cthulhu/quiz_file_creator:/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] 5ff7e4932735c2d36dca2b49bd29eb38fe712ce42c5ac016665ccdb4306f8209 [INFO] running `"docker" "start" "-a" "5ff7e4932735c2d36dca2b49bd29eb38fe712ce42c5ac016665ccdb4306f8209"` [INFO] [stderr] Checking nix v0.5.1 [INFO] [stderr] Checking rustyline v1.0.0 [INFO] [stderr] Checking quiz_file_creator v0.1.0 (/opt/crater/workdir) [INFO] [stderr] warning: unused import: `regex::Regex` [INFO] [stderr] --> src/main.rs:6:5 [INFO] [stderr] | [INFO] [stderr] 6 | use regex::Regex; [INFO] [stderr] | ^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(unused_imports)] on by default [INFO] [stderr] [INFO] [stderr] warning: unused import: `std::io` [INFO] [stderr] --> src/main.rs:9:5 [INFO] [stderr] | [INFO] [stderr] 9 | use std::io; [INFO] [stderr] | ^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: unused import: `regex::Regex` [INFO] [stderr] --> src/main.rs:6:5 [INFO] [stderr] | [INFO] [stderr] 6 | use regex::Regex; [INFO] [stderr] | ^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(unused_imports)] on by default [INFO] [stderr] [INFO] [stderr] warning: unused import: `std::io` [INFO] [stderr] --> src/main.rs:9:5 [INFO] [stderr] | [INFO] [stderr] 9 | use std::io; [INFO] [stderr] | ^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/main.rs:11:52 [INFO] [stderr] | [INFO] [stderr] 11 | fn print_default_screen(question_num: usize, data: &Vec>, status: &str, prev_cmd: &str) { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ help: change this to: `&[Vec]` [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 `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/main.rs:35:42 [INFO] [stderr] | [INFO] [stderr] 35 | fn print_list(question_num: usize, data: &Vec>, status: &str, prev_cmd: &str) { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ help: change this to: `&[Vec]` [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 `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/main.rs:60:61 [INFO] [stderr] | [INFO] [stderr] 60 | fn save_file>(file_path: P, data: &Vec>) { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ help: change this to: `&[Vec]` [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: unused `std::result::Result` that must be used [INFO] [stderr] --> src/main.rs:61:5 [INFO] [stderr] | [INFO] [stderr] 61 | fs::copy(&file_path, file_path.as_ref().to_str().unwrap().to_owned() + ".bak");//.expect("File backup failed"); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(unused_must_use)] on by default [INFO] [stderr] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stderr] [INFO] [stderr] warning: use of `unwrap_or` followed by a function call [INFO] [stderr] --> src/main.rs:71:55 [INFO] [stderr] | [INFO] [stderr] 71 | let quiz_data_file_path = std::env::args().nth(1).unwrap_or("QuizData.dat".to_owned()); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| "QuizData.dat".to_owned())` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::or_fun_call)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: use of `unwrap_or` followed by a function call [INFO] [stderr] --> src/main.rs:73:57 [INFO] [stderr] | [INFO] [stderr] 73 | let data = fs::read_to_string(&quiz_data_file_path).unwrap_or("1+1\n5\n9\n1337\n2".to_owned()) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|_| "1+1\n5\n9\n1337\n2".to_owned())` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: useless use of `format!` [INFO] [stderr] --> src/main.rs:159:30 [INFO] [stderr] | [INFO] [stderr] 159 | status = format!("Can't remove last question"); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `"Can't remove last question".to_string()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::useless_format)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stderr] [INFO] [stderr] warning: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/main.rs:11:52 [INFO] [stderr] | [INFO] [stderr] 11 | fn print_default_screen(question_num: usize, data: &Vec>, status: &str, prev_cmd: &str) { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ help: change this to: `&[Vec]` [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 `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/main.rs:35:42 [INFO] [stderr] | [INFO] [stderr] 35 | fn print_list(question_num: usize, data: &Vec>, status: &str, prev_cmd: &str) { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ help: change this to: `&[Vec]` [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 `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/main.rs:60:61 [INFO] [stderr] | [INFO] [stderr] 60 | fn save_file>(file_path: P, data: &Vec>) { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ help: change this to: `&[Vec]` [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: unused `std::result::Result` that must be used [INFO] [stderr] --> src/main.rs:61:5 [INFO] [stderr] | [INFO] [stderr] 61 | fs::copy(&file_path, file_path.as_ref().to_str().unwrap().to_owned() + ".bak");//.expect("File backup failed"); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(unused_must_use)] on by default [INFO] [stderr] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stderr] [INFO] [stderr] warning: use of `unwrap_or` followed by a function call [INFO] [stderr] --> src/main.rs:71:55 [INFO] [stderr] | [INFO] [stderr] 71 | let quiz_data_file_path = std::env::args().nth(1).unwrap_or("QuizData.dat".to_owned()); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| "QuizData.dat".to_owned())` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::or_fun_call)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: use of `unwrap_or` followed by a function call [INFO] [stderr] --> src/main.rs:73:57 [INFO] [stderr] | [INFO] [stderr] 73 | let data = fs::read_to_string(&quiz_data_file_path).unwrap_or("1+1\n5\n9\n1337\n2".to_owned()) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|_| "1+1\n5\n9\n1337\n2".to_owned())` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: useless use of `format!` [INFO] [stderr] --> src/main.rs:159:30 [INFO] [stderr] | [INFO] [stderr] 159 | status = format!("Can't remove last question"); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `"Can't remove last question".to_string()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::useless_format)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stderr] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 6.63s [INFO] running `"docker" "inspect" "5ff7e4932735c2d36dca2b49bd29eb38fe712ce42c5ac016665ccdb4306f8209"` [INFO] running `"docker" "rm" "-f" "5ff7e4932735c2d36dca2b49bd29eb38fe712ce42c5ac016665ccdb4306f8209"` [INFO] [stdout] 5ff7e4932735c2d36dca2b49bd29eb38fe712ce42c5ac016665ccdb4306f8209