[INFO] updating cached repository joel1st/heatmap_rust [INFO] running `"git" "fetch" "--all"` [INFO] [stdout] Fetching origin [INFO] [stderr] From git://github.com/joel1st/heatmap_rust [INFO] [stderr] * branch HEAD -> FETCH_HEAD [INFO] running `"git" "clone" "work/cache/sources/gh/joel1st/heatmap_rust" "work/ex/clippy-test-run/sources/stable/gh/joel1st/heatmap_rust"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable/gh/joel1st/heatmap_rust'... [INFO] [stderr] done. [INFO] running `"git" "clone" "work/cache/sources/gh/joel1st/heatmap_rust" "work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/joel1st/heatmap_rust"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/joel1st/heatmap_rust'... [INFO] [stderr] done. [INFO] running `"git" "rev-parse" "HEAD"` [INFO] [stdout] 8833f2f163cb75fef330bf1ca7d364be19b57754 [INFO] sha for GitHub repo joel1st/heatmap_rust: 8833f2f163cb75fef330bf1ca7d364be19b57754 [INFO] validating manifest of joel1st/heatmap_rust 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 joel1st/heatmap_rust 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 joel1st/heatmap_rust [INFO] finished frobbing joel1st/heatmap_rust [INFO] frobbed toml for joel1st/heatmap_rust written to work/ex/clippy-test-run/sources/stable/gh/joel1st/heatmap_rust/Cargo.toml [INFO] started frobbing joel1st/heatmap_rust [INFO] finished frobbing joel1st/heatmap_rust [INFO] frobbed toml for joel1st/heatmap_rust written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/joel1st/heatmap_rust/Cargo.toml [INFO] crate joel1st/heatmap_rust 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 joel1st/heatmap_rust against stable for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-2/stable:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable/gh/joel1st/heatmap_rust:/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] 61d6f7b5d26f626cb6a7a8b558bb06e05edeab6e46cba50cd11c2a6ff0f95c94 [INFO] running `"docker" "start" "-a" "61d6f7b5d26f626cb6a7a8b558bb06e05edeab6e46cba50cd11c2a6ff0f95c94"` [INFO] [stderr] Checking enum_primitive v0.1.1 [INFO] [stderr] Checking term_size v0.3.0 [INFO] [stderr] Checking hostname v0.1.3 [INFO] [stderr] Checking atty v0.2.2 [INFO] [stderr] Checking base64 v0.4.2 [INFO] [stderr] Checking serde_json v1.0.2 [INFO] [stderr] Checking num-rational v0.1.38 [INFO] [stderr] Checking rayon-core v1.2.1 [INFO] [stderr] Checking num v0.1.39 [INFO] [stderr] Checking png v0.8.0 [INFO] [stderr] Checking rust-crypto v0.2.36 [INFO] [stderr] Checking textwrap v0.6.0 [INFO] [stderr] Checking chrono v0.4.0 [INFO] [stderr] Checking chrono v0.3.0 [INFO] [stderr] Checking rayon v0.8.1 [INFO] [stderr] Checking clap v2.25.0 [INFO] [stderr] Checking textnonce v0.6.0 [INFO] [stderr] Checking jpeg-decoder v0.1.13 [INFO] [stderr] Checking image v0.14.0 [INFO] [stderr] Checking bson v0.9.0 [INFO] [stderr] Checking mongodb v0.3.1 [INFO] [stderr] Checking heatmap v0.1.0 (/opt/crater/workdir) [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/configuration_logic.rs:73:9 [INFO] [stderr] | [INFO] [stderr] 73 | diameter: diameter, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `diameter` [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/configuration_logic.rs:74:9 [INFO] [stderr] | [INFO] [stderr] 74 | radius: radius, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `radius` [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/configuration_logic.rs:75:9 [INFO] [stderr] | [INFO] [stderr] 75 | image_width: image_width, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `image_width` [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/configuration_logic.rs:76:9 [INFO] [stderr] | [INFO] [stderr] 76 | image_height: image_height, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `image_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/configuration_logic.rs:77:9 [INFO] [stderr] | [INFO] [stderr] 77 | file_name: file_name, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `file_name` [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/configuration_logic.rs:78:9 [INFO] [stderr] | [INFO] [stderr] 78 | color: color, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `color` [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/configuration_logic.rs:79:9 [INFO] [stderr] | [INFO] [stderr] 79 | stamp: stamp, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `stamp` [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/configuration_logic.rs:80:9 [INFO] [stderr] | [INFO] [stderr] 80 | location_source: location_source, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `location_source` [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/configuration_logic.rs:81:9 [INFO] [stderr] | [INFO] [stderr] 81 | automated: automated, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `automated` [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/configuration_logic.rs:73:9 [INFO] [stderr] | [INFO] [stderr] 73 | diameter: diameter, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `diameter` [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/configuration_logic.rs:74:9 [INFO] [stderr] | [INFO] [stderr] 74 | radius: radius, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `radius` [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/configuration_logic.rs:75:9 [INFO] [stderr] | [INFO] [stderr] 75 | image_width: image_width, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `image_width` [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/configuration_logic.rs:76:9 [INFO] [stderr] | [INFO] [stderr] 76 | image_height: image_height, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `image_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/configuration_logic.rs:77:9 [INFO] [stderr] | [INFO] [stderr] 77 | file_name: file_name, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `file_name` [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/configuration_logic.rs:78:9 [INFO] [stderr] | [INFO] [stderr] 78 | color: color, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `color` [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/configuration_logic.rs:79:9 [INFO] [stderr] | [INFO] [stderr] 79 | stamp: stamp, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `stamp` [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/configuration_logic.rs:80:9 [INFO] [stderr] | [INFO] [stderr] 80 | location_source: location_source, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `location_source` [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/configuration_logic.rs:81:9 [INFO] [stderr] | [INFO] [stderr] 81 | automated: automated, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `automated` [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: returning the result of a let binding from a block. Consider returning the expression directly. [INFO] [stderr] --> src/heatmap_logic.rs:62:5 [INFO] [stderr] | [INFO] [stderr] 62 | img [INFO] [stderr] | ^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::let_and_return)] on by default [INFO] [stderr] note: this expression can be directly returned [INFO] [stderr] --> src/heatmap_logic.rs:56:15 [INFO] [stderr] | [INFO] [stderr] 56 | let img = ImageBuffer::from_fn( configuration.image_width, configuration.image_height, |x, y| { [INFO] [stderr] | _______________^ [INFO] [stderr] 57 | | let yelem = y; [INFO] [stderr] 58 | | let xelem = x; [INFO] [stderr] 59 | | let val = occurances[yelem as usize][xelem as usize]; [INFO] [stderr] 60 | | image::Rgba(get_color_for_occurance(&color_scheme, val)) [INFO] [stderr] 61 | | }); [INFO] [stderr] | |______^ [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stderr] [INFO] [stderr] warning: returning the result of a let binding from a block. Consider returning the expression directly. [INFO] [stderr] --> src/heatmap_logic.rs:62:5 [INFO] [stderr] | [INFO] [stderr] 62 | img [INFO] [stderr] | ^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::let_and_return)] on by default [INFO] [stderr] note: this expression can be directly returned [INFO] [stderr] --> src/heatmap_logic.rs:56:15 [INFO] [stderr] | [INFO] [stderr] 56 | let img = ImageBuffer::from_fn( configuration.image_width, configuration.image_height, |x, y| { [INFO] [stderr] | _______________^ [INFO] [stderr] 57 | | let yelem = y; [INFO] [stderr] 58 | | let xelem = x; [INFO] [stderr] 59 | | let val = occurances[yelem as usize][xelem as usize]; [INFO] [stderr] 60 | | image::Rgba(get_color_for_occurance(&color_scheme, val)) [INFO] [stderr] 61 | | }); [INFO] [stderr] | |______^ [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stderr] [INFO] [stderr] warning: writing `&String` instead of `&str` involves a new object where a slice will do. [INFO] [stderr] --> src/get_locations.rs:7:39 [INFO] [stderr] | [INFO] [stderr] 7 | pub fn get_locations(location_source: &String) -> Vec<(u32, u32)> { [INFO] [stderr] | ^^^^^^^ help: change this to: `&str` [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: single-character string constant used as pattern [INFO] [stderr] --> src/get_locations.rs:20:39 [INFO] [stderr] | [INFO] [stderr] 20 | let line_by_line = contents.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] warning: single-character string constant used as pattern [INFO] [stderr] --> src/get_locations.rs:22:53 [INFO] [stderr] | [INFO] [stderr] 22 | let temp_collection: 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: called `ok().expect()` on a Result value. You can call `expect` directly on the `Result` [INFO] [stderr] --> src/get_locations.rs:39:18 [INFO] [stderr] | [INFO] [stderr] 39 | let cursor = coll.find(None, None).ok().expect("Failed to execute find."); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::ok_expect)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ok_expect [INFO] [stderr] [INFO] [stderr] warning: Err(_) will match all errors, maybe not a good idea [INFO] [stderr] --> src/get_locations.rs:49:13 [INFO] [stderr] | [INFO] [stderr] 49 | Err(_) => panic!("failed to get the things") [INFO] [stderr] | ^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::match_wild_err_arm)] on by default [INFO] [stderr] = note: to remove this warning, match each error separately or use unreachable macro [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_wild_err_arm [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/heatmap_logic.rs:21:12 [INFO] [stderr] | [INFO] [stderr] 21 | stamp: &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: this .into_iter() call is equivalent to .iter() and will not move the Vec [INFO] [stderr] --> src/heatmap_logic.rs:26:37 [INFO] [stderr] | [INFO] [stderr] 26 | for (y_ind, y_val) in stamp.into_iter().enumerate() { [INFO] [stderr] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::into_iter_on_ref)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stderr] [INFO] [stderr] warning: this .into_iter() call is equivalent to .iter() and will not move the Vec [INFO] [stderr] --> src/heatmap_logic.rs:31:41 [INFO] [stderr] | [INFO] [stderr] 31 | for (x_ind, x_val) in y_val.into_iter().enumerate() { [INFO] [stderr] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stderr] [INFO] [stderr] warning: casting u8 to u16 may become silently lossy if types change [INFO] [stderr] --> src/heatmap_logic.rs:36:82 [INFO] [stderr] | [INFO] [stderr] 36 | location_matrix[y_matrix_pos as usize][x_matrix_pos as usize] += *x_val as u16; [INFO] [stderr] | ^^^^^^^^^^^^^ help: try: `u16::from(*x_val)` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::cast_lossless)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless [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/heatmap_logic.rs:65:50 [INFO] [stderr] | [INFO] [stderr] 65 | pub fn get_color_for_occurance(available_colors: &Vec, no_of_occurances: u16) -> [u8; 4] { [INFO] [stderr] | ^^^^^^^^^^^ help: change this to: `&[Color]` [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: using `clone` on a `Copy` type [INFO] [stderr] --> src/heatmap_logic.rs:69:20 [INFO] [stderr] | [INFO] [stderr] 69 | return color.rgba.clone(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `color.rgba` [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/heatmap_logic.rs:72:20 [INFO] [stderr] | [INFO] [stderr] 72 | return available_colors[index - 1].rgba.clone(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `available_colors[index - 1].rgba` [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/heatmap_logic.rs:75:5 [INFO] [stderr] | [INFO] [stderr] 75 | available_colors[length - 1].rgba.clone() [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `available_colors[length - 1].rgba` [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: writing `&String` instead of `&str` involves a new object where a slice will do. [INFO] [stderr] --> src/stamps.rs:3:25 [INFO] [stderr] | [INFO] [stderr] 3 | pub fn get_stamp(stamp: &String, diameter: i32) -> Vec> { [INFO] [stderr] | ^^^^^^^ help: change this to: `&str` [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: Negation by multiplying with -1 [INFO] [stderr] --> src/stamps.rs:43:26 [INFO] [stderr] | [INFO] [stderr] 43 | pixels.push(((cmp::max(dx.abs(), dy.abs()) * -1) + center) as u8); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::neg_multiply)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stderr] [INFO] [stderr] warning: `ref` on an entire `let` pattern is discouraged, take a reference with `&` instead [INFO] [stderr] --> src/main.rs:16:9 [INFO] [stderr] | [INFO] [stderr] 16 | let ref path = &Path::new(&configuration.file_name); [INFO] [stderr] | ----^^^^^^^^---------------------------------------- help: try: `let path = &(&Path::new(&configuration.file_name));` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::toplevel_ref_arg)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#toplevel_ref_arg [INFO] [stderr] [INFO] [stderr] warning: writing `&String` instead of `&str` involves a new object where a slice will do. [INFO] [stderr] --> src/get_locations.rs:7:39 [INFO] [stderr] | [INFO] [stderr] 7 | pub fn get_locations(location_source: &String) -> Vec<(u32, u32)> { [INFO] [stderr] | ^^^^^^^ help: change this to: `&str` [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: single-character string constant used as pattern [INFO] [stderr] --> src/get_locations.rs:20:39 [INFO] [stderr] | [INFO] [stderr] 20 | let line_by_line = contents.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] warning: single-character string constant used as pattern [INFO] [stderr] --> src/get_locations.rs:22:53 [INFO] [stderr] | [INFO] [stderr] 22 | let temp_collection: 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: called `ok().expect()` on a Result value. You can call `expect` directly on the `Result` [INFO] [stderr] --> src/get_locations.rs:39:18 [INFO] [stderr] | [INFO] [stderr] 39 | let cursor = coll.find(None, None).ok().expect("Failed to execute find."); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::ok_expect)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ok_expect [INFO] [stderr] [INFO] [stderr] warning: Err(_) will match all errors, maybe not a good idea [INFO] [stderr] --> src/get_locations.rs:49:13 [INFO] [stderr] | [INFO] [stderr] 49 | Err(_) => panic!("failed to get the things") [INFO] [stderr] | ^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::match_wild_err_arm)] on by default [INFO] [stderr] = note: to remove this warning, match each error separately or use unreachable macro [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_wild_err_arm [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/heatmap_logic.rs:21:12 [INFO] [stderr] | [INFO] [stderr] 21 | stamp: &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: this .into_iter() call is equivalent to .iter() and will not move the Vec [INFO] [stderr] --> src/heatmap_logic.rs:26:37 [INFO] [stderr] | [INFO] [stderr] 26 | for (y_ind, y_val) in stamp.into_iter().enumerate() { [INFO] [stderr] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::into_iter_on_ref)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stderr] [INFO] [stderr] warning: this .into_iter() call is equivalent to .iter() and will not move the Vec [INFO] [stderr] --> src/heatmap_logic.rs:31:41 [INFO] [stderr] | [INFO] [stderr] 31 | for (x_ind, x_val) in y_val.into_iter().enumerate() { [INFO] [stderr] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stderr] [INFO] [stderr] warning: casting u8 to u16 may become silently lossy if types change [INFO] [stderr] --> src/heatmap_logic.rs:36:82 [INFO] [stderr] | [INFO] [stderr] 36 | location_matrix[y_matrix_pos as usize][x_matrix_pos as usize] += *x_val as u16; [INFO] [stderr] | ^^^^^^^^^^^^^ help: try: `u16::from(*x_val)` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::cast_lossless)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless [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/heatmap_logic.rs:65:50 [INFO] [stderr] | [INFO] [stderr] 65 | pub fn get_color_for_occurance(available_colors: &Vec, no_of_occurances: u16) -> [u8; 4] { [INFO] [stderr] | ^^^^^^^^^^^ help: change this to: `&[Color]` [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: using `clone` on a `Copy` type [INFO] [stderr] --> src/heatmap_logic.rs:69:20 [INFO] [stderr] | [INFO] [stderr] 69 | return color.rgba.clone(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `color.rgba` [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/heatmap_logic.rs:72:20 [INFO] [stderr] | [INFO] [stderr] 72 | return available_colors[index - 1].rgba.clone(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `available_colors[index - 1].rgba` [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/heatmap_logic.rs:75:5 [INFO] [stderr] | [INFO] [stderr] 75 | available_colors[length - 1].rgba.clone() [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `available_colors[length - 1].rgba` [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: writing `&String` instead of `&str` involves a new object where a slice will do. [INFO] [stderr] --> src/stamps.rs:3:25 [INFO] [stderr] | [INFO] [stderr] 3 | pub fn get_stamp(stamp: &String, diameter: i32) -> Vec> { [INFO] [stderr] | ^^^^^^^ help: change this to: `&str` [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: Negation by multiplying with -1 [INFO] [stderr] --> src/stamps.rs:43:26 [INFO] [stderr] | [INFO] [stderr] 43 | pixels.push(((cmp::max(dx.abs(), dy.abs()) * -1) + center) as u8); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::neg_multiply)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stderr] [INFO] [stderr] warning: `ref` on an entire `let` pattern is discouraged, take a reference with `&` instead [INFO] [stderr] --> src/main.rs:16:9 [INFO] [stderr] | [INFO] [stderr] 16 | let ref path = &Path::new(&configuration.file_name); [INFO] [stderr] | ----^^^^^^^^---------------------------------------- help: try: `let path = &(&Path::new(&configuration.file_name));` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::toplevel_ref_arg)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#toplevel_ref_arg [INFO] [stderr] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 24.51s [INFO] running `"docker" "inspect" "61d6f7b5d26f626cb6a7a8b558bb06e05edeab6e46cba50cd11c2a6ff0f95c94"` [INFO] running `"docker" "rm" "-f" "61d6f7b5d26f626cb6a7a8b558bb06e05edeab6e46cba50cd11c2a6ff0f95c94"` [INFO] [stdout] 61d6f7b5d26f626cb6a7a8b558bb06e05edeab6e46cba50cd11c2a6ff0f95c94