[INFO] cloning repository https://github.com/UEPA-Foundation/GB [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/UEPA-Foundation/GB" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FUEPA-Foundation%2FGB", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FUEPA-Foundation%2FGB'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 5fed5357d6a38f29b02b35602b4fa7fee94ed8a5 [INFO] linting UEPA-Foundation/GB against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FUEPA-Foundation%2FGB" "/workspace/builds/worker-3-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-3-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/UEPA-Foundation/GB [INFO] finished tweaking git repo https://github.com/UEPA-Foundation/GB [INFO] tweaked toml for git repo https://github.com/UEPA-Foundation/GB written to /workspace/builds/worker-3-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/UEPA-Foundation/GB 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/UEPA-Foundation/GB 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] Downloading crates ... [INFO] [stderr] Downloaded snafu v0.7.1 [INFO] [stderr] Downloaded enum_dispatch v0.3.8 [INFO] [stderr] Downloaded spin v0.9.4 [INFO] [stderr] Downloaded snafu-derive v0.7.1 [INFO] [stderr] Downloaded exr v1.5.1 [INFO] [stderr] Downloaded sdl2 v0.35.2 [INFO] [stderr] Downloaded tiff v0.7.3 [INFO] [stderr] Downloaded sdl2-sys v0.35.2 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 5be094dbd489fed9ade9932b2283676b16116b119064374431c458f94b18491a [INFO] running `Command { std: "docker" "start" "-a" "5be094dbd489fed9ade9932b2283676b16116b119064374431c458f94b18491a", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "5be094dbd489fed9ade9932b2283676b16116b119064374431c458f94b18491a", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "5be094dbd489fed9ade9932b2283676b16116b119064374431c458f94b18491a", kill_on_drop: false }` [INFO] [stdout] 5be094dbd489fed9ade9932b2283676b16116b119064374431c458f94b18491a [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 93313ef967a2e8a7473111d79dcfa0995fcf5338e96e29052dd16b741a9603e8 [INFO] running `Command { std: "docker" "start" "-a" "93313ef967a2e8a7473111d79dcfa0995fcf5338e96e29052dd16b741a9603e8", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.132 [INFO] [stderr] Compiling syn v1.0.98 [INFO] [stderr] Compiling crossbeam-utils v0.8.12 [INFO] [stderr] Compiling num-traits v0.2.15 [INFO] [stderr] Compiling crossbeam-epoch v0.9.11 [INFO] [stderr] Compiling num-integer v0.1.45 [INFO] [stderr] Compiling rayon-core v1.9.3 [INFO] [stderr] Compiling num-bigint v0.4.3 [INFO] [stderr] Compiling rayon v1.5.3 [INFO] [stderr] Checking miniz_oxide v0.5.4 [INFO] [stderr] Compiling futures-core v0.3.24 [INFO] [stderr] Compiling version-compare v0.1.0 [INFO] [stderr] Compiling num-rational v0.4.1 [INFO] [stderr] Checking either v1.8.0 [INFO] [stderr] Checking spin v0.9.4 [INFO] [stderr] Compiling num-iter v0.1.43 [INFO] [stderr] Checking weezl v0.1.7 [INFO] [stderr] Checking futures-sink v0.3.24 [INFO] [stderr] Compiling sdl2 v0.35.2 [INFO] [stderr] Checking smallvec v1.9.0 [INFO] [stderr] Checking bit_field v0.10.1 [INFO] [stderr] Checking lebe v0.5.2 [INFO] [stderr] Checking half v1.8.2 [INFO] [stderr] Compiling once_cell v1.14.0 [INFO] [stderr] Checking bytemuck v1.12.1 [INFO] [stderr] Compiling sdl2-sys v0.35.2 [INFO] [stderr] Compiling paste v1.0.7 [INFO] [stderr] Checking crossbeam-channel v0.5.6 [INFO] [stderr] Checking gif v0.11.4 [INFO] [stderr] Checking flate2 v1.0.24 [INFO] [stderr] Checking num_cpus v1.13.1 [INFO] [stderr] Checking getrandom v0.2.7 [INFO] [stderr] Checking crossbeam-deque v0.8.2 [INFO] [stderr] Checking threadpool v1.8.1 [INFO] [stderr] Checking nanorand v0.7.0 [INFO] [stderr] Checking png v0.17.6 [INFO] [stderr] Checking num-complex v0.4.2 [INFO] [stderr] Checking num v0.4.0 [INFO] [stderr] Checking jpeg-decoder v0.2.6 [INFO] [stderr] Checking tiff v0.7.3 [INFO] [stderr] Compiling pin-project-internal v1.0.12 [INFO] [stderr] Compiling snafu-derive v0.7.1 [INFO] [stderr] Compiling num-derive v0.3.3 [INFO] [stderr] Compiling enum_dispatch v0.3.8 [INFO] [stderr] Checking pin-project v1.0.12 [INFO] [stderr] Checking flume v0.10.14 [INFO] [stderr] Checking exr v1.5.1 [INFO] [stderr] Checking snafu v0.7.1 [INFO] [stderr] Checking image v0.24.4 [INFO] [stderr] Checking uepa v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unneeded unit expression [INFO] [stdout] --> src/ppu/lcd.rs:86:9 [INFO] [stdout] | [INFO] [stdout] 86 | () // LY is read only [INFO] [stdout] | ^^ help: remove the final `()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] = note: `#[warn(clippy::unused_unit)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit expression [INFO] [stdout] --> src/ppu/lcd.rs:86:9 [INFO] [stdout] | [INFO] [stdout] 86 | () // LY is read only [INFO] [stdout] | ^^ help: remove the final `()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] = note: `#[warn(clippy::unused_unit)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/cpu/instructions.rs:702:5 [INFO] [stdout] | [INFO] [stdout] 702 | gb.cpu.a = gb.cpu.a << 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `gb.cpu.a <<= 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/cpu/instructions.rs:774:5 [INFO] [stdout] | [INFO] [stdout] 774 | gb.cpu.a = gb.cpu.a >> 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `gb.cpu.a >>= 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/instructions.rs:673:20 [INFO] [stdout] | [INFO] [stdout] 673 | gb.cpu.$r8 = gb.cpu.$r8 << 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `gb.cpu.$r8 <<= 1` [INFO] [stdout] ... [INFO] [stdout] 1423 | /* 1X */ rl!(b), rl!(c), rl!(d), rl!(e), rl!(h), rl!(l), rl!(d hl), rl!(a), [INFO] [stdout] | ------ in this macro invocation [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: this warning originates in the macro `rl` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/cpu/instructions.rs:673:20 [INFO] [stdout] | [INFO] [stdout] 673 | gb.cpu.$r8 = gb.cpu.$r8 << 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `gb.cpu.$r8 <<= 1` [INFO] [stdout] ... [INFO] [stdout] 1423 | /* 1X */ rl!(b), rl!(c), rl!(d), rl!(e), rl!(h), rl!(l), rl!(d hl), rl!(a), [INFO] [stdout] | ------ in this macro invocation [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: this warning originates in the macro `rl` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/cpu/instructions.rs:673:20 [INFO] [stdout] | [INFO] [stdout] 673 | gb.cpu.$r8 = gb.cpu.$r8 << 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `gb.cpu.$r8 <<= 1` [INFO] [stdout] ... [INFO] [stdout] 1423 | /* 1X */ rl!(b), rl!(c), rl!(d), rl!(e), rl!(h), rl!(l), rl!(d hl), rl!(a), [INFO] [stdout] | ------ in this macro invocation [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: this warning originates in the macro `rl` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/cpu/instructions.rs:673:20 [INFO] [stdout] | [INFO] [stdout] 673 | gb.cpu.$r8 = gb.cpu.$r8 << 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `gb.cpu.$r8 <<= 1` [INFO] [stdout] ... [INFO] [stdout] 1423 | /* 1X */ rl!(b), rl!(c), rl!(d), rl!(e), rl!(h), rl!(l), rl!(d hl), rl!(a), [INFO] [stdout] | ------ in this macro invocation [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: this warning originates in the macro `rl` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/cpu/instructions.rs:673:20 [INFO] [stdout] | [INFO] [stdout] 673 | gb.cpu.$r8 = gb.cpu.$r8 << 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `gb.cpu.$r8 <<= 1` [INFO] [stdout] ... [INFO] [stdout] 1423 | /* 1X */ rl!(b), rl!(c), rl!(d), rl!(e), rl!(h), rl!(l), rl!(d hl), rl!(a), [INFO] [stdout] | ------ in this macro invocation [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: this warning originates in the macro `rl` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/cpu/instructions.rs:673:20 [INFO] [stdout] | [INFO] [stdout] 673 | gb.cpu.$r8 = gb.cpu.$r8 << 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `gb.cpu.$r8 <<= 1` [INFO] [stdout] ... [INFO] [stdout] 1423 | /* 1X */ rl!(b), rl!(c), rl!(d), rl!(e), rl!(h), rl!(l), rl!(d hl), rl!(a), [INFO] [stdout] | ------ in this macro invocation [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: this warning originates in the macro `rl` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/cpu/instructions.rs:688:13 [INFO] [stdout] | [INFO] [stdout] 688 | dhl = dhl << 1; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `dhl <<= 1` [INFO] [stdout] ... [INFO] [stdout] 1423 | /* 1X */ rl!(b), rl!(c), rl!(d), rl!(e), rl!(h), rl!(l), rl!(d hl), rl!(a), [INFO] [stdout] | --------- in this macro invocation [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: this warning originates in the macro `rl` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/cpu/instructions.rs:673:20 [INFO] [stdout] | [INFO] [stdout] 673 | gb.cpu.$r8 = gb.cpu.$r8 << 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `gb.cpu.$r8 <<= 1` [INFO] [stdout] ... [INFO] [stdout] 1423 | /* 1X */ rl!(b), rl!(c), rl!(d), rl!(e), rl!(h), rl!(l), rl!(d hl), rl!(a), [INFO] [stdout] | ------ in this macro invocation [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: this warning originates in the macro `rl` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/cpu/instructions.rs:745:20 [INFO] [stdout] | [INFO] [stdout] 745 | gb.cpu.$r8 = gb.cpu.$r8 >> 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `gb.cpu.$r8 >>= 1` [INFO] [stdout] ... [INFO] [stdout] 1424 | rr!(b), rr!(c), rr!(d), rr!(e), rr!(h), rr!(l), rr!(d hl), rr!(a), [INFO] [stdout] | ------ in this macro invocation [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: this warning originates in the macro `rr` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/cpu/instructions.rs:745:20 [INFO] [stdout] | [INFO] [stdout] 745 | gb.cpu.$r8 = gb.cpu.$r8 >> 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `gb.cpu.$r8 >>= 1` [INFO] [stdout] ... [INFO] [stdout] 1424 | rr!(b), rr!(c), rr!(d), rr!(e), rr!(h), rr!(l), rr!(d hl), rr!(a), [INFO] [stdout] | ------ in this macro invocation [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: this warning originates in the macro `rr` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/cpu/instructions.rs:745:20 [INFO] [stdout] | [INFO] [stdout] 745 | gb.cpu.$r8 = gb.cpu.$r8 >> 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `gb.cpu.$r8 >>= 1` [INFO] [stdout] ... [INFO] [stdout] 1424 | rr!(b), rr!(c), rr!(d), rr!(e), rr!(h), rr!(l), rr!(d hl), rr!(a), [INFO] [stdout] | ------ in this macro invocation [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: this warning originates in the macro `rr` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/cpu/instructions.rs:745:20 [INFO] [stdout] | [INFO] [stdout] 745 | gb.cpu.$r8 = gb.cpu.$r8 >> 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `gb.cpu.$r8 >>= 1` [INFO] [stdout] ... [INFO] [stdout] 1424 | rr!(b), rr!(c), rr!(d), rr!(e), rr!(h), rr!(l), rr!(d hl), rr!(a), [INFO] [stdout] | ------ in this macro invocation [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: this warning originates in the macro `rr` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/cpu/instructions.rs:745:20 [INFO] [stdout] | [INFO] [stdout] 745 | gb.cpu.$r8 = gb.cpu.$r8 >> 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `gb.cpu.$r8 >>= 1` [INFO] [stdout] ... [INFO] [stdout] 1424 | rr!(b), rr!(c), rr!(d), rr!(e), rr!(h), rr!(l), rr!(d hl), rr!(a), [INFO] [stdout] | ------ in this macro invocation [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: this warning originates in the macro `rr` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/cpu/instructions.rs:745:20 [INFO] [stdout] | [INFO] [stdout] 745 | gb.cpu.$r8 = gb.cpu.$r8 >> 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `gb.cpu.$r8 >>= 1` [INFO] [stdout] ... [INFO] [stdout] 1424 | rr!(b), rr!(c), rr!(d), rr!(e), rr!(h), rr!(l), rr!(d hl), rr!(a), [INFO] [stdout] | ------ in this macro invocation [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: this warning originates in the macro `rr` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/cpu/instructions.rs:760:13 [INFO] [stdout] | [INFO] [stdout] 760 | dhl = dhl >> 1; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `dhl >>= 1` [INFO] [stdout] ... [INFO] [stdout] 1424 | rr!(b), rr!(c), rr!(d), rr!(e), rr!(h), rr!(l), rr!(d hl), rr!(a), [INFO] [stdout] | --------- in this macro invocation [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: this warning originates in the macro `rr` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/cpu/instructions.rs:745:20 [INFO] [stdout] | [INFO] [stdout] 745 | gb.cpu.$r8 = gb.cpu.$r8 >> 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `gb.cpu.$r8 >>= 1` [INFO] [stdout] ... [INFO] [stdout] 1424 | rr!(b), rr!(c), rr!(d), rr!(e), rr!(h), rr!(l), rr!(d hl), rr!(a), [INFO] [stdout] | ------ in this macro invocation [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: this warning originates in the macro `rr` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/cpu/instructions.rs:816:20 [INFO] [stdout] | [INFO] [stdout] 816 | gb.cpu.$r8 = gb.cpu.$r8 << 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `gb.cpu.$r8 <<= 1` [INFO] [stdout] ... [INFO] [stdout] 1425 | /* 2X */ sla!(b), sla!(c), sla!(d), sla!(e), sla!(h), sla!(l), sla!(d hl), sla!(a), [INFO] [stdout] | ------- in this macro invocation [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: this warning originates in the macro `sla` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/cpu/instructions.rs:816:20 [INFO] [stdout] | [INFO] [stdout] 816 | gb.cpu.$r8 = gb.cpu.$r8 << 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `gb.cpu.$r8 <<= 1` [INFO] [stdout] ... [INFO] [stdout] 1425 | /* 2X */ sla!(b), sla!(c), sla!(d), sla!(e), sla!(h), sla!(l), sla!(d hl), sla!(a), [INFO] [stdout] | ------- in this macro invocation [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: this warning originates in the macro `sla` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/cpu/instructions.rs:816:20 [INFO] [stdout] | [INFO] [stdout] 816 | gb.cpu.$r8 = gb.cpu.$r8 << 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `gb.cpu.$r8 <<= 1` [INFO] [stdout] ... [INFO] [stdout] 1425 | /* 2X */ sla!(b), sla!(c), sla!(d), sla!(e), sla!(h), sla!(l), sla!(d hl), sla!(a), [INFO] [stdout] | ------- in this macro invocation [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: this warning originates in the macro `sla` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/cpu/instructions.rs:816:20 [INFO] [stdout] | [INFO] [stdout] 816 | gb.cpu.$r8 = gb.cpu.$r8 << 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `gb.cpu.$r8 <<= 1` [INFO] [stdout] ... [INFO] [stdout] 1425 | /* 2X */ sla!(b), sla!(c), sla!(d), sla!(e), sla!(h), sla!(l), sla!(d hl), sla!(a), [INFO] [stdout] | ------- in this macro invocation [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: this warning originates in the macro `sla` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/cpu/instructions.rs:816:20 [INFO] [stdout] | [INFO] [stdout] 816 | gb.cpu.$r8 = gb.cpu.$r8 << 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `gb.cpu.$r8 <<= 1` [INFO] [stdout] ... [INFO] [stdout] 1425 | /* 2X */ sla!(b), sla!(c), sla!(d), sla!(e), sla!(h), sla!(l), sla!(d hl), sla!(a), [INFO] [stdout] | ------- in this macro invocation [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: this warning originates in the macro `sla` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/cpu/instructions.rs:816:20 [INFO] [stdout] | [INFO] [stdout] 816 | gb.cpu.$r8 = gb.cpu.$r8 << 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `gb.cpu.$r8 <<= 1` [INFO] [stdout] ... [INFO] [stdout] 1425 | /* 2X */ sla!(b), sla!(c), sla!(d), sla!(e), sla!(h), sla!(l), sla!(d hl), sla!(a), [INFO] [stdout] | ------- in this macro invocation [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: this warning originates in the macro `sla` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/cpu/instructions.rs:829:13 [INFO] [stdout] | [INFO] [stdout] 829 | dhl = dhl << 1; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `dhl <<= 1` [INFO] [stdout] ... [INFO] [stdout] 1425 | /* 2X */ sla!(b), sla!(c), sla!(d), sla!(e), sla!(h), sla!(l), sla!(d hl), sla!(a), [INFO] [stdout] | ---------- in this macro invocation [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: this warning originates in the macro `sla` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/cpu/instructions.rs:816:20 [INFO] [stdout] | [INFO] [stdout] 816 | gb.cpu.$r8 = gb.cpu.$r8 << 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `gb.cpu.$r8 <<= 1` [INFO] [stdout] ... [INFO] [stdout] 1425 | /* 2X */ sla!(b), sla!(c), sla!(d), sla!(e), sla!(h), sla!(l), sla!(d hl), sla!(a), [INFO] [stdout] | ------- in this macro invocation [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: this warning originates in the macro `sla` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: there is no need to manually implement bit rotation [INFO] [stdout] --> src/cpu/instructions.rs:644:26 [INFO] [stdout] | [INFO] [stdout] 644 | gb.cpu.$r8 = (gb.cpu.$r8 >> 4) | (gb.cpu.$r8 << 4); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: this expression can be rewritten as: `gb.cpu.$r8.rotate_left(4)` [INFO] [stdout] ... [INFO] [stdout] 1427 | /* 3X */ swap!(b), swap!(c), swap!(d), swap!(e), swap!(h), swap!(l), swap!(d hl), swap!(a), [INFO] [stdout] | -------- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_rotate [INFO] [stdout] = note: `#[warn(clippy::manual_rotate)]` on by default [INFO] [stdout] = note: this warning originates in the macro `swap` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: there is no need to manually implement bit rotation [INFO] [stdout] --> src/cpu/instructions.rs:644:26 [INFO] [stdout] | [INFO] [stdout] 644 | gb.cpu.$r8 = (gb.cpu.$r8 >> 4) | (gb.cpu.$r8 << 4); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: this expression can be rewritten as: `gb.cpu.$r8.rotate_left(4)` [INFO] [stdout] ... [INFO] [stdout] 1427 | /* 3X */ swap!(b), swap!(c), swap!(d), swap!(e), swap!(h), swap!(l), swap!(d hl), swap!(a), [INFO] [stdout] | -------- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_rotate [INFO] [stdout] = note: this warning originates in the macro `swap` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: there is no need to manually implement bit rotation [INFO] [stdout] --> src/cpu/instructions.rs:644:26 [INFO] [stdout] | [INFO] [stdout] 644 | gb.cpu.$r8 = (gb.cpu.$r8 >> 4) | (gb.cpu.$r8 << 4); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: this expression can be rewritten as: `gb.cpu.$r8.rotate_left(4)` [INFO] [stdout] ... [INFO] [stdout] 1427 | /* 3X */ swap!(b), swap!(c), swap!(d), swap!(e), swap!(h), swap!(l), swap!(d hl), swap!(a), [INFO] [stdout] | -------- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_rotate [INFO] [stdout] = note: this warning originates in the macro `swap` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: there is no need to manually implement bit rotation [INFO] [stdout] --> src/cpu/instructions.rs:644:26 [INFO] [stdout] | [INFO] [stdout] 644 | gb.cpu.$r8 = (gb.cpu.$r8 >> 4) | (gb.cpu.$r8 << 4); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: this expression can be rewritten as: `gb.cpu.$r8.rotate_left(4)` [INFO] [stdout] ... [INFO] [stdout] 1427 | /* 3X */ swap!(b), swap!(c), swap!(d), swap!(e), swap!(h), swap!(l), swap!(d hl), swap!(a), [INFO] [stdout] | -------- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_rotate [INFO] [stdout] = note: this warning originates in the macro `swap` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: there is no need to manually implement bit rotation [INFO] [stdout] --> src/cpu/instructions.rs:644:26 [INFO] [stdout] | [INFO] [stdout] 644 | gb.cpu.$r8 = (gb.cpu.$r8 >> 4) | (gb.cpu.$r8 << 4); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: this expression can be rewritten as: `gb.cpu.$r8.rotate_left(4)` [INFO] [stdout] ... [INFO] [stdout] 1427 | /* 3X */ swap!(b), swap!(c), swap!(d), swap!(e), swap!(h), swap!(l), swap!(d hl), swap!(a), [INFO] [stdout] | -------- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_rotate [INFO] [stdout] = note: this warning originates in the macro `swap` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: there is no need to manually implement bit rotation [INFO] [stdout] --> src/cpu/instructions.rs:644:26 [INFO] [stdout] | [INFO] [stdout] 644 | gb.cpu.$r8 = (gb.cpu.$r8 >> 4) | (gb.cpu.$r8 << 4); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: this expression can be rewritten as: `gb.cpu.$r8.rotate_left(4)` [INFO] [stdout] ... [INFO] [stdout] 1427 | /* 3X */ swap!(b), swap!(c), swap!(d), swap!(e), swap!(h), swap!(l), swap!(d hl), swap!(a), [INFO] [stdout] | -------- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_rotate [INFO] [stdout] = note: this warning originates in the macro `swap` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: there is no need to manually implement bit rotation [INFO] [stdout] --> src/cpu/instructions.rs:656:34 [INFO] [stdout] | [INFO] [stdout] 656 | gb.cycle_write(addr, (dhl >> 4) | (dhl << 4)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: this expression can be rewritten as: `dhl.rotate_left(4)` [INFO] [stdout] ... [INFO] [stdout] 1427 | /* 3X */ swap!(b), swap!(c), swap!(d), swap!(e), swap!(h), swap!(l), swap!(d hl), swap!(a), [INFO] [stdout] | ----------- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_rotate [INFO] [stdout] = note: this warning originates in the macro `swap` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: there is no need to manually implement bit rotation [INFO] [stdout] --> src/cpu/instructions.rs:644:26 [INFO] [stdout] | [INFO] [stdout] 644 | gb.cpu.$r8 = (gb.cpu.$r8 >> 4) | (gb.cpu.$r8 << 4); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: this expression can be rewritten as: `gb.cpu.$r8.rotate_left(4)` [INFO] [stdout] ... [INFO] [stdout] 1427 | /* 3X */ swap!(b), swap!(c), swap!(d), swap!(e), swap!(h), swap!(l), swap!(d hl), swap!(a), [INFO] [stdout] | -------- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_rotate [INFO] [stdout] = note: this warning originates in the macro `swap` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/cpu/instructions.rs:702:5 [INFO] [stdout] | [INFO] [stdout] 702 | gb.cpu.a = gb.cpu.a << 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `gb.cpu.a <<= 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/cpu/instructions.rs:774:5 [INFO] [stdout] | [INFO] [stdout] 774 | gb.cpu.a = gb.cpu.a >> 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `gb.cpu.a >>= 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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/cpu/mod.rs:99:9 [INFO] [stdout] | [INFO] [stdout] 99 | / match self.intr.fetch() { [INFO] [stdout] 100 | | Some(_) => { [INFO] [stdout] 101 | | self.halt = false; [INFO] [stdout] ... | [INFO] [stdout] 130 | | None => {} [INFO] [stdout] 131 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 99 ~ if let Some(_) = self.intr.fetch() { [INFO] [stdout] 100 + self.halt = false; [INFO] [stdout] 101 + [INFO] [stdout] 102 + if ime { [INFO] [stdout] 103 + self.advance_cycles(4); [INFO] [stdout] 104 + self.intr.disable(); [INFO] [stdout] 105 + [INFO] [stdout] 106 + let addr = u16::to_le_bytes(self.cpu.pc); [INFO] [stdout] 107 + self.cpu.sp.dec(); [INFO] [stdout] 108 + self.cycle_write(self.cpu.sp, addr[1]); [INFO] [stdout] 109 + [INFO] [stdout] 110 + // Second fetch to check if intr should be cancelled [INFO] [stdout] 111 + let jp_addr = match self.intr.fetch() { [INFO] [stdout] 112 + Some(intr) => { [INFO] [stdout] 113 + self.intr.reset(intr); [INFO] [stdout] 114 + (intr as u16) * 8 + 0x40 [INFO] [stdout] 115 + } [INFO] [stdout] 116 + None => 0, [INFO] [stdout] 117 + }; [INFO] [stdout] 118 + [INFO] [stdout] 119 + self.cpu.sp.dec(); [INFO] [stdout] 120 + self.cycle_write(self.cpu.sp, addr[0]); [INFO] [stdout] 121 + [INFO] [stdout] 122 + // jump to intr handler addr [INFO] [stdout] 123 + self.cpu.pc = jp_addr; [INFO] [stdout] 124 + self.advance_cycles(4); [INFO] [stdout] 125 + [INFO] [stdout] 126 + return; [INFO] [stdout] 127 + } [INFO] [stdout] 128 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/debug.rs:46:12 [INFO] [stdout] | [INFO] [stdout] 46 | if !self.stdout.flush().is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.stdout.flush().is_err()` [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/debug.rs:52:12 [INFO] [stdout] | [INFO] [stdout] 52 | if !self.stdin.read_line(&mut user_input).is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.stdin.read_line(&mut user_input).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `changes` [INFO] [stdout] --> src/debug.rs:161:26 [INFO] [stdout] | [INFO] [stdout] 161 | for i in 0..changes.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 161 - for i in 0..changes.len() { [INFO] [stdout] 161 + for in &changes { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this pattern reimplements `Option::unwrap_or` [INFO] [stdout] --> src/debug.rs:177:21 [INFO] [stdout] | [INFO] [stdout] 177 | let steps = match modif { [INFO] [stdout] | _____________________^ [INFO] [stdout] 178 | | None => 1, [INFO] [stdout] 179 | | Some(n) => n, [INFO] [stdout] 180 | | }; [INFO] [stdout] | |_________^ help: replace with: `modif.unwrap_or(1)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or [INFO] [stdout] = note: `#[warn(clippy::manual_unwrap_or)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this pattern reimplements `Option::unwrap_or` [INFO] [stdout] --> src/debug.rs:187:21 [INFO] [stdout] | [INFO] [stdout] 187 | let steps = match modif { [INFO] [stdout] | _____________________^ [INFO] [stdout] 188 | | None => 1, [INFO] [stdout] 189 | | Some(n) => n, [INFO] [stdout] 190 | | }; [INFO] [stdout] | |_________^ help: replace with: `modif.unwrap_or(1)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this pattern reimplements `Option::unwrap_or` [INFO] [stdout] --> src/debug.rs:208:21 [INFO] [stdout] | [INFO] [stdout] 208 | let count = match modif { [INFO] [stdout] | _____________________^ [INFO] [stdout] 209 | | None => 32, [INFO] [stdout] 210 | | Some(n) => n, [INFO] [stdout] 211 | | }; [INFO] [stdout] | |_________^ help: replace with: `modif.unwrap_or(32)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this pattern reimplements `Option::unwrap_or` [INFO] [stdout] --> src/debug.rs:301:21 [INFO] [stdout] | [INFO] [stdout] 301 | let count = match modif { [INFO] [stdout] | _____________________^ [INFO] [stdout] 302 | | None => 5, [INFO] [stdout] 303 | | Some(n) => n, [INFO] [stdout] 304 | | }; [INFO] [stdout] | |_________^ help: replace with: `modif.unwrap_or(5)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `format!` in `println!` args [INFO] [stdout] --> src/debug.rs:413:17 [INFO] [stdout] | [INFO] [stdout] 413 | println!("{}", format!("Invalid command: {}", cmd_name)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: combine the `format!(..)` arguments with the outer `println!(..)` call [INFO] [stdout] = help: or consider changing `format!` to `format_args!` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_in_format_args [INFO] [stdout] = note: `#[warn(clippy::format_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/debug.rs:447:9 [INFO] [stdout] | [INFO] [stdout] 447 | let arg; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] = note: `#[warn(clippy::needless_late_init)]` on by default [INFO] [stdout] help: move the declaration `arg` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 447 ~ [INFO] [stdout] 448 ~ let arg = if arg_str.starts_with('$') { [INFO] [stdout] 449 ~ match u16::from_str_radix(&arg_str[1..], 16) { [INFO] [stdout] 450 | Ok(n) => Ok(Arg::Numeric(n)), [INFO] [stdout] ... [INFO] [stdout] 453 | } else { [INFO] [stdout] 454 ~ match arg_str.parse::() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/debug.rs:449:45 [INFO] [stdout] | [INFO] [stdout] 449 | arg = match u16::from_str_radix(&arg_str[1..], 16) { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/debug.rs:448:9 [INFO] [stdout] | [INFO] [stdout] 448 | if arg_str.starts_with('$') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] = note: `#[warn(clippy::manual_strip)]` on by default [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 448 ~ if let Some() = arg_str.strip_prefix('$') { [INFO] [stdout] 449 ~ arg = match u16::from_str_radix(, 16) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/debug.rs:501:8 [INFO] [stdout] | [INFO] [stdout] 501 | if mod_str == "" { [INFO] [stdout] | ^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `mod_str.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] = note: `#[warn(clippy::comparison_to_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/debug.rs:505:37 [INFO] [stdout] | [INFO] [stdout] 505 | Ok(Some(u16::from_str_radix(&mod_str[1..], 16).or_else(|_| Err(format!("Invalid modifier: {}", mod_str)))?)) [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/debug.rs:504:5 [INFO] [stdout] | [INFO] [stdout] 504 | if mod_str.starts_with('$') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 504 ~ if let Some() = mod_str.strip_prefix('$') { [INFO] [stdout] 505 ~ Ok(Some(u16::from_str_radix(, 16).or_else(|_| Err(format!("Invalid modifier: {}", mod_str)))?)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Result.or_else(|x| Err(y))`, which is more succinctly expressed as `map_err(|x| y)` [INFO] [stdout] --> src/debug.rs:505:17 [INFO] [stdout] | [INFO] [stdout] 505 | Ok(Some(u16::from_str_radix(&mod_str[1..], 16).or_else(|_| Err(format!("Invalid modifier: {}", mod_str)))?)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `u16::from_str_radix(&mod_str[1..], 16).map_err(|_| format!("Invalid modifier: {}", mod_str))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] = note: `#[warn(clippy::bind_instead_of_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Result.or_else(|x| Err(y))`, which is more succinctly expressed as `map_err(|x| y)` [INFO] [stdout] --> src/debug.rs:507:17 [INFO] [stdout] | [INFO] [stdout] 507 | Ok(Some(mod_str.parse::().or_else(|_| Err(format!("Invalid modifier: {}", mod_str)))?)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `mod_str.parse::().map_err(|_| format!("Invalid modifier: {}", mod_str))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `VBLANK` contains a capitalized acronym [INFO] [stdout] --> src/intr/mod.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | VBLANK = 0, [INFO] [stdout] | ^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Vblank` [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: name `STAT` contains a capitalized acronym [INFO] [stdout] --> src/intr/mod.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | STAT = 1, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Stat` [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 `TIMER` contains a capitalized acronym [INFO] [stdout] --> src/intr/mod.rs:11:5 [INFO] [stdout] | [INFO] [stdout] 11 | TIMER = 2, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Timer` [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 `SERIAL` contains a capitalized acronym [INFO] [stdout] --> src/intr/mod.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | SERIAL = 3, [INFO] [stdout] | ^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Serial` [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 `JOYPAD` contains a capitalized acronym [INFO] [stdout] --> src/intr/mod.rs:13:5 [INFO] [stdout] | [INFO] [stdout] 13 | JOYPAD = 4, [INFO] [stdout] | ^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Joypad` [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 `DISABLED` contains a capitalized acronym [INFO] [stdout] --> src/intr/mod.rs:17:5 [INFO] [stdout] | [INFO] [stdout] 17 | DISABLED, [INFO] [stdout] | ^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Disabled` [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 `ENABLING` contains a capitalized acronym [INFO] [stdout] --> src/intr/mod.rs:18:5 [INFO] [stdout] | [INFO] [stdout] 18 | ENABLING, [INFO] [stdout] | ^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Enabling` [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 `ENABLED` contains a capitalized acronym [INFO] [stdout] --> src/intr/mod.rs:19:5 [INFO] [stdout] | [INFO] [stdout] 19 | ENABLED, [INFO] [stdout] | ^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Enabled` [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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/intr/mod.rs:29:9 [INFO] [stdout] | [INFO] [stdout] 29 | / match self.ime { [INFO] [stdout] 30 | | ImeState::DISABLED => self.ime = ImeState::ENABLING, [INFO] [stdout] 31 | | _ => {} [INFO] [stdout] 32 | | } [INFO] [stdout] | |_________^ help: try: `if let ImeState::DISABLED = self.ime { self.ime = ImeState::ENABLING }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `NONE` contains a capitalized acronym [INFO] [stdout] --> src/mmu/cart/mbc1.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 15 | NONE, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `None` [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 `RAM` contains a capitalized acronym [INFO] [stdout] --> src/mmu/cart/mbc1.rs:16:5 [INFO] [stdout] | [INFO] [stdout] 16 | RAM(Vec), [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Ram` [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: unneeded `return` statement [INFO] [stdout] --> src/mmu/cart/mbc3.rs:205:26 [INFO] [stdout] | [INFO] [stdout] 205 | _ => return, [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: replace `return` with a unit value [INFO] [stdout] | [INFO] [stdout] 205 - _ => return, [INFO] [stdout] 205 + _ => (), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/mmu/cart/mbc3.rs:214:26 [INFO] [stdout] | [INFO] [stdout] 214 | _ => return, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: replace `return` with a unit value [INFO] [stdout] | [INFO] [stdout] 214 - _ => return, [INFO] [stdout] 214 + _ => (), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u16` -> `u16`) [INFO] [stdout] --> src/mmu/cart/mbc5.rs:54:30 [INFO] [stdout] | [INFO] [stdout] 54 | self.rom_bank_mask = (nbanks - 1) as u16; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `(nbanks - 1)` [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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/mmu/cart/mbc5.rs:115:9 [INFO] [stdout] | [INFO] [stdout] 115 | / match addr { [INFO] [stdout] 116 | | 0x4000..=0x5FFF => { [INFO] [stdout] 117 | | match self.extras { [INFO] [stdout] 118 | | Extras::None | Extras::Ram(_) => self.ram_bank = val & 0x0F, [INFO] [stdout] ... | [INFO] [stdout] 125 | | _ => {} [INFO] [stdout] 126 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 115 ~ if let 0x4000..=0x5FFF = addr { [INFO] [stdout] 116 + match self.extras { [INFO] [stdout] 117 + Extras::None | Extras::Ram(_) => self.ram_bank = val & 0x0F, [INFO] [stdout] 118 + Extras::Rumble | Extras::RamRumble(_) => { [INFO] [stdout] 119 + self.ram_bank = (val & 0x0F) & !0x08 [INFO] [stdout] 120 + // TODO: set rumble [INFO] [stdout] 121 + } [INFO] [stdout] 122 + } [INFO] [stdout] 123 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> src/mmu/cart/no_mbc.rs:9:1 [INFO] [stdout] | [INFO] [stdout] 9 | / enum Ram { [INFO] [stdout] 10 | | NONE, [INFO] [stdout] | | ---- the second-largest variant carries no data at all [INFO] [stdout] 11 | | RAM(RamBank), [INFO] [stdout] | | ------------ the largest variant contains at least 8192 bytes [INFO] [stdout] 12 | | } [INFO] [stdout] | |_^ the entire enum is at least 8193 bytes [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant [INFO] [stdout] = note: `#[warn(clippy::large_enum_variant)]` on by default [INFO] [stdout] help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum [INFO] [stdout] | [INFO] [stdout] 11 - RAM(RamBank), [INFO] [stdout] 11 + RAM(Box), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `NONE` contains a capitalized acronym [INFO] [stdout] --> src/mmu/cart/no_mbc.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | NONE, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `None` [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 `RAM` contains a capitalized acronym [INFO] [stdout] --> src/mmu/cart/no_mbc.rs:11:5 [INFO] [stdout] | [INFO] [stdout] 11 | RAM(RamBank), [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Ram` [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: it looks like you're manually copying between slices [INFO] [stdout] --> src/mmu/cart/no_mbc.rs:37:9 [INFO] [stdout] | [INFO] [stdout] 37 | / for i in 0..0x4000 { [INFO] [stdout] 38 | | self.rom0[i] = raw_rom[i]; [INFO] [stdout] 39 | | } [INFO] [stdout] | |_________^ help: try replacing the loop by: `self.rom0.copy_from_slice(&raw_rom[..0x4000]);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_memcpy [INFO] [stdout] = note: `#[warn(clippy::manual_memcpy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: it looks like you're manually copying between slices [INFO] [stdout] --> src/mmu/cart/no_mbc.rs:40:9 [INFO] [stdout] | [INFO] [stdout] 40 | / for i in 0..0x4000 { [INFO] [stdout] 41 | | self.romx[i] = raw_rom[i + 0x4000]; [INFO] [stdout] 42 | | } [INFO] [stdout] | |_________^ help: try replacing the loop by: `self.romx.copy_from_slice(&raw_rom[16384..(0x4000 + 16384)]);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_memcpy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> src/mmu/cart/mod.rs:16:1 [INFO] [stdout] | [INFO] [stdout] 15 | #[enum_dispatch] [INFO] [stdout] | ---------------- [INFO] [stdout] | | [INFO] [stdout] | the largest variant contains at least 40961 bytes [INFO] [stdout] | the second-largest variant contains at least 544 bytes [INFO] [stdout] 16 | / pub enum CartridgeEnum { [INFO] [stdout] 17 | | Mbc1, [INFO] [stdout] 18 | | Mbc2, [INFO] [stdout] 19 | | Mbc3, [INFO] [stdout] 20 | | Mbc5, [INFO] [stdout] 21 | | NoMbc, [INFO] [stdout] 22 | | } [INFO] [stdout] | |_^ the entire enum is at least 40968 bytes [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant [INFO] [stdout] help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum [INFO] [stdout] | [INFO] [stdout] 21 - NoMbc, [INFO] [stdout] 21 + Box, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/mmu/cart/mod.rs:38:56 [INFO] [stdout] | [INFO] [stdout] 38 | fn init_rom_banks(&mut self, nbanks: u16, raw_rom: &Vec) -> Result<(), CartridgeError>; [INFO] [stdout] | ^^^^^^^^ help: change this to: `&[u8]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `addr` is only used to index `raw_rom` [INFO] [stdout] --> src/mmu/cart/mod.rs:112:17 [INFO] [stdout] | [INFO] [stdout] 112 | for addr in 0x0134..=0x014C { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 112 - for addr in 0x0134..=0x014C { [INFO] [stdout] 112 + for in raw_rom.iter().take(0x014C + 1).skip(0x0134) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/mmu/cart/mod.rs:123:5 [INFO] [stdout] | [INFO] [stdout] 123 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] = note: `#[warn(clippy::println_empty_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `SELECT` contains a capitalized acronym [INFO] [stdout] --> src/mmu/io/joypad.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | SELECT = 0x04, [INFO] [stdout] | ^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Select` [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 `START` contains a capitalized acronym [INFO] [stdout] --> src/mmu/io/joypad.rs:13:5 [INFO] [stdout] | [INFO] [stdout] 13 | START = 0x08, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Start` [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 `RIGHT` contains a capitalized acronym [INFO] [stdout] --> src/mmu/io/joypad.rs:14:5 [INFO] [stdout] | [INFO] [stdout] 14 | RIGHT = 0x10, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Right` [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 `LEFT` contains a capitalized acronym [INFO] [stdout] --> src/mmu/io/joypad.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 15 | LEFT = 0x20, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Left` [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 `DOWN` contains a capitalized acronym [INFO] [stdout] --> src/mmu/io/joypad.rs:17:5 [INFO] [stdout] | [INFO] [stdout] 17 | DOWN = 0x80, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Down` [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 `RUNNING` contains a capitalized acronym [INFO] [stdout] --> src/mmu/io/timer.rs:13:5 [INFO] [stdout] | [INFO] [stdout] 13 | RUNNING, [INFO] [stdout] | ^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Running` [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 `OVERFLOW` contains a capitalized acronym [INFO] [stdout] --> src/mmu/io/timer.rs:14:5 [INFO] [stdout] | [INFO] [stdout] 14 | OVERFLOW(u8), [INFO] [stdout] | ^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Overflow` [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: manual implementation of an assign operation [INFO] [stdout] --> src/cpu/instructions.rs:673:20 [INFO] [stdout] | [INFO] [stdout] 673 | gb.cpu.$r8 = gb.cpu.$r8 << 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `gb.cpu.$r8 <<= 1` [INFO] [stdout] ... [INFO] [stdout] 1423 | /* 1X */ rl!(b), rl!(c), rl!(d), rl!(e), rl!(h), rl!(l), rl!(d hl), rl!(a), [INFO] [stdout] | ------ in this macro invocation [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: this warning originates in the macro `rl` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `LOADING` contains a capitalized acronym [INFO] [stdout] --> src/mmu/io/timer.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 15 | LOADING(u8), [INFO] [stdout] | ^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Loading` [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: manual implementation of an assign operation [INFO] [stdout] --> src/cpu/instructions.rs:673:20 [INFO] [stdout] | [INFO] [stdout] 673 | gb.cpu.$r8 = gb.cpu.$r8 << 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `gb.cpu.$r8 <<= 1` [INFO] [stdout] ... [INFO] [stdout] 1423 | /* 1X */ rl!(b), rl!(c), rl!(d), rl!(e), rl!(h), rl!(l), rl!(d hl), rl!(a), [INFO] [stdout] | ------ in this macro invocation [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: this warning originates in the macro `rl` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/cpu/instructions.rs:673:20 [INFO] [stdout] | [INFO] [stdout] 673 | gb.cpu.$r8 = gb.cpu.$r8 << 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `gb.cpu.$r8 <<= 1` [INFO] [stdout] ... [INFO] [stdout] 1423 | /* 1X */ rl!(b), rl!(c), rl!(d), rl!(e), rl!(h), rl!(l), rl!(d hl), rl!(a), [INFO] [stdout] | ------ in this macro invocation [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: this warning originates in the macro `rl` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/cpu/instructions.rs:673:20 [INFO] [stdout] | [INFO] [stdout] 673 | gb.cpu.$r8 = gb.cpu.$r8 << 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `gb.cpu.$r8 <<= 1` [INFO] [stdout] ... [INFO] [stdout] 1423 | /* 1X */ rl!(b), rl!(c), rl!(d), rl!(e), rl!(h), rl!(l), rl!(d hl), rl!(a), [INFO] [stdout] | ------ in this macro invocation [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: this warning originates in the macro `rl` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/mmu/io/timer.rs:111:9 [INFO] [stdout] | [INFO] [stdout] 111 | / match self.tima_state { [INFO] [stdout] 112 | | TimaState::LOADING(3) => true, [INFO] [stdout] 113 | | _ => false, [INFO] [stdout] 114 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 111 - match self.tima_state { [INFO] [stdout] 112 - TimaState::LOADING(3) => true, [INFO] [stdout] 113 - _ => false, [INFO] [stdout] 114 - } [INFO] [stdout] 111 + matches!(self.tima_state, TimaState::LOADING(3)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/cpu/instructions.rs:673:20 [INFO] [stdout] | [INFO] [stdout] 673 | gb.cpu.$r8 = gb.cpu.$r8 << 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `gb.cpu.$r8 <<= 1` [INFO] [stdout] ... [INFO] [stdout] 1423 | /* 1X */ rl!(b), rl!(c), rl!(d), rl!(e), rl!(h), rl!(l), rl!(d hl), rl!(a), [INFO] [stdout] | ------ in this macro invocation [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: this warning originates in the macro `rl` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/cpu/instructions.rs:673:20 [INFO] [stdout] | [INFO] [stdout] 673 | gb.cpu.$r8 = gb.cpu.$r8 << 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `gb.cpu.$r8 <<= 1` [INFO] [stdout] ... [INFO] [stdout] 1423 | /* 1X */ rl!(b), rl!(c), rl!(d), rl!(e), rl!(h), rl!(l), rl!(d hl), rl!(a), [INFO] [stdout] | ------ in this macro invocation [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: this warning originates in the macro `rl` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/cpu/instructions.rs:688:13 [INFO] [stdout] | [INFO] [stdout] 688 | dhl = dhl << 1; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `dhl <<= 1` [INFO] [stdout] ... [INFO] [stdout] 1423 | /* 1X */ rl!(b), rl!(c), rl!(d), rl!(e), rl!(h), rl!(l), rl!(d hl), rl!(a), [INFO] [stdout] | --------- in this macro invocation [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: this warning originates in the macro `rl` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/cpu/instructions.rs:673:20 [INFO] [stdout] | [INFO] [stdout] 673 | gb.cpu.$r8 = gb.cpu.$r8 << 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `gb.cpu.$r8 <<= 1` [INFO] [stdout] ... [INFO] [stdout] 1423 | /* 1X */ rl!(b), rl!(c), rl!(d), rl!(e), rl!(h), rl!(l), rl!(d hl), rl!(a), [INFO] [stdout] | ------ in this macro invocation [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: this warning originates in the macro `rl` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/cpu/instructions.rs:745:20 [INFO] [stdout] | [INFO] [stdout] 745 | gb.cpu.$r8 = gb.cpu.$r8 >> 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `gb.cpu.$r8 >>= 1` [INFO] [stdout] ... [INFO] [stdout] 1424 | rr!(b), rr!(c), rr!(d), rr!(e), rr!(h), rr!(l), rr!(d hl), rr!(a), [INFO] [stdout] | ------ in this macro invocation [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: this warning originates in the macro `rr` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/cpu/instructions.rs:745:20 [INFO] [stdout] | [INFO] [stdout] 745 | gb.cpu.$r8 = gb.cpu.$r8 >> 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `gb.cpu.$r8 >>= 1` [INFO] [stdout] ... [INFO] [stdout] 1424 | rr!(b), rr!(c), rr!(d), rr!(e), rr!(h), rr!(l), rr!(d hl), rr!(a), [INFO] [stdout] | ------ in this macro invocation [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: this warning originates in the macro `rr` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/cpu/instructions.rs:745:20 [INFO] [stdout] | [INFO] [stdout] 745 | gb.cpu.$r8 = gb.cpu.$r8 >> 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `gb.cpu.$r8 >>= 1` [INFO] [stdout] ... [INFO] [stdout] 1424 | rr!(b), rr!(c), rr!(d), rr!(e), rr!(h), rr!(l), rr!(d hl), rr!(a), [INFO] [stdout] | ------ in this macro invocation [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: this warning originates in the macro `rr` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/cpu/instructions.rs:745:20 [INFO] [stdout] | [INFO] [stdout] 745 | gb.cpu.$r8 = gb.cpu.$r8 >> 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `gb.cpu.$r8 >>= 1` [INFO] [stdout] ... [INFO] [stdout] 1424 | rr!(b), rr!(c), rr!(d), rr!(e), rr!(h), rr!(l), rr!(d hl), rr!(a), [INFO] [stdout] | ------ in this macro invocation [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: this warning originates in the macro `rr` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/cpu/instructions.rs:745:20 [INFO] [stdout] | [INFO] [stdout] 745 | gb.cpu.$r8 = gb.cpu.$r8 >> 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `gb.cpu.$r8 >>= 1` [INFO] [stdout] ... [INFO] [stdout] 1424 | rr!(b), rr!(c), rr!(d), rr!(e), rr!(h), rr!(l), rr!(d hl), rr!(a), [INFO] [stdout] | ------ in this macro invocation [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: this warning originates in the macro `rr` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/cpu/instructions.rs:745:20 [INFO] [stdout] | [INFO] [stdout] 745 | gb.cpu.$r8 = gb.cpu.$r8 >> 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `gb.cpu.$r8 >>= 1` [INFO] [stdout] ... [INFO] [stdout] 1424 | rr!(b), rr!(c), rr!(d), rr!(e), rr!(h), rr!(l), rr!(d hl), rr!(a), [INFO] [stdout] | ------ in this macro invocation [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: this warning originates in the macro `rr` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/cpu/instructions.rs:760:13 [INFO] [stdout] | [INFO] [stdout] 760 | dhl = dhl >> 1; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `dhl >>= 1` [INFO] [stdout] ... [INFO] [stdout] 1424 | rr!(b), rr!(c), rr!(d), rr!(e), rr!(h), rr!(l), rr!(d hl), rr!(a), [INFO] [stdout] | --------- in this macro invocation [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: this warning originates in the macro `rr` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `INDEX` contains a capitalized acronym [INFO] [stdout] --> src/ppu/background/mod.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | INDEX, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Index` [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: manual implementation of an assign operation [INFO] [stdout] --> src/cpu/instructions.rs:745:20 [INFO] [stdout] | [INFO] [stdout] 745 | gb.cpu.$r8 = gb.cpu.$r8 >> 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `gb.cpu.$r8 >>= 1` [INFO] [stdout] ... [INFO] [stdout] 1424 | rr!(b), rr!(c), rr!(d), rr!(e), rr!(h), rr!(l), rr!(d hl), rr!(a), [INFO] [stdout] | ------ in this macro invocation [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: this warning originates in the macro `rr` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/cpu/instructions.rs:816:20 [INFO] [stdout] | [INFO] [stdout] 816 | gb.cpu.$r8 = gb.cpu.$r8 << 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `gb.cpu.$r8 <<= 1` [INFO] [stdout] ... [INFO] [stdout] 1425 | /* 2X */ sla!(b), sla!(c), sla!(d), sla!(e), sla!(h), sla!(l), sla!(d hl), sla!(a), [INFO] [stdout] | ------- in this macro invocation [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: this warning originates in the macro `sla` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/cpu/instructions.rs:816:20 [INFO] [stdout] | [INFO] [stdout] 816 | gb.cpu.$r8 = gb.cpu.$r8 << 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `gb.cpu.$r8 <<= 1` [INFO] [stdout] ... [INFO] [stdout] 1425 | /* 2X */ sla!(b), sla!(c), sla!(d), sla!(e), sla!(h), sla!(l), sla!(d hl), sla!(a), [INFO] [stdout] | ------- in this macro invocation [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: this warning originates in the macro `sla` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `DATALOW` contains a capitalized acronym [INFO] [stdout] --> src/ppu/background/mod.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | DATALOW, [INFO] [stdout] | ^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Datalow` [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 `DATAHIGH` contains a capitalized acronym [INFO] [stdout] --> src/ppu/background/mod.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | DATAHIGH, [INFO] [stdout] | ^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Datahigh` [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 `PUSH` contains a capitalized acronym [INFO] [stdout] --> src/ppu/background/mod.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | PUSH, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Push` [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 `SLEEP` contains a capitalized acronym [INFO] [stdout] --> src/ppu/background/mod.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | SLEEP, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Sleep` [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: manual implementation of an assign operation [INFO] [stdout] --> src/cpu/instructions.rs:816:20 [INFO] [stdout] | [INFO] [stdout] 816 | gb.cpu.$r8 = gb.cpu.$r8 << 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `gb.cpu.$r8 <<= 1` [INFO] [stdout] ... [INFO] [stdout] 1425 | /* 2X */ sla!(b), sla!(c), sla!(d), sla!(e), sla!(h), sla!(l), sla!(d hl), sla!(a), [INFO] [stdout] | ------- in this macro invocation [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: this warning originates in the macro `sla` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/cpu/instructions.rs:816:20 [INFO] [stdout] | [INFO] [stdout] 816 | gb.cpu.$r8 = gb.cpu.$r8 << 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `gb.cpu.$r8 <<= 1` [INFO] [stdout] ... [INFO] [stdout] 1425 | /* 2X */ sla!(b), sla!(c), sla!(d), sla!(e), sla!(h), sla!(l), sla!(d hl), sla!(a), [INFO] [stdout] | ------- in this macro invocation [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: this warning originates in the macro `sla` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/cpu/instructions.rs:816:20 [INFO] [stdout] | [INFO] [stdout] 816 | gb.cpu.$r8 = gb.cpu.$r8 << 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `gb.cpu.$r8 <<= 1` [INFO] [stdout] ... [INFO] [stdout] 1425 | /* 2X */ sla!(b), sla!(c), sla!(d), sla!(e), sla!(h), sla!(l), sla!(d hl), sla!(a), [INFO] [stdout] | ------- in this macro invocation [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: this warning originates in the macro `sla` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/cpu/instructions.rs:816:20 [INFO] [stdout] | [INFO] [stdout] 816 | gb.cpu.$r8 = gb.cpu.$r8 << 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `gb.cpu.$r8 <<= 1` [INFO] [stdout] ... [INFO] [stdout] 1425 | /* 2X */ sla!(b), sla!(c), sla!(d), sla!(e), sla!(h), sla!(l), sla!(d hl), sla!(a), [INFO] [stdout] | ------- in this macro invocation [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: this warning originates in the macro `sla` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/cpu/instructions.rs:829:13 [INFO] [stdout] | [INFO] [stdout] 829 | dhl = dhl << 1; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `dhl <<= 1` [INFO] [stdout] ... [INFO] [stdout] 1425 | /* 2X */ sla!(b), sla!(c), sla!(d), sla!(e), sla!(h), sla!(l), sla!(d hl), sla!(a), [INFO] [stdout] | ---------- in this macro invocation [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: this warning originates in the macro `sla` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/cpu/instructions.rs:816:20 [INFO] [stdout] | [INFO] [stdout] 816 | gb.cpu.$r8 = gb.cpu.$r8 << 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `gb.cpu.$r8 <<= 1` [INFO] [stdout] ... [INFO] [stdout] 1425 | /* 2X */ sla!(b), sla!(c), sla!(d), sla!(e), sla!(h), sla!(l), sla!(d hl), sla!(a), [INFO] [stdout] | ------- in this macro invocation [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: this warning originates in the macro `sla` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: there is no need to manually implement bit rotation [INFO] [stdout] --> src/cpu/instructions.rs:644:26 [INFO] [stdout] | [INFO] [stdout] 644 | gb.cpu.$r8 = (gb.cpu.$r8 >> 4) | (gb.cpu.$r8 << 4); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: this expression can be rewritten as: `gb.cpu.$r8.rotate_left(4)` [INFO] [stdout] ... [INFO] [stdout] 1427 | /* 3X */ swap!(b), swap!(c), swap!(d), swap!(e), swap!(h), swap!(l), swap!(d hl), swap!(a), [INFO] [stdout] | -------- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_rotate [INFO] [stdout] = note: `#[warn(clippy::manual_rotate)]` on by default [INFO] [stdout] = note: this warning originates in the macro `swap` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: there is no need to manually implement bit rotation [INFO] [stdout] --> src/cpu/instructions.rs:644:26 [INFO] [stdout] | [INFO] [stdout] 644 | gb.cpu.$r8 = (gb.cpu.$r8 >> 4) | (gb.cpu.$r8 << 4); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: this expression can be rewritten as: `gb.cpu.$r8.rotate_left(4)` [INFO] [stdout] ... [INFO] [stdout] 1427 | /* 3X */ swap!(b), swap!(c), swap!(d), swap!(e), swap!(h), swap!(l), swap!(d hl), swap!(a), [INFO] [stdout] | -------- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_rotate [INFO] [stdout] = note: this warning originates in the macro `swap` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: there is no need to manually implement bit rotation [INFO] [stdout] --> src/cpu/instructions.rs:644:26 [INFO] [stdout] | [INFO] [stdout] 644 | gb.cpu.$r8 = (gb.cpu.$r8 >> 4) | (gb.cpu.$r8 << 4); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: this expression can be rewritten as: `gb.cpu.$r8.rotate_left(4)` [INFO] [stdout] ... [INFO] [stdout] 1427 | /* 3X */ swap!(b), swap!(c), swap!(d), swap!(e), swap!(h), swap!(l), swap!(d hl), swap!(a), [INFO] [stdout] | -------- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_rotate [INFO] [stdout] = note: this warning originates in the macro `swap` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: there is no need to manually implement bit rotation [INFO] [stdout] --> src/cpu/instructions.rs:644:26 [INFO] [stdout] | [INFO] [stdout] 644 | gb.cpu.$r8 = (gb.cpu.$r8 >> 4) | (gb.cpu.$r8 << 4); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: this expression can be rewritten as: `gb.cpu.$r8.rotate_left(4)` [INFO] [stdout] ... [INFO] [stdout] 1427 | /* 3X */ swap!(b), swap!(c), swap!(d), swap!(e), swap!(h), swap!(l), swap!(d hl), swap!(a), [INFO] [stdout] | -------- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_rotate [INFO] [stdout] = note: this warning originates in the macro `swap` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `DATALOW` contains a capitalized acronym [INFO] [stdout] --> src/ppu/sprites/mod.rs:26:5 [INFO] [stdout] | [INFO] [stdout] 26 | DATALOW, [INFO] [stdout] | ^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Datalow` [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 `DATAHIGH` contains a capitalized acronym [INFO] [stdout] --> src/ppu/sprites/mod.rs:27:5 [INFO] [stdout] | [INFO] [stdout] 27 | DATAHIGH, [INFO] [stdout] | ^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Datahigh` [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 `PUSH` contains a capitalized acronym [INFO] [stdout] --> src/ppu/sprites/mod.rs:28:5 [INFO] [stdout] | [INFO] [stdout] 28 | PUSH, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Push` [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 `SLEEP` contains a capitalized acronym [INFO] [stdout] --> src/ppu/sprites/mod.rs:29:5 [INFO] [stdout] | [INFO] [stdout] 29 | SLEEP, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Sleep` [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: match expression looks like `matches!` macro [INFO] [stdout] --> src/ppu/sprites/mod.rs:46:9 [INFO] [stdout] | [INFO] [stdout] 46 | / match self.state { [INFO] [stdout] 47 | | State::SLEEP => false, [INFO] [stdout] 48 | | _ => true, [INFO] [stdout] 49 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 46 - match self.state { [INFO] [stdout] 47 - State::SLEEP => false, [INFO] [stdout] 48 - _ => true, [INFO] [stdout] 49 - } [INFO] [stdout] 46 + !matches!(self.state, State::SLEEP) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: there is no need to manually implement bit rotation [INFO] [stdout] --> src/cpu/instructions.rs:644:26 [INFO] [stdout] | [INFO] [stdout] 644 | gb.cpu.$r8 = (gb.cpu.$r8 >> 4) | (gb.cpu.$r8 << 4); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: this expression can be rewritten as: `gb.cpu.$r8.rotate_left(4)` [INFO] [stdout] ... [INFO] [stdout] 1427 | /* 3X */ swap!(b), swap!(c), swap!(d), swap!(e), swap!(h), swap!(l), swap!(d hl), swap!(a), [INFO] [stdout] | -------- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_rotate [INFO] [stdout] = note: this warning originates in the macro `swap` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/ppu/sprites/mod.rs:59:30 [INFO] [stdout] | [INFO] [stdout] 59 | y: self.oam.read(obj_addr + 0), [INFO] [stdout] | ^^^^^^^^^^^^ help: consider reducing it to: `obj_addr` [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: there is no need to manually implement bit rotation [INFO] [stdout] --> src/cpu/instructions.rs:644:26 [INFO] [stdout] | [INFO] [stdout] 644 | gb.cpu.$r8 = (gb.cpu.$r8 >> 4) | (gb.cpu.$r8 << 4); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: this expression can be rewritten as: `gb.cpu.$r8.rotate_left(4)` [INFO] [stdout] ... [INFO] [stdout] 1427 | /* 3X */ swap!(b), swap!(c), swap!(d), swap!(e), swap!(h), swap!(l), swap!(d hl), swap!(a), [INFO] [stdout] | -------- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_rotate [INFO] [stdout] = note: this warning originates in the macro `swap` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: there is no need to manually implement bit rotation [INFO] [stdout] --> src/cpu/instructions.rs:656:34 [INFO] [stdout] | [INFO] [stdout] 656 | gb.cycle_write(addr, (dhl >> 4) | (dhl << 4)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: this expression can be rewritten as: `dhl.rotate_left(4)` [INFO] [stdout] ... [INFO] [stdout] 1427 | /* 3X */ swap!(b), swap!(c), swap!(d), swap!(e), swap!(h), swap!(l), swap!(d hl), swap!(a), [INFO] [stdout] | ----------- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_rotate [INFO] [stdout] = note: this warning originates in the macro `swap` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: there is no need to manually implement bit rotation [INFO] [stdout] --> src/cpu/instructions.rs:644:26 [INFO] [stdout] | [INFO] [stdout] 644 | gb.cpu.$r8 = (gb.cpu.$r8 >> 4) | (gb.cpu.$r8 << 4); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: this expression can be rewritten as: `gb.cpu.$r8.rotate_left(4)` [INFO] [stdout] ... [INFO] [stdout] 1427 | /* 3X */ swap!(b), swap!(c), swap!(d), swap!(e), swap!(h), swap!(l), swap!(d hl), swap!(a), [INFO] [stdout] | -------- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_rotate [INFO] [stdout] = note: this warning originates in the macro `swap` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `HBLANK` contains a capitalized acronym [INFO] [stdout] --> src/ppu/mod.rs:58:5 [INFO] [stdout] | [INFO] [stdout] 58 | HBLANK = 0, [INFO] [stdout] | ^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Hblank` [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 `VBLANK` contains a capitalized acronym [INFO] [stdout] --> src/ppu/mod.rs:59:5 [INFO] [stdout] | [INFO] [stdout] 59 | VBLANK = 1, [INFO] [stdout] | ^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Vblank` [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 `OAMSCAN` contains a capitalized acronym [INFO] [stdout] --> src/ppu/mod.rs:60:5 [INFO] [stdout] | [INFO] [stdout] 60 | OAMSCAN = 2, [INFO] [stdout] | ^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Oamscan` [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 `DRAW` contains a capitalized acronym [INFO] [stdout] --> src/ppu/mod.rs:61:5 [INFO] [stdout] | [INFO] [stdout] 61 | DRAW = 3, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Draw` [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 `OFF` contains a capitalized acronym [INFO] [stdout] --> src/ppu/mod.rs:67:5 [INFO] [stdout] | [INFO] [stdout] 67 | OFF, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter (notice the capitalization): `Off` [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 `STARTUP` contains a capitalized acronym [INFO] [stdout] --> src/ppu/mod.rs:68:5 [INFO] [stdout] | [INFO] [stdout] 68 | STARTUP, [INFO] [stdout] | ^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Startup` [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 `INACTIVE` contains a capitalized acronym [INFO] [stdout] --> src/ppu/mod.rs:73:5 [INFO] [stdout] | [INFO] [stdout] 73 | INACTIVE, [INFO] [stdout] | ^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Inactive` [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 `STARTING` contains a capitalized acronym [INFO] [stdout] --> src/ppu/mod.rs:74:5 [INFO] [stdout] | [INFO] [stdout] 74 | STARTING, [INFO] [stdout] | ^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Starting` [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 `RESTARTING` contains a capitalized acronym [INFO] [stdout] --> src/ppu/mod.rs:75:5 [INFO] [stdout] | [INFO] [stdout] 75 | RESTARTING(u8), [INFO] [stdout] | ^^^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Restarting` [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 `FIRSTREAD` contains a capitalized acronym [INFO] [stdout] --> src/ppu/mod.rs:76:5 [INFO] [stdout] | [INFO] [stdout] 76 | FIRSTREAD, [INFO] [stdout] | ^^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Firstread` [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 `RESTARTFIRSTREAD` contains a capitalized acronym [INFO] [stdout] --> src/ppu/mod.rs:77:5 [INFO] [stdout] | [INFO] [stdout] 77 | RESTARTFIRSTREAD, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Restartfirstread` [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 `ACTIVE` contains a capitalized acronym [INFO] [stdout] --> src/ppu/mod.rs:78:5 [INFO] [stdout] | [INFO] [stdout] 78 | ACTIVE(u8), [INFO] [stdout] | ^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Active` [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: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/ppu/mod.rs:104:12 [INFO] [stdout] | [INFO] [stdout] 104 | if self.ppu.dma_cycles % 4 == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `self.ppu.dma_cycles.is_multiple_of(4)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/ppu/mod.rs:324:20 [INFO] [stdout] | [INFO] [stdout] 324 | if self.cycles % 2 == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace with: `self.cycles.is_multiple_of(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/ppu/mod.rs:338:20 [INFO] [stdout] | [INFO] [stdout] 338 | if self.cycles % 2 == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace with: `self.cycles.is_multiple_of(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> src/ppu/mod.rs:357:13 [INFO] [stdout] | [INFO] [stdout] 357 | _ = self.mix_pixel().and_then(|pixel| { [INFO] [stdout] | _____________^ [INFO] [stdout] 358 | | let idx = self.ly as usize * 160 + self.lx as usize; [INFO] [stdout] 359 | | // first frame after turning lcd on gets skipped [INFO] [stdout] 360 | | if let LcdStatus::ON = self.lcd_status { [INFO] [stdout] ... | [INFO] [stdout] 365 | | Some(()) [INFO] [stdout] 366 | | }); [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] help: use `map` instead [INFO] [stdout] | [INFO] [stdout] 357 ~ _ = self.mix_pixel().map(|pixel| { [INFO] [stdout] 358 | let idx = self.ly as usize * 160 + self.lx as usize; [INFO] [stdout] ... [INFO] [stdout] 364 | self.fetch_obj(); [INFO] [stdout] 365 ~ () [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/ppu/mod.rs:384:14 [INFO] [stdout] | [INFO] [stdout] 384 | 0 => (palette & 0b00000011) >> 0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `(palette & 0b00000011)` [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 operation has no effect [INFO] [stdout] --> src/main.rs:87:17 [INFO] [stdout] | [INFO] [stdout] 87 | tex_buf[(i * 3) + 0] = PALETTE[*pixel as usize]; [INFO] [stdout] | ^^^^^^^^^^^ help: consider reducing it to: `((i * 3))` [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: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/intr/mod.rs:7:23 [INFO] [stdout] | [INFO] [stdout] 7 | #[derive(Clone, Copy, num_derive::FromPrimitive)] [INFO] [stdout] | ^------------------------ [INFO] [stdout] | | [INFO] [stdout] | `FromPrimitive` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_NUM_FromPrimitive_FOR_Interrupt` [INFO] [stdout] 8 | pub enum Interrupt { [INFO] [stdout] | --------- `Interrupt` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `num_derive::FromPrimitive` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `num_derive::FromPrimitive` may come from an old version of the `num_derive` crate, try updating your dependency with `cargo update -p num_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: `#[warn(non_local_definitions)]` on by default [INFO] [stdout] = note: this warning originates in the derive macro `num_derive::FromPrimitive` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/cpu/mod.rs:99:9 [INFO] [stdout] | [INFO] [stdout] 99 | / match self.intr.fetch() { [INFO] [stdout] 100 | | Some(_) => { [INFO] [stdout] 101 | | self.halt = false; [INFO] [stdout] ... | [INFO] [stdout] 130 | | None => {} [INFO] [stdout] 131 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 99 ~ if let Some(_) = self.intr.fetch() { [INFO] [stdout] 100 + self.halt = false; [INFO] [stdout] 101 + [INFO] [stdout] 102 + if ime { [INFO] [stdout] 103 + self.advance_cycles(4); [INFO] [stdout] 104 + self.intr.disable(); [INFO] [stdout] 105 + [INFO] [stdout] 106 + let addr = u16::to_le_bytes(self.cpu.pc); [INFO] [stdout] 107 + self.cpu.sp.dec(); [INFO] [stdout] 108 + self.cycle_write(self.cpu.sp, addr[1]); [INFO] [stdout] 109 + [INFO] [stdout] 110 + // Second fetch to check if intr should be cancelled [INFO] [stdout] 111 + let jp_addr = match self.intr.fetch() { [INFO] [stdout] 112 + Some(intr) => { [INFO] [stdout] 113 + self.intr.reset(intr); [INFO] [stdout] 114 + (intr as u16) * 8 + 0x40 [INFO] [stdout] 115 + } [INFO] [stdout] 116 + None => 0, [INFO] [stdout] 117 + }; [INFO] [stdout] 118 + [INFO] [stdout] 119 + self.cpu.sp.dec(); [INFO] [stdout] 120 + self.cycle_write(self.cpu.sp, addr[0]); [INFO] [stdout] 121 + [INFO] [stdout] 122 + // jump to intr handler addr [INFO] [stdout] 123 + self.cpu.pc = jp_addr; [INFO] [stdout] 124 + self.advance_cycles(4); [INFO] [stdout] 125 + [INFO] [stdout] 126 + return; [INFO] [stdout] 127 + } [INFO] [stdout] 128 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/debug.rs:46:12 [INFO] [stdout] | [INFO] [stdout] 46 | if !self.stdout.flush().is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.stdout.flush().is_err()` [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/debug.rs:52:12 [INFO] [stdout] | [INFO] [stdout] 52 | if !self.stdin.read_line(&mut user_input).is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.stdin.read_line(&mut user_input).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `changes` [INFO] [stdout] --> src/debug.rs:161:26 [INFO] [stdout] | [INFO] [stdout] 161 | for i in 0..changes.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 161 - for i in 0..changes.len() { [INFO] [stdout] 161 + for in &changes { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this pattern reimplements `Option::unwrap_or` [INFO] [stdout] --> src/debug.rs:177:21 [INFO] [stdout] | [INFO] [stdout] 177 | let steps = match modif { [INFO] [stdout] | _____________________^ [INFO] [stdout] 178 | | None => 1, [INFO] [stdout] 179 | | Some(n) => n, [INFO] [stdout] 180 | | }; [INFO] [stdout] | |_________^ help: replace with: `modif.unwrap_or(1)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or [INFO] [stdout] = note: `#[warn(clippy::manual_unwrap_or)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this pattern reimplements `Option::unwrap_or` [INFO] [stdout] --> src/debug.rs:187:21 [INFO] [stdout] | [INFO] [stdout] 187 | let steps = match modif { [INFO] [stdout] | _____________________^ [INFO] [stdout] 188 | | None => 1, [INFO] [stdout] 189 | | Some(n) => n, [INFO] [stdout] 190 | | }; [INFO] [stdout] | |_________^ help: replace with: `modif.unwrap_or(1)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this pattern reimplements `Option::unwrap_or` [INFO] [stdout] --> src/debug.rs:208:21 [INFO] [stdout] | [INFO] [stdout] 208 | let count = match modif { [INFO] [stdout] | _____________________^ [INFO] [stdout] 209 | | None => 32, [INFO] [stdout] 210 | | Some(n) => n, [INFO] [stdout] 211 | | }; [INFO] [stdout] | |_________^ help: replace with: `modif.unwrap_or(32)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this pattern reimplements `Option::unwrap_or` [INFO] [stdout] --> src/debug.rs:301:21 [INFO] [stdout] | [INFO] [stdout] 301 | let count = match modif { [INFO] [stdout] | _____________________^ [INFO] [stdout] 302 | | None => 5, [INFO] [stdout] 303 | | Some(n) => n, [INFO] [stdout] 304 | | }; [INFO] [stdout] | |_________^ help: replace with: `modif.unwrap_or(5)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `format!` in `println!` args [INFO] [stdout] --> src/debug.rs:413:17 [INFO] [stdout] | [INFO] [stdout] 413 | println!("{}", format!("Invalid command: {}", cmd_name)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: combine the `format!(..)` arguments with the outer `println!(..)` call [INFO] [stdout] = help: or consider changing `format!` to `format_args!` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_in_format_args [INFO] [stdout] = note: `#[warn(clippy::format_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/debug.rs:447:9 [INFO] [stdout] | [INFO] [stdout] 447 | let arg; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] = note: `#[warn(clippy::needless_late_init)]` on by default [INFO] [stdout] help: move the declaration `arg` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 447 ~ [INFO] [stdout] 448 ~ let arg = if arg_str.starts_with('$') { [INFO] [stdout] 449 ~ match u16::from_str_radix(&arg_str[1..], 16) { [INFO] [stdout] 450 | Ok(n) => Ok(Arg::Numeric(n)), [INFO] [stdout] ... [INFO] [stdout] 453 | } else { [INFO] [stdout] 454 ~ match arg_str.parse::() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/debug.rs:449:45 [INFO] [stdout] | [INFO] [stdout] 449 | arg = match u16::from_str_radix(&arg_str[1..], 16) { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/debug.rs:448:9 [INFO] [stdout] | [INFO] [stdout] 448 | if arg_str.starts_with('$') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] = note: `#[warn(clippy::manual_strip)]` on by default [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 448 ~ if let Some() = arg_str.strip_prefix('$') { [INFO] [stdout] 449 ~ arg = match u16::from_str_radix(, 16) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/debug.rs:501:8 [INFO] [stdout] | [INFO] [stdout] 501 | if mod_str == "" { [INFO] [stdout] | ^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `mod_str.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] = note: `#[warn(clippy::comparison_to_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/debug.rs:505:37 [INFO] [stdout] | [INFO] [stdout] 505 | Ok(Some(u16::from_str_radix(&mod_str[1..], 16).or_else(|_| Err(format!("Invalid modifier: {}", mod_str)))?)) [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/debug.rs:504:5 [INFO] [stdout] | [INFO] [stdout] 504 | if mod_str.starts_with('$') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 504 ~ if let Some() = mod_str.strip_prefix('$') { [INFO] [stdout] 505 ~ Ok(Some(u16::from_str_radix(, 16).or_else(|_| Err(format!("Invalid modifier: {}", mod_str)))?)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Result.or_else(|x| Err(y))`, which is more succinctly expressed as `map_err(|x| y)` [INFO] [stdout] --> src/debug.rs:505:17 [INFO] [stdout] | [INFO] [stdout] 505 | Ok(Some(u16::from_str_radix(&mod_str[1..], 16).or_else(|_| Err(format!("Invalid modifier: {}", mod_str)))?)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `u16::from_str_radix(&mod_str[1..], 16).map_err(|_| format!("Invalid modifier: {}", mod_str))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] = note: `#[warn(clippy::bind_instead_of_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Result.or_else(|x| Err(y))`, which is more succinctly expressed as `map_err(|x| y)` [INFO] [stdout] --> src/debug.rs:507:17 [INFO] [stdout] | [INFO] [stdout] 507 | Ok(Some(mod_str.parse::().or_else(|_| Err(format!("Invalid modifier: {}", mod_str)))?)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `mod_str.parse::().map_err(|_| format!("Invalid modifier: {}", mod_str))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `VBLANK` contains a capitalized acronym [INFO] [stdout] --> src/intr/mod.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | VBLANK = 0, [INFO] [stdout] | ^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Vblank` [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: name `STAT` contains a capitalized acronym [INFO] [stdout] --> src/intr/mod.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | STAT = 1, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Stat` [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 `TIMER` contains a capitalized acronym [INFO] [stdout] --> src/intr/mod.rs:11:5 [INFO] [stdout] | [INFO] [stdout] 11 | TIMER = 2, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Timer` [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 `SERIAL` contains a capitalized acronym [INFO] [stdout] --> src/intr/mod.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | SERIAL = 3, [INFO] [stdout] | ^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Serial` [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 `JOYPAD` contains a capitalized acronym [INFO] [stdout] --> src/intr/mod.rs:13:5 [INFO] [stdout] | [INFO] [stdout] 13 | JOYPAD = 4, [INFO] [stdout] | ^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Joypad` [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 `DISABLED` contains a capitalized acronym [INFO] [stdout] --> src/intr/mod.rs:17:5 [INFO] [stdout] | [INFO] [stdout] 17 | DISABLED, [INFO] [stdout] | ^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Disabled` [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 `ENABLING` contains a capitalized acronym [INFO] [stdout] --> src/intr/mod.rs:18:5 [INFO] [stdout] | [INFO] [stdout] 18 | ENABLING, [INFO] [stdout] | ^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Enabling` [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 `ENABLED` contains a capitalized acronym [INFO] [stdout] --> src/intr/mod.rs:19:5 [INFO] [stdout] | [INFO] [stdout] 19 | ENABLED, [INFO] [stdout] | ^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Enabled` [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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/intr/mod.rs:29:9 [INFO] [stdout] | [INFO] [stdout] 29 | / match self.ime { [INFO] [stdout] 30 | | ImeState::DISABLED => self.ime = ImeState::ENABLING, [INFO] [stdout] 31 | | _ => {} [INFO] [stdout] 32 | | } [INFO] [stdout] | |_________^ help: try: `if let ImeState::DISABLED = self.ime { self.ime = ImeState::ENABLING }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `NONE` contains a capitalized acronym [INFO] [stdout] --> src/mmu/cart/mbc1.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 15 | NONE, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `None` [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 `RAM` contains a capitalized acronym [INFO] [stdout] --> src/mmu/cart/mbc1.rs:16:5 [INFO] [stdout] | [INFO] [stdout] 16 | RAM(Vec), [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Ram` [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: unneeded `return` statement [INFO] [stdout] --> src/mmu/cart/mbc3.rs:205:26 [INFO] [stdout] | [INFO] [stdout] 205 | _ => return, [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: replace `return` with a unit value [INFO] [stdout] | [INFO] [stdout] 205 - _ => return, [INFO] [stdout] 205 + _ => (), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/mmu/cart/mbc3.rs:214:26 [INFO] [stdout] | [INFO] [stdout] 214 | _ => return, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: replace `return` with a unit value [INFO] [stdout] | [INFO] [stdout] 214 - _ => return, [INFO] [stdout] 214 + _ => (), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u16` -> `u16`) [INFO] [stdout] --> src/mmu/cart/mbc5.rs:54:30 [INFO] [stdout] | [INFO] [stdout] 54 | self.rom_bank_mask = (nbanks - 1) as u16; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `(nbanks - 1)` [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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/mmu/cart/mbc5.rs:115:9 [INFO] [stdout] | [INFO] [stdout] 115 | / match addr { [INFO] [stdout] 116 | | 0x4000..=0x5FFF => { [INFO] [stdout] 117 | | match self.extras { [INFO] [stdout] 118 | | Extras::None | Extras::Ram(_) => self.ram_bank = val & 0x0F, [INFO] [stdout] ... | [INFO] [stdout] 125 | | _ => {} [INFO] [stdout] 126 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 115 ~ if let 0x4000..=0x5FFF = addr { [INFO] [stdout] 116 + match self.extras { [INFO] [stdout] 117 + Extras::None | Extras::Ram(_) => self.ram_bank = val & 0x0F, [INFO] [stdout] 118 + Extras::Rumble | Extras::RamRumble(_) => { [INFO] [stdout] 119 + self.ram_bank = (val & 0x0F) & !0x08 [INFO] [stdout] 120 + // TODO: set rumble [INFO] [stdout] 121 + } [INFO] [stdout] 122 + } [INFO] [stdout] 123 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> src/mmu/cart/no_mbc.rs:9:1 [INFO] [stdout] | [INFO] [stdout] 9 | / enum Ram { [INFO] [stdout] 10 | | NONE, [INFO] [stdout] | | ---- the second-largest variant carries no data at all [INFO] [stdout] 11 | | RAM(RamBank), [INFO] [stdout] | | ------------ the largest variant contains at least 8192 bytes [INFO] [stdout] 12 | | } [INFO] [stdout] | |_^ the entire enum is at least 8193 bytes [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant [INFO] [stdout] = note: `#[warn(clippy::large_enum_variant)]` on by default [INFO] [stdout] help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum [INFO] [stdout] | [INFO] [stdout] 11 - RAM(RamBank), [INFO] [stdout] 11 + RAM(Box), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `NONE` contains a capitalized acronym [INFO] [stdout] --> src/mmu/cart/no_mbc.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | NONE, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `None` [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 `RAM` contains a capitalized acronym [INFO] [stdout] --> src/mmu/cart/no_mbc.rs:11:5 [INFO] [stdout] | [INFO] [stdout] 11 | RAM(RamBank), [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Ram` [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: it looks like you're manually copying between slices [INFO] [stdout] --> src/mmu/cart/no_mbc.rs:37:9 [INFO] [stdout] | [INFO] [stdout] 37 | / for i in 0..0x4000 { [INFO] [stdout] 38 | | self.rom0[i] = raw_rom[i]; [INFO] [stdout] 39 | | } [INFO] [stdout] | |_________^ help: try replacing the loop by: `self.rom0.copy_from_slice(&raw_rom[..0x4000]);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_memcpy [INFO] [stdout] = note: `#[warn(clippy::manual_memcpy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: it looks like you're manually copying between slices [INFO] [stdout] --> src/mmu/cart/no_mbc.rs:40:9 [INFO] [stdout] | [INFO] [stdout] 40 | / for i in 0..0x4000 { [INFO] [stdout] 41 | | self.romx[i] = raw_rom[i + 0x4000]; [INFO] [stdout] 42 | | } [INFO] [stdout] | |_________^ help: try replacing the loop by: `self.romx.copy_from_slice(&raw_rom[16384..(0x4000 + 16384)]);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_memcpy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> src/mmu/cart/mod.rs:16:1 [INFO] [stdout] | [INFO] [stdout] 15 | #[enum_dispatch] [INFO] [stdout] | ---------------- [INFO] [stdout] | | [INFO] [stdout] | the largest variant contains at least 40961 bytes [INFO] [stdout] | the second-largest variant contains at least 544 bytes [INFO] [stdout] 16 | / pub enum CartridgeEnum { [INFO] [stdout] 17 | | Mbc1, [INFO] [stdout] 18 | | Mbc2, [INFO] [stdout] 19 | | Mbc3, [INFO] [stdout] 20 | | Mbc5, [INFO] [stdout] 21 | | NoMbc, [INFO] [stdout] 22 | | } [INFO] [stdout] | |_^ the entire enum is at least 40968 bytes [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant [INFO] [stdout] help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum [INFO] [stdout] | [INFO] [stdout] 21 - NoMbc, [INFO] [stdout] 21 + Box, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/mmu/cart/mod.rs:38:56 [INFO] [stdout] | [INFO] [stdout] 38 | fn init_rom_banks(&mut self, nbanks: u16, raw_rom: &Vec) -> Result<(), CartridgeError>; [INFO] [stdout] | ^^^^^^^^ help: change this to: `&[u8]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `addr` is only used to index `raw_rom` [INFO] [stdout] --> src/mmu/cart/mod.rs:112:17 [INFO] [stdout] | [INFO] [stdout] 112 | for addr in 0x0134..=0x014C { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 112 - for addr in 0x0134..=0x014C { [INFO] [stdout] 112 + for in raw_rom.iter().take(0x014C + 1).skip(0x0134) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/mmu/cart/mod.rs:123:5 [INFO] [stdout] | [INFO] [stdout] 123 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] = note: `#[warn(clippy::println_empty_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `SELECT` contains a capitalized acronym [INFO] [stdout] --> src/mmu/io/joypad.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | SELECT = 0x04, [INFO] [stdout] | ^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Select` [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 `START` contains a capitalized acronym [INFO] [stdout] --> src/mmu/io/joypad.rs:13:5 [INFO] [stdout] | [INFO] [stdout] 13 | START = 0x08, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Start` [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 `RIGHT` contains a capitalized acronym [INFO] [stdout] --> src/mmu/io/joypad.rs:14:5 [INFO] [stdout] | [INFO] [stdout] 14 | RIGHT = 0x10, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Right` [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 `LEFT` contains a capitalized acronym [INFO] [stdout] --> src/mmu/io/joypad.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 15 | LEFT = 0x20, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Left` [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 `DOWN` contains a capitalized acronym [INFO] [stdout] --> src/mmu/io/joypad.rs:17:5 [INFO] [stdout] | [INFO] [stdout] 17 | DOWN = 0x80, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Down` [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 `RUNNING` contains a capitalized acronym [INFO] [stdout] --> src/mmu/io/timer.rs:13:5 [INFO] [stdout] | [INFO] [stdout] 13 | RUNNING, [INFO] [stdout] | ^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Running` [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 `OVERFLOW` contains a capitalized acronym [INFO] [stdout] --> src/mmu/io/timer.rs:14:5 [INFO] [stdout] | [INFO] [stdout] 14 | OVERFLOW(u8), [INFO] [stdout] | ^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Overflow` [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 `LOADING` contains a capitalized acronym [INFO] [stdout] --> src/mmu/io/timer.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 15 | LOADING(u8), [INFO] [stdout] | ^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Loading` [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: match expression looks like `matches!` macro [INFO] [stdout] --> src/mmu/io/timer.rs:111:9 [INFO] [stdout] | [INFO] [stdout] 111 | / match self.tima_state { [INFO] [stdout] 112 | | TimaState::LOADING(3) => true, [INFO] [stdout] 113 | | _ => false, [INFO] [stdout] 114 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 111 - match self.tima_state { [INFO] [stdout] 112 - TimaState::LOADING(3) => true, [INFO] [stdout] 113 - _ => false, [INFO] [stdout] 114 - } [INFO] [stdout] 111 + matches!(self.tima_state, TimaState::LOADING(3)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `INDEX` contains a capitalized acronym [INFO] [stdout] --> src/ppu/background/mod.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | INDEX, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Index` [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 `DATALOW` contains a capitalized acronym [INFO] [stdout] --> src/ppu/background/mod.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | DATALOW, [INFO] [stdout] | ^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Datalow` [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 `DATAHIGH` contains a capitalized acronym [INFO] [stdout] --> src/ppu/background/mod.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | DATAHIGH, [INFO] [stdout] | ^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Datahigh` [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 `PUSH` contains a capitalized acronym [INFO] [stdout] --> src/ppu/background/mod.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | PUSH, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Push` [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 `SLEEP` contains a capitalized acronym [INFO] [stdout] --> src/ppu/background/mod.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | SLEEP, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Sleep` [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 `DATALOW` contains a capitalized acronym [INFO] [stdout] --> src/ppu/sprites/mod.rs:26:5 [INFO] [stdout] | [INFO] [stdout] 26 | DATALOW, [INFO] [stdout] | ^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Datalow` [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 `DATAHIGH` contains a capitalized acronym [INFO] [stdout] --> src/ppu/sprites/mod.rs:27:5 [INFO] [stdout] | [INFO] [stdout] 27 | DATAHIGH, [INFO] [stdout] | ^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Datahigh` [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 `PUSH` contains a capitalized acronym [INFO] [stdout] --> src/ppu/sprites/mod.rs:28:5 [INFO] [stdout] | [INFO] [stdout] 28 | PUSH, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Push` [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 `SLEEP` contains a capitalized acronym [INFO] [stdout] --> src/ppu/sprites/mod.rs:29:5 [INFO] [stdout] | [INFO] [stdout] 29 | SLEEP, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Sleep` [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: match expression looks like `matches!` macro [INFO] [stdout] --> src/ppu/sprites/mod.rs:46:9 [INFO] [stdout] | [INFO] [stdout] 46 | / match self.state { [INFO] [stdout] 47 | | State::SLEEP => false, [INFO] [stdout] 48 | | _ => true, [INFO] [stdout] 49 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 46 - match self.state { [INFO] [stdout] 47 - State::SLEEP => false, [INFO] [stdout] 48 - _ => true, [INFO] [stdout] 49 - } [INFO] [stdout] 46 + !matches!(self.state, State::SLEEP) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/ppu/sprites/mod.rs:59:30 [INFO] [stdout] | [INFO] [stdout] 59 | y: self.oam.read(obj_addr + 0), [INFO] [stdout] | ^^^^^^^^^^^^ help: consider reducing it to: `obj_addr` [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: name `HBLANK` contains a capitalized acronym [INFO] [stdout] --> src/ppu/mod.rs:58:5 [INFO] [stdout] | [INFO] [stdout] 58 | HBLANK = 0, [INFO] [stdout] | ^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Hblank` [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 `VBLANK` contains a capitalized acronym [INFO] [stdout] --> src/ppu/mod.rs:59:5 [INFO] [stdout] | [INFO] [stdout] 59 | VBLANK = 1, [INFO] [stdout] | ^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Vblank` [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 `OAMSCAN` contains a capitalized acronym [INFO] [stdout] --> src/ppu/mod.rs:60:5 [INFO] [stdout] | [INFO] [stdout] 60 | OAMSCAN = 2, [INFO] [stdout] | ^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Oamscan` [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 `DRAW` contains a capitalized acronym [INFO] [stdout] --> src/ppu/mod.rs:61:5 [INFO] [stdout] | [INFO] [stdout] 61 | DRAW = 3, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Draw` [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 `OFF` contains a capitalized acronym [INFO] [stdout] --> src/ppu/mod.rs:67:5 [INFO] [stdout] | [INFO] [stdout] 67 | OFF, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter (notice the capitalization): `Off` [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 `STARTUP` contains a capitalized acronym [INFO] [stdout] --> src/ppu/mod.rs:68:5 [INFO] [stdout] | [INFO] [stdout] 68 | STARTUP, [INFO] [stdout] | ^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Startup` [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 `INACTIVE` contains a capitalized acronym [INFO] [stdout] --> src/ppu/mod.rs:73:5 [INFO] [stdout] | [INFO] [stdout] 73 | INACTIVE, [INFO] [stdout] | ^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Inactive` [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 `STARTING` contains a capitalized acronym [INFO] [stdout] --> src/ppu/mod.rs:74:5 [INFO] [stdout] | [INFO] [stdout] 74 | STARTING, [INFO] [stdout] | ^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Starting` [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 `RESTARTING` contains a capitalized acronym [INFO] [stdout] --> src/ppu/mod.rs:75:5 [INFO] [stdout] | [INFO] [stdout] 75 | RESTARTING(u8), [INFO] [stdout] | ^^^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Restarting` [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 `FIRSTREAD` contains a capitalized acronym [INFO] [stdout] --> src/ppu/mod.rs:76:5 [INFO] [stdout] | [INFO] [stdout] 76 | FIRSTREAD, [INFO] [stdout] | ^^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Firstread` [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 `RESTARTFIRSTREAD` contains a capitalized acronym [INFO] [stdout] --> src/ppu/mod.rs:77:5 [INFO] [stdout] | [INFO] [stdout] 77 | RESTARTFIRSTREAD, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Restartfirstread` [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 `ACTIVE` contains a capitalized acronym [INFO] [stdout] --> src/ppu/mod.rs:78:5 [INFO] [stdout] | [INFO] [stdout] 78 | ACTIVE(u8), [INFO] [stdout] | ^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Active` [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: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/ppu/mod.rs:104:12 [INFO] [stdout] | [INFO] [stdout] 104 | if self.ppu.dma_cycles % 4 == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `self.ppu.dma_cycles.is_multiple_of(4)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/ppu/mod.rs:324:20 [INFO] [stdout] | [INFO] [stdout] 324 | if self.cycles % 2 == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace with: `self.cycles.is_multiple_of(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/ppu/mod.rs:338:20 [INFO] [stdout] | [INFO] [stdout] 338 | if self.cycles % 2 == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace with: `self.cycles.is_multiple_of(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> src/ppu/mod.rs:357:13 [INFO] [stdout] | [INFO] [stdout] 357 | _ = self.mix_pixel().and_then(|pixel| { [INFO] [stdout] | _____________^ [INFO] [stdout] 358 | | let idx = self.ly as usize * 160 + self.lx as usize; [INFO] [stdout] 359 | | // first frame after turning lcd on gets skipped [INFO] [stdout] 360 | | if let LcdStatus::ON = self.lcd_status { [INFO] [stdout] ... | [INFO] [stdout] 365 | | Some(()) [INFO] [stdout] 366 | | }); [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] help: use `map` instead [INFO] [stdout] | [INFO] [stdout] 357 ~ _ = self.mix_pixel().map(|pixel| { [INFO] [stdout] 358 | let idx = self.ly as usize * 160 + self.lx as usize; [INFO] [stdout] ... [INFO] [stdout] 364 | self.fetch_obj(); [INFO] [stdout] 365 ~ () [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/ppu/mod.rs:384:14 [INFO] [stdout] | [INFO] [stdout] 384 | 0 => (palette & 0b00000011) >> 0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `(palette & 0b00000011)` [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 operation has no effect [INFO] [stdout] --> src/main.rs:87:17 [INFO] [stdout] | [INFO] [stdout] 87 | tex_buf[(i * 3) + 0] = PALETTE[*pixel as usize]; [INFO] [stdout] | ^^^^^^^^^^^ help: consider reducing it to: `((i * 3))` [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: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/intr/mod.rs:7:23 [INFO] [stdout] | [INFO] [stdout] 7 | #[derive(Clone, Copy, num_derive::FromPrimitive)] [INFO] [stdout] | ^------------------------ [INFO] [stdout] | | [INFO] [stdout] | `FromPrimitive` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_NUM_FromPrimitive_FOR_Interrupt` [INFO] [stdout] 8 | pub enum Interrupt { [INFO] [stdout] | --------- `Interrupt` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `num_derive::FromPrimitive` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `num_derive::FromPrimitive` may come from an old version of the `num_derive` crate, try updating your dependency with `cargo update -p num_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: `#[warn(non_local_definitions)]` on by default [INFO] [stdout] = note: this warning originates in the derive macro `num_derive::FromPrimitive` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 15.53s [INFO] running `Command { std: "docker" "inspect" "93313ef967a2e8a7473111d79dcfa0995fcf5338e96e29052dd16b741a9603e8", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "93313ef967a2e8a7473111d79dcfa0995fcf5338e96e29052dd16b741a9603e8", kill_on_drop: false }` [INFO] [stdout] 93313ef967a2e8a7473111d79dcfa0995fcf5338e96e29052dd16b741a9603e8