[INFO] cloning repository https://github.com/Ligime/PlanetPixelEngine [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/Ligime/PlanetPixelEngine" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FLigime%2FPlanetPixelEngine", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FLigime%2FPlanetPixelEngine'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 8aaa34ef5f37ac9735fc1097eeee94187a23754c [INFO] linting Ligime/PlanetPixelEngine against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FLigime%2FPlanetPixelEngine" "/workspace/builds/worker-5-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-5-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/Ligime/PlanetPixelEngine [INFO] finished tweaking git repo https://github.com/Ligime/PlanetPixelEngine [INFO] tweaked toml for git repo https://github.com/Ligime/PlanetPixelEngine written to /workspace/builds/worker-5-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/Ligime/PlanetPixelEngine 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/Ligime/PlanetPixelEngine 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] [stderr] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded fastnoise-lite v1.1.1 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-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] 6695ddb86ce18d7c104ed0d5ccecda10b82d8bf8f9df5d88520b8d9297d1f290 [INFO] running `Command { std: "docker" "start" "-a" "6695ddb86ce18d7c104ed0d5ccecda10b82d8bf8f9df5d88520b8d9297d1f290", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "6695ddb86ce18d7c104ed0d5ccecda10b82d8bf8f9df5d88520b8d9297d1f290", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "6695ddb86ce18d7c104ed0d5ccecda10b82d8bf8f9df5d88520b8d9297d1f290", kill_on_drop: false }` [INFO] [stdout] 6695ddb86ce18d7c104ed0d5ccecda10b82d8bf8f9df5d88520b8d9297d1f290 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-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] eb4aeb47a89d0447a416c4c8fd19ade073ce5547320e784a6e22264dade46da6 [INFO] running `Command { std: "docker" "start" "-a" "eb4aeb47a89d0447a416c4c8fd19ade073ce5547320e784a6e22264dade46da6", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.180 [INFO] [stderr] Compiling crossbeam-utils v0.8.21 [INFO] [stderr] Compiling getrandom v0.3.4 [INFO] [stderr] Compiling version-compare v0.1.1 [INFO] [stderr] Compiling zerocopy v0.8.37 [INFO] [stderr] Checking cfg-if v1.0.4 [INFO] [stderr] Compiling winapi v0.3.9 [INFO] [stderr] Compiling sdl2 v0.37.0 [INFO] [stderr] Checking bitflags v1.3.2 [INFO] [stderr] Checking lazy_static v1.5.0 [INFO] [stderr] Checking either v1.15.0 [INFO] [stderr] Compiling rayon-core v1.13.0 [INFO] [stderr] Compiling num-traits v0.2.19 [INFO] [stderr] Compiling sdl2-sys v0.37.0 [INFO] [stderr] Checking crossbeam-epoch v0.9.18 [INFO] [stderr] Checking crossbeam-deque v0.8.6 [INFO] [stderr] Checking rayon v1.11.0 [INFO] [stderr] Checking fastnoise-lite v1.1.1 [INFO] [stderr] Checking rand_core v0.9.5 [INFO] [stderr] Checking ppv-lite86 v0.2.21 [INFO] [stderr] Checking rand_chacha v0.9.0 [INFO] [stderr] Checking rand v0.9.2 [INFO] [stderr] Checking PlanetPixel v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `try_grow` [INFO] [stdout] --> src/cell_update.rs:6:69 [INFO] [stdout] | [INFO] [stdout] 6 | use crate::{CELL_SIZE, Cell, DirtyRect, PITCH, PITCH_SIZE, pixels::{try_grow, try_grow_destroy, try_move, TRANSPARENCY}}; [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: `try_grow` [INFO] [stdout] --> src/cell_update.rs:6:69 [INFO] [stdout] | [INFO] [stdout] 6 | use crate::{CELL_SIZE, Cell, DirtyRect, PITCH, PITCH_SIZE, pixels::{try_grow, try_grow_destroy, try_move, TRANSPARENCY}}; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/pixels.rs:93:5 [INFO] [stdout] | [INFO] [stdout] 93 | return false; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 93 - return false; [INFO] [stdout] 93 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/pixels.rs:15:40 [INFO] [stdout] | [INFO] [stdout] 15 | pub fn try_move(cell:&mut Cell, cells: &mut Vec>>, x1:usize, y1:usize, mut x2: isize, mut y2: isize, random:u8)->bool{ [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] 15 - pub fn try_move(cell:&mut Cell, cells: &mut Vec>>, x1:usize, y1:usize, mut x2: isize, mut y2: isize, random:u8)->bool{ [INFO] [stdout] 15 + pub fn try_move(cell:&mut Cell, cells: &mut [Arc>], x1:usize, y1:usize, mut x2: isize, mut y2: isize, random:u8)->bool{ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/pixels.rs:31:12 [INFO] [stdout] | [INFO] [stdout] 31 | if cell.id % CELL_AMOUNT == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `cell.id.is_multiple_of(CELL_AMOUNT)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/pixels.rs:34:9 [INFO] [stdout] | [INFO] [stdout] 34 | x2 = CELL_SIZE as isize + x2 ; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `x2 += CELL_SIZE as isize` [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/pixels.rs:50:9 [INFO] [stdout] | [INFO] [stdout] 50 | y2 = CELL_SIZE as isize + y2; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `y2 += CELL_SIZE as isize` [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 looks like you are swapping elements of `cell.grid` manually [INFO] [stdout] --> src/pixels.rs:71:13 [INFO] [stdout] | [INFO] [stdout] 71 | / let temp = cell.grid[y1*CELL_SIZE + x1]; [INFO] [stdout] 72 | | cell.grid[y1*CELL_SIZE + x1] = cell.grid[y2*CELL_SIZE + x2]; [INFO] [stdout] 73 | | cell.grid[y2*CELL_SIZE + x2] = temp; [INFO] [stdout] | |________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_swap [INFO] [stdout] = note: `#[warn(clippy::manual_swap)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 71 ~ let CELL_SIZE = CELL_SIZE; [INFO] [stdout] 72 + cell.grid.swap(y1*CELL_SIZE + x1, y2*CELL_SIZE + x2); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/pixels.rs:161:5 [INFO] [stdout] | [INFO] [stdout] 161 | return false; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 161 - return false; [INFO] [stdout] 161 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/pixels.rs:99:40 [INFO] [stdout] | [INFO] [stdout] 99 | pub fn try_grow(cell:&mut Cell, cells: &mut Vec>>, x1:usize, y1:usize, mut x2: isize, mut y2: isize, random:u8)->bool{ [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 99 - pub fn try_grow(cell:&mut Cell, cells: &mut Vec>>, x1:usize, y1:usize, mut x2: isize, mut y2: isize, random:u8)->bool{ [INFO] [stdout] 99 + pub fn try_grow(cell:&mut Cell, cells: &mut [Arc>], x1:usize, y1:usize, mut x2: isize, mut y2: isize, random:u8)->bool{ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/pixels.rs:103:12 [INFO] [stdout] | [INFO] [stdout] 103 | if cell.id % CELL_AMOUNT == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `cell.id.is_multiple_of(CELL_AMOUNT)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/pixels.rs:106:9 [INFO] [stdout] | [INFO] [stdout] 106 | x2 = CELL_SIZE as isize + x2 ; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `x2 += CELL_SIZE as isize` [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: manual implementation of an assign operation [INFO] [stdout] --> src/pixels.rs:122:9 [INFO] [stdout] | [INFO] [stdout] 122 | y2 = CELL_SIZE as isize + y2; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `y2 += CELL_SIZE as isize` [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: unneeded `return` statement [INFO] [stdout] --> src/pixels.rs:228:5 [INFO] [stdout] | [INFO] [stdout] 228 | return false; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 228 - return false; [INFO] [stdout] 228 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/pixels.rs:165:48 [INFO] [stdout] | [INFO] [stdout] 165 | pub fn try_grow_destroy(cell:&mut Cell, cells: &mut Vec>>, x1:usize, y1:usize, mut x2: isize, mut y2: isize, random... [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 165 - pub fn try_grow_destroy(cell:&mut Cell, cells: &mut Vec>>, x1:usize, y1:usize, mut x2: isize, mut y2: isize, random:u8)->bool{ [INFO] [stdout] 165 + pub fn try_grow_destroy(cell:&mut Cell, cells: &mut [Arc>], x1:usize, y1:usize, mut x2: isize, mut y2: isize, random:u8)->bool{ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/pixels.rs:169:12 [INFO] [stdout] | [INFO] [stdout] 169 | if cell.id % CELL_AMOUNT == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `cell.id.is_multiple_of(CELL_AMOUNT)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/pixels.rs:172:9 [INFO] [stdout] | [INFO] [stdout] 172 | x2 = CELL_SIZE as isize + x2 ; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `x2 += CELL_SIZE as isize` [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: manual implementation of an assign operation [INFO] [stdout] --> src/pixels.rs:188:9 [INFO] [stdout] | [INFO] [stdout] 188 | y2 = CELL_SIZE as isize + y2; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `y2 += CELL_SIZE as isize` [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 `if` statement can be collapsed [INFO] [stdout] --> src/cell_update.rs:30:29 [INFO] [stdout] | [INFO] [stdout] 30 | / ... if random_num > 128{ [INFO] [stdout] 31 | | ... if try_move(cell, cells, z, i, z as isize - pixel.speed[0] as isize, i as isize + pixel.speed[1] as isize, random_num){ [INFO] [stdout] 32 | | ... continue; [INFO] [stdout] 33 | | ... } [INFO] [stdout] 34 | | ... } [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] 30 ~ if random_num > 128 [INFO] [stdout] 31 ~ && try_move(cell, cells, z, i, z as isize - pixel.speed[0] as isize, i as isize + pixel.speed[1] as isize, random_num){ [INFO] [stdout] 32 | continue; [INFO] [stdout] 33 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/cell_update.rs:44:29 [INFO] [stdout] | [INFO] [stdout] 44 | / ... if random_num > 128{ [INFO] [stdout] 45 | | ... if try_move(cell,cells, z, i, z as isize - pixel.speed[0] as isize, i as isize + pixel.speed[1] as isize, random_num){ [INFO] [stdout] 46 | | ... continue; [INFO] [stdout] 47 | | ... } [INFO] [stdout] 48 | | ... } [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] 44 ~ if random_num > 128 [INFO] [stdout] 45 ~ && try_move(cell,cells, z, i, z as isize - pixel.speed[0] as isize, i as isize + pixel.speed[1] as isize, random_num){ [INFO] [stdout] 46 | continue; [INFO] [stdout] 47 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/cell_update.rs:94:25 [INFO] [stdout] | [INFO] [stdout] 94 | / ... if random_num >= 120 && random_num <= 144{ [INFO] [stdout] 95 | | ... if try_grow_destroy(cell, cells, z, i, z as isize + (random_num as isize%12-6 ).signum(), i as isize+(random_num as isiz... [INFO] [stdout] 96 | | ... continue; [INFO] [stdout] 97 | | ... } [INFO] [stdout] 98 | | ... } [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] 94 ~ if random_num >= 120 && random_num <= 144 [INFO] [stdout] 95 ~ && try_grow_destroy(cell, cells, z, i, z as isize + (random_num as isize%12-6 ).signum(), i as isize+(random_num as isize%24-12 ).signum(), random_num){ [INFO] [stdout] 96 | continue; [INFO] [stdout] 97 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/cell_update.rs:94:28 [INFO] [stdout] | [INFO] [stdout] 94 | if random_num >= 120 && random_num <= 144{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(120..=144).contains(&random_num)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/structs.rs:46:9 [INFO] [stdout] | [INFO] [stdout] 46 | return new_pixel; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 46 - return new_pixel; [INFO] [stdout] 46 + new_pixel [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/structs.rs:52:17 [INFO] [stdout] | [INFO] [stdout] 52 | x = x * !(x < 0) as isize; [INFO] [stdout] | ^^^^^^^^ help: try: `(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] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/structs.rs:53:17 [INFO] [stdout] | [INFO] [stdout] 53 | y = y * !(y < 0) as isize; [INFO] [stdout] | ^^^^^^^^ help: try: `(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 boolean expression can be simplified [INFO] [stdout] --> src/structs.rs:56:17 [INFO] [stdout] | [INFO] [stdout] 56 | x = x * !(x > CELL_SIZE) as usize + (CELL_SIZE)*(x > CELL_SIZE) as usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `(x <= CELL_SIZE)` [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 boolean expression can be simplified [INFO] [stdout] --> src/structs.rs:57:17 [INFO] [stdout] | [INFO] [stdout] 57 | y = y * !(y > CELL_SIZE) as usize + (CELL_SIZE)*(y > CELL_SIZE) as usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `(y <= CELL_SIZE)` [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 boolean expression can be simplified [INFO] [stdout] --> src/structs.rs:59:84 [INFO] [stdout] | [INFO] [stdout] 59 | self.rect.x1 = x*(self.rect.x1 + self.rect.x2 == 0)as usize + self.rect.x1*!(self.rect.x1 + self.rect.x2 == 0)as usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(self.rect.x1 + self.rect.x2 != 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 boolean expression can be simplified [INFO] [stdout] --> src/structs.rs:60:84 [INFO] [stdout] | [INFO] [stdout] 60 | self.rect.y1 = y*(self.rect.y1 + self.rect.y2 == 0)as usize + self.rect.y1*!(self.rect.y1 + self.rect.y2 == 0)as usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(self.rect.y1 + self.rect.y2 != 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 boolean expression can be simplified [INFO] [stdout] --> src/structs.rs:62:67 [INFO] [stdout] | [INFO] [stdout] 62 | self.rect.x1 = x*(x= self.rect.x1)` [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 boolean expression can be simplified [INFO] [stdout] --> src/structs.rs:63:67 [INFO] [stdout] | [INFO] [stdout] 63 | self.rect.x2 = x*(x>self.rect.x2) as usize + self.rect.x2*!(x>self.rect.x2) as usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `(x <= self.rect.x2)` [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 boolean expression can be simplified [INFO] [stdout] --> src/structs.rs:64:67 [INFO] [stdout] | [INFO] [stdout] 64 | self.rect.y1 = y*(y= self.rect.y1)` [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 boolean expression can be simplified [INFO] [stdout] --> src/structs.rs:65:67 [INFO] [stdout] | [INFO] [stdout] 65 | self.rect.y2 = y*(y>self.rect.y2) as usize + self.rect.y2*!(y>self.rect.y2) as usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `(y <= self.rect.y2)` [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 boolean expression can be simplified [INFO] [stdout] --> src/structs.rs:67:121 [INFO] [stdout] | [INFO] [stdout] 67 | ...ze + self.calculated_rect.x1*!(self.calculated_rect.x1 + self.calculated_rect.x2 == 0)as usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(self.calculated_rect.x1 + self.calculated_rect.x2 != 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 boolean expression can be simplified [INFO] [stdout] --> src/structs.rs:68:128 [INFO] [stdout] | [INFO] [stdout] 68 | ...ze + self.calculated_rect.y1*!(self.calculated_rect.y1 + self.calculated_rect.y2 == 0)as usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(self.calculated_rect.y1 + self.calculated_rect.y2 != 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 boolean expression can be simplified [INFO] [stdout] --> src/structs.rs:70:100 [INFO] [stdout] | [INFO] [stdout] 70 | ...e + self.calculated_rect.x1*!(x= self.calculated_rect.x1)` [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 boolean expression can be simplified [INFO] [stdout] --> src/structs.rs:71:100 [INFO] [stdout] | [INFO] [stdout] 71 | ...e + self.calculated_rect.x2*!(x>self.calculated_rect.x2) as usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(x <= self.calculated_rect.x2)` [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 boolean expression can be simplified [INFO] [stdout] --> src/structs.rs:72:100 [INFO] [stdout] | [INFO] [stdout] 72 | ...e + self.calculated_rect.y1*!(y= self.calculated_rect.y1)` [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 boolean expression can be simplified [INFO] [stdout] --> src/structs.rs:73:100 [INFO] [stdout] | [INFO] [stdout] 73 | ...e + self.calculated_rect.y2*!(y>self.calculated_rect.y2) as usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(y <= self.calculated_rect.y2)` [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: unneeded `return` statement [INFO] [stdout] --> src/pixels.rs:93:5 [INFO] [stdout] | [INFO] [stdout] 93 | return false; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 93 - return false; [INFO] [stdout] 93 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/pixels.rs:15:40 [INFO] [stdout] | [INFO] [stdout] 15 | pub fn try_move(cell:&mut Cell, cells: &mut Vec>>, x1:usize, y1:usize, mut x2: isize, mut y2: isize, random:u8)->bool{ [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] 15 - pub fn try_move(cell:&mut Cell, cells: &mut Vec>>, x1:usize, y1:usize, mut x2: isize, mut y2: isize, random:u8)->bool{ [INFO] [stdout] 15 + pub fn try_move(cell:&mut Cell, cells: &mut [Arc>], x1:usize, y1:usize, mut x2: isize, mut y2: isize, random:u8)->bool{ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/pixels.rs:31:12 [INFO] [stdout] | [INFO] [stdout] 31 | if cell.id % CELL_AMOUNT == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `cell.id.is_multiple_of(CELL_AMOUNT)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/pixels.rs:34:9 [INFO] [stdout] | [INFO] [stdout] 34 | x2 = CELL_SIZE as isize + x2 ; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `x2 += CELL_SIZE as isize` [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/pixels.rs:50:9 [INFO] [stdout] | [INFO] [stdout] 50 | y2 = CELL_SIZE as isize + y2; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `y2 += CELL_SIZE as isize` [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 looks like you are swapping elements of `cell.grid` manually [INFO] [stdout] --> src/pixels.rs:71:13 [INFO] [stdout] | [INFO] [stdout] 71 | / let temp = cell.grid[y1*CELL_SIZE + x1]; [INFO] [stdout] 72 | | cell.grid[y1*CELL_SIZE + x1] = cell.grid[y2*CELL_SIZE + x2]; [INFO] [stdout] 73 | | cell.grid[y2*CELL_SIZE + x2] = temp; [INFO] [stdout] | |________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_swap [INFO] [stdout] = note: `#[warn(clippy::manual_swap)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 71 ~ let CELL_SIZE = CELL_SIZE; [INFO] [stdout] 72 + cell.grid.swap(y1*CELL_SIZE + x1, y2*CELL_SIZE + x2); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/structs.rs:102:25 [INFO] [stdout] | [INFO] [stdout] 102 | self.pixel_data[y*PITCH + x*PITCH_SIZE + 0] = self.grid[y*CELL_SIZE + x].color[0]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `(y*PITCH + x*PITCH_SIZE)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] = note: `#[warn(clippy::identity_op)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/structs.rs:116:9 [INFO] [stdout] | [INFO] [stdout] 116 | return new_cell; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 116 - return new_cell; [INFO] [stdout] 116 + new_cell [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/structs.rs:119:94 [INFO] [stdout] | [INFO] [stdout] 119 | pub fn generate(&mut self, region_position:[i32;2], cell_position:[i32;2], texture_data: &Vec, biome: u32){ [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 119 - pub fn generate(&mut self, region_position:[i32;2], cell_position:[i32;2], texture_data: &Vec, biome: u32){ [INFO] [stdout] 119 + pub fn generate(&mut self, region_position:[i32;2], cell_position:[i32;2], texture_data: &[u8], biome: u32){ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/pixels.rs:161:5 [INFO] [stdout] | [INFO] [stdout] 161 | return false; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 161 - return false; [INFO] [stdout] 161 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/pixels.rs:99:40 [INFO] [stdout] | [INFO] [stdout] 99 | pub fn try_grow(cell:&mut Cell, cells: &mut Vec>>, x1:usize, y1:usize, mut x2: isize, mut y2: isize, random:u8)->bool{ [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 99 - pub fn try_grow(cell:&mut Cell, cells: &mut Vec>>, x1:usize, y1:usize, mut x2: isize, mut y2: isize, random:u8)->bool{ [INFO] [stdout] 99 + pub fn try_grow(cell:&mut Cell, cells: &mut [Arc>], x1:usize, y1:usize, mut x2: isize, mut y2: isize, random:u8)->bool{ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/pixels.rs:103:12 [INFO] [stdout] | [INFO] [stdout] 103 | if cell.id % CELL_AMOUNT == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `cell.id.is_multiple_of(CELL_AMOUNT)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/pixels.rs:106:9 [INFO] [stdout] | [INFO] [stdout] 106 | x2 = CELL_SIZE as isize + x2 ; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `x2 += CELL_SIZE as isize` [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: manual implementation of an assign operation [INFO] [stdout] --> src/pixels.rs:122:9 [INFO] [stdout] | [INFO] [stdout] 122 | y2 = CELL_SIZE as isize + y2; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `y2 += CELL_SIZE as isize` [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: manual implementation of an assign operation [INFO] [stdout] --> src/structs.rs:146:21 [INFO] [stdout] | [INFO] [stdout] 146 | saturation = saturation/4; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `saturation /= 4` [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: length comparison to zero [INFO] [stdout] --> src/structs.rs:182:12 [INFO] [stdout] | [INFO] [stdout] 182 | if self.cells.len() == 0{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.cells.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/structs.rs:187:60 [INFO] [stdout] | [INFO] [stdout] 187 | cell.generate(self.position, cell_position,&texture_data,self.biome); [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `texture_data` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/pixels.rs:228:5 [INFO] [stdout] | [INFO] [stdout] 228 | return false; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 228 - return false; [INFO] [stdout] 228 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/structs.rs:195:60 [INFO] [stdout] | [INFO] [stdout] 195 | cell.generate(self.position, cell_position,&texture_data, self.biome); [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `texture_data` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/pixels.rs:165:48 [INFO] [stdout] | [INFO] [stdout] 165 | pub fn try_grow_destroy(cell:&mut Cell, cells: &mut Vec>>, x1:usize, y1:usize, mut x2: isize, mut y2: isize, random... [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 165 - pub fn try_grow_destroy(cell:&mut Cell, cells: &mut Vec>>, x1:usize, y1:usize, mut x2: isize, mut y2: isize, random:u8)->bool{ [INFO] [stdout] 165 + pub fn try_grow_destroy(cell:&mut Cell, cells: &mut [Arc>], x1:usize, y1:usize, mut x2: isize, mut y2: isize, random:u8)->bool{ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/pixels.rs:169:12 [INFO] [stdout] | [INFO] [stdout] 169 | if cell.id % CELL_AMOUNT == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `cell.id.is_multiple_of(CELL_AMOUNT)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/pixels.rs:172:9 [INFO] [stdout] | [INFO] [stdout] 172 | x2 = CELL_SIZE as isize + x2 ; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `x2 += CELL_SIZE as isize` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/structs.rs:203:53 [INFO] [stdout] | [INFO] [stdout] 203 | cell.generate(self.position, cell_position, &texture_data,self.biome); [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `texture_data` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/pixels.rs:188:9 [INFO] [stdout] | [INFO] [stdout] 188 | y2 = CELL_SIZE as isize + y2; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `y2 += CELL_SIZE as isize` [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: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/entity.rs:19:55 [INFO] [stdout] | [INFO] [stdout] 19 | pub fn check_collision(entity:&mut Entity, big_cells: &mut Vec>>, world_position:[i32;2]){ [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 19 - pub fn check_collision(entity:&mut Entity, big_cells: &mut Vec>>, world_position:[i32;2]){ [INFO] [stdout] 19 + pub fn check_collision(entity:&mut Entity, big_cells: &mut [Arc>], world_position:[i32;2]){ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/entity.rs:33:17 [INFO] [stdout] | [INFO] [stdout] 33 | in_cell_x = CELL_SIZE as i32 + in_cell_x; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `in_cell_x += CELL_SIZE as i32` [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: manual implementation of an assign operation [INFO] [stdout] --> src/entity.rs:36:17 [INFO] [stdout] | [INFO] [stdout] 36 | in_cell_y = CELL_SIZE as i32 + in_cell_y; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `in_cell_y += CELL_SIZE as i32` [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: manual implementation of an assign operation [INFO] [stdout] --> src/entity.rs:39:17 [INFO] [stdout] | [INFO] [stdout] 39 | in_cell2_y = CELL_SIZE as i32 + in_cell2_y; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `in_cell2_y += CELL_SIZE as i32` [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 `if` statement can be collapsed [INFO] [stdout] --> src/cell_update.rs:30:29 [INFO] [stdout] | [INFO] [stdout] 30 | / ... if random_num > 128{ [INFO] [stdout] 31 | | ... if try_move(cell, cells, z, i, z as isize - pixel.speed[0] as isize, i as isize + pixel.speed[1] as isize, random_num){ [INFO] [stdout] 32 | | ... continue; [INFO] [stdout] 33 | | ... } [INFO] [stdout] 34 | | ... } [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] 30 ~ if random_num > 128 [INFO] [stdout] 31 ~ && try_move(cell, cells, z, i, z as isize - pixel.speed[0] as isize, i as isize + pixel.speed[1] as isize, random_num){ [INFO] [stdout] 32 | continue; [INFO] [stdout] 33 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/cell_update.rs:44:29 [INFO] [stdout] | [INFO] [stdout] 44 | / ... if random_num > 128{ [INFO] [stdout] 45 | | ... if try_move(cell,cells, z, i, z as isize - pixel.speed[0] as isize, i as isize + pixel.speed[1] as isize, random_num){ [INFO] [stdout] 46 | | ... continue; [INFO] [stdout] 47 | | ... } [INFO] [stdout] 48 | | ... } [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] 44 ~ if random_num > 128 [INFO] [stdout] 45 ~ && try_move(cell,cells, z, i, z as isize - pixel.speed[0] as isize, i as isize + pixel.speed[1] as isize, random_num){ [INFO] [stdout] 46 | continue; [INFO] [stdout] 47 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/entity.rs:74:17 [INFO] [stdout] | [INFO] [stdout] 74 | in_cell_x = CELL_SIZE as i32 + in_cell_x; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `in_cell_x += CELL_SIZE as i32` [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: manual implementation of an assign operation [INFO] [stdout] --> src/entity.rs:77:17 [INFO] [stdout] | [INFO] [stdout] 77 | in_cell_y = CELL_SIZE as i32 + in_cell_y; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `in_cell_y += CELL_SIZE as i32` [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: manual implementation of an assign operation [INFO] [stdout] --> src/entity.rs:80:17 [INFO] [stdout] | [INFO] [stdout] 80 | in_cell2_x = CELL_SIZE as i32 + in_cell2_x; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `in_cell2_x += CELL_SIZE as i32` [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 `if` statement can be collapsed [INFO] [stdout] --> src/cell_update.rs:94:25 [INFO] [stdout] | [INFO] [stdout] 94 | / ... if random_num >= 120 && random_num <= 144{ [INFO] [stdout] 95 | | ... if try_grow_destroy(cell, cells, z, i, z as isize + (random_num as isize%12-6 ).signum(), i as isize+(random_num as isiz... [INFO] [stdout] 96 | | ... continue; [INFO] [stdout] 97 | | ... } [INFO] [stdout] 98 | | ... } [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] 94 ~ if random_num >= 120 && random_num <= 144 [INFO] [stdout] 95 ~ && try_grow_destroy(cell, cells, z, i, z as isize + (random_num as isize%12-6 ).signum(), i as isize+(random_num as isize%24-12 ).signum(), random_num){ [INFO] [stdout] 96 | continue; [INFO] [stdout] 97 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/cell_update.rs:94:28 [INFO] [stdout] | [INFO] [stdout] 94 | if random_num >= 120 && random_num <= 144{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(120..=144).contains(&random_num)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/structs.rs:46:9 [INFO] [stdout] | [INFO] [stdout] 46 | return new_pixel; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 46 - return new_pixel; [INFO] [stdout] 46 + new_pixel [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/shift.rs:5:32 [INFO] [stdout] | [INFO] [stdout] 5 | pub fn make_big_cells(regions: &mut Vec, big_cells: &mut 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] help: change this to [INFO] [stdout] | [INFO] [stdout] 5 - pub fn make_big_cells(regions: &mut Vec, big_cells: &mut Vec>>){ [INFO] [stdout] 5 + pub fn make_big_cells(regions: &mut [Region], big_cells: &mut Vec>>){ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/shift.rs:19:34 [INFO] [stdout] | [INFO] [stdout] 19 | pub fn update_regions_x(regions: &mut Vec,shift_delta: i32){ [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 19 - pub fn update_regions_x(regions: &mut Vec,shift_delta: i32){ [INFO] [stdout] 19 + pub fn update_regions_x(regions: &mut [Region],shift_delta: i32){ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/structs.rs:52:17 [INFO] [stdout] | [INFO] [stdout] 52 | x = x * !(x < 0) as isize; [INFO] [stdout] | ^^^^^^^^ help: try: `(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] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/structs.rs:53:17 [INFO] [stdout] | [INFO] [stdout] 53 | y = y * !(y < 0) as isize; [INFO] [stdout] | ^^^^^^^^ help: try: `(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 boolean expression can be simplified [INFO] [stdout] --> src/structs.rs:56:17 [INFO] [stdout] | [INFO] [stdout] 56 | x = x * !(x > CELL_SIZE) as usize + (CELL_SIZE)*(x > CELL_SIZE) as usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `(x <= CELL_SIZE)` [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 boolean expression can be simplified [INFO] [stdout] --> src/structs.rs:57:17 [INFO] [stdout] | [INFO] [stdout] 57 | y = y * !(y > CELL_SIZE) as usize + (CELL_SIZE)*(y > CELL_SIZE) as usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `(y <= CELL_SIZE)` [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: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/shift.rs:44:34 [INFO] [stdout] | [INFO] [stdout] 44 | pub fn update_regions_y(regions: &mut Vec,shift_delta: i32){ [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 44 - pub fn update_regions_y(regions: &mut Vec,shift_delta: i32){ [INFO] [stdout] 44 + pub fn update_regions_y(regions: &mut [Region],shift_delta: i32){ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/structs.rs:59:84 [INFO] [stdout] | [INFO] [stdout] 59 | self.rect.x1 = x*(self.rect.x1 + self.rect.x2 == 0)as usize + self.rect.x1*!(self.rect.x1 + self.rect.x2 == 0)as usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(self.rect.x1 + self.rect.x2 != 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 boolean expression can be simplified [INFO] [stdout] --> src/structs.rs:60:84 [INFO] [stdout] | [INFO] [stdout] 60 | self.rect.y1 = y*(self.rect.y1 + self.rect.y2 == 0)as usize + self.rect.y1*!(self.rect.y1 + self.rect.y2 == 0)as usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(self.rect.y1 + self.rect.y2 != 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: the loop variable `i` is only used to index `regions` [INFO] [stdout] --> src/shift.rs:47:18 [INFO] [stdout] | [INFO] [stdout] 47 | for i in 0..REGION_AMOUNT{ [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] 47 - for i in 0..REGION_AMOUNT{ [INFO] [stdout] 47 + for in regions.iter_mut().take(REGION_AMOUNT){ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/structs.rs:62:67 [INFO] [stdout] | [INFO] [stdout] 62 | self.rect.x1 = x*(x= self.rect.x1)` [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 boolean expression can be simplified [INFO] [stdout] --> src/structs.rs:63:67 [INFO] [stdout] | [INFO] [stdout] 63 | self.rect.x2 = x*(x>self.rect.x2) as usize + self.rect.x2*!(x>self.rect.x2) as usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `(x <= self.rect.x2)` [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 boolean expression can be simplified [INFO] [stdout] --> src/structs.rs:64:67 [INFO] [stdout] | [INFO] [stdout] 64 | self.rect.y1 = y*(y= self.rect.y1)` [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 boolean expression can be simplified [INFO] [stdout] --> src/structs.rs:65:67 [INFO] [stdout] | [INFO] [stdout] 65 | self.rect.y2 = y*(y>self.rect.y2) as usize + self.rect.y2*!(y>self.rect.y2) as usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `(y <= self.rect.y2)` [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 boolean expression can be simplified [INFO] [stdout] --> src/structs.rs:67:121 [INFO] [stdout] | [INFO] [stdout] 67 | ...ze + self.calculated_rect.x1*!(self.calculated_rect.x1 + self.calculated_rect.x2 == 0)as usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(self.calculated_rect.x1 + self.calculated_rect.x2 != 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 boolean expression can be simplified [INFO] [stdout] --> src/structs.rs:68:128 [INFO] [stdout] | [INFO] [stdout] 68 | ...ze + self.calculated_rect.y1*!(self.calculated_rect.y1 + self.calculated_rect.y2 == 0)as usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(self.calculated_rect.y1 + self.calculated_rect.y2 != 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 boolean expression can be simplified [INFO] [stdout] --> src/structs.rs:70:100 [INFO] [stdout] | [INFO] [stdout] 70 | ...e + self.calculated_rect.x1*!(x= self.calculated_rect.x1)` [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 boolean expression can be simplified [INFO] [stdout] --> src/structs.rs:71:100 [INFO] [stdout] | [INFO] [stdout] 71 | ...e + self.calculated_rect.x2*!(x>self.calculated_rect.x2) as usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(x <= self.calculated_rect.x2)` [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: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/shift.rs:65:30 [INFO] [stdout] | [INFO] [stdout] 65 | pub fn update_cells_x(cells: &mut Vec>>, big_cells: &mut Vec>>, shift_delta: [i32;2], shift_position... [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 65 - pub fn update_cells_x(cells: &mut Vec>>, big_cells: &mut Vec>>, shift_delta: [i32;2], shift_position: [i32;2]){ [INFO] [stdout] 65 + pub fn update_cells_x(cells: &mut [Arc>], big_cells: &mut Vec>>, shift_delta: [i32;2], shift_position: [i32;2]){ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/shift.rs:65:69 [INFO] [stdout] | [INFO] [stdout] 65 | pub fn update_cells_x(cells: &mut Vec>>, big_cells: &mut Vec>>, shift_delta: [i32;2], shift_position... [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 65 - pub fn update_cells_x(cells: &mut Vec>>, big_cells: &mut Vec>>, shift_delta: [i32;2], shift_position: [i32;2]){ [INFO] [stdout] 65 + pub fn update_cells_x(cells: &mut Vec>>, big_cells: &mut [Arc>], shift_delta: [i32;2], shift_position: [i32;2]){ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/structs.rs:72:100 [INFO] [stdout] | [INFO] [stdout] 72 | ...e + self.calculated_rect.y1*!(y= self.calculated_rect.y1)` [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 boolean expression can be simplified [INFO] [stdout] --> src/structs.rs:73:100 [INFO] [stdout] | [INFO] [stdout] 73 | ...e + self.calculated_rect.y2*!(y>self.calculated_rect.y2) as usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(y <= self.calculated_rect.y2)` [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: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/shift.rs:80:30 [INFO] [stdout] | [INFO] [stdout] 80 | pub fn update_cells_y(cells: &mut Vec>>, big_cells: &mut Vec>>,shift_delta: [i32;2], shift_position:... [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 80 - pub fn update_cells_y(cells: &mut Vec>>, big_cells: &mut Vec>>,shift_delta: [i32;2], shift_position: [i32;2]){ [INFO] [stdout] 80 + pub fn update_cells_y(cells: &mut [Arc>], big_cells: &mut Vec>>,shift_delta: [i32;2], shift_position: [i32;2]){ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/shift.rs:80:69 [INFO] [stdout] | [INFO] [stdout] 80 | pub fn update_cells_y(cells: &mut Vec>>, big_cells: &mut Vec>>,shift_delta: [i32;2], shift_position:... [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 80 - pub fn update_cells_y(cells: &mut Vec>>, big_cells: &mut Vec>>,shift_delta: [i32;2], shift_position: [i32;2]){ [INFO] [stdout] 80 + pub fn update_cells_y(cells: &mut Vec>>, big_cells: &mut [Arc>],shift_delta: [i32;2], shift_position: [i32;2]){ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/main.rs:49:1 [INFO] [stdout] | [INFO] [stdout] 49 | fn place_line(cells: &mut Vec>>,mut x1:i32,x2:i32,mut y1:i32,y2:i32,id:u8, color:[u8;3], brush_size:i32){ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/main.rs:49:22 [INFO] [stdout] | [INFO] [stdout] 49 | fn place_line(cells: &mut Vec>>,mut x1:i32,x2:i32,mut y1:i32,y2:i32,id:u8, color:[u8;3], brush_size:i32){ [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 49 - fn place_line(cells: &mut Vec>>,mut x1:i32,x2:i32,mut y1:i32,y2:i32,id:u8, color:[u8;3], brush_size:i32){ [INFO] [stdout] 49 + fn place_line(cells: &mut [Arc>],mut x1:i32,x2:i32,mut y1:i32,y2:i32,id:u8, color:[u8;3], brush_size:i32){ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/structs.rs:102:25 [INFO] [stdout] | [INFO] [stdout] 102 | self.pixel_data[y*PITCH + x*PITCH_SIZE + 0] = self.grid[y*CELL_SIZE + x].color[0]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `(y*PITCH + x*PITCH_SIZE)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] = note: `#[warn(clippy::identity_op)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/structs.rs:116:9 [INFO] [stdout] | [INFO] [stdout] 116 | return new_cell; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 116 - return new_cell; [INFO] [stdout] 116 + new_cell [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/structs.rs:119:94 [INFO] [stdout] | [INFO] [stdout] 119 | pub fn generate(&mut self, region_position:[i32;2], cell_position:[i32;2], texture_data: &Vec, biome: u32){ [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 119 - pub fn generate(&mut self, region_position:[i32;2], cell_position:[i32;2], texture_data: &Vec, biome: u32){ [INFO] [stdout] 119 + pub fn generate(&mut self, region_position:[i32;2], cell_position:[i32;2], texture_data: &[u8], biome: u32){ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:96:5 [INFO] [stdout] | [INFO] [stdout] 96 | return (biome_noise1.get_noise_2d(x , y)*biome_size* biome_noise2.get_noise_2d(x, y)) as u32/8; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 96 - return (biome_noise1.get_noise_2d(x , y)*biome_size* biome_noise2.get_noise_2d(x, y)) as u32/8; [INFO] [stdout] 96 + (biome_noise1.get_noise_2d(x , y)*biome_size* biome_noise2.get_noise_2d(x, y)) as u32/8 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:155:5 [INFO] [stdout] | [INFO] [stdout] 155 | return map_data; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 155 - return map_data; [INFO] [stdout] 155 + map_data [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:100:27 [INFO] [stdout] | [INFO] [stdout] 100 | pub fn update_map(regions:&Vec, biome_noise1:&FastNoiseLite,biome_noise2:&FastNoiseLite) -> 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] help: change this to [INFO] [stdout] | [INFO] [stdout] 100 - pub fn update_map(regions:&Vec, biome_noise1:&FastNoiseLite,biome_noise2:&FastNoiseLite) -> Vec{ [INFO] [stdout] 100 + pub fn update_map(regions:&[Region], biome_noise1:&FastNoiseLite,biome_noise2:&FastNoiseLite) -> Vec{ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/structs.rs:146:21 [INFO] [stdout] | [INFO] [stdout] 146 | saturation = saturation/4; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `saturation /= 4` [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 binary expression can be simplified [INFO] [stdout] --> src/main.rs:141:16 [INFO] [stdout] | [INFO] [stdout] 141 | if j >= CELL_SIZE/2 && j <= CELL_SIZE/2 && i >= CELL_SIZE/2 && i<= CELL_SIZE/2{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `j == CELL_SIZE/2` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_comparisons [INFO] [stdout] = note: `#[warn(clippy::double_comparisons)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/structs.rs:182:12 [INFO] [stdout] | [INFO] [stdout] 182 | if self.cells.len() == 0{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.cells.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/structs.rs:187:60 [INFO] [stdout] | [INFO] [stdout] 187 | cell.generate(self.position, cell_position,&texture_data,self.biome); [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `texture_data` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [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:159:30 [INFO] [stdout] | [INFO] [stdout] 159 | pub fn screenshot(big_cells: &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] help: change this to [INFO] [stdout] | [INFO] [stdout] 159 - pub fn screenshot(big_cells: &Vec>>){ [INFO] [stdout] 159 + pub fn screenshot(big_cells: &[Arc>]){ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/structs.rs:195:60 [INFO] [stdout] | [INFO] [stdout] 195 | cell.generate(self.position, cell_position,&texture_data, self.biome); [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `texture_data` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `u8` which implements the `Copy` trait [INFO] [stdout] --> src/main.rs:166:42 [INFO] [stdout] | [INFO] [stdout] 166 | screenshot_data.push(cell.pixel_data[x + y*PITCH].clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `cell.pixel_data[x + y*PITCH]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/structs.rs:203:53 [INFO] [stdout] | [INFO] [stdout] 203 | cell.generate(self.position, cell_position, &texture_data,self.biome); [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `texture_data` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/entity.rs:19:55 [INFO] [stdout] | [INFO] [stdout] 19 | pub fn check_collision(entity:&mut Entity, big_cells: &mut Vec>>, world_position:[i32;2]){ [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 19 - pub fn check_collision(entity:&mut Entity, big_cells: &mut Vec>>, world_position:[i32;2]){ [INFO] [stdout] 19 + pub fn check_collision(entity:&mut Entity, big_cells: &mut [Arc>], world_position:[i32;2]){ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/entity.rs:33:17 [INFO] [stdout] | [INFO] [stdout] 33 | in_cell_x = CELL_SIZE as i32 + in_cell_x; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `in_cell_x += CELL_SIZE as i32` [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: manual implementation of an assign operation [INFO] [stdout] --> src/entity.rs:36:17 [INFO] [stdout] | [INFO] [stdout] 36 | in_cell_y = CELL_SIZE as i32 + in_cell_y; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `in_cell_y += CELL_SIZE as i32` [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: manual implementation of an assign operation [INFO] [stdout] --> src/entity.rs:39:17 [INFO] [stdout] | [INFO] [stdout] 39 | in_cell2_y = CELL_SIZE as i32 + in_cell2_y; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `in_cell2_y += CELL_SIZE as i32` [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: call to `reserve` immediately after creation [INFO] [stdout] --> src/main.rs:276:5 [INFO] [stdout] | [INFO] [stdout] 276 | / let mut big_cells = vec![]; [INFO] [stdout] 277 | | big_cells.reserve(CELL_AMOUNT*CELL_AMOUNT*ACTIVE_REGS*ACTIVE_REGS); [INFO] [stdout] | |_______________________________________________________________________^ help: consider using `Vec::with_capacity(/* Space hint */)`: `let mut big_cells = Vec::with_capacity(CELL_AMOUNT*CELL_AMOUNT*ACTIVE_REGS*ACTIVE_REGS);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#reserve_after_initialization [INFO] [stdout] = note: `#[warn(clippy::reserve_after_initialization)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/entity.rs:74:17 [INFO] [stdout] | [INFO] [stdout] 74 | in_cell_x = CELL_SIZE as i32 + in_cell_x; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `in_cell_x += CELL_SIZE as i32` [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: manual implementation of an assign operation [INFO] [stdout] --> src/entity.rs:77:17 [INFO] [stdout] | [INFO] [stdout] 77 | in_cell_y = CELL_SIZE as i32 + in_cell_y; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `in_cell_y += CELL_SIZE as i32` [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: manual implementation of an assign operation [INFO] [stdout] --> src/entity.rs:80:17 [INFO] [stdout] | [INFO] [stdout] 80 | in_cell2_x = CELL_SIZE as i32 + in_cell2_x; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `in_cell2_x += CELL_SIZE as i32` [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: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/shift.rs:5:32 [INFO] [stdout] | [INFO] [stdout] 5 | pub fn make_big_cells(regions: &mut Vec, big_cells: &mut 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] help: change this to [INFO] [stdout] | [INFO] [stdout] 5 - pub fn make_big_cells(regions: &mut Vec, big_cells: &mut Vec>>){ [INFO] [stdout] 5 + pub fn make_big_cells(regions: &mut [Region], big_cells: &mut Vec>>){ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/shift.rs:19:34 [INFO] [stdout] | [INFO] [stdout] 19 | pub fn update_regions_x(regions: &mut Vec,shift_delta: i32){ [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 19 - pub fn update_regions_x(regions: &mut Vec,shift_delta: i32){ [INFO] [stdout] 19 + pub fn update_regions_x(regions: &mut [Region],shift_delta: i32){ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `regions` [INFO] [stdout] --> src/main.rs:443:18 [INFO] [stdout] | [INFO] [stdout] 443 | for i in 0..REGION_AMOUNT*REGION_AMOUNT{ [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 and enumerate() [INFO] [stdout] | [INFO] [stdout] 443 - for i in 0..REGION_AMOUNT*REGION_AMOUNT{ [INFO] [stdout] 443 + for (i, ) in regions.iter_mut().enumerate().take(REGION_AMOUNT*REGION_AMOUNT){ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/shift.rs:44:34 [INFO] [stdout] | [INFO] [stdout] 44 | pub fn update_regions_y(regions: &mut Vec,shift_delta: i32){ [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 44 - pub fn update_regions_y(regions: &mut Vec,shift_delta: i32){ [INFO] [stdout] 44 + pub fn update_regions_y(regions: &mut [Region],shift_delta: i32){ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `regions` [INFO] [stdout] --> src/shift.rs:47:18 [INFO] [stdout] | [INFO] [stdout] 47 | for i in 0..REGION_AMOUNT{ [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] 47 - for i in 0..REGION_AMOUNT{ [INFO] [stdout] 47 + for in regions.iter_mut().take(REGION_AMOUNT){ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/shift.rs:65:30 [INFO] [stdout] | [INFO] [stdout] 65 | pub fn update_cells_x(cells: &mut Vec>>, big_cells: &mut Vec>>, shift_delta: [i32;2], shift_position... [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 65 - pub fn update_cells_x(cells: &mut Vec>>, big_cells: &mut Vec>>, shift_delta: [i32;2], shift_position: [i32;2]){ [INFO] [stdout] 65 + pub fn update_cells_x(cells: &mut [Arc>], big_cells: &mut Vec>>, shift_delta: [i32;2], shift_position: [i32;2]){ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/shift.rs:65:69 [INFO] [stdout] | [INFO] [stdout] 65 | pub fn update_cells_x(cells: &mut Vec>>, big_cells: &mut Vec>>, shift_delta: [i32;2], shift_position... [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 65 - pub fn update_cells_x(cells: &mut Vec>>, big_cells: &mut Vec>>, shift_delta: [i32;2], shift_position: [i32;2]){ [INFO] [stdout] 65 + pub fn update_cells_x(cells: &mut Vec>>, big_cells: &mut [Arc>], shift_delta: [i32;2], shift_position: [i32;2]){ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/shift.rs:80:30 [INFO] [stdout] | [INFO] [stdout] 80 | pub fn update_cells_y(cells: &mut Vec>>, big_cells: &mut Vec>>,shift_delta: [i32;2], shift_position:... [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 80 - pub fn update_cells_y(cells: &mut Vec>>, big_cells: &mut Vec>>,shift_delta: [i32;2], shift_position: [i32;2]){ [INFO] [stdout] 80 + pub fn update_cells_y(cells: &mut [Arc>], big_cells: &mut Vec>>,shift_delta: [i32;2], shift_position: [i32;2]){ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/shift.rs:80:69 [INFO] [stdout] | [INFO] [stdout] 80 | pub fn update_cells_y(cells: &mut Vec>>, big_cells: &mut Vec>>,shift_delta: [i32;2], shift_position:... [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 80 - pub fn update_cells_y(cells: &mut Vec>>, big_cells: &mut Vec>>,shift_delta: [i32;2], shift_position: [i32;2]){ [INFO] [stdout] 80 + pub fn update_cells_y(cells: &mut Vec>>, big_cells: &mut [Arc>],shift_delta: [i32;2], shift_position: [i32;2]){ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/main.rs:49:1 [INFO] [stdout] | [INFO] [stdout] 49 | fn place_line(cells: &mut Vec>>,mut x1:i32,x2:i32,mut y1:i32,y2:i32,id:u8, color:[u8;3], brush_size:i32){ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/main.rs:49:22 [INFO] [stdout] | [INFO] [stdout] 49 | fn place_line(cells: &mut Vec>>,mut x1:i32,x2:i32,mut y1:i32,y2:i32,id:u8, color:[u8;3], brush_size:i32){ [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 49 - fn place_line(cells: &mut Vec>>,mut x1:i32,x2:i32,mut y1:i32,y2:i32,id:u8, color:[u8;3], brush_size:i32){ [INFO] [stdout] 49 + fn place_line(cells: &mut [Arc>],mut x1:i32,x2:i32,mut y1:i32,y2:i32,id:u8, color:[u8;3], brush_size:i32){ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `cells` [INFO] [stdout] --> src/main.rs:517:22 [INFO] [stdout] | [INFO] [stdout] 517 | for i in 0..(CELL_AMOUNT*CELL_AMOUNT){ [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 and enumerate() [INFO] [stdout] | [INFO] [stdout] 517 - for i in 0..(CELL_AMOUNT*CELL_AMOUNT){ [INFO] [stdout] 517 + for (i, ) in cells.iter().enumerate().take((CELL_AMOUNT*CELL_AMOUNT)){ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:96:5 [INFO] [stdout] | [INFO] [stdout] 96 | return (biome_noise1.get_noise_2d(x , y)*biome_size* biome_noise2.get_noise_2d(x, y)) as u32/8; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 96 - return (biome_noise1.get_noise_2d(x , y)*biome_size* biome_noise2.get_noise_2d(x, y)) as u32/8; [INFO] [stdout] 96 + (biome_noise1.get_noise_2d(x , y)*biome_size* biome_noise2.get_noise_2d(x, y)) as u32/8 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:155:5 [INFO] [stdout] | [INFO] [stdout] 155 | return map_data; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 155 - return map_data; [INFO] [stdout] 155 + map_data [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:100:27 [INFO] [stdout] | [INFO] [stdout] 100 | pub fn update_map(regions:&Vec, biome_noise1:&FastNoiseLite,biome_noise2:&FastNoiseLite) -> 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] help: change this to [INFO] [stdout] | [INFO] [stdout] 100 - pub fn update_map(regions:&Vec, biome_noise1:&FastNoiseLite,biome_noise2:&FastNoiseLite) -> Vec{ [INFO] [stdout] 100 + pub fn update_map(regions:&[Region], biome_noise1:&FastNoiseLite,biome_noise2:&FastNoiseLite) -> Vec{ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this binary expression can be simplified [INFO] [stdout] --> src/main.rs:141:16 [INFO] [stdout] | [INFO] [stdout] 141 | if j >= CELL_SIZE/2 && j <= CELL_SIZE/2 && i >= CELL_SIZE/2 && i<= CELL_SIZE/2{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `j == CELL_SIZE/2` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_comparisons [INFO] [stdout] = note: `#[warn(clippy::double_comparisons)]` on by default [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:159:30 [INFO] [stdout] | [INFO] [stdout] 159 | pub fn screenshot(big_cells: &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] help: change this to [INFO] [stdout] | [INFO] [stdout] 159 - pub fn screenshot(big_cells: &Vec>>){ [INFO] [stdout] 159 + pub fn screenshot(big_cells: &[Arc>]){ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `u8` which implements the `Copy` trait [INFO] [stdout] --> src/main.rs:166:42 [INFO] [stdout] | [INFO] [stdout] 166 | screenshot_data.push(cell.pixel_data[x + y*PITCH].clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `cell.pixel_data[x + y*PITCH]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `reserve` immediately after creation [INFO] [stdout] --> src/main.rs:276:5 [INFO] [stdout] | [INFO] [stdout] 276 | / let mut big_cells = vec![]; [INFO] [stdout] 277 | | big_cells.reserve(CELL_AMOUNT*CELL_AMOUNT*ACTIVE_REGS*ACTIVE_REGS); [INFO] [stdout] | |_______________________________________________________________________^ help: consider using `Vec::with_capacity(/* Space hint */)`: `let mut big_cells = Vec::with_capacity(CELL_AMOUNT*CELL_AMOUNT*ACTIVE_REGS*ACTIVE_REGS);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#reserve_after_initialization [INFO] [stdout] = note: `#[warn(clippy::reserve_after_initialization)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `regions` [INFO] [stdout] --> src/main.rs:443:18 [INFO] [stdout] | [INFO] [stdout] 443 | for i in 0..REGION_AMOUNT*REGION_AMOUNT{ [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 and enumerate() [INFO] [stdout] | [INFO] [stdout] 443 - for i in 0..REGION_AMOUNT*REGION_AMOUNT{ [INFO] [stdout] 443 + for (i, ) in regions.iter_mut().enumerate().take(REGION_AMOUNT*REGION_AMOUNT){ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `cells` [INFO] [stdout] --> src/main.rs:517:22 [INFO] [stdout] | [INFO] [stdout] 517 | for i in 0..(CELL_AMOUNT*CELL_AMOUNT){ [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 and enumerate() [INFO] [stdout] | [INFO] [stdout] 517 - for i in 0..(CELL_AMOUNT*CELL_AMOUNT){ [INFO] [stdout] 517 + for (i, ) in cells.iter().enumerate().take((CELL_AMOUNT*CELL_AMOUNT)){ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [optimized + debuginfo] target(s) in 8.76s [INFO] running `Command { std: "docker" "inspect" "eb4aeb47a89d0447a416c4c8fd19ade073ce5547320e784a6e22264dade46da6", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "eb4aeb47a89d0447a416c4c8fd19ade073ce5547320e784a6e22264dade46da6", kill_on_drop: false }` [INFO] [stdout] eb4aeb47a89d0447a416c4c8fd19ade073ce5547320e784a6e22264dade46da6