[INFO] cloning repository https://github.com/morgan-mcnabb/chip8-emulator [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/morgan-mcnabb/chip8-emulator" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fmorgan-mcnabb%2Fchip8-emulator", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fmorgan-mcnabb%2Fchip8-emulator'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] ae31c84946194ebe5216e07cb3185e5db3db57e7 [INFO] linting morgan-mcnabb/chip8-emulator against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fmorgan-mcnabb%2Fchip8-emulator" "/workspace/builds/worker-3-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-3-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/morgan-mcnabb/chip8-emulator [INFO] finished tweaking git repo https://github.com/morgan-mcnabb/chip8-emulator [INFO] tweaked toml for git repo https://github.com/morgan-mcnabb/chip8-emulator written to /workspace/builds/worker-3-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/morgan-mcnabb/chip8-emulator 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/morgan-mcnabb/chip8-emulator 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] Downloading crates ... [INFO] [stderr] Downloaded bytemuck v1.14.1 [INFO] [stderr] Downloaded winnow v0.5.36 [INFO] [stderr] Downloaded sdl2 v0.36.0 [INFO] [stderr] Downloaded sdl2-sys v0.36.0 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-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] fedd4da87b579158742dea8e6e813f9a93a50c9a5987bb45d14f1deaba581ca1 [INFO] running `Command { std: "docker" "start" "-a" "fedd4da87b579158742dea8e6e813f9a93a50c9a5987bb45d14f1deaba581ca1", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "fedd4da87b579158742dea8e6e813f9a93a50c9a5987bb45d14f1deaba581ca1", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "fedd4da87b579158742dea8e6e813f9a93a50c9a5987bb45d14f1deaba581ca1", kill_on_drop: false }` [INFO] [stdout] fedd4da87b579158742dea8e6e813f9a93a50c9a5987bb45d14f1deaba581ca1 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-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] aa0f8bdd651da4602b16e39aaf56d1e19c5ac5a32784e5030ac9692335c774b2 [INFO] running `Command { std: "docker" "start" "-a" "aa0f8bdd651da4602b16e39aaf56d1e19c5ac5a32784e5030ac9692335c774b2", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.152 [INFO] [stderr] Compiling pkg-config v0.3.29 [INFO] [stderr] Checking bytemuck v1.14.1 [INFO] [stderr] Compiling version-compare v0.1.1 [INFO] [stderr] Checking smallvec v1.13.1 [INFO] [stderr] Compiling cpal v0.15.2 [INFO] [stderr] Compiling sdl2 v0.36.0 [INFO] [stderr] Checking claxon v0.4.3 [INFO] [stderr] Checking symphonia-core v0.5.3 [INFO] [stderr] Compiling sdl2-sys v0.36.0 [INFO] [stderr] Compiling alsa-sys v0.3.1 [INFO] [stderr] Checking symphonia-metadata v0.5.3 [INFO] [stderr] Checking nix v0.24.3 [INFO] [stderr] Checking getrandom v0.2.12 [INFO] [stderr] Checking parking_lot_core v0.9.9 [INFO] [stderr] Checking symphonia-bundle-mp3 v0.5.3 [INFO] [stderr] Checking rand_core v0.6.4 [INFO] [stderr] Checking parking_lot v0.12.1 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Checking alsa v0.7.1 [INFO] [stderr] Checking rand v0.8.5 [INFO] [stderr] Checking symphonia v0.5.3 [INFO] [stderr] Checking rodio v0.17.3 [INFO] [stderr] Checking chip8-emulator v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/display.rs:25:13 [INFO] [stdout] | [INFO] [stdout] 25 | renderer: renderer, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `renderer` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/display.rs:26:13 [INFO] [stdout] | [INFO] [stdout] 26 | event_pump: event_pump, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `event_pump` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/pixel.rs:12:17 [INFO] [stdout] | [INFO] [stdout] 12 | Pixel { x: x, y: y, on: on } [INFO] [stdout] | ^^^^ help: replace it with: `x` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/pixel.rs:12:23 [INFO] [stdout] | [INFO] [stdout] 12 | Pixel { x: x, y: y, on: on } [INFO] [stdout] | ^^^^ help: replace it with: `y` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/pixel.rs:12:29 [INFO] [stdout] | [INFO] [stdout] 12 | Pixel { x: x, y: y, on: on } [INFO] [stdout] | ^^^^^^ help: replace it with: `on` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/display.rs:25:13 [INFO] [stdout] | [INFO] [stdout] 25 | renderer: renderer, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `renderer` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/display.rs:26:13 [INFO] [stdout] | [INFO] [stdout] 26 | event_pump: event_pump, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `event_pump` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/pixel.rs:12:17 [INFO] [stdout] | [INFO] [stdout] 12 | Pixel { x: x, y: y, on: on } [INFO] [stdout] | ^^^^ help: replace it with: `x` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/pixel.rs:12:23 [INFO] [stdout] | [INFO] [stdout] 12 | Pixel { x: x, y: y, on: on } [INFO] [stdout] | ^^^^ help: replace it with: `y` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/pixel.rs:12:29 [INFO] [stdout] | [INFO] [stdout] 12 | Pixel { x: x, y: y, on: on } [INFO] [stdout] | ^^^^^^ help: replace it with: `on` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `event_pump` [INFO] [stdout] --> src/chip8.rs:150:72 [INFO] [stdout] | [INFO] [stdout] 150 | pub fn handle_next_instruction(&mut self, keyboard: &mut Keyboard, event_pump: &mut EventPump) { [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_event_pump` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `stream` is never read [INFO] [stdout] --> src/audio.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 3 | pub struct AudioDriver { [INFO] [stdout] | ----------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 6 | stream: OutputStream, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `set_register_value` and `play_sound` are never used [INFO] [stdout] --> src/chip8.rs:118:12 [INFO] [stdout] | [INFO] [stdout] 26 | impl Chip8 { [INFO] [stdout] | ---------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 118 | pub fn set_register_value(&mut self, register: u8, value: u8) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 132 | pub fn play_sound(&self) { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: it looks like you're manually copying between slices [INFO] [stdout] --> src/chip8.rs:77:9 [INFO] [stdout] | [INFO] [stdout] 77 | / for index in 0..rom_contents.len() { [INFO] [stdout] 78 | | self.memory[mem_start_location + index] = rom_contents[index]; [INFO] [stdout] 79 | | } [INFO] [stdout] | |_________^ help: try replacing the loop by: `self.memory[mem_start_location..(rom_contents.len() + mem_start_location)].copy_from_slice(&rom_contents[..]);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_memcpy [INFO] [stdout] = note: `#[warn(clippy::manual_memcpy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/chip8.rs:87:12 [INFO] [stdout] | [INFO] [stdout] 87 | if height % DEFAULT_CHIP8_PIXEL_HEIGHT != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `!height.is_multiple_of(DEFAULT_CHIP8_PIXEL_HEIGHT)` [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 `.is_multiple_of()` [INFO] [stdout] --> src/chip8.rs:91:12 [INFO] [stdout] | [INFO] [stdout] 91 | if width % DEFAULT_CHIP8_PIXEL_WIDTH != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `!width.is_multiple_of(DEFAULT_CHIP8_PIXEL_WIDTH)` [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/chip8.rs:124:13 [INFO] [stdout] | [INFO] [stdout] 124 | self.sound_timer = self.sound_timer - 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.sound_timer -= 1` [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/chip8.rs:139:13 [INFO] [stdout] | [INFO] [stdout] 139 | self.delay_timer = self.delay_timer - 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.delay_timer -= 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/chip8.rs:422:24 [INFO] [stdout] | [INFO] [stdout] 422 | if !(index >= self.memory.len() - 2) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(index < self.memory.len() - 2)` [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/chip8.rs:442:24 [INFO] [stdout] | [INFO] [stdout] 442 | if !(i >= self.memory.len() - 2) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(i < self.memory.len() - 2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/chip8.rs:193:17 [INFO] [stdout] | [INFO] [stdout] 193 | / if self.registers[x_index] == nn { [INFO] [stdout] 194 | | self.program_counter = self.program_counter + 2; [INFO] [stdout] 195 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 191 ~ 0x3 [INFO] [stdout] 192 | // ("conditional, 3XNN: skips next instruction if Vx = NN"); [INFO] [stdout] 193 ~ if self.registers[x_index] == nn => { [INFO] [stdout] 194 | self.program_counter = self.program_counter + 2; [INFO] [stdout] 195 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/chip8.rs:199:17 [INFO] [stdout] | [INFO] [stdout] 199 | / if self.registers[x_index] != nn { [INFO] [stdout] 200 | | self.program_counter = self.program_counter + 2; [INFO] [stdout] 201 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 197 ~ 0x4 [INFO] [stdout] 198 | // ("conditional, 4XNN: skips next instruction if Vx != NN"); [INFO] [stdout] 199 ~ if self.registers[x_index] != nn => { [INFO] [stdout] 200 | self.program_counter = self.program_counter + 2; [INFO] [stdout] 201 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/chip8.rs:205:17 [INFO] [stdout] | [INFO] [stdout] 205 | / if self.registers[x_index] == self.registers[y_index] { [INFO] [stdout] 206 | | self.program_counter = self.program_counter + 2; [INFO] [stdout] 207 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 203 ~ 0x5 [INFO] [stdout] 204 | // ("conditional, 5XY0: skips next instruction if Vx == Vy"); [INFO] [stdout] 205 ~ if self.registers[x_index] == self.registers[y_index] => { [INFO] [stdout] 206 | self.program_counter = self.program_counter + 2; [INFO] [stdout] 207 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/chip8.rs:293:17 [INFO] [stdout] | [INFO] [stdout] 293 | / if self.registers[x_index] != self.registers[y_index] { [INFO] [stdout] 294 | | self.program_counter = self.program_counter + 2; [INFO] [stdout] 295 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 291 ~ 0x9 [INFO] [stdout] 292 | // ("9XY0: skips the next instruction if Vx != Vy"); [INFO] [stdout] 293 ~ if self.registers[x_index] != self.registers[y_index] => { [INFO] [stdout] 294 | self.program_counter = self.program_counter + 2; [INFO] [stdout] 295 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/chip8.rs:194:21 [INFO] [stdout] | [INFO] [stdout] 194 | self.program_counter = self.program_counter + 2; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.program_counter += 2` [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/chip8.rs:200:21 [INFO] [stdout] | [INFO] [stdout] 200 | self.program_counter = self.program_counter + 2; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.program_counter += 2` [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/chip8.rs:206:21 [INFO] [stdout] | [INFO] [stdout] 206 | self.program_counter = self.program_counter + 2; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.program_counter += 2` [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/chip8.rs:224:21 [INFO] [stdout] | [INFO] [stdout] 224 | self.registers[x_index] = self.registers[x_index] | self.registers[y_index]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.registers[x_index] |= self.registers[y_index]` [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/chip8.rs:228:21 [INFO] [stdout] | [INFO] [stdout] 228 | self.registers[x_index] = self.registers[x_index] & self.registers[y_index]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.registers[x_index] &= self.registers[y_index]` [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/chip8.rs:232:21 [INFO] [stdout] | [INFO] [stdout] 232 | self.registers[x_index] = self.registers[x_index] ^ self.registers[y_index]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.registers[x_index] ^= self.registers[y_index]` [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/chip8.rs:266:21 [INFO] [stdout] | [INFO] [stdout] 266 | self.registers[x_index] = self.registers[x_index] >> 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.registers[x_index] >>= 1` [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/chip8.rs:286:21 [INFO] [stdout] | [INFO] [stdout] 286 | self.registers[x_index] = self.registers[x_index] << 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.registers[x_index] <<= 1` [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/chip8.rs:294:21 [INFO] [stdout] | [INFO] [stdout] 294 | self.program_counter = self.program_counter + 2; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.program_counter += 2` [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/chip8.rs:352:25 [INFO] [stdout] | [INFO] [stdout] 352 | self.program_counter = self.program_counter + 2; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.program_counter += 2` [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/chip8.rs:359:25 [INFO] [stdout] | [INFO] [stdout] 359 | self.program_counter = self.program_counter + 2; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.program_counter += 2` [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: statement with no effect [INFO] [stdout] --> src/chip8.rs:363:21 [INFO] [stdout] | [INFO] [stdout] 363 | ("invalid opcode"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect [INFO] [stdout] = note: `#[warn(clippy::no_effect)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/chip8.rs:382:21 [INFO] [stdout] | [INFO] [stdout] 382 | / if self.awaiting_keylift { [INFO] [stdout] 383 | | if !keyboard.get_state()[keyboard.get_halt_key()] { [INFO] [stdout] 384 | | self.awaiting_keylift = false; [INFO] [stdout] 385 | | self.registers[x_index] = keyboard.get_halt_key() as u8; [INFO] [stdout] 386 | | } [INFO] [stdout] 387 | | } [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] 382 ~ if self.awaiting_keylift [INFO] [stdout] 383 ~ && !keyboard.get_state()[keyboard.get_halt_key()] { [INFO] [stdout] 384 | self.awaiting_keylift = false; [INFO] [stdout] 385 | self.registers[x_index] = keyboard.get_halt_key() as u8; [INFO] [stdout] 386 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/chip8.rs:392:25 [INFO] [stdout] | [INFO] [stdout] 392 | self.program_counter = self.program_counter - 2; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.program_counter -= 2` [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/chip8.rs:405:21 [INFO] [stdout] | [INFO] [stdout] 405 | self.index_register = self.index_register + self.registers[x_index] as u16; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.index_register += self.registers[x_index] as u16` [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: unused variable: `event_pump` [INFO] [stdout] --> src/chip8.rs:150:72 [INFO] [stdout] | [INFO] [stdout] 150 | pub fn handle_next_instruction(&mut self, keyboard: &mut Keyboard, event_pump: &mut EventPump) { [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_event_pump` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/chip8.rs:456:13 [INFO] [stdout] | [INFO] [stdout] 456 | self.program_counter = self.program_counter + 2; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.program_counter += 2` [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: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/keyboard.rs:58:9 [INFO] [stdout] | [INFO] [stdout] 58 | self.halt_key as usize [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.halt_key` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `stream` is never read [INFO] [stdout] --> src/audio.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 3 | pub struct AudioDriver { [INFO] [stdout] | ----------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 6 | stream: OutputStream, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `set_register_value` and `play_sound` are never used [INFO] [stdout] --> src/chip8.rs:118:12 [INFO] [stdout] | [INFO] [stdout] 26 | impl Chip8 { [INFO] [stdout] | ---------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 118 | pub fn set_register_value(&mut self, register: u8, value: u8) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 132 | pub fn play_sound(&self) { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: it looks like you're manually copying between slices [INFO] [stdout] --> src/chip8.rs:77:9 [INFO] [stdout] | [INFO] [stdout] 77 | / for index in 0..rom_contents.len() { [INFO] [stdout] 78 | | self.memory[mem_start_location + index] = rom_contents[index]; [INFO] [stdout] 79 | | } [INFO] [stdout] | |_________^ help: try replacing the loop by: `self.memory[mem_start_location..(rom_contents.len() + mem_start_location)].copy_from_slice(&rom_contents[..]);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_memcpy [INFO] [stdout] = note: `#[warn(clippy::manual_memcpy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/renderer.rs:31:17 [INFO] [stdout] | [INFO] [stdout] 31 | / self.canvas.fill_rect(Rect::new( [INFO] [stdout] 32 | | (pixel.x * chip8.vram_scale as u32) as i32, [INFO] [stdout] 33 | | (pixel.y * chip8.vram_scale as u32) as i32, [INFO] [stdout] 34 | | chip8.vram_scale as u32, [INFO] [stdout] 35 | | chip8.vram_scale as u32, [INFO] [stdout] 36 | | )); [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 31 | let _ = self.canvas.fill_rect(Rect::new( [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/chip8.rs:87:12 [INFO] [stdout] | [INFO] [stdout] 87 | if height % DEFAULT_CHIP8_PIXEL_HEIGHT != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `!height.is_multiple_of(DEFAULT_CHIP8_PIXEL_HEIGHT)` [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 `.is_multiple_of()` [INFO] [stdout] --> src/chip8.rs:91:12 [INFO] [stdout] | [INFO] [stdout] 91 | if width % DEFAULT_CHIP8_PIXEL_WIDTH != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `!width.is_multiple_of(DEFAULT_CHIP8_PIXEL_WIDTH)` [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/chip8.rs:124:13 [INFO] [stdout] | [INFO] [stdout] 124 | self.sound_timer = self.sound_timer - 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.sound_timer -= 1` [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/chip8.rs:139:13 [INFO] [stdout] | [INFO] [stdout] 139 | self.delay_timer = self.delay_timer - 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.delay_timer -= 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/chip8.rs:422:24 [INFO] [stdout] | [INFO] [stdout] 422 | if !(index >= self.memory.len() - 2) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(index < self.memory.len() - 2)` [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/chip8.rs:442:24 [INFO] [stdout] | [INFO] [stdout] 442 | if !(i >= self.memory.len() - 2) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(i < self.memory.len() - 2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/chip8.rs:193:17 [INFO] [stdout] | [INFO] [stdout] 193 | / if self.registers[x_index] == nn { [INFO] [stdout] 194 | | self.program_counter = self.program_counter + 2; [INFO] [stdout] 195 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 191 ~ 0x3 [INFO] [stdout] 192 | // ("conditional, 3XNN: skips next instruction if Vx = NN"); [INFO] [stdout] 193 ~ if self.registers[x_index] == nn => { [INFO] [stdout] 194 | self.program_counter = self.program_counter + 2; [INFO] [stdout] 195 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/chip8.rs:199:17 [INFO] [stdout] | [INFO] [stdout] 199 | / if self.registers[x_index] != nn { [INFO] [stdout] 200 | | self.program_counter = self.program_counter + 2; [INFO] [stdout] 201 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 197 ~ 0x4 [INFO] [stdout] 198 | // ("conditional, 4XNN: skips next instruction if Vx != NN"); [INFO] [stdout] 199 ~ if self.registers[x_index] != nn => { [INFO] [stdout] 200 | self.program_counter = self.program_counter + 2; [INFO] [stdout] 201 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/chip8.rs:205:17 [INFO] [stdout] | [INFO] [stdout] 205 | / if self.registers[x_index] == self.registers[y_index] { [INFO] [stdout] 206 | | self.program_counter = self.program_counter + 2; [INFO] [stdout] 207 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 203 ~ 0x5 [INFO] [stdout] 204 | // ("conditional, 5XY0: skips next instruction if Vx == Vy"); [INFO] [stdout] 205 ~ if self.registers[x_index] == self.registers[y_index] => { [INFO] [stdout] 206 | self.program_counter = self.program_counter + 2; [INFO] [stdout] 207 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/chip8.rs:293:17 [INFO] [stdout] | [INFO] [stdout] 293 | / if self.registers[x_index] != self.registers[y_index] { [INFO] [stdout] 294 | | self.program_counter = self.program_counter + 2; [INFO] [stdout] 295 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 291 ~ 0x9 [INFO] [stdout] 292 | // ("9XY0: skips the next instruction if Vx != Vy"); [INFO] [stdout] 293 ~ if self.registers[x_index] != self.registers[y_index] => { [INFO] [stdout] 294 | self.program_counter = self.program_counter + 2; [INFO] [stdout] 295 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/chip8.rs:194:21 [INFO] [stdout] | [INFO] [stdout] 194 | self.program_counter = self.program_counter + 2; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.program_counter += 2` [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/chip8.rs:200:21 [INFO] [stdout] | [INFO] [stdout] 200 | self.program_counter = self.program_counter + 2; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.program_counter += 2` [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/chip8.rs:206:21 [INFO] [stdout] | [INFO] [stdout] 206 | self.program_counter = self.program_counter + 2; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.program_counter += 2` [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/chip8.rs:224:21 [INFO] [stdout] | [INFO] [stdout] 224 | self.registers[x_index] = self.registers[x_index] | self.registers[y_index]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.registers[x_index] |= self.registers[y_index]` [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/chip8.rs:228:21 [INFO] [stdout] | [INFO] [stdout] 228 | self.registers[x_index] = self.registers[x_index] & self.registers[y_index]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.registers[x_index] &= self.registers[y_index]` [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/chip8.rs:232:21 [INFO] [stdout] | [INFO] [stdout] 232 | self.registers[x_index] = self.registers[x_index] ^ self.registers[y_index]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.registers[x_index] ^= self.registers[y_index]` [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/chip8.rs:266:21 [INFO] [stdout] | [INFO] [stdout] 266 | self.registers[x_index] = self.registers[x_index] >> 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.registers[x_index] >>= 1` [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/chip8.rs:286:21 [INFO] [stdout] | [INFO] [stdout] 286 | self.registers[x_index] = self.registers[x_index] << 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.registers[x_index] <<= 1` [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/chip8.rs:294:21 [INFO] [stdout] | [INFO] [stdout] 294 | self.program_counter = self.program_counter + 2; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.program_counter += 2` [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/chip8.rs:352:25 [INFO] [stdout] | [INFO] [stdout] 352 | self.program_counter = self.program_counter + 2; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.program_counter += 2` [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/chip8.rs:359:25 [INFO] [stdout] | [INFO] [stdout] 359 | self.program_counter = self.program_counter + 2; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.program_counter += 2` [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: statement with no effect [INFO] [stdout] --> src/chip8.rs:363:21 [INFO] [stdout] | [INFO] [stdout] 363 | ("invalid opcode"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect [INFO] [stdout] = note: `#[warn(clippy::no_effect)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/chip8.rs:382:21 [INFO] [stdout] | [INFO] [stdout] 382 | / if self.awaiting_keylift { [INFO] [stdout] 383 | | if !keyboard.get_state()[keyboard.get_halt_key()] { [INFO] [stdout] 384 | | self.awaiting_keylift = false; [INFO] [stdout] 385 | | self.registers[x_index] = keyboard.get_halt_key() as u8; [INFO] [stdout] 386 | | } [INFO] [stdout] 387 | | } [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] 382 ~ if self.awaiting_keylift [INFO] [stdout] 383 ~ && !keyboard.get_state()[keyboard.get_halt_key()] { [INFO] [stdout] 384 | self.awaiting_keylift = false; [INFO] [stdout] 385 | self.registers[x_index] = keyboard.get_halt_key() as u8; [INFO] [stdout] 386 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/chip8.rs:392:25 [INFO] [stdout] | [INFO] [stdout] 392 | self.program_counter = self.program_counter - 2; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.program_counter -= 2` [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/chip8.rs:405:21 [INFO] [stdout] | [INFO] [stdout] 405 | self.index_register = self.index_register + self.registers[x_index] as u16; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.index_register += self.registers[x_index] as u16` [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/chip8.rs:456:13 [INFO] [stdout] | [INFO] [stdout] 456 | self.program_counter = self.program_counter + 2; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.program_counter += 2` [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: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/keyboard.rs:58:9 [INFO] [stdout] | [INFO] [stdout] 58 | self.halt_key as usize [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.halt_key` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/pixel.rs:35:9 [INFO] [stdout] | [INFO] [stdout] 35 | assert_eq!(true, pixel.on); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_assert_comparison)]` on by default [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 35 - assert_eq!(true, pixel.on); [INFO] [stdout] 35 + assert!(pixel.on); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/renderer.rs:31:17 [INFO] [stdout] | [INFO] [stdout] 31 | / self.canvas.fill_rect(Rect::new( [INFO] [stdout] 32 | | (pixel.x * chip8.vram_scale as u32) as i32, [INFO] [stdout] 33 | | (pixel.y * chip8.vram_scale as u32) as i32, [INFO] [stdout] 34 | | chip8.vram_scale as u32, [INFO] [stdout] 35 | | chip8.vram_scale as u32, [INFO] [stdout] 36 | | )); [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 31 | let _ = self.canvas.fill_rect(Rect::new( [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 5.82s [INFO] running `Command { std: "docker" "inspect" "aa0f8bdd651da4602b16e39aaf56d1e19c5ac5a32784e5030ac9692335c774b2", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "aa0f8bdd651da4602b16e39aaf56d1e19c5ac5a32784e5030ac9692335c774b2", kill_on_drop: false }` [INFO] [stdout] aa0f8bdd651da4602b16e39aaf56d1e19c5ac5a32784e5030ac9692335c774b2