[INFO] cloning repository https://github.com/Oachristensen/ascii_sim [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/Oachristensen/ascii_sim" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FOachristensen%2Fascii_sim", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FOachristensen%2Fascii_sim'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] e26cb2edc3e00dd5e0bfba88a3ef571129fad855 [INFO] linting Oachristensen/ascii_sim against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FOachristensen%2Fascii_sim" "/workspace/builds/worker-1-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-1-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/Oachristensen/ascii_sim [INFO] finished tweaking git repo https://github.com/Oachristensen/ascii_sim [INFO] tweaked toml for git repo https://github.com/Oachristensen/ascii_sim written to /workspace/builds/worker-1-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/Oachristensen/ascii_sim on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/Oachristensen/ascii_sim already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] ddb9e423d0c3b4c2f986d1f713e9f174f6ca55682888affa53d4a286a746505f [INFO] running `Command { std: "docker" "start" "-a" "ddb9e423d0c3b4c2f986d1f713e9f174f6ca55682888affa53d4a286a746505f", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "ddb9e423d0c3b4c2f986d1f713e9f174f6ca55682888affa53d4a286a746505f", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "ddb9e423d0c3b4c2f986d1f713e9f174f6ca55682888affa53d4a286a746505f", kill_on_drop: false }` [INFO] [stdout] ddb9e423d0c3b4c2f986d1f713e9f174f6ca55682888affa53d4a286a746505f [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 53261c72e4f574f446911ad950074ebf41183604eeb13f432ff51a15ddc9e804 [INFO] running `Command { std: "docker" "start" "-a" "53261c72e4f574f446911ad950074ebf41183604eeb13f432ff51a15ddc9e804", kill_on_drop: false }` [INFO] [stderr] Checking ascii_sim v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `array` [INFO] [stdout] --> src/main.rs:1:11 [INFO] [stdout] | [INFO] [stdout] 1 | use std::{array, char, thread::sleep, vec}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `thread_rng` [INFO] [stdout] --> src/main.rs:2:12 [INFO] [stdout] | [INFO] [stdout] 2 | use rand::{thread_rng, Rng}; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:29:21 [INFO] [stdout] | [INFO] [stdout] 29 | fn check_pixel_left(mut pixel_array : Vec, index : usize) -> (bool,Vec) { [INFO] [stdout] | ----^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:49:22 [INFO] [stdout] | [INFO] [stdout] 49 | fn check_pixel_right(mut pixel_array : Vec, index : usize) -> (bool,Vec) { [INFO] [stdout] | ----^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:69:21 [INFO] [stdout] | [INFO] [stdout] 69 | fn check_pixel_down(mut pixel_array : Vec, index : usize) -> (bool,Vec) { [INFO] [stdout] | ----^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:141:47 [INFO] [stdout] | [INFO] [stdout] 141 | fn update_matrix(mut matrix_array: Vec, mut pixel_array : Vec) -> (Vec, Vec) { [INFO] [stdout] | ----^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:150:9 [INFO] [stdout] | [INFO] [stdout] 150 | let mut pixel = Pixel{ x: (0), y: (0), value: ('0')}; [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/main.rs:24:5 [INFO] [stdout] | [INFO] [stdout] 24 | pixel_array[index].x = pixel_array[index].x +x; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `pixel_array[index].x += x` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/main.rs:25:5 [INFO] [stdout] | [INFO] [stdout] 25 | pixel_array[index].y = pixel_array[index].y + y; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `pixel_array[index].y += y` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:36:16 [INFO] [stdout] | [INFO] [stdout] 36 | if !(pixel_array[i].x == X_SIZE as i32) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(pixel_array[i].x != X_SIZE as i32)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:35:9 [INFO] [stdout] | [INFO] [stdout] 35 | / if !(pixel_array[index] == pixel_array[i]) { [INFO] [stdout] 36 | | if !(pixel_array[i].x == X_SIZE as i32) { [INFO] [stdout] 37 | | if pixel_array[index].y == pixel_array[i].y { [INFO] [stdout] 38 | | if pixel_array[index].x == pixel_array[i].x+1 { [INFO] [stdout] ... | [INFO] [stdout] 43 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 35 ~ if !(pixel_array[index] == pixel_array[i]) [INFO] [stdout] 36 ~ && !(pixel_array[i].x == X_SIZE as i32) { [INFO] [stdout] 37 | if pixel_array[index].y == pixel_array[i].y { [INFO] [stdout] ... [INFO] [stdout] 41 | } [INFO] [stdout] 42 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:36:13 [INFO] [stdout] | [INFO] [stdout] 36 | / if !(pixel_array[i].x == X_SIZE as i32) { [INFO] [stdout] 37 | | if pixel_array[index].y == pixel_array[i].y { [INFO] [stdout] 38 | | if pixel_array[index].x == pixel_array[i].x+1 { [INFO] [stdout] 39 | | return (false,pixel_array) [INFO] [stdout] ... | [INFO] [stdout] 42 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 36 ~ if !(pixel_array[i].x == X_SIZE as i32) [INFO] [stdout] 37 ~ && pixel_array[index].y == pixel_array[i].y { [INFO] [stdout] 38 | if pixel_array[index].x == pixel_array[i].x+1 { [INFO] [stdout] 39 | return (false,pixel_array) [INFO] [stdout] 40 | } [INFO] [stdout] 41 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:37:17 [INFO] [stdout] | [INFO] [stdout] 37 | / if pixel_array[index].y == pixel_array[i].y { [INFO] [stdout] 38 | | if pixel_array[index].x == pixel_array[i].x+1 { [INFO] [stdout] 39 | | return (false,pixel_array) [INFO] [stdout] 40 | | } [INFO] [stdout] 41 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 37 ~ if pixel_array[index].y == pixel_array[i].y [INFO] [stdout] 38 ~ && pixel_array[index].x == pixel_array[i].x+1 { [INFO] [stdout] 39 | return (false,pixel_array) [INFO] [stdout] 40 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:56:16 [INFO] [stdout] | [INFO] [stdout] 56 | if !(pixel_array[i].x == 0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(pixel_array[i].x != 0)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:55:9 [INFO] [stdout] | [INFO] [stdout] 55 | / if !(pixel_array[index] == pixel_array[i]) { [INFO] [stdout] 56 | | if !(pixel_array[i].x == 0) { [INFO] [stdout] 57 | | if pixel_array[index].y == pixel_array[i].y { [INFO] [stdout] 58 | | if pixel_array[index].x == pixel_array[i].x-1 { [INFO] [stdout] ... | [INFO] [stdout] 63 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 55 ~ if !(pixel_array[index] == pixel_array[i]) [INFO] [stdout] 56 ~ && !(pixel_array[i].x == 0) { [INFO] [stdout] 57 | if pixel_array[index].y == pixel_array[i].y { [INFO] [stdout] ... [INFO] [stdout] 61 | } [INFO] [stdout] 62 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:56:13 [INFO] [stdout] | [INFO] [stdout] 56 | / if !(pixel_array[i].x == 0) { [INFO] [stdout] 57 | | if pixel_array[index].y == pixel_array[i].y { [INFO] [stdout] 58 | | if pixel_array[index].x == pixel_array[i].x-1 { [INFO] [stdout] 59 | | return (false, pixel_array) [INFO] [stdout] ... | [INFO] [stdout] 62 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 56 ~ if !(pixel_array[i].x == 0) [INFO] [stdout] 57 ~ && pixel_array[index].y == pixel_array[i].y { [INFO] [stdout] 58 | if pixel_array[index].x == pixel_array[i].x-1 { [INFO] [stdout] 59 | return (false, pixel_array) [INFO] [stdout] 60 | } [INFO] [stdout] 61 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:57:17 [INFO] [stdout] | [INFO] [stdout] 57 | / if pixel_array[index].y == pixel_array[i].y { [INFO] [stdout] 58 | | if pixel_array[index].x == pixel_array[i].x-1 { [INFO] [stdout] 59 | | return (false, pixel_array) [INFO] [stdout] 60 | | } [INFO] [stdout] 61 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 57 ~ if pixel_array[index].y == pixel_array[i].y [INFO] [stdout] 58 ~ && pixel_array[index].x == pixel_array[i].x-1 { [INFO] [stdout] 59 | return (false, pixel_array) [INFO] [stdout] 60 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:75:17 [INFO] [stdout] | [INFO] [stdout] 75 | if !(pixel_array[i].y == 0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(pixel_array[i].y != 0)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:74:9 [INFO] [stdout] | [INFO] [stdout] 74 | / if !(pixel_array[index] == pixel_array[i]) { [INFO] [stdout] 75 | | if !(pixel_array[i].y == 0) { [INFO] [stdout] 76 | | if pixel_array[index].x == pixel_array[i].x { [INFO] [stdout] 77 | | if pixel_array[index].y == pixel_array[i].y-1 { [INFO] [stdout] ... | [INFO] [stdout] 82 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 74 ~ if !(pixel_array[index] == pixel_array[i]) [INFO] [stdout] 75 ~ && !(pixel_array[i].y == 0) { [INFO] [stdout] 76 | if pixel_array[index].x == pixel_array[i].x { [INFO] [stdout] ... [INFO] [stdout] 80 | } [INFO] [stdout] 81 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:75:13 [INFO] [stdout] | [INFO] [stdout] 75 | / if !(pixel_array[i].y == 0) { [INFO] [stdout] 76 | | if pixel_array[index].x == pixel_array[i].x { [INFO] [stdout] 77 | | if pixel_array[index].y == pixel_array[i].y-1 { [INFO] [stdout] 78 | | return (false,pixel_array); [INFO] [stdout] ... | [INFO] [stdout] 81 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 75 ~ if !(pixel_array[i].y == 0) [INFO] [stdout] 76 ~ && pixel_array[index].x == pixel_array[i].x { [INFO] [stdout] 77 | if pixel_array[index].y == pixel_array[i].y-1 { [INFO] [stdout] 78 | return (false,pixel_array); [INFO] [stdout] 79 | } [INFO] [stdout] 80 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:76:17 [INFO] [stdout] | [INFO] [stdout] 76 | / if pixel_array[index].x == pixel_array[i].x { [INFO] [stdout] 77 | | if pixel_array[index].y == pixel_array[i].y-1 { [INFO] [stdout] 78 | | return (false,pixel_array); [INFO] [stdout] 79 | | } [INFO] [stdout] 80 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 76 ~ if pixel_array[index].x == pixel_array[i].x [INFO] [stdout] 77 ~ && pixel_array[index].y == pixel_array[i].y-1 { [INFO] [stdout] 78 | return (false,pixel_array); [INFO] [stdout] 79 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/main.rs:88:21 [INFO] [stdout] | [INFO] [stdout] 88 | fn draw_matrix(arr: &Vec) { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 88 - fn draw_matrix(arr: &Vec) { [INFO] [stdout] 88 + fn draw_matrix(arr: &[char]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `array` [INFO] [stdout] --> src/main.rs:1:11 [INFO] [stdout] | [INFO] [stdout] 1 | use std::{array, char, thread::sleep, vec}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `thread_rng` [INFO] [stdout] --> src/main.rs:2:12 [INFO] [stdout] | [INFO] [stdout] 2 | use rand::{thread_rng, Rng}; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `matrix_array` [INFO] [stdout] --> src/main.rs:135:14 [INFO] [stdout] | [INFO] [stdout] 135 | for i in 0..MATRIX_SIZE { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 135 - for i in 0..MATRIX_SIZE { [INFO] [stdout] 135 + for in matrix_array.iter_mut().take(MATRIX_SIZE) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `pixel_array` [INFO] [stdout] --> src/main.rs:156:14 [INFO] [stdout] | [INFO] [stdout] 156 | for i in 0..NUM_SIM { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 156 - for i in 0..NUM_SIM { [INFO] [stdout] 156 + for in pixel_array.iter_mut().take(NUM_SIM) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:29:21 [INFO] [stdout] | [INFO] [stdout] 29 | fn check_pixel_left(mut pixel_array : Vec, index : usize) -> (bool,Vec) { [INFO] [stdout] | ----^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:49:22 [INFO] [stdout] | [INFO] [stdout] 49 | fn check_pixel_right(mut pixel_array : Vec, index : usize) -> (bool,Vec) { [INFO] [stdout] | ----^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:69:21 [INFO] [stdout] | [INFO] [stdout] 69 | fn check_pixel_down(mut pixel_array : Vec, index : usize) -> (bool,Vec) { [INFO] [stdout] | ----^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:141:47 [INFO] [stdout] | [INFO] [stdout] 141 | fn update_matrix(mut matrix_array: Vec, mut pixel_array : Vec) -> (Vec, Vec) { [INFO] [stdout] | ----^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:150:9 [INFO] [stdout] | [INFO] [stdout] 150 | let mut pixel = Pixel{ x: (0), y: (0), value: ('0')}; [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/main.rs:24:5 [INFO] [stdout] | [INFO] [stdout] 24 | pixel_array[index].x = pixel_array[index].x +x; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `pixel_array[index].x += x` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/main.rs:25:5 [INFO] [stdout] | [INFO] [stdout] 25 | pixel_array[index].y = pixel_array[index].y + y; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `pixel_array[index].y += y` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:36:16 [INFO] [stdout] | [INFO] [stdout] 36 | if !(pixel_array[i].x == X_SIZE as i32) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(pixel_array[i].x != X_SIZE as i32)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:35:9 [INFO] [stdout] | [INFO] [stdout] 35 | / if !(pixel_array[index] == pixel_array[i]) { [INFO] [stdout] 36 | | if !(pixel_array[i].x == X_SIZE as i32) { [INFO] [stdout] 37 | | if pixel_array[index].y == pixel_array[i].y { [INFO] [stdout] 38 | | if pixel_array[index].x == pixel_array[i].x+1 { [INFO] [stdout] ... | [INFO] [stdout] 43 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 35 ~ if !(pixel_array[index] == pixel_array[i]) [INFO] [stdout] 36 ~ && !(pixel_array[i].x == X_SIZE as i32) { [INFO] [stdout] 37 | if pixel_array[index].y == pixel_array[i].y { [INFO] [stdout] ... [INFO] [stdout] 41 | } [INFO] [stdout] 42 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:36:13 [INFO] [stdout] | [INFO] [stdout] 36 | / if !(pixel_array[i].x == X_SIZE as i32) { [INFO] [stdout] 37 | | if pixel_array[index].y == pixel_array[i].y { [INFO] [stdout] 38 | | if pixel_array[index].x == pixel_array[i].x+1 { [INFO] [stdout] 39 | | return (false,pixel_array) [INFO] [stdout] ... | [INFO] [stdout] 42 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 36 ~ if !(pixel_array[i].x == X_SIZE as i32) [INFO] [stdout] 37 ~ && pixel_array[index].y == pixel_array[i].y { [INFO] [stdout] 38 | if pixel_array[index].x == pixel_array[i].x+1 { [INFO] [stdout] 39 | return (false,pixel_array) [INFO] [stdout] 40 | } [INFO] [stdout] 41 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:37:17 [INFO] [stdout] | [INFO] [stdout] 37 | / if pixel_array[index].y == pixel_array[i].y { [INFO] [stdout] 38 | | if pixel_array[index].x == pixel_array[i].x+1 { [INFO] [stdout] 39 | | return (false,pixel_array) [INFO] [stdout] 40 | | } [INFO] [stdout] 41 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 37 ~ if pixel_array[index].y == pixel_array[i].y [INFO] [stdout] 38 ~ && pixel_array[index].x == pixel_array[i].x+1 { [INFO] [stdout] 39 | return (false,pixel_array) [INFO] [stdout] 40 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:56:16 [INFO] [stdout] | [INFO] [stdout] 56 | if !(pixel_array[i].x == 0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(pixel_array[i].x != 0)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:55:9 [INFO] [stdout] | [INFO] [stdout] 55 | / if !(pixel_array[index] == pixel_array[i]) { [INFO] [stdout] 56 | | if !(pixel_array[i].x == 0) { [INFO] [stdout] 57 | | if pixel_array[index].y == pixel_array[i].y { [INFO] [stdout] 58 | | if pixel_array[index].x == pixel_array[i].x-1 { [INFO] [stdout] ... | [INFO] [stdout] 63 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 55 ~ if !(pixel_array[index] == pixel_array[i]) [INFO] [stdout] 56 ~ && !(pixel_array[i].x == 0) { [INFO] [stdout] 57 | if pixel_array[index].y == pixel_array[i].y { [INFO] [stdout] ... [INFO] [stdout] 61 | } [INFO] [stdout] 62 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:56:13 [INFO] [stdout] | [INFO] [stdout] 56 | / if !(pixel_array[i].x == 0) { [INFO] [stdout] 57 | | if pixel_array[index].y == pixel_array[i].y { [INFO] [stdout] 58 | | if pixel_array[index].x == pixel_array[i].x-1 { [INFO] [stdout] 59 | | return (false, pixel_array) [INFO] [stdout] ... | [INFO] [stdout] 62 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 56 ~ if !(pixel_array[i].x == 0) [INFO] [stdout] 57 ~ && pixel_array[index].y == pixel_array[i].y { [INFO] [stdout] 58 | if pixel_array[index].x == pixel_array[i].x-1 { [INFO] [stdout] 59 | return (false, pixel_array) [INFO] [stdout] 60 | } [INFO] [stdout] 61 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:57:17 [INFO] [stdout] | [INFO] [stdout] 57 | / if pixel_array[index].y == pixel_array[i].y { [INFO] [stdout] 58 | | if pixel_array[index].x == pixel_array[i].x-1 { [INFO] [stdout] 59 | | return (false, pixel_array) [INFO] [stdout] 60 | | } [INFO] [stdout] 61 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 57 ~ if pixel_array[index].y == pixel_array[i].y [INFO] [stdout] 58 ~ && pixel_array[index].x == pixel_array[i].x-1 { [INFO] [stdout] 59 | return (false, pixel_array) [INFO] [stdout] 60 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:75:17 [INFO] [stdout] | [INFO] [stdout] 75 | if !(pixel_array[i].y == 0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(pixel_array[i].y != 0)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:74:9 [INFO] [stdout] | [INFO] [stdout] 74 | / if !(pixel_array[index] == pixel_array[i]) { [INFO] [stdout] 75 | | if !(pixel_array[i].y == 0) { [INFO] [stdout] 76 | | if pixel_array[index].x == pixel_array[i].x { [INFO] [stdout] 77 | | if pixel_array[index].y == pixel_array[i].y-1 { [INFO] [stdout] ... | [INFO] [stdout] 82 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 74 ~ if !(pixel_array[index] == pixel_array[i]) [INFO] [stdout] 75 ~ && !(pixel_array[i].y == 0) { [INFO] [stdout] 76 | if pixel_array[index].x == pixel_array[i].x { [INFO] [stdout] ... [INFO] [stdout] 80 | } [INFO] [stdout] 81 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:75:13 [INFO] [stdout] | [INFO] [stdout] 75 | / if !(pixel_array[i].y == 0) { [INFO] [stdout] 76 | | if pixel_array[index].x == pixel_array[i].x { [INFO] [stdout] 77 | | if pixel_array[index].y == pixel_array[i].y-1 { [INFO] [stdout] 78 | | return (false,pixel_array); [INFO] [stdout] ... | [INFO] [stdout] 81 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 75 ~ if !(pixel_array[i].y == 0) [INFO] [stdout] 76 ~ && pixel_array[index].x == pixel_array[i].x { [INFO] [stdout] 77 | if pixel_array[index].y == pixel_array[i].y-1 { [INFO] [stdout] 78 | return (false,pixel_array); [INFO] [stdout] 79 | } [INFO] [stdout] 80 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:76:17 [INFO] [stdout] | [INFO] [stdout] 76 | / if pixel_array[index].x == pixel_array[i].x { [INFO] [stdout] 77 | | if pixel_array[index].y == pixel_array[i].y-1 { [INFO] [stdout] 78 | | return (false,pixel_array); [INFO] [stdout] 79 | | } [INFO] [stdout] 80 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 76 ~ if pixel_array[index].x == pixel_array[i].x [INFO] [stdout] 77 ~ && pixel_array[index].y == pixel_array[i].y-1 { [INFO] [stdout] 78 | return (false,pixel_array); [INFO] [stdout] 79 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/main.rs:88:21 [INFO] [stdout] | [INFO] [stdout] 88 | fn draw_matrix(arr: &Vec) { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 88 - fn draw_matrix(arr: &Vec) { [INFO] [stdout] 88 + fn draw_matrix(arr: &[char]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `matrix_array` [INFO] [stdout] --> src/main.rs:135:14 [INFO] [stdout] | [INFO] [stdout] 135 | for i in 0..MATRIX_SIZE { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 135 - for i in 0..MATRIX_SIZE { [INFO] [stdout] 135 + for in matrix_array.iter_mut().take(MATRIX_SIZE) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `pixel_array` [INFO] [stdout] --> src/main.rs:156:14 [INFO] [stdout] | [INFO] [stdout] 156 | for i in 0..NUM_SIM { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 156 - for i in 0..NUM_SIM { [INFO] [stdout] 156 + for in pixel_array.iter_mut().take(NUM_SIM) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.28s [INFO] running `Command { std: "docker" "inspect" "53261c72e4f574f446911ad950074ebf41183604eeb13f432ff51a15ddc9e804", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "53261c72e4f574f446911ad950074ebf41183604eeb13f432ff51a15ddc9e804", kill_on_drop: false }` [INFO] [stdout] 53261c72e4f574f446911ad950074ebf41183604eeb13f432ff51a15ddc9e804