[INFO] cloning repository https://github.com/val500/rustboy [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/val500/rustboy" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fval500%2Frustboy", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fval500%2Frustboy'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 7a0992155e2a6177edbaa2b70573648f69601261 [INFO] linting val500/rustboy against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fval500%2Frustboy" "/workspace/builds/worker-7-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-7-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/val500/rustboy [INFO] finished tweaking git repo https://github.com/val500/rustboy [INFO] tweaked toml for git repo https://github.com/val500/rustboy written to /workspace/builds/worker-7-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/val500/rustboy 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/val500/rustboy 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] Blocking waiting for file lock on package cache [INFO] [stderr] Updating crates.io index [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded version-compare v0.0.10 [INFO] [stderr] Downloaded spin_sleep v1.0.0 [INFO] [stderr] Downloaded queue v0.3.1 [INFO] [stderr] Downloaded sdl2 v0.34.3 [INFO] [stderr] Downloaded sdl2-sys v0.34.3 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-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] 10e0595890b5416a0a93d951e3e7b9eb0bfd4f05008d4bc8f39ee428d17cce18 [INFO] running `Command { std: "docker" "start" "-a" "10e0595890b5416a0a93d951e3e7b9eb0bfd4f05008d4bc8f39ee428d17cce18", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "10e0595890b5416a0a93d951e3e7b9eb0bfd4f05008d4bc8f39ee428d17cce18", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "10e0595890b5416a0a93d951e3e7b9eb0bfd4f05008d4bc8f39ee428d17cce18", kill_on_drop: false }` [INFO] [stdout] 10e0595890b5416a0a93d951e3e7b9eb0bfd4f05008d4bc8f39ee428d17cce18 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-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] a846156a865bf3764fda5584270bf8b21d882161846aba605ed659fc7102c689 [INFO] running `Command { std: "docker" "start" "-a" "a846156a865bf3764fda5584270bf8b21d882161846aba605ed659fc7102c689", kill_on_drop: false }` [INFO] [stderr] Compiling version-compare v0.0.10 [INFO] [stderr] Compiling cfg-if v0.1.10 [INFO] [stderr] Compiling libc v0.2.82 [INFO] [stderr] Compiling sdl2 v0.34.3 [INFO] [stderr] Checking spin_sleep v1.0.0 [INFO] [stderr] Checking queue v0.3.1 [INFO] [stderr] Compiling sdl2-sys v0.34.3 [INFO] [stderr] Checking rustboy v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: inconsistent casing in hexadecimal literal [INFO] [stdout] --> src/instructions.rs:139:9 [INFO] [stdout] | [INFO] [stdout] 139 | 0xFb => ei(cpu, passed), [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using `0xfb` or `0xFB` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mixed_case_hex_literals [INFO] [stdout] = note: `#[warn(clippy::mixed_case_hex_literals)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the feature `derive_default_enum` has been stable since 1.62.0 and no longer requires an attribute to enable [INFO] [stdout] --> src/main.rs:1:12 [INFO] [stdout] | [INFO] [stdout] 1 | #![feature(derive_default_enum)] [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(stable_features)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: inconsistent casing in hexadecimal literal [INFO] [stdout] --> src/instructions.rs:139:9 [INFO] [stdout] | [INFO] [stdout] 139 | 0xFb => ei(cpu, passed), [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using `0xfb` or `0xFB` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mixed_case_hex_literals [INFO] [stdout] = note: `#[warn(clippy::mixed_case_hex_literals)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the feature `derive_default_enum` has been stable since 1.62.0 and no longer requires an attribute to enable [INFO] [stdout] --> src/main.rs:1:12 [INFO] [stdout] | [INFO] [stdout] 1 | #![feature(derive_default_enum)] [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(stable_features)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:65:6 [INFO] [stdout] | [INFO] [stdout] 65 | let mut timer = &mut gameboy.cpu.ppu.io_registers.timer; [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `CPU` contains a capitalized acronym [INFO] [stdout] --> src/cpu.rs:5:12 [INFO] [stdout] | [INFO] [stdout] 5 | pub struct CPU { [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Cpu` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/cpu.rs:79:3 [INFO] [stdout] | [INFO] [stdout] 79 | self.pc = self.pc + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.pc += 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: this `if` statement can be collapsed [INFO] [stdout] --> src/cpu.rs:180:3 [INFO] [stdout] | [INFO] [stdout] 180 | / if addr == 0xFF46 { [INFO] [stdout] 181 | | if data <= 0xDF { [INFO] [stdout] 182 | | let mut oam_arr: [u8; 0xA0] = self.ppu.oam.into(); [INFO] [stdout] 183 | | for i in 0..0xA0 { [INFO] [stdout] ... | [INFO] [stdout] 189 | | } [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] 180 ~ if addr == 0xFF46 [INFO] [stdout] 181 ~ && data <= 0xDF { [INFO] [stdout] 182 | let mut oam_arr: [u8; 0xA0] = self.ppu.oam.into(); [INFO] [stdout] ... [INFO] [stdout] 187 | self.ppu.oam = oam_arr.into(); [INFO] [stdout] 188 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/cpu.rs:200:9 [INFO] [stdout] | [INFO] [stdout] 200 | self.reg_file.SP = self.reg_file.SP + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.reg_file.SP += 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/cpu.rs:205:9 [INFO] [stdout] | [INFO] [stdout] 205 | self.reg_file.SP = self.reg_file.SP - 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.reg_file.SP -= 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/cpu.rs:214:9 [INFO] [stdout] | [INFO] [stdout] 214 | self.reg_file.SP = self.reg_file.SP - 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.reg_file.SP -= 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: using `clone` on type `u8` which implements the `Copy` trait [INFO] [stdout] --> src/gameboy.rs:45:43 [INFO] [stdout] | [INFO] [stdout] 45 | self.cpu.memory.boot_rom[i] = el.clone(); [INFO] [stdout] | ^^^^^^^^^^ help: try dereferencing it: `*el` [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: manual implementation of an assign operation [INFO] [stdout] --> src/gameboy.rs:46:13 [INFO] [stdout] | [INFO] [stdout] 46 | i = i + 1; [INFO] [stdout] | ^^^^^^^^^ help: replace it with: `i += 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: using `clone` on type `u8` which implements the `Copy` trait [INFO] [stdout] --> src/gameboy.rs:51:34 [INFO] [stdout] | [INFO] [stdout] 51 | self.cpu.memory.rom_bank0[i] = el.clone(); [INFO] [stdout] | ^^^^^^^^^^ help: try dereferencing it: `*el` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `u8` which implements the `Copy` trait [INFO] [stdout] --> src/gameboy.rs:53:43 [INFO] [stdout] | [INFO] [stdout] 53 | self.cpu.memory.rom_bank1[i - 0x4000] = el.clone(); [INFO] [stdout] | ^^^^^^^^^^ help: try dereferencing it: `*el` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/gameboy.rs:335:2 [INFO] [stdout] | [INFO] [stdout] 335 | 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] 335 - return false; [INFO] [stdout] 335 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/gameboy.rs:193:3 [INFO] [stdout] | [INFO] [stdout] 193 | / if self.cpu.ppu.io_registers.joypad.select_direction == 0 { [INFO] [stdout] 194 | | self.cpu.ppu.io_registers.joypad.down_or_start = 1; [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] 192 ~ } [INFO] [stdout] 193 ~ if self.cpu.ppu.io_registers.joypad.select_direction == 0 => { [INFO] [stdout] 194 | self.cpu.ppu.io_registers.joypad.down_or_start = 1; [INFO] [stdout] 195 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/gameboy.rs:201:3 [INFO] [stdout] | [INFO] [stdout] 201 | / if self.cpu.ppu.io_registers.joypad.select_direction == 0 { [INFO] [stdout] 202 | | self.cpu.ppu.io_registers.joypad.up_or_select = 1; [INFO] [stdout] 203 | | } [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] 200 ~ } [INFO] [stdout] 201 ~ if self.cpu.ppu.io_registers.joypad.select_direction == 0 => { [INFO] [stdout] 202 | self.cpu.ppu.io_registers.joypad.up_or_select = 1; [INFO] [stdout] 203 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/gameboy.rs:209:3 [INFO] [stdout] | [INFO] [stdout] 209 | / if self.cpu.ppu.io_registers.joypad.select_direction == 0 { [INFO] [stdout] 210 | | self.cpu.ppu.io_registers.joypad.left_or_b = 1; [INFO] [stdout] 211 | | } [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] 208 ~ } [INFO] [stdout] 209 ~ if self.cpu.ppu.io_registers.joypad.select_direction == 0 => { [INFO] [stdout] 210 | self.cpu.ppu.io_registers.joypad.left_or_b = 1; [INFO] [stdout] 211 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/gameboy.rs:217:3 [INFO] [stdout] | [INFO] [stdout] 217 | / if self.cpu.ppu.io_registers.joypad.select_direction == 0 { [INFO] [stdout] 218 | | self.cpu.ppu.io_registers.joypad.right_or_a = 0; [INFO] [stdout] 219 | | } [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] 216 ~ } [INFO] [stdout] 217 ~ if self.cpu.ppu.io_registers.joypad.select_direction == 0 => { [INFO] [stdout] 218 | self.cpu.ppu.io_registers.joypad.right_or_a = 0; [INFO] [stdout] 219 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/gameboy.rs:225:3 [INFO] [stdout] | [INFO] [stdout] 225 | / if self.cpu.ppu.io_registers.joypad.select_direction == 0 { [INFO] [stdout] 226 | | self.cpu.ppu.io_registers.joypad.down_or_start = 0; [INFO] [stdout] 227 | | self.cpu.ppu.io_registers.interrupt_flag.joypad = 1; [INFO] [stdout] 228 | | [INFO] [stdout] 229 | | } [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] 224 ~ } [INFO] [stdout] 225 ~ if self.cpu.ppu.io_registers.joypad.select_direction == 0 => { [INFO] [stdout] 226 | self.cpu.ppu.io_registers.joypad.down_or_start = 0; [INFO] [stdout] 227 | self.cpu.ppu.io_registers.interrupt_flag.joypad = 1; [INFO] [stdout] 228 | [INFO] [stdout] 229 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/gameboy.rs:235:3 [INFO] [stdout] | [INFO] [stdout] 235 | / if self.cpu.ppu.io_registers.joypad.select_direction == 0 { [INFO] [stdout] 236 | | self.cpu.ppu.io_registers.joypad.up_or_select = 0; [INFO] [stdout] 237 | | self.cpu.ppu.io_registers.interrupt_flag.joypad = 1; [INFO] [stdout] 238 | | } [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] 234 ~ } [INFO] [stdout] 235 ~ if self.cpu.ppu.io_registers.joypad.select_direction == 0 => { [INFO] [stdout] 236 | self.cpu.ppu.io_registers.joypad.up_or_select = 0; [INFO] [stdout] 237 | self.cpu.ppu.io_registers.interrupt_flag.joypad = 1; [INFO] [stdout] 238 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/gameboy.rs:244:3 [INFO] [stdout] | [INFO] [stdout] 244 | / if self.cpu.ppu.io_registers.joypad.select_direction == 0 { [INFO] [stdout] 245 | | self.cpu.ppu.io_registers.joypad.left_or_b = 0; [INFO] [stdout] 246 | | self.cpu.ppu.io_registers.interrupt_flag.joypad = 1; [INFO] [stdout] 247 | | } [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] 243 ~ } [INFO] [stdout] 244 ~ if self.cpu.ppu.io_registers.joypad.select_direction == 0 => { [INFO] [stdout] 245 | self.cpu.ppu.io_registers.joypad.left_or_b = 0; [INFO] [stdout] 246 | self.cpu.ppu.io_registers.interrupt_flag.joypad = 1; [INFO] [stdout] 247 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/gameboy.rs:253:3 [INFO] [stdout] | [INFO] [stdout] 253 | / if self.cpu.ppu.io_registers.joypad.select_direction == 0 { [INFO] [stdout] 254 | | self.cpu.ppu.io_registers.joypad.right_or_a = 0; [INFO] [stdout] 255 | | self.cpu.ppu.io_registers.interrupt_flag.joypad = 1; [INFO] [stdout] 256 | | } [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] 252 ~ } [INFO] [stdout] 253 ~ if self.cpu.ppu.io_registers.joypad.select_direction == 0 => { [INFO] [stdout] 254 | self.cpu.ppu.io_registers.joypad.right_or_a = 0; [INFO] [stdout] 255 | self.cpu.ppu.io_registers.interrupt_flag.joypad = 1; [INFO] [stdout] 256 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/gameboy.rs:264:3 [INFO] [stdout] | [INFO] [stdout] 264 | / if self.cpu.ppu.io_registers.joypad.select_action == 0 { [INFO] [stdout] 265 | | self.cpu.ppu.io_registers.joypad.down_or_start = 1; [INFO] [stdout] 266 | | self.cpu.ppu.io_registers.interrupt_flag.joypad = 1; [INFO] [stdout] 267 | | } [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] 263 ~ } [INFO] [stdout] 264 ~ if self.cpu.ppu.io_registers.joypad.select_action == 0 => { [INFO] [stdout] 265 | self.cpu.ppu.io_registers.joypad.down_or_start = 1; [INFO] [stdout] 266 | self.cpu.ppu.io_registers.interrupt_flag.joypad = 1; [INFO] [stdout] 267 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/gameboy.rs:273:3 [INFO] [stdout] | [INFO] [stdout] 273 | / if self.cpu.ppu.io_registers.joypad.select_action == 0 { [INFO] [stdout] 274 | | self.cpu.ppu.io_registers.joypad.up_or_select = 1; [INFO] [stdout] 275 | | self.cpu.ppu.io_registers.interrupt_flag.joypad = 1; [INFO] [stdout] 276 | | } [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] 272 ~ } [INFO] [stdout] 273 ~ if self.cpu.ppu.io_registers.joypad.select_action == 0 => { [INFO] [stdout] 274 | self.cpu.ppu.io_registers.joypad.up_or_select = 1; [INFO] [stdout] 275 | self.cpu.ppu.io_registers.interrupt_flag.joypad = 1; [INFO] [stdout] 276 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/gameboy.rs:292:3 [INFO] [stdout] | [INFO] [stdout] 292 | / if self.cpu.ppu.io_registers.joypad.select_action == 0 { [INFO] [stdout] 293 | | self.cpu.ppu.io_registers.joypad.right_or_a = 0; [INFO] [stdout] 294 | | self.cpu.ppu.io_registers.interrupt_flag.joypad = 1; [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 ~ } [INFO] [stdout] 292 ~ if self.cpu.ppu.io_registers.joypad.select_action == 0 => { [INFO] [stdout] 293 | self.cpu.ppu.io_registers.joypad.right_or_a = 0; [INFO] [stdout] 294 | self.cpu.ppu.io_registers.interrupt_flag.joypad = 1; [INFO] [stdout] 295 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/gameboy.rs:301:3 [INFO] [stdout] | [INFO] [stdout] 301 | / if self.cpu.ppu.io_registers.joypad.select_action == 0 { [INFO] [stdout] 302 | | self.cpu.ppu.io_registers.joypad.down_or_start = 0; [INFO] [stdout] 303 | | self.cpu.ppu.io_registers.interrupt_flag.joypad = 1; [INFO] [stdout] 304 | | } [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] 300 ~ } [INFO] [stdout] 301 ~ if self.cpu.ppu.io_registers.joypad.select_action == 0 => { [INFO] [stdout] 302 | self.cpu.ppu.io_registers.joypad.down_or_start = 0; [INFO] [stdout] 303 | self.cpu.ppu.io_registers.interrupt_flag.joypad = 1; [INFO] [stdout] 304 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/gameboy.rs:310:3 [INFO] [stdout] | [INFO] [stdout] 310 | / if self.cpu.ppu.io_registers.joypad.select_action == 0 { [INFO] [stdout] 311 | | self.cpu.ppu.io_registers.joypad.up_or_select = 0; [INFO] [stdout] 312 | | self.cpu.ppu.io_registers.interrupt_flag.joypad = 1; [INFO] [stdout] 313 | | } [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] 309 ~ } [INFO] [stdout] 310 ~ if self.cpu.ppu.io_registers.joypad.select_action == 0 => { [INFO] [stdout] 311 | self.cpu.ppu.io_registers.joypad.up_or_select = 0; [INFO] [stdout] 312 | self.cpu.ppu.io_registers.interrupt_flag.joypad = 1; [INFO] [stdout] 313 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/gameboy.rs:319:3 [INFO] [stdout] | [INFO] [stdout] 319 | / if self.cpu.ppu.io_registers.joypad.select_action == 0 { [INFO] [stdout] 320 | | self.cpu.ppu.io_registers.joypad.left_or_b = 0; [INFO] [stdout] 321 | | self.cpu.ppu.io_registers.interrupt_flag.joypad = 1; [INFO] [stdout] 322 | | } [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] 318 ~ } [INFO] [stdout] 319 ~ if self.cpu.ppu.io_registers.joypad.select_action == 0 => { [INFO] [stdout] 320 | self.cpu.ppu.io_registers.joypad.left_or_b = 0; [INFO] [stdout] 321 | self.cpu.ppu.io_registers.interrupt_flag.joypad = 1; [INFO] [stdout] 322 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/gameboy.rs:328:3 [INFO] [stdout] | [INFO] [stdout] 328 | / if self.cpu.ppu.io_registers.joypad.select_action == 0 { [INFO] [stdout] 329 | | self.cpu.ppu.io_registers.joypad.right_or_a = 0; [INFO] [stdout] 330 | | self.cpu.ppu.io_registers.interrupt_flag.joypad = 1; [INFO] [stdout] 331 | | } [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] 327 ~ } [INFO] [stdout] 328 ~ if self.cpu.ppu.io_registers.joypad.select_action == 0 => { [INFO] [stdout] 329 | self.cpu.ppu.io_registers.joypad.right_or_a = 0; [INFO] [stdout] 330 | self.cpu.ppu.io_registers.interrupt_flag.joypad = 1; [INFO] [stdout] 331 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/instructions.rs:1014:5 [INFO] [stdout] | [INFO] [stdout] 1014 | / flags.H = if (((a & 0x0F) + (b & 0x0F)) & 0x10) == 0x10 { [INFO] [stdout] 1015 | | 1 [INFO] [stdout] 1016 | | } else { [INFO] [stdout] 1017 | | 0 [INFO] [stdout] 1018 | | }; [INFO] [stdout] | |______^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `cpu::Flags { H: if (((a & 0x0F) + (b & 0x0F)) & 0x10) == 0x10 { [INFO] [stdout] 1 [INFO] [stdout] } else { [INFO] [stdout] 0 [INFO] [stdout] }, Z: if val as u8 == 0 { 1 } else { 0 }, C: if val > 255 { 1 } else { 0 }, ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/instructions.rs:1013:5 [INFO] [stdout] | [INFO] [stdout] 1013 | let mut flags = Flags::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] = note: `#[warn(clippy::field_reassign_with_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/instructions.rs:1027:5 [INFO] [stdout] | [INFO] [stdout] 1027 | / flags.H = if (((a & 0x0FFF) + (b & 0x0FFF)) & 0x1000) == 0x1000 { [INFO] [stdout] 1028 | | 1 [INFO] [stdout] 1029 | | } else { [INFO] [stdout] 1030 | | 0 [INFO] [stdout] 1031 | | }; [INFO] [stdout] | |______^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `cpu::Flags { H: if (((a & 0x0FFF) + (b & 0x0FFF)) & 0x1000) == 0x1000 { [INFO] [stdout] 1 [INFO] [stdout] } else { [INFO] [stdout] 0 [INFO] [stdout] }, C: if val > 65535 { 1 } else { 0 }, ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/instructions.rs:1026:5 [INFO] [stdout] | [INFO] [stdout] 1026 | let mut flags = Flags::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/instructions.rs:1042:5 [INFO] [stdout] | [INFO] [stdout] 1042 | / flags.H = if (((a & 0x0F) + (b & 0x0F) + carry) & 0x10) == 0x10 { [INFO] [stdout] 1043 | | 1 [INFO] [stdout] 1044 | | } else { [INFO] [stdout] 1045 | | 0 [INFO] [stdout] 1046 | | }; [INFO] [stdout] | |______^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `cpu::Flags { H: if (((a & 0x0F) + (b & 0x0F) + carry) & 0x10) == 0x10 { [INFO] [stdout] 1 [INFO] [stdout] } else { [INFO] [stdout] 0 [INFO] [stdout] }, Z: if val as u8 == 0 { 1 } else { 0 }, C: if val > 255 { 1 } else { 0 }, ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/instructions.rs:1041:5 [INFO] [stdout] | [INFO] [stdout] 1041 | let mut flags = Flags::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/instructions.rs:1056:5 [INFO] [stdout] | [INFO] [stdout] 1056 | flags.N = 1; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `cpu::Flags { N: 1, H: if (a & 0x0F).wrapping_sub(b & 0x0F) & 0x10 != 0 { [INFO] [stdout] 1 [INFO] [stdout] } else { [INFO] [stdout] 0 [INFO] [stdout] }, Z: if val == 0 { 1 } else { 0 }, C: if a < b { 1 } else { 0 } }` and removing relevant reassignments [INFO] [stdout] --> src/instructions.rs:1055:5 [INFO] [stdout] | [INFO] [stdout] 1055 | let mut flags = Flags::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/instructions.rs:1073:5 [INFO] [stdout] | [INFO] [stdout] 1073 | flags.N = 1; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `cpu::Flags { N: 1, H: if (a & 0x0F).wrapping_sub(b & 0x0F).wrapping_sub(carry) & 0x10 != 0 { [INFO] [stdout] 1 [INFO] [stdout] } else { [INFO] [stdout] 0 [INFO] [stdout] }, C: if (a as u16) < (b as u16) + (carry as u16) { [INFO] [stdout] 1 [INFO] [stdout] } else { [INFO] [stdout] 0 [INFO] [stdout] }, Z: if val == 0 { 1 } else { 0 } }` and removing relevant reassignments [INFO] [stdout] --> src/instructions.rs:1072:5 [INFO] [stdout] | [INFO] [stdout] 1072 | let mut flags = Flags::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/instructions.rs:1091:5 [INFO] [stdout] | [INFO] [stdout] 1091 | flags.Z = if val == 0 { 1 } else { 0 }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `cpu::Flags { Z: if val == 0 { 1 } else { 0 }, N: 0, H: 1, C: 0 }` and removing relevant reassignments [INFO] [stdout] --> src/instructions.rs:1090:5 [INFO] [stdout] | [INFO] [stdout] 1090 | let mut flags = Flags::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/instructions.rs:1101:5 [INFO] [stdout] | [INFO] [stdout] 1101 | flags.Z = if val == 0 { 1 } else { 0 }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `cpu::Flags { Z: if val == 0 { 1 } else { 0 }, N: 0, H: 0, C: 0 }` and removing relevant reassignments [INFO] [stdout] --> src/instructions.rs:1100:5 [INFO] [stdout] | [INFO] [stdout] 1100 | let mut flags = Flags::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/instructions.rs:1111:5 [INFO] [stdout] | [INFO] [stdout] 1111 | flags.Z = if val == 0 { 1 } else { 0 }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `cpu::Flags { Z: if val == 0 { 1 } else { 0 }, N: 0, H: 0, C: 0 }` and removing relevant reassignments [INFO] [stdout] --> src/instructions.rs:1110:5 [INFO] [stdout] | [INFO] [stdout] 1110 | let mut flags = Flags::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/instructions.rs:1517:6 [INFO] [stdout] | [INFO] [stdout] 1517 | / flags.H = if (((a & 0x0F) + (b & 0x0F)) & 0x10) == 0x10 { [INFO] [stdout] 1518 | | 1 [INFO] [stdout] 1519 | | } else { [INFO] [stdout] 1520 | | 0 [INFO] [stdout] 1521 | | }; [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `cpu::Flags { H: if (((a & 0x0F) + (b & 0x0F)) & 0x10) == 0x10 { [INFO] [stdout] 1 [INFO] [stdout] } else { [INFO] [stdout] 0 [INFO] [stdout] }, C: if (((a & 0xFF) + (b & 0xFF)) & 0x100) == 0x100 { [INFO] [stdout] 1 [INFO] [stdout] } else { [INFO] [stdout] 0 [INFO] [stdout] }, Z: 0, N: 0 }` and removing relevant reassignments [INFO] [stdout] --> src/instructions.rs:1516:6 [INFO] [stdout] | [INFO] [stdout] 1516 | let mut flags = Flags::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/instructions.rs:1556:6 [INFO] [stdout] | [INFO] [stdout] 1556 | / flags.H = if (((a & 0x0F) + (b & 0x0F)) & 0x10) == 0x10 { [INFO] [stdout] 1557 | | 1 [INFO] [stdout] 1558 | | } else { [INFO] [stdout] 1559 | | 0 [INFO] [stdout] 1560 | | }; [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `cpu::Flags { H: if (((a & 0x0F) + (b & 0x0F)) & 0x10) == 0x10 { [INFO] [stdout] 1 [INFO] [stdout] } else { [INFO] [stdout] 0 [INFO] [stdout] }, C: if (((a & 0xFF) + (b & 0xFF)) & 0x100) == 0x100 { [INFO] [stdout] 1 [INFO] [stdout] } else { [INFO] [stdout] 0 [INFO] [stdout] }, Z: 0, N: 0 }` and removing relevant reassignments [INFO] [stdout] --> src/instructions.rs:1555:6 [INFO] [stdout] | [INFO] [stdout] 1555 | let mut flags = Flags::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/instructions.rs:1917:17 [INFO] [stdout] | [INFO] [stdout] 1917 | cpu.reg_file[reg8] = cpu.reg_file[reg8] << 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `cpu.reg_file[reg8] <<= 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/instructions.rs:2194:17 [INFO] [stdout] | [INFO] [stdout] 2194 | cpu.reg_file[reg8] = cpu.reg_file[reg8] & mask; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `cpu.reg_file[reg8] &= mask` [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/instructions.rs:2249:17 [INFO] [stdout] | [INFO] [stdout] 2249 | cpu.reg_file[reg8] = cpu.reg_file[reg8] | mask; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `cpu.reg_file[reg8] |= mask` [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: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/ppu.rs:14:1 [INFO] [stdout] | [INFO] [stdout] 14 | impl Into for GameboyColor { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] = note: `#[warn(clippy::from_over_into)]` on by default [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 14 ~ impl From for Color { [INFO] [stdout] 15 ~ fn from(val: GameboyColor) -> Self { [INFO] [stdout] 16 ~ match val { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/ppu.rs:55:30 [INFO] [stdout] | [INFO] [stdout] 55 | sprite_priority: !(bytes[3] & 8 == 0), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `(bytes[3] & 8 != 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/ppu.rs:56:21 [INFO] [stdout] | [INFO] [stdout] 56 | y_flip: !(bytes[3] & 4 == 0), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `(bytes[3] & 4 != 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/ppu.rs:57:21 [INFO] [stdout] | [INFO] [stdout] 57 | x_flip: !(bytes[3] & 2 == 0), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `(bytes[3] & 2 != 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/ppu.rs:58:22 [INFO] [stdout] | [INFO] [stdout] 58 | palette: !(bytes[3] & 1 == 0), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `(bytes[3] & 1 != 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: name `OAM` contains a capitalized acronym [INFO] [stdout] --> src/ppu.rs:83:12 [INFO] [stdout] | [INFO] [stdout] 83 | pub struct OAM { [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Oam` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `OAM` which implements the `Copy` trait [INFO] [stdout] --> src/ppu.rs:89:32 [INFO] [stdout] | [INFO] [stdout] 89 | let mut oam_arr: [u8; 0xA0] = self.clone().into(); [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `(*self)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `OAM` which implements the `Copy` trait [INFO] [stdout] --> src/ppu.rs:94:28 [INFO] [stdout] | [INFO] [stdout] 94 | let oam_arr: [u8; 0xA0] = self.clone().into(); [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `(*self)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/ppu.rs:103:23 [INFO] [stdout] | [INFO] [stdout] 103 | .flat_map(|s| Into::<[u8; 4]>::into(s)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the method itself: `Into::<[u8; 4]>::into` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `color_map` [INFO] [stdout] --> src/ppu.rs:133:11 [INFO] [stdout] | [INFO] [stdout] 133 | for i in 0..8 { [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 and enumerate() [INFO] [stdout] | [INFO] [stdout] 133 - for i in 0..8 { [INFO] [stdout] 133 + for (i, ) in color_map.iter_mut().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `PPU` contains a capitalized acronym [INFO] [stdout] --> src/ppu.rs:160:12 [INFO] [stdout] | [INFO] [stdout] 160 | pub struct PPU { [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Ppu` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `[ppu::OamEntry; 40]` [INFO] [stdout] --> src/ppu.rs:171:37 [INFO] [stdout] | [INFO] [stdout] 171 | oam: OAM { oam_entries: [OamEntry::default(); 40].into()}, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `[OamEntry::default(); 40]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `isize` is unnecessary [INFO] [stdout] --> src/ppu.rs:239:4 [INFO] [stdout] | [INFO] [stdout] 239 | ((0x1000 as isize) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `0x1000_isize` [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: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/ppu.rs:247:11 [INFO] [stdout] | [INFO] [stdout] 247 | assert!(mem_tile_index >= 0x800 && mem_tile_index <= 0x17FF, "mem_tile_index: {}", mem_tile_index) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0x800..=0x17FF).contains(&mem_tile_index)` [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: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/ppu.rs:263:27 [INFO] [stdout] | [INFO] [stdout] 263 | self.vram[(sprite.data_tile_num as usize * 16 + 2 * tile_row as usize) as usize]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `((sprite.data_tile_num as usize * 16 + 2 * tile_row as usize))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/ppu.rs:265:18 [INFO] [stdout] | [INFO] [stdout] 265 | [(sprite.data_tile_num as usize * 16 + 2 * tile_row as usize + 1) as usize]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `((sprite.data_tile_num as usize * 16 + 2 * tile_row as usize + 1))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u16` -> `u16`) [INFO] [stdout] --> src/ppu.rs:329:41 [INFO] [stdout] | [INFO] [stdout] 329 | let vram_index = tilemap_base + ((fetcher_y as u16 / 8 * 32) + fetcher_x as u16) as u16; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `((fetcher_y as u16 / 8 * 32) + fetcher_x as u16)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `usize` is unnecessary [INFO] [stdout] --> src/ppu.rs:339:13 [INFO] [stdout] | [INFO] [stdout] 339 | (0x1000 as usize) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `0x1000_usize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `usize` is unnecessary [INFO] [stdout] --> src/ppu.rs:354:13 [INFO] [stdout] | [INFO] [stdout] 354 | (0x1000 as usize) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `0x1000_usize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/ppu.rs:359:13 [INFO] [stdout] | [INFO] [stdout] 359 | (tile_index as usize) * 16 + tile_row * 2 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `tile_index` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/ppu.rs:407:6 [INFO] [stdout] | [INFO] [stdout] 407 | ((0x02 & high_byte) >> 0) | ((0x02 & low_byte) >> 1), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `((0x02 & high_byte))` [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: this operation has no effect [INFO] [stdout] --> src/ppu.rs:412:34 [INFO] [stdout] | [INFO] [stdout] 412 | ((0x01 & high_byte) << 1) | ((0x01 & low_byte) >> 0), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `((0x01 & low_byte))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/ppu.rs:446:5 [INFO] [stdout] | [INFO] [stdout] 446 | !(num & (1 << bit_num) == 0) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(num & (1 << bit_num) != 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: name `LCDC` contains a capitalized acronym [INFO] [stdout] --> src/register_maps.rs:64:12 [INFO] [stdout] | [INFO] [stdout] 64 | pub struct LCDC { [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Lcdc` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `TAC` contains a capitalized acronym [INFO] [stdout] --> src/register_maps.rs:181:12 [INFO] [stdout] | [INFO] [stdout] 181 | pub struct TAC { [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Tac` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `CPU` contains a capitalized acronym [INFO] [stdout] --> src/cpu.rs:5:12 [INFO] [stdout] | [INFO] [stdout] 5 | pub struct CPU { [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Cpu` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `u8` which implements the `Copy` trait [INFO] [stdout] --> src/main.rs:62:39 [INFO] [stdout] | [INFO] [stdout] 62 | gameboy.cpu.memory.boot_rom[i] = el.clone(); [INFO] [stdout] | ^^^^^^^^^^ help: try dereferencing it: `*el` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/main.rs:63:6 [INFO] [stdout] | [INFO] [stdout] 63 | i = i + 1; [INFO] [stdout] | ^^^^^^^^^ help: replace it with: `i += 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: useless conversion to the same type: `u8` [INFO] [stdout] --> src/main.rs:66:14 [INFO] [stdout] | [INFO] [stdout] 66 | timer.tma = 0.into(); [INFO] [stdout] | ^^^^^^^^ help: consider removing `.into()`: `0` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/cpu.rs:79:3 [INFO] [stdout] | [INFO] [stdout] 79 | self.pc = self.pc + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.pc += 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: this `if` statement can be collapsed [INFO] [stdout] --> src/cpu.rs:180:3 [INFO] [stdout] | [INFO] [stdout] 180 | / if addr == 0xFF46 { [INFO] [stdout] 181 | | if data <= 0xDF { [INFO] [stdout] 182 | | let mut oam_arr: [u8; 0xA0] = self.ppu.oam.into(); [INFO] [stdout] 183 | | for i in 0..0xA0 { [INFO] [stdout] ... | [INFO] [stdout] 189 | | } [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] 180 ~ if addr == 0xFF46 [INFO] [stdout] 181 ~ && data <= 0xDF { [INFO] [stdout] 182 | let mut oam_arr: [u8; 0xA0] = self.ppu.oam.into(); [INFO] [stdout] ... [INFO] [stdout] 187 | self.ppu.oam = oam_arr.into(); [INFO] [stdout] 188 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/cpu.rs:200:9 [INFO] [stdout] | [INFO] [stdout] 200 | self.reg_file.SP = self.reg_file.SP + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.reg_file.SP += 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/cpu.rs:205:9 [INFO] [stdout] | [INFO] [stdout] 205 | self.reg_file.SP = self.reg_file.SP - 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.reg_file.SP -= 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/cpu.rs:214:9 [INFO] [stdout] | [INFO] [stdout] 214 | self.reg_file.SP = self.reg_file.SP - 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.reg_file.SP -= 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: using `clone` on type `u8` which implements the `Copy` trait [INFO] [stdout] --> src/gameboy.rs:45:43 [INFO] [stdout] | [INFO] [stdout] 45 | self.cpu.memory.boot_rom[i] = el.clone(); [INFO] [stdout] | ^^^^^^^^^^ help: try dereferencing it: `*el` [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: manual implementation of an assign operation [INFO] [stdout] --> src/gameboy.rs:46:13 [INFO] [stdout] | [INFO] [stdout] 46 | i = i + 1; [INFO] [stdout] | ^^^^^^^^^ help: replace it with: `i += 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: using `clone` on type `u8` which implements the `Copy` trait [INFO] [stdout] --> src/gameboy.rs:51:34 [INFO] [stdout] | [INFO] [stdout] 51 | self.cpu.memory.rom_bank0[i] = el.clone(); [INFO] [stdout] | ^^^^^^^^^^ help: try dereferencing it: `*el` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `u8` which implements the `Copy` trait [INFO] [stdout] --> src/gameboy.rs:53:43 [INFO] [stdout] | [INFO] [stdout] 53 | self.cpu.memory.rom_bank1[i - 0x4000] = el.clone(); [INFO] [stdout] | ^^^^^^^^^^ help: try dereferencing it: `*el` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/gameboy.rs:335:2 [INFO] [stdout] | [INFO] [stdout] 335 | 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] 335 - return false; [INFO] [stdout] 335 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/gameboy.rs:193:3 [INFO] [stdout] | [INFO] [stdout] 193 | / if self.cpu.ppu.io_registers.joypad.select_direction == 0 { [INFO] [stdout] 194 | | self.cpu.ppu.io_registers.joypad.down_or_start = 1; [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] 192 ~ } [INFO] [stdout] 193 ~ if self.cpu.ppu.io_registers.joypad.select_direction == 0 => { [INFO] [stdout] 194 | self.cpu.ppu.io_registers.joypad.down_or_start = 1; [INFO] [stdout] 195 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/gameboy.rs:201:3 [INFO] [stdout] | [INFO] [stdout] 201 | / if self.cpu.ppu.io_registers.joypad.select_direction == 0 { [INFO] [stdout] 202 | | self.cpu.ppu.io_registers.joypad.up_or_select = 1; [INFO] [stdout] 203 | | } [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] 200 ~ } [INFO] [stdout] 201 ~ if self.cpu.ppu.io_registers.joypad.select_direction == 0 => { [INFO] [stdout] 202 | self.cpu.ppu.io_registers.joypad.up_or_select = 1; [INFO] [stdout] 203 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/gameboy.rs:209:3 [INFO] [stdout] | [INFO] [stdout] 209 | / if self.cpu.ppu.io_registers.joypad.select_direction == 0 { [INFO] [stdout] 210 | | self.cpu.ppu.io_registers.joypad.left_or_b = 1; [INFO] [stdout] 211 | | } [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] 208 ~ } [INFO] [stdout] 209 ~ if self.cpu.ppu.io_registers.joypad.select_direction == 0 => { [INFO] [stdout] 210 | self.cpu.ppu.io_registers.joypad.left_or_b = 1; [INFO] [stdout] 211 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/gameboy.rs:217:3 [INFO] [stdout] | [INFO] [stdout] 217 | / if self.cpu.ppu.io_registers.joypad.select_direction == 0 { [INFO] [stdout] 218 | | self.cpu.ppu.io_registers.joypad.right_or_a = 0; [INFO] [stdout] 219 | | } [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] 216 ~ } [INFO] [stdout] 217 ~ if self.cpu.ppu.io_registers.joypad.select_direction == 0 => { [INFO] [stdout] 218 | self.cpu.ppu.io_registers.joypad.right_or_a = 0; [INFO] [stdout] 219 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/gameboy.rs:225:3 [INFO] [stdout] | [INFO] [stdout] 225 | / if self.cpu.ppu.io_registers.joypad.select_direction == 0 { [INFO] [stdout] 226 | | self.cpu.ppu.io_registers.joypad.down_or_start = 0; [INFO] [stdout] 227 | | self.cpu.ppu.io_registers.interrupt_flag.joypad = 1; [INFO] [stdout] 228 | | [INFO] [stdout] 229 | | } [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] 224 ~ } [INFO] [stdout] 225 ~ if self.cpu.ppu.io_registers.joypad.select_direction == 0 => { [INFO] [stdout] 226 | self.cpu.ppu.io_registers.joypad.down_or_start = 0; [INFO] [stdout] 227 | self.cpu.ppu.io_registers.interrupt_flag.joypad = 1; [INFO] [stdout] 228 | [INFO] [stdout] 229 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/gameboy.rs:235:3 [INFO] [stdout] | [INFO] [stdout] 235 | / if self.cpu.ppu.io_registers.joypad.select_direction == 0 { [INFO] [stdout] 236 | | self.cpu.ppu.io_registers.joypad.up_or_select = 0; [INFO] [stdout] 237 | | self.cpu.ppu.io_registers.interrupt_flag.joypad = 1; [INFO] [stdout] 238 | | } [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] 234 ~ } [INFO] [stdout] 235 ~ if self.cpu.ppu.io_registers.joypad.select_direction == 0 => { [INFO] [stdout] 236 | self.cpu.ppu.io_registers.joypad.up_or_select = 0; [INFO] [stdout] 237 | self.cpu.ppu.io_registers.interrupt_flag.joypad = 1; [INFO] [stdout] 238 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/gameboy.rs:244:3 [INFO] [stdout] | [INFO] [stdout] 244 | / if self.cpu.ppu.io_registers.joypad.select_direction == 0 { [INFO] [stdout] 245 | | self.cpu.ppu.io_registers.joypad.left_or_b = 0; [INFO] [stdout] 246 | | self.cpu.ppu.io_registers.interrupt_flag.joypad = 1; [INFO] [stdout] 247 | | } [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] 243 ~ } [INFO] [stdout] 244 ~ if self.cpu.ppu.io_registers.joypad.select_direction == 0 => { [INFO] [stdout] 245 | self.cpu.ppu.io_registers.joypad.left_or_b = 0; [INFO] [stdout] 246 | self.cpu.ppu.io_registers.interrupt_flag.joypad = 1; [INFO] [stdout] 247 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/gameboy.rs:253:3 [INFO] [stdout] | [INFO] [stdout] 253 | / if self.cpu.ppu.io_registers.joypad.select_direction == 0 { [INFO] [stdout] 254 | | self.cpu.ppu.io_registers.joypad.right_or_a = 0; [INFO] [stdout] 255 | | self.cpu.ppu.io_registers.interrupt_flag.joypad = 1; [INFO] [stdout] 256 | | } [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] 252 ~ } [INFO] [stdout] 253 ~ if self.cpu.ppu.io_registers.joypad.select_direction == 0 => { [INFO] [stdout] 254 | self.cpu.ppu.io_registers.joypad.right_or_a = 0; [INFO] [stdout] 255 | self.cpu.ppu.io_registers.interrupt_flag.joypad = 1; [INFO] [stdout] 256 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/gameboy.rs:264:3 [INFO] [stdout] | [INFO] [stdout] 264 | / if self.cpu.ppu.io_registers.joypad.select_action == 0 { [INFO] [stdout] 265 | | self.cpu.ppu.io_registers.joypad.down_or_start = 1; [INFO] [stdout] 266 | | self.cpu.ppu.io_registers.interrupt_flag.joypad = 1; [INFO] [stdout] 267 | | } [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] 263 ~ } [INFO] [stdout] 264 ~ if self.cpu.ppu.io_registers.joypad.select_action == 0 => { [INFO] [stdout] 265 | self.cpu.ppu.io_registers.joypad.down_or_start = 1; [INFO] [stdout] 266 | self.cpu.ppu.io_registers.interrupt_flag.joypad = 1; [INFO] [stdout] 267 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/gameboy.rs:273:3 [INFO] [stdout] | [INFO] [stdout] 273 | / if self.cpu.ppu.io_registers.joypad.select_action == 0 { [INFO] [stdout] 274 | | self.cpu.ppu.io_registers.joypad.up_or_select = 1; [INFO] [stdout] 275 | | self.cpu.ppu.io_registers.interrupt_flag.joypad = 1; [INFO] [stdout] 276 | | } [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] 272 ~ } [INFO] [stdout] 273 ~ if self.cpu.ppu.io_registers.joypad.select_action == 0 => { [INFO] [stdout] 274 | self.cpu.ppu.io_registers.joypad.up_or_select = 1; [INFO] [stdout] 275 | self.cpu.ppu.io_registers.interrupt_flag.joypad = 1; [INFO] [stdout] 276 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/gameboy.rs:292:3 [INFO] [stdout] | [INFO] [stdout] 292 | / if self.cpu.ppu.io_registers.joypad.select_action == 0 { [INFO] [stdout] 293 | | self.cpu.ppu.io_registers.joypad.right_or_a = 0; [INFO] [stdout] 294 | | self.cpu.ppu.io_registers.interrupt_flag.joypad = 1; [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 ~ } [INFO] [stdout] 292 ~ if self.cpu.ppu.io_registers.joypad.select_action == 0 => { [INFO] [stdout] 293 | self.cpu.ppu.io_registers.joypad.right_or_a = 0; [INFO] [stdout] 294 | self.cpu.ppu.io_registers.interrupt_flag.joypad = 1; [INFO] [stdout] 295 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/gameboy.rs:301:3 [INFO] [stdout] | [INFO] [stdout] 301 | / if self.cpu.ppu.io_registers.joypad.select_action == 0 { [INFO] [stdout] 302 | | self.cpu.ppu.io_registers.joypad.down_or_start = 0; [INFO] [stdout] 303 | | self.cpu.ppu.io_registers.interrupt_flag.joypad = 1; [INFO] [stdout] 304 | | } [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] 300 ~ } [INFO] [stdout] 301 ~ if self.cpu.ppu.io_registers.joypad.select_action == 0 => { [INFO] [stdout] 302 | self.cpu.ppu.io_registers.joypad.down_or_start = 0; [INFO] [stdout] 303 | self.cpu.ppu.io_registers.interrupt_flag.joypad = 1; [INFO] [stdout] 304 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/gameboy.rs:310:3 [INFO] [stdout] | [INFO] [stdout] 310 | / if self.cpu.ppu.io_registers.joypad.select_action == 0 { [INFO] [stdout] 311 | | self.cpu.ppu.io_registers.joypad.up_or_select = 0; [INFO] [stdout] 312 | | self.cpu.ppu.io_registers.interrupt_flag.joypad = 1; [INFO] [stdout] 313 | | } [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] 309 ~ } [INFO] [stdout] 310 ~ if self.cpu.ppu.io_registers.joypad.select_action == 0 => { [INFO] [stdout] 311 | self.cpu.ppu.io_registers.joypad.up_or_select = 0; [INFO] [stdout] 312 | self.cpu.ppu.io_registers.interrupt_flag.joypad = 1; [INFO] [stdout] 313 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/gameboy.rs:319:3 [INFO] [stdout] | [INFO] [stdout] 319 | / if self.cpu.ppu.io_registers.joypad.select_action == 0 { [INFO] [stdout] 320 | | self.cpu.ppu.io_registers.joypad.left_or_b = 0; [INFO] [stdout] 321 | | self.cpu.ppu.io_registers.interrupt_flag.joypad = 1; [INFO] [stdout] 322 | | } [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] 318 ~ } [INFO] [stdout] 319 ~ if self.cpu.ppu.io_registers.joypad.select_action == 0 => { [INFO] [stdout] 320 | self.cpu.ppu.io_registers.joypad.left_or_b = 0; [INFO] [stdout] 321 | self.cpu.ppu.io_registers.interrupt_flag.joypad = 1; [INFO] [stdout] 322 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/gameboy.rs:328:3 [INFO] [stdout] | [INFO] [stdout] 328 | / if self.cpu.ppu.io_registers.joypad.select_action == 0 { [INFO] [stdout] 329 | | self.cpu.ppu.io_registers.joypad.right_or_a = 0; [INFO] [stdout] 330 | | self.cpu.ppu.io_registers.interrupt_flag.joypad = 1; [INFO] [stdout] 331 | | } [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] 327 ~ } [INFO] [stdout] 328 ~ if self.cpu.ppu.io_registers.joypad.select_action == 0 => { [INFO] [stdout] 329 | self.cpu.ppu.io_registers.joypad.right_or_a = 0; [INFO] [stdout] 330 | self.cpu.ppu.io_registers.interrupt_flag.joypad = 1; [INFO] [stdout] 331 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: feature `wrapping_int_impl` is declared but not used [INFO] [stdout] --> src/main.rs:4:12 [INFO] [stdout] | [INFO] [stdout] 4 | #![feature(wrapping_int_impl)] [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_features)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/instructions.rs:1014:5 [INFO] [stdout] | [INFO] [stdout] 1014 | / flags.H = if (((a & 0x0F) + (b & 0x0F)) & 0x10) == 0x10 { [INFO] [stdout] 1015 | | 1 [INFO] [stdout] 1016 | | } else { [INFO] [stdout] 1017 | | 0 [INFO] [stdout] 1018 | | }; [INFO] [stdout] | |______^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `cpu::Flags { H: if (((a & 0x0F) + (b & 0x0F)) & 0x10) == 0x10 { [INFO] [stdout] 1 [INFO] [stdout] } else { [INFO] [stdout] 0 [INFO] [stdout] }, Z: if val as u8 == 0 { 1 } else { 0 }, C: if val > 255 { 1 } else { 0 }, ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/instructions.rs:1013:5 [INFO] [stdout] | [INFO] [stdout] 1013 | let mut flags = Flags::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] = note: `#[warn(clippy::field_reassign_with_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/instructions.rs:1027:5 [INFO] [stdout] | [INFO] [stdout] 1027 | / flags.H = if (((a & 0x0FFF) + (b & 0x0FFF)) & 0x1000) == 0x1000 { [INFO] [stdout] 1028 | | 1 [INFO] [stdout] 1029 | | } else { [INFO] [stdout] 1030 | | 0 [INFO] [stdout] 1031 | | }; [INFO] [stdout] | |______^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `cpu::Flags { H: if (((a & 0x0FFF) + (b & 0x0FFF)) & 0x1000) == 0x1000 { [INFO] [stdout] 1 [INFO] [stdout] } else { [INFO] [stdout] 0 [INFO] [stdout] }, C: if val > 65535 { 1 } else { 0 }, ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/instructions.rs:1026:5 [INFO] [stdout] | [INFO] [stdout] 1026 | let mut flags = Flags::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/instructions.rs:1042:5 [INFO] [stdout] | [INFO] [stdout] 1042 | / flags.H = if (((a & 0x0F) + (b & 0x0F) + carry) & 0x10) == 0x10 { [INFO] [stdout] 1043 | | 1 [INFO] [stdout] 1044 | | } else { [INFO] [stdout] 1045 | | 0 [INFO] [stdout] 1046 | | }; [INFO] [stdout] | |______^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `cpu::Flags { H: if (((a & 0x0F) + (b & 0x0F) + carry) & 0x10) == 0x10 { [INFO] [stdout] 1 [INFO] [stdout] } else { [INFO] [stdout] 0 [INFO] [stdout] }, Z: if val as u8 == 0 { 1 } else { 0 }, C: if val > 255 { 1 } else { 0 }, ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/instructions.rs:1041:5 [INFO] [stdout] | [INFO] [stdout] 1041 | let mut flags = Flags::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/instructions.rs:1056:5 [INFO] [stdout] | [INFO] [stdout] 1056 | flags.N = 1; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `cpu::Flags { N: 1, H: if (a & 0x0F).wrapping_sub(b & 0x0F) & 0x10 != 0 { [INFO] [stdout] 1 [INFO] [stdout] } else { [INFO] [stdout] 0 [INFO] [stdout] }, Z: if val == 0 { 1 } else { 0 }, C: if a < b { 1 } else { 0 } }` and removing relevant reassignments [INFO] [stdout] --> src/instructions.rs:1055:5 [INFO] [stdout] | [INFO] [stdout] 1055 | let mut flags = Flags::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/instructions.rs:1073:5 [INFO] [stdout] | [INFO] [stdout] 1073 | flags.N = 1; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `cpu::Flags { N: 1, H: if (a & 0x0F).wrapping_sub(b & 0x0F).wrapping_sub(carry) & 0x10 != 0 { [INFO] [stdout] 1 [INFO] [stdout] } else { [INFO] [stdout] 0 [INFO] [stdout] }, C: if (a as u16) < (b as u16) + (carry as u16) { [INFO] [stdout] 1 [INFO] [stdout] } else { [INFO] [stdout] 0 [INFO] [stdout] }, Z: if val == 0 { 1 } else { 0 } }` and removing relevant reassignments [INFO] [stdout] --> src/instructions.rs:1072:5 [INFO] [stdout] | [INFO] [stdout] 1072 | let mut flags = Flags::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/instructions.rs:1091:5 [INFO] [stdout] | [INFO] [stdout] 1091 | flags.Z = if val == 0 { 1 } else { 0 }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `cpu::Flags { Z: if val == 0 { 1 } else { 0 }, N: 0, H: 1, C: 0 }` and removing relevant reassignments [INFO] [stdout] --> src/instructions.rs:1090:5 [INFO] [stdout] | [INFO] [stdout] 1090 | let mut flags = Flags::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/instructions.rs:1101:5 [INFO] [stdout] | [INFO] [stdout] 1101 | flags.Z = if val == 0 { 1 } else { 0 }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `cpu::Flags { Z: if val == 0 { 1 } else { 0 }, N: 0, H: 0, C: 0 }` and removing relevant reassignments [INFO] [stdout] --> src/instructions.rs:1100:5 [INFO] [stdout] | [INFO] [stdout] 1100 | let mut flags = Flags::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/instructions.rs:1111:5 [INFO] [stdout] | [INFO] [stdout] 1111 | flags.Z = if val == 0 { 1 } else { 0 }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `cpu::Flags { Z: if val == 0 { 1 } else { 0 }, N: 0, H: 0, C: 0 }` and removing relevant reassignments [INFO] [stdout] --> src/instructions.rs:1110:5 [INFO] [stdout] | [INFO] [stdout] 1110 | let mut flags = Flags::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/instructions.rs:1517:6 [INFO] [stdout] | [INFO] [stdout] 1517 | / flags.H = if (((a & 0x0F) + (b & 0x0F)) & 0x10) == 0x10 { [INFO] [stdout] 1518 | | 1 [INFO] [stdout] 1519 | | } else { [INFO] [stdout] 1520 | | 0 [INFO] [stdout] 1521 | | }; [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `cpu::Flags { H: if (((a & 0x0F) + (b & 0x0F)) & 0x10) == 0x10 { [INFO] [stdout] 1 [INFO] [stdout] } else { [INFO] [stdout] 0 [INFO] [stdout] }, C: if (((a & 0xFF) + (b & 0xFF)) & 0x100) == 0x100 { [INFO] [stdout] 1 [INFO] [stdout] } else { [INFO] [stdout] 0 [INFO] [stdout] }, Z: 0, N: 0 }` and removing relevant reassignments [INFO] [stdout] --> src/instructions.rs:1516:6 [INFO] [stdout] | [INFO] [stdout] 1516 | let mut flags = Flags::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/instructions.rs:1556:6 [INFO] [stdout] | [INFO] [stdout] 1556 | / flags.H = if (((a & 0x0F) + (b & 0x0F)) & 0x10) == 0x10 { [INFO] [stdout] 1557 | | 1 [INFO] [stdout] 1558 | | } else { [INFO] [stdout] 1559 | | 0 [INFO] [stdout] 1560 | | }; [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `cpu::Flags { H: if (((a & 0x0F) + (b & 0x0F)) & 0x10) == 0x10 { [INFO] [stdout] 1 [INFO] [stdout] } else { [INFO] [stdout] 0 [INFO] [stdout] }, C: if (((a & 0xFF) + (b & 0xFF)) & 0x100) == 0x100 { [INFO] [stdout] 1 [INFO] [stdout] } else { [INFO] [stdout] 0 [INFO] [stdout] }, Z: 0, N: 0 }` and removing relevant reassignments [INFO] [stdout] --> src/instructions.rs:1555:6 [INFO] [stdout] | [INFO] [stdout] 1555 | let mut flags = Flags::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/instructions.rs:1917:17 [INFO] [stdout] | [INFO] [stdout] 1917 | cpu.reg_file[reg8] = cpu.reg_file[reg8] << 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `cpu.reg_file[reg8] <<= 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/instructions.rs:2194:17 [INFO] [stdout] | [INFO] [stdout] 2194 | cpu.reg_file[reg8] = cpu.reg_file[reg8] & mask; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `cpu.reg_file[reg8] &= mask` [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/instructions.rs:2249:17 [INFO] [stdout] | [INFO] [stdout] 2249 | cpu.reg_file[reg8] = cpu.reg_file[reg8] | mask; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `cpu.reg_file[reg8] |= mask` [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: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/ppu.rs:14:1 [INFO] [stdout] | [INFO] [stdout] 14 | impl Into for GameboyColor { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] = note: `#[warn(clippy::from_over_into)]` on by default [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 14 ~ impl From for Color { [INFO] [stdout] 15 ~ fn from(val: GameboyColor) -> Self { [INFO] [stdout] 16 ~ match val { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/ppu.rs:55:30 [INFO] [stdout] | [INFO] [stdout] 55 | sprite_priority: !(bytes[3] & 8 == 0), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `(bytes[3] & 8 != 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/ppu.rs:56:21 [INFO] [stdout] | [INFO] [stdout] 56 | y_flip: !(bytes[3] & 4 == 0), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `(bytes[3] & 4 != 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/ppu.rs:57:21 [INFO] [stdout] | [INFO] [stdout] 57 | x_flip: !(bytes[3] & 2 == 0), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `(bytes[3] & 2 != 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/ppu.rs:58:22 [INFO] [stdout] | [INFO] [stdout] 58 | palette: !(bytes[3] & 1 == 0), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `(bytes[3] & 1 != 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: name `OAM` contains a capitalized acronym [INFO] [stdout] --> src/ppu.rs:83:12 [INFO] [stdout] | [INFO] [stdout] 83 | pub struct OAM { [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Oam` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `OAM` which implements the `Copy` trait [INFO] [stdout] --> src/ppu.rs:89:32 [INFO] [stdout] | [INFO] [stdout] 89 | let mut oam_arr: [u8; 0xA0] = self.clone().into(); [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `(*self)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `OAM` which implements the `Copy` trait [INFO] [stdout] --> src/ppu.rs:94:28 [INFO] [stdout] | [INFO] [stdout] 94 | let oam_arr: [u8; 0xA0] = self.clone().into(); [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `(*self)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/ppu.rs:103:23 [INFO] [stdout] | [INFO] [stdout] 103 | .flat_map(|s| Into::<[u8; 4]>::into(s)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the method itself: `Into::<[u8; 4]>::into` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `color_map` [INFO] [stdout] --> src/ppu.rs:133:11 [INFO] [stdout] | [INFO] [stdout] 133 | for i in 0..8 { [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 and enumerate() [INFO] [stdout] | [INFO] [stdout] 133 - for i in 0..8 { [INFO] [stdout] 133 + for (i, ) in color_map.iter_mut().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `PPU` contains a capitalized acronym [INFO] [stdout] --> src/ppu.rs:160:12 [INFO] [stdout] | [INFO] [stdout] 160 | pub struct PPU { [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Ppu` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `[ppu::OamEntry; 40]` [INFO] [stdout] --> src/ppu.rs:171:37 [INFO] [stdout] | [INFO] [stdout] 171 | oam: OAM { oam_entries: [OamEntry::default(); 40].into()}, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `[OamEntry::default(); 40]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `isize` is unnecessary [INFO] [stdout] --> src/ppu.rs:239:4 [INFO] [stdout] | [INFO] [stdout] 239 | ((0x1000 as isize) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `0x1000_isize` [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: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/ppu.rs:247:11 [INFO] [stdout] | [INFO] [stdout] 247 | assert!(mem_tile_index >= 0x800 && mem_tile_index <= 0x17FF, "mem_tile_index: {}", mem_tile_index) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0x800..=0x17FF).contains(&mem_tile_index)` [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: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/ppu.rs:263:27 [INFO] [stdout] | [INFO] [stdout] 263 | self.vram[(sprite.data_tile_num as usize * 16 + 2 * tile_row as usize) as usize]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `((sprite.data_tile_num as usize * 16 + 2 * tile_row as usize))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/ppu.rs:265:18 [INFO] [stdout] | [INFO] [stdout] 265 | [(sprite.data_tile_num as usize * 16 + 2 * tile_row as usize + 1) as usize]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `((sprite.data_tile_num as usize * 16 + 2 * tile_row as usize + 1))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u16` -> `u16`) [INFO] [stdout] --> src/ppu.rs:329:41 [INFO] [stdout] | [INFO] [stdout] 329 | let vram_index = tilemap_base + ((fetcher_y as u16 / 8 * 32) + fetcher_x as u16) as u16; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `((fetcher_y as u16 / 8 * 32) + fetcher_x as u16)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `usize` is unnecessary [INFO] [stdout] --> src/ppu.rs:339:13 [INFO] [stdout] | [INFO] [stdout] 339 | (0x1000 as usize) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `0x1000_usize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `usize` is unnecessary [INFO] [stdout] --> src/ppu.rs:354:13 [INFO] [stdout] | [INFO] [stdout] 354 | (0x1000 as usize) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `0x1000_usize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/ppu.rs:359:13 [INFO] [stdout] | [INFO] [stdout] 359 | (tile_index as usize) * 16 + tile_row * 2 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `tile_index` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/ppu.rs:407:6 [INFO] [stdout] | [INFO] [stdout] 407 | ((0x02 & high_byte) >> 0) | ((0x02 & low_byte) >> 1), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `((0x02 & high_byte))` [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: this operation has no effect [INFO] [stdout] --> src/ppu.rs:412:34 [INFO] [stdout] | [INFO] [stdout] 412 | ((0x01 & high_byte) << 1) | ((0x01 & low_byte) >> 0), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `((0x01 & low_byte))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/ppu.rs:446:5 [INFO] [stdout] | [INFO] [stdout] 446 | !(num & (1 << bit_num) == 0) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(num & (1 << bit_num) != 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: name `LCDC` contains a capitalized acronym [INFO] [stdout] --> src/register_maps.rs:64:12 [INFO] [stdout] | [INFO] [stdout] 64 | pub struct LCDC { [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Lcdc` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `TAC` contains a capitalized acronym [INFO] [stdout] --> src/register_maps.rs:181:12 [INFO] [stdout] | [INFO] [stdout] 181 | pub struct TAC { [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Tac` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: feature `wrapping_int_impl` is declared but not used [INFO] [stdout] --> src/main.rs:4:12 [INFO] [stdout] | [INFO] [stdout] 4 | #![feature(wrapping_int_impl)] [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_features)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 4.35s [INFO] running `Command { std: "docker" "inspect" "a846156a865bf3764fda5584270bf8b21d882161846aba605ed659fc7102c689", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "a846156a865bf3764fda5584270bf8b21d882161846aba605ed659fc7102c689", kill_on_drop: false }` [INFO] [stdout] a846156a865bf3764fda5584270bf8b21d882161846aba605ed659fc7102c689