[INFO] updating cached repository GodTamIt/diffsim [INFO] running `"git" "fetch" "--all"` [INFO] [stdout] Fetching origin [INFO] [stderr] From git://github.com/GodTamIt/diffsim [INFO] [stderr] * branch HEAD -> FETCH_HEAD [INFO] running `"git" "clone" "work/cache/sources/gh/GodTamIt/diffsim" "work/ex/clippy-test-run/sources/stable/gh/GodTamIt/diffsim"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable/gh/GodTamIt/diffsim'... [INFO] [stderr] done. [INFO] running `"git" "clone" "work/cache/sources/gh/GodTamIt/diffsim" "work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/GodTamIt/diffsim"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/GodTamIt/diffsim'... [INFO] [stderr] done. [INFO] running `"git" "rev-parse" "HEAD"` [INFO] [stdout] 2ca501143188ba8d3a9f273837ab78bae6f50bdd [INFO] sha for GitHub repo GodTamIt/diffsim: 2ca501143188ba8d3a9f273837ab78bae6f50bdd [INFO] validating manifest of GodTamIt/diffsim 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 GodTamIt/diffsim 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 GodTamIt/diffsim [INFO] finished frobbing GodTamIt/diffsim [INFO] frobbed toml for GodTamIt/diffsim written to work/ex/clippy-test-run/sources/stable/gh/GodTamIt/diffsim/Cargo.toml [INFO] started frobbing GodTamIt/diffsim [INFO] finished frobbing GodTamIt/diffsim [INFO] frobbed toml for GodTamIt/diffsim written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/GodTamIt/diffsim/Cargo.toml [INFO] crate GodTamIt/diffsim 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 GodTamIt/diffsim against stable for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-4/stable:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable/gh/GodTamIt/diffsim:/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] 046d9fc6340c5374e48da607cfc2954c6d2ef684048555525caee0b9fc51fe7f [INFO] running `"docker" "start" "-a" "046d9fc6340c5374e48da607cfc2954c6d2ef684048555525caee0b9fc51fe7f"` [INFO] [stderr] Compiling unicode-segmentation v1.2.0 [INFO] [stderr] Checking difflib v0.2.0 [INFO] [stderr] Compiling term_size v0.3.0 [INFO] [stderr] Compiling atty v0.2.2 [INFO] [stderr] Compiling textwrap v0.7.0 [INFO] [stderr] Compiling clap v2.26.0 [INFO] [stderr] Compiling diffsim v0.1.0 (/opt/crater/workdir) [INFO] [stderr] warning: unused imports: `damerau_levenshtein`, `jaro`, `osa_distance` [INFO] [stderr] --> src/commands.rs:8:14 [INFO] [stderr] | [INFO] [stderr] 8 | use strsim::{osa_distance, damerau_levenshtein, jaro}; [INFO] [stderr] | ^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^ ^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(unused_imports)] on by default [INFO] [stderr] [INFO] [stderr] warning: unused imports: `damerau_levenshtein`, `jaro`, `osa_distance` [INFO] [stderr] --> src/commands.rs:8:14 [INFO] [stderr] | [INFO] [stderr] 8 | use strsim::{osa_distance, damerau_levenshtein, jaro}; [INFO] [stderr] | ^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^ ^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(unused_imports)] on by default [INFO] [stderr] [INFO] [stderr] warning: you seem to be trying to match on a boolean expression [INFO] [stderr] --> src/commands.rs:50:29 [INFO] [stderr] | [INFO] [stderr] 50 | let ratio = match in_mem { [INFO] [stderr] | _____________________________^ [INFO] [stderr] 51 | | true => get_ratio(file_to_contents_map.get(file1).unwrap(), file_to_contents_map.get(file2).unwrap())?, [INFO] [stderr] 52 | | false => get_ratio(&utils::read_file_to_end(file1)?, &utils::read_file_to_end(file2)?)?, [INFO] [stderr] 53 | | }; [INFO] [stderr] | |_________________^ help: consider using an if/else expression: `if in_mem { get_ratio(file_to_contents_map.get(file1).unwrap(), file_to_contents_map.get(file2).unwrap())? } else { get_ratio(&utils::read_file_to_end(file1)?, &utils::read_file_to_end(file2)?)? }` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::match_bool)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_bool [INFO] [stderr] [INFO] [stderr] warning: called `.get().unwrap()` on a HashMap. Using `[]` is more clear and more concise [INFO] [stderr] --> src/commands.rs:51:40 [INFO] [stderr] | [INFO] [stderr] 51 | true => get_ratio(file_to_contents_map.get(file1).unwrap(), file_to_contents_map.get(file2).unwrap())?, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&file_to_contents_map[file1]` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::get_unwrap)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_unwrap [INFO] [stderr] [INFO] [stderr] warning: called `.get().unwrap()` on a HashMap. Using `[]` is more clear and more concise [INFO] [stderr] --> src/commands.rs:51:82 [INFO] [stderr] | [INFO] [stderr] 51 | true => get_ratio(file_to_contents_map.get(file1).unwrap(), file_to_contents_map.get(file2).unwrap())?, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&file_to_contents_map[file2]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_unwrap [INFO] [stderr] [INFO] [stderr] warning: you seem to be trying to match on a boolean expression [INFO] [stderr] --> src/commands.rs:105:29 [INFO] [stderr] | [INFO] [stderr] 105 | let ratio = match in_mem { [INFO] [stderr] | _____________________________^ [INFO] [stderr] 106 | | true => get_ratio(file_to_contents_map.get(file1).unwrap(), file_to_contents_map.get(file2).unwrap())?, [INFO] [stderr] 107 | | false => get_ratio(&utils::read_file_to_end(file1)?, &utils::read_file_to_end(file2)?)?, [INFO] [stderr] 108 | | }; [INFO] [stderr] | |_________________^ help: consider using an if/else expression: `if in_mem { get_ratio(file_to_contents_map.get(file1).unwrap(), file_to_contents_map.get(file2).unwrap())? } else { get_ratio(&utils::read_file_to_end(file1)?, &utils::read_file_to_end(file2)?)? }` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_bool [INFO] [stderr] [INFO] [stderr] warning: called `.get().unwrap()` on a HashMap. Using `[]` is more clear and more concise [INFO] [stderr] --> src/commands.rs:106:40 [INFO] [stderr] | [INFO] [stderr] 106 | true => get_ratio(file_to_contents_map.get(file1).unwrap(), file_to_contents_map.get(file2).unwrap())?, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&file_to_contents_map[file1]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_unwrap [INFO] [stderr] [INFO] [stderr] warning: called `.get().unwrap()` on a HashMap. Using `[]` is more clear and more concise [INFO] [stderr] --> src/commands.rs:106:82 [INFO] [stderr] | [INFO] [stderr] 106 | true => get_ratio(file_to_contents_map.get(file1).unwrap(), file_to_contents_map.get(file2).unwrap())?, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&file_to_contents_map[file2]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_unwrap [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/utils.rs:36:44 [INFO] [stderr] | [INFO] [stderr] 36 | pub fn file_list_to_hashmap<'a>(file_list: &'a Vec, map: &mut HashMap<&'a String, String>) -> io::Result<()> { [INFO] [stderr] | ^^^^^^^^^^^^^^^ help: change this to: `&[String]` [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: parameter of type `HashMap` should be generalized over different hashers [INFO] [stderr] --> src/utils.rs:36:71 [INFO] [stderr] | [INFO] [stderr] 36 | pub fn file_list_to_hashmap<'a>(file_list: &'a Vec, map: &mut HashMap<&'a String, String>) -> io::Result<()> { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::implicit_hasher)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_hasher [INFO] [stderr] help: consider adding a type parameter [INFO] [stderr] | [INFO] [stderr] 36 | pub fn file_list_to_hashmap<'a, S: ::std::hash::BuildHasher>(file_list: &'a Vec, map: &mut HashMap<&'a String, String, S>) -> io::Result<()> { [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/utils.rs:45:31 [INFO] [stderr] | [INFO] [stderr] 45 | pub fn print_results(results: &Vec<(&String, &String, f32)>) -> io::Result<()> { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `&[(&String, &String, f32)]` [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: you seem to be trying to match on a boolean expression [INFO] [stderr] --> src/commands.rs:50:29 [INFO] [stderr] | [INFO] [stderr] 50 | let ratio = match in_mem { [INFO] [stderr] | _____________________________^ [INFO] [stderr] 51 | | true => get_ratio(file_to_contents_map.get(file1).unwrap(), file_to_contents_map.get(file2).unwrap())?, [INFO] [stderr] 52 | | false => get_ratio(&utils::read_file_to_end(file1)?, &utils::read_file_to_end(file2)?)?, [INFO] [stderr] 53 | | }; [INFO] [stderr] | |_________________^ help: consider using an if/else expression: `if in_mem { get_ratio(file_to_contents_map.get(file1).unwrap(), file_to_contents_map.get(file2).unwrap())? } else { get_ratio(&utils::read_file_to_end(file1)?, &utils::read_file_to_end(file2)?)? }` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::match_bool)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_bool [INFO] [stderr] [INFO] [stderr] warning: called `.get().unwrap()` on a HashMap. Using `[]` is more clear and more concise [INFO] [stderr] --> src/commands.rs:51:40 [INFO] [stderr] | [INFO] [stderr] 51 | true => get_ratio(file_to_contents_map.get(file1).unwrap(), file_to_contents_map.get(file2).unwrap())?, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&file_to_contents_map[file1]` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::get_unwrap)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_unwrap [INFO] [stderr] [INFO] [stderr] warning: called `.get().unwrap()` on a HashMap. Using `[]` is more clear and more concise [INFO] [stderr] --> src/commands.rs:51:82 [INFO] [stderr] | [INFO] [stderr] 51 | true => get_ratio(file_to_contents_map.get(file1).unwrap(), file_to_contents_map.get(file2).unwrap())?, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&file_to_contents_map[file2]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_unwrap [INFO] [stderr] [INFO] [stderr] warning: you seem to be trying to match on a boolean expression [INFO] [stderr] --> src/commands.rs:105:29 [INFO] [stderr] | [INFO] [stderr] 105 | let ratio = match in_mem { [INFO] [stderr] | _____________________________^ [INFO] [stderr] 106 | | true => get_ratio(file_to_contents_map.get(file1).unwrap(), file_to_contents_map.get(file2).unwrap())?, [INFO] [stderr] 107 | | false => get_ratio(&utils::read_file_to_end(file1)?, &utils::read_file_to_end(file2)?)?, [INFO] [stderr] 108 | | }; [INFO] [stderr] | |_________________^ help: consider using an if/else expression: `if in_mem { get_ratio(file_to_contents_map.get(file1).unwrap(), file_to_contents_map.get(file2).unwrap())? } else { get_ratio(&utils::read_file_to_end(file1)?, &utils::read_file_to_end(file2)?)? }` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_bool [INFO] [stderr] [INFO] [stderr] warning: called `.get().unwrap()` on a HashMap. Using `[]` is more clear and more concise [INFO] [stderr] --> src/commands.rs:106:40 [INFO] [stderr] | [INFO] [stderr] 106 | true => get_ratio(file_to_contents_map.get(file1).unwrap(), file_to_contents_map.get(file2).unwrap())?, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&file_to_contents_map[file1]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_unwrap [INFO] [stderr] [INFO] [stderr] warning: called `.get().unwrap()` on a HashMap. Using `[]` is more clear and more concise [INFO] [stderr] --> src/commands.rs:106:82 [INFO] [stderr] | [INFO] [stderr] 106 | true => get_ratio(file_to_contents_map.get(file1).unwrap(), file_to_contents_map.get(file2).unwrap())?, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&file_to_contents_map[file2]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_unwrap [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/utils.rs:36:44 [INFO] [stderr] | [INFO] [stderr] 36 | pub fn file_list_to_hashmap<'a>(file_list: &'a Vec, map: &mut HashMap<&'a String, String>) -> io::Result<()> { [INFO] [stderr] | ^^^^^^^^^^^^^^^ help: change this to: `&[String]` [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: parameter of type `HashMap` should be generalized over different hashers [INFO] [stderr] --> src/utils.rs:36:71 [INFO] [stderr] | [INFO] [stderr] 36 | pub fn file_list_to_hashmap<'a>(file_list: &'a Vec, map: &mut HashMap<&'a String, String>) -> io::Result<()> { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::implicit_hasher)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_hasher [INFO] [stderr] help: consider adding a type parameter [INFO] [stderr] | [INFO] [stderr] 36 | pub fn file_list_to_hashmap<'a, S: ::std::hash::BuildHasher>(file_list: &'a Vec, map: &mut HashMap<&'a String, String, S>) -> io::Result<()> { [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/utils.rs:45:31 [INFO] [stderr] | [INFO] [stderr] 45 | pub fn print_results(results: &Vec<(&String, &String, f32)>) -> io::Result<()> { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `&[(&String, &String, f32)]` [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] Finished dev [unoptimized + debuginfo] target(s) in 23.51s [INFO] running `"docker" "inspect" "046d9fc6340c5374e48da607cfc2954c6d2ef684048555525caee0b9fc51fe7f"` [INFO] running `"docker" "rm" "-f" "046d9fc6340c5374e48da607cfc2954c6d2ef684048555525caee0b9fc51fe7f"` [INFO] [stdout] 046d9fc6340c5374e48da607cfc2954c6d2ef684048555525caee0b9fc51fe7f