[INFO] cloning repository https://github.com/c-ola/cassowary-gb [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/c-ola/cassowary-gb" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fc-ola%2Fcassowary-gb", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fc-ola%2Fcassowary-gb'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 59563f1271297b87a4d51447bb3575636797368f [INFO] linting c-ola/cassowary-gb against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fc-ola%2Fcassowary-gb" "/workspace/builds/worker-1-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-1-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/c-ola/cassowary-gb [INFO] finished tweaking git repo https://github.com/c-ola/cassowary-gb [INFO] tweaked toml for git repo https://github.com/c-ola/cassowary-gb written to /workspace/builds/worker-1-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/c-ola/cassowary-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/c-ola/cassowary-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] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded version-compare v0.1.1 [INFO] [stderr] Downloaded clap v4.4.7 [INFO] [stderr] Downloaded clap_builder v4.4.7 [INFO] [stderr] Downloaded syn v2.0.31 [INFO] [stderr] Downloaded sdl2 v0.35.2 [INFO] [stderr] Downloaded sdl2-sys v0.35.2 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] c2aa4fcec44fe06a443697b265e8e01c9380762e3568ac667a34a6df606457a7 [INFO] running `Command { std: "docker" "start" "-a" "c2aa4fcec44fe06a443697b265e8e01c9380762e3568ac667a34a6df606457a7", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "c2aa4fcec44fe06a443697b265e8e01c9380762e3568ac667a34a6df606457a7", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "c2aa4fcec44fe06a443697b265e8e01c9380762e3568ac667a34a6df606457a7", kill_on_drop: false }` [INFO] [stdout] c2aa4fcec44fe06a443697b265e8e01c9380762e3568ac667a34a6df606457a7 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 1dd0726e580dede75c88fc5eec68fa05ace86f5d103ac5e9d2f5c404be691b64 [INFO] running `Command { std: "docker" "start" "-a" "1dd0726e580dede75c88fc5eec68fa05ace86f5d103ac5e9d2f5c404be691b64", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.66 [INFO] [stderr] Compiling unicode-ident v1.0.11 [INFO] [stderr] Compiling version-compare v0.1.1 [INFO] [stderr] Compiling libc v0.2.147 [INFO] [stderr] Checking utf8parse v0.2.1 [INFO] [stderr] Checking anstyle v1.0.4 [INFO] [stderr] Checking anstyle-query v1.0.0 [INFO] [stderr] Checking colorchoice v1.0.0 [INFO] [stderr] Compiling sdl2 v0.35.2 [INFO] [stderr] Checking clap_lex v0.6.0 [INFO] [stderr] Checking strsim v0.10.0 [INFO] [stderr] Checking bitflags v1.3.2 [INFO] [stderr] Checking lazy_static v1.4.0 [INFO] [stderr] Checking anstyle-parse v0.2.2 [INFO] [stderr] Compiling sdl2-sys v0.35.2 [INFO] [stderr] Checking anstream v0.6.4 [INFO] [stderr] Checking clap_builder v4.4.7 [INFO] [stderr] Compiling quote v1.0.33 [INFO] [stderr] Compiling syn v2.0.31 [INFO] [stderr] Compiling clap_derive v4.4.7 [INFO] [stderr] Checking clap v4.4.7 [INFO] [stderr] Checking cassowary-gb v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unneeded unit expression [INFO] [stdout] --> src/console/cpu.rs:151:17 [INFO] [stdout] | [INFO] [stdout] 151 | () [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/console/cpu.rs:839:13 [INFO] [stdout] | [INFO] [stdout] 839 | () [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] [INFO] [stdout] [INFO] [stdout] warning: unused import: `super::regids::IF` [INFO] [stdout] --> src/console/ppu.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use super::regids::IF; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `sdl2::pixels::Color` [INFO] [stdout] --> src/console/ppu.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use sdl2::pixels::Color; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `sdl2::rect::Point` [INFO] [stdout] --> src/console/ppu.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | use sdl2::rect::Point; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Canvas` [INFO] [stdout] --> src/console/ppu.rs:8:20 [INFO] [stdout] | [INFO] [stdout] 8 | use sdl2::render::{Canvas, Texture}; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `sdl2::surface::Surface` [INFO] [stdout] --> src/console/ppu.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | use sdl2::surface::Surface; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `sdl2::video::Window` [INFO] [stdout] --> src/console/ppu.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | use sdl2::video::Window; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `super::regids::*` [INFO] [stdout] --> src/console/apu.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use super::regids::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `AudioSpecDesired` [INFO] [stdout] --> src/console/apu.rs:5:34 [INFO] [stdout] | [INFO] [stdout] 5 | use sdl2::audio::{AudioCallback, AudioSpecDesired}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::sync::atomic::AtomicU64` [INFO] [stdout] --> src/console.rs:19:5 [INFO] [stdout] | [INFO] [stdout] 19 | use std::sync::atomic::AtomicU64; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::sync::mpsc` [INFO] [stdout] --> src/console.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | use std::sync::mpsc; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::sync::mpsc::channel` [INFO] [stdout] --> src/console.rs:22:5 [INFO] [stdout] | [INFO] [stdout] 22 | use std::sync::mpsc::channel; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::sync::mpsc::Receiver` [INFO] [stdout] --> src/console.rs:23:5 [INFO] [stdout] | [INFO] [stdout] 23 | use std::sync::mpsc::Receiver; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::sync::mpsc::Sender` [INFO] [stdout] --> src/console.rs:24:5 [INFO] [stdout] | [INFO] [stdout] 24 | use std::sync::mpsc::Sender; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::thread::JoinHandle` [INFO] [stdout] --> src/console.rs:29:5 [INFO] [stdout] | [INFO] [stdout] 29 | use std::thread::JoinHandle; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit expression [INFO] [stdout] --> src/console/cpu.rs:151:17 [INFO] [stdout] | [INFO] [stdout] 151 | () [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/console/cpu.rs:839:13 [INFO] [stdout] | [INFO] [stdout] 839 | () [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] [INFO] [stdout] [INFO] [stdout] warning: unused import: `super::regids::IF` [INFO] [stdout] --> src/console/ppu.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use super::regids::IF; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `sdl2::pixels::Color` [INFO] [stdout] --> src/console/ppu.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use sdl2::pixels::Color; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `sdl2::rect::Point` [INFO] [stdout] --> src/console/ppu.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | use sdl2::rect::Point; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Canvas` [INFO] [stdout] --> src/console/ppu.rs:8:20 [INFO] [stdout] | [INFO] [stdout] 8 | use sdl2::render::{Canvas, Texture}; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `sdl2::surface::Surface` [INFO] [stdout] --> src/console/ppu.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | use sdl2::surface::Surface; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `sdl2::video::Window` [INFO] [stdout] --> src/console/ppu.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | use sdl2::video::Window; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `super::regids::*` [INFO] [stdout] --> src/console/apu.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use super::regids::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `AudioSpecDesired` [INFO] [stdout] --> src/console/apu.rs:5:34 [INFO] [stdout] | [INFO] [stdout] 5 | use sdl2::audio::{AudioCallback, AudioSpecDesired}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::sync::atomic::AtomicU64` [INFO] [stdout] --> src/console.rs:19:5 [INFO] [stdout] | [INFO] [stdout] 19 | use std::sync::atomic::AtomicU64; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::sync::mpsc` [INFO] [stdout] --> src/console.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | use std::sync::mpsc; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::sync::mpsc::channel` [INFO] [stdout] --> src/console.rs:22:5 [INFO] [stdout] | [INFO] [stdout] 22 | use std::sync::mpsc::channel; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::sync::mpsc::Receiver` [INFO] [stdout] --> src/console.rs:23:5 [INFO] [stdout] | [INFO] [stdout] 23 | use std::sync::mpsc::Receiver; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::sync::mpsc::Sender` [INFO] [stdout] --> src/console.rs:24:5 [INFO] [stdout] | [INFO] [stdout] 24 | use std::sync::mpsc::Sender; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::thread::JoinHandle` [INFO] [stdout] --> src/console.rs:29:5 [INFO] [stdout] | [INFO] [stdout] 29 | use std::thread::JoinHandle; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `y_flip` [INFO] [stdout] --> src/console/ppu.rs:230:41 [INFO] [stdout] | [INFO] [stdout] 230 | fn mix_bytes_obj(low: u8, high: u8, y_flip: bool, x_flip: bool) -> [u8; 8] { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_y_flip` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `pace` [INFO] [stdout] --> src/console/apu.rs:55:13 [INFO] [stdout] | [INFO] [stdout] 55 | let pace = nr10 & 0b01110000 >> 4; [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_pace` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `env_dir` [INFO] [stdout] --> src/console/apu.rs:65:13 [INFO] [stdout] | [INFO] [stdout] 65 | let env_dir = nr12 & 0b00001000 >> 3; [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_env_dir` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `sweep_pace` [INFO] [stdout] --> src/console/apu.rs:66:13 [INFO] [stdout] | [INFO] [stdout] 66 | let sweep_pace = nr12 & 0b00000111; [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_sweep_pace` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `trigger` [INFO] [stdout] --> src/console/apu.rs:71:13 [INFO] [stdout] | [INFO] [stdout] 71 | let trigger = nr14 & 0b10000000 >> 7; [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_trigger` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `length_en` [INFO] [stdout] --> src/console/apu.rs:72:13 [INFO] [stdout] | [INFO] [stdout] 72 | let length_en = nr14 & 0b01000000 >> 6; [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_length_en` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value captured by `clock_timer` is never read [INFO] [stdout] --> src/console.rs:188:17 [INFO] [stdout] | [INFO] [stdout] 188 | clock_timer = Instant::now(); [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: did you mean to capture by reference instead? [INFO] [stdout] = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `clock_timer` is never read [INFO] [stdout] --> src/console.rs:188:17 [INFO] [stdout] | [INFO] [stdout] 188 | clock_timer = Instant::now(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `clock_timer` [INFO] [stdout] --> src/console.rs:158:13 [INFO] [stdout] | [INFO] [stdout] 158 | let mut clock_timer = Instant::now(); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_clock_timer` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `stop` [INFO] [stdout] --> src/console.rs:227:13 [INFO] [stdout] | [INFO] [stdout] 227 | let stop = Arc::new(AtomicBool::new(false)); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_stop` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `byte` [INFO] [stdout] --> src/console.rs:303:17 [INFO] [stdout] | [INFO] [stdout] 303 | let byte = data[i]; [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_byte` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `PerfError` is never constructed [INFO] [stdout] --> src/console.rs:51:8 [INFO] [stdout] | [INFO] [stdout] 51 | struct PerfError { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `PerfTimer` is never constructed [INFO] [stdout] --> src/console.rs:62:8 [INFO] [stdout] | [INFO] [stdout] 62 | struct PerfTimer { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `start`, `end`, and `avg` are never used [INFO] [stdout] --> src/console.rs:69:8 [INFO] [stdout] | [INFO] [stdout] 68 | impl PerfTimer { [INFO] [stdout] | --------------------------------- associated items in this implementation [INFO] [stdout] 69 | fn new() -> PerfTimer { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 76 | fn start(&mut self) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 79 | fn end(&mut self) -> Result<(), PerfError> { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 96 | fn avg(&self) -> f64 { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `run_cpu` is never used [INFO] [stdout] --> src/console.rs:157:8 [INFO] [stdout] | [INFO] [stdout] 147 | impl GameBoy { [INFO] [stdout] | ------------ method in this implementation [INFO] [stdout] ... [INFO] [stdout] 157 | fn run_cpu(&mut self, stop_signal: Arc, clock: Arc<(Mutex, Condvar)>) -> thread::JoinHandle<()> { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `set_carry_flags` is never used [INFO] [stdout] --> src/console/cpu.rs:655:8 [INFO] [stdout] | [INFO] [stdout] 42 | impl SharpSM83 { [INFO] [stdout] | -------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 655 | fn set_carry_flags(&mut self, carry: bool, half_carry: bool) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `DMA` is never used [INFO] [stdout] --> src/console/ppu.rs:31:7 [INFO] [stdout] | [INFO] [stdout] 31 | const DMA: u16 = 0xFF46; [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `OBJ_EN` is never used [INFO] [stdout] --> src/console/ppu.rs:44:7 [INFO] [stdout] | [INFO] [stdout] 44 | const OBJ_EN: u8 = 1 << 1; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `LYC_INT_SEL` is never used [INFO] [stdout] --> src/console/ppu.rs:48:7 [INFO] [stdout] | [INFO] [stdout] 48 | const LYC_INT_SEL: u8 = 1 << 6; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `M2_INT_SEL` is never used [INFO] [stdout] --> src/console/ppu.rs:49:7 [INFO] [stdout] | [INFO] [stdout] 49 | const M2_INT_SEL: u8 = 1 << 5; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `M1_INT_SEL` is never used [INFO] [stdout] --> src/console/ppu.rs:50:7 [INFO] [stdout] | [INFO] [stdout] 50 | const M1_INT_SEL: u8 = 1 << 4; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `M0_INT_SEL` is never used [INFO] [stdout] --> src/console/ppu.rs:51:7 [INFO] [stdout] | [INFO] [stdout] 51 | const M0_INT_SEL: u8 = 1 << 3; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `LYC_EQ_LY` is never used [INFO] [stdout] --> src/console/ppu.rs:52:7 [INFO] [stdout] | [INFO] [stdout] 52 | const LYC_EQ_LY: u8 = 1 << 2; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `PPU_MODE` is never used [INFO] [stdout] --> src/console/ppu.rs:53:7 [INFO] [stdout] | [INFO] [stdout] 53 | const PPU_MODE: u8 = 0b11; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `sprite_prio` is never read [INFO] [stdout] --> src/console/ppu.rs:81:9 [INFO] [stdout] | [INFO] [stdout] 78 | struct Pixel { [INFO] [stdout] | ----- field in this struct [INFO] [stdout] ... [INFO] [stdout] 81 | pub sprite_prio: u8, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Pixel` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `channel3_pos` is never read [INFO] [stdout] --> src/console/apu.rs:37:5 [INFO] [stdout] | [INFO] [stdout] 31 | pub struct Apu { [INFO] [stdout] | --- field in this struct [INFO] [stdout] ... [INFO] [stdout] 37 | channel3_pos: u8, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Apu` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/console/cpu/instruction.rs:142:9 [INFO] [stdout] | [INFO] [stdout] 142 | / return if opcode == 0x00 { [INFO] [stdout] 143 | | NOP [INFO] [stdout] 144 | | } else if opcode == 0x10 { [INFO] [stdout] 145 | | STOP [INFO] [stdout] ... | [INFO] [stdout] 339 | | ErrInstr { opcode } [INFO] [stdout] 340 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 142 ~ if opcode == 0x00 { [INFO] [stdout] 143 + NOP [INFO] [stdout] 144 + } else if opcode == 0x10 { [INFO] [stdout] 145 + STOP [INFO] [stdout] 146 + } else if opcode == 0x76 { [INFO] [stdout] 147 + HALT [INFO] [stdout] 148 + } else if opcode == 0xF3 { [INFO] [stdout] 149 + DI [INFO] [stdout] 150 + } else if opcode == 0xFB { [INFO] [stdout] 151 + EI [INFO] [stdout] 152 + } [INFO] [stdout] 153 + // 8-bit load / store instructions registers [INFO] [stdout] 154 + // LD r r [INFO] [stdout] 155 + else if op_x == 0b01 { [INFO] [stdout] 156 + LDRwR(op_y, op_z) [INFO] [stdout] 157 + } [INFO] [stdout] 158 + // LD r n [INFO] [stdout] 159 + else if op_x == 0b00 && op_z == 0b110 { [INFO] [stdout] 160 + LDRwN(op_y) [INFO] [stdout] 161 + } [INFO] [stdout] 162 + // LDH [INFO] [stdout] 163 + // 0xE0, 0xE2, 0xF0, 0xF2 [INFO] [stdout] 164 + // 0b1110_0000 [INFO] [stdout] 165 + // 0b1110_0010 [INFO] [stdout] 166 + // 0b1111_0000 [INFO] [stdout] 167 + // 0b1111_0010 [INFO] [stdout] 168 + else if op_x == 0b11 [INFO] [stdout] 169 + && (op_y == 0b110 || op_y == 0b100) [INFO] [stdout] 170 + && (op_z == 0b000 || op_z == 0b010) [INFO] [stdout] 171 + { [INFO] [stdout] 172 + LDH(op_y == 0b100, op_z == 0b000) [INFO] [stdout] 173 + } [INFO] [stdout] 174 + // LD A (nn) [INFO] [stdout] 175 + else if op_x == 0b11 && op_y & 0b101 == 0b101 && op_z == 0b010 { [INFO] [stdout] 176 + LDAwNNa(op_y == 0b101) [INFO] [stdout] 177 + } [INFO] [stdout] 178 + // LD (rr) A, LD A (rr) [INFO] [stdout] 179 + else if op_x == 0b00 && op_z == 0b010 { [INFO] [stdout] 180 + if op_q == 0b1 { [INFO] [stdout] 181 + LDAwRRa(op_p) [INFO] [stdout] 182 + } else { [INFO] [stdout] 183 + LDRRawA(op_p) [INFO] [stdout] 184 + } [INFO] [stdout] 185 + } [INFO] [stdout] 186 + // 16-bit loads [INFO] [stdout] 187 + // LD rr nn [INFO] [stdout] 188 + else if op_x == 0b00 && op_q == 0b0 && op_z == 0b001 { [INFO] [stdout] 189 + LDrrnn(op_p) [INFO] [stdout] 190 + } [INFO] [stdout] 191 + //LD (nn) SP [INFO] [stdout] 192 + else if opcode == 0x08 { [INFO] [stdout] 193 + LDNNawSP [INFO] [stdout] 194 + } [INFO] [stdout] 195 + // load stack pointer from HL [INFO] [stdout] 196 + else if opcode == 0xF9 { [INFO] [stdout] 197 + LDSPwHL [INFO] [stdout] 198 + } else if opcode == 0xF8 { [INFO] [stdout] 199 + LDHLwSP [INFO] [stdout] 200 + } [INFO] [stdout] 201 + // push rr [INFO] [stdout] 202 + else if op_x == 0b11 && op_q == 0 && op_z == 0b101 { [INFO] [stdout] 203 + PUSHrr(op_p) [INFO] [stdout] 204 + } [INFO] [stdout] 205 + // pop rr [INFO] [stdout] 206 + else if op_x == 0b11 && op_q == 0 && op_z == 0b001 { [INFO] [stdout] 207 + POPrr(op_p) [INFO] [stdout] 208 + } [INFO] [stdout] 209 + //-----------ARITHMETIC--------- [INFO] [stdout] 210 + [INFO] [stdout] 211 + //add, sub, adc, subc, and, or, xor, cp [INFO] [stdout] 212 + else if op_x == 0b10 && op_q == 0b0 { [INFO] [stdout] 213 + match op_p { [INFO] [stdout] 214 + 0 => Add(op_z), [INFO] [stdout] 215 + 1 => Sub(op_z), [INFO] [stdout] 216 + 2 => And(op_z), [INFO] [stdout] 217 + 3 => Or(op_z), [INFO] [stdout] 218 + _ => ErrInstr { opcode }, [INFO] [stdout] 219 + } [INFO] [stdout] 220 + } else if op_x == 0b10 && op_q == 0b1 { [INFO] [stdout] 221 + match op_p { [INFO] [stdout] 222 + 0 => Adc(op_z), [INFO] [stdout] 223 + 1 => Sbc(op_z), [INFO] [stdout] 224 + 2 => Xor(op_z), [INFO] [stdout] 225 + 3 => Cmp(op_z), [INFO] [stdout] 226 + _ => ErrInstr { opcode }, [INFO] [stdout] 227 + } [INFO] [stdout] 228 + } [INFO] [stdout] 229 + // arithmetic with n [INFO] [stdout] 230 + else if op_x == 0b11 && op_z == 0b110 { [INFO] [stdout] 231 + match op_y { [INFO] [stdout] 232 + 0b000 => Addn, [INFO] [stdout] 233 + 0b001 => Adcn, [INFO] [stdout] 234 + 0b010 => Subn, [INFO] [stdout] 235 + 0b011 => Sbcn, [INFO] [stdout] 236 + 0b100 => Andn, [INFO] [stdout] 237 + 0b101 => Xorn, [INFO] [stdout] 238 + 0b110 => Orn, [INFO] [stdout] 239 + 0b111 => Cmpn, [INFO] [stdout] 240 + _ => ErrInstr { opcode }, [INFO] [stdout] 241 + } [INFO] [stdout] 242 + } [INFO] [stdout] 243 + // increment / decrement registers [INFO] [stdout] 244 + else if op_x == 0b00 && op_z == 0b100 { [INFO] [stdout] 245 + IncR(op_y) [INFO] [stdout] 246 + } else if op_x == 0b00 && op_z == 0b101 { [INFO] [stdout] 247 + DecR(op_y) [INFO] [stdout] 248 + } [INFO] [stdout] 249 + // 16-bit arithmetic [INFO] [stdout] 250 + // ADD SP e [INFO] [stdout] 251 + else if opcode == 0xE8 { [INFO] [stdout] 252 + AddSpE [INFO] [stdout] 253 + } [INFO] [stdout] 254 + // ADD HL rr [INFO] [stdout] 255 + else if op_x == 0b00 && op_q == 0b1 && op_z == 0b001 { [INFO] [stdout] 256 + ADDHLrr(op_p) [INFO] [stdout] 257 + } [INFO] [stdout] 258 + // INC / DEC [INFO] [stdout] 259 + else if op_x == 0b00 && op_q == 0b0 && op_z == 0b011 { [INFO] [stdout] 260 + INCrr(op_p) [INFO] [stdout] 261 + } else if op_x == 0b00 && op_q == 0b1 && op_z == 0b011 { [INFO] [stdout] 262 + DECrr(op_p) [INFO] [stdout] 263 + } else if opcode == 0x27 { [INFO] [stdout] 264 + DAA [INFO] [stdout] 265 + } else if opcode == 0x37 { [INFO] [stdout] 266 + SCF [INFO] [stdout] 267 + } else if opcode == 0x2F { [INFO] [stdout] 268 + CPL [INFO] [stdout] 269 + } else if opcode == 0x3F { [INFO] [stdout] 270 + CCF [INFO] [stdout] 271 + } [INFO] [stdout] 272 + // ROTATES AND SHIFTS & Bit Ops [INFO] [stdout] 273 + // RLCA [INFO] [stdout] 274 + else if opcode == 0x07 { [INFO] [stdout] 275 + RLCA [INFO] [stdout] 276 + } [INFO] [stdout] 277 + // RLA [INFO] [stdout] 278 + else if opcode == 0x17 { [INFO] [stdout] 279 + RLA [INFO] [stdout] 280 + } [INFO] [stdout] 281 + // RRCA [INFO] [stdout] 282 + else if opcode == 0x0F { [INFO] [stdout] 283 + RRCA [INFO] [stdout] 284 + } [INFO] [stdout] 285 + // RRA [INFO] [stdout] 286 + else if opcode == 0x1F { [INFO] [stdout] 287 + RRA [INFO] [stdout] 288 + } [INFO] [stdout] 289 + // prefix CB [INFO] [stdout] 290 + else if opcode == 0xCB { [INFO] [stdout] 291 + CB [INFO] [stdout] 292 + } [INFO] [stdout] 293 + //--------CONTROL FLOW--------- [INFO] [stdout] 294 + [INFO] [stdout] 295 + //Jump nn [INFO] [stdout] 296 + else if opcode == 0b1100_0011 { [INFO] [stdout] 297 + JPnn [INFO] [stdout] 298 + } [INFO] [stdout] 299 + //jump HL [INFO] [stdout] 300 + else if opcode == 0b1110_1001 { [INFO] [stdout] 301 + JPHL [INFO] [stdout] 302 + } [INFO] [stdout] 303 + //jump cc, nn [INFO] [stdout] 304 + else if op_x == 0b11 && op_y & 0b100 == 0b000 && op_z == 0b010 { [INFO] [stdout] 305 + JPccnn(cc) [INFO] [stdout] 306 + } [INFO] [stdout] 307 + // JR e [INFO] [stdout] 308 + else if opcode == 0x18 { [INFO] [stdout] 309 + JRe [INFO] [stdout] 310 + } [INFO] [stdout] 311 + //JR cc, e [INFO] [stdout] 312 + else if op_x == 0b00 && (op_y & 0b100 == 0b100) && op_z == 0b000 { [INFO] [stdout] 313 + JRcce(cc) [INFO] [stdout] 314 + } [INFO] [stdout] 315 + // CALL nn [INFO] [stdout] 316 + else if opcode == 0xCD { [INFO] [stdout] 317 + CALLnn [INFO] [stdout] 318 + } [INFO] [stdout] 319 + //CALL cc, nn [INFO] [stdout] 320 + else if op_x == 0b11 && op_y & 0b100 == 0b000 && op_z == 0b100 { [INFO] [stdout] 321 + CALLccnn(cc) [INFO] [stdout] 322 + } [INFO] [stdout] 323 + //RET [INFO] [stdout] 324 + else if opcode == 0xC9 { [INFO] [stdout] 325 + RET [INFO] [stdout] 326 + } [INFO] [stdout] 327 + //RET cc [INFO] [stdout] 328 + else if op_x == 0b11 && op_y & 0b100 == 0b000 && op_z == 0b000 { [INFO] [stdout] 329 + RETcc(cc) [INFO] [stdout] 330 + } [INFO] [stdout] 331 + //RETI [INFO] [stdout] 332 + else if opcode == 0xD9 { [INFO] [stdout] 333 + RETI [INFO] [stdout] 334 + } [INFO] [stdout] 335 + //RST n [INFO] [stdout] 336 + else if op_x == 0b11 && op_z == 0b111 { [INFO] [stdout] 337 + RSTn(op_y) [INFO] [stdout] 338 + } else { [INFO] [stdout] 339 + ErrInstr { opcode } [INFO] [stdout] 340 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/console/cpu/instruction.rs:349:9 [INFO] [stdout] | [INFO] [stdout] 349 | / return match op_x { [INFO] [stdout] 350 | | //these are all the rotates [INFO] [stdout] 351 | | 0b00 => match op_y { [INFO] [stdout] 352 | | 0b000 => RLCr(op_z), [INFO] [stdout] ... | [INFO] [stdout] 367 | | _ => ErrInstr { opcode }, [INFO] [stdout] 368 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 349 ~ match op_x { [INFO] [stdout] 350 + //these are all the rotates [INFO] [stdout] 351 + 0b00 => match op_y { [INFO] [stdout] 352 + 0b000 => RLCr(op_z), [INFO] [stdout] 353 + 0b001 => RRCr(op_z), [INFO] [stdout] 354 + 0b010 => RLr(op_z), [INFO] [stdout] 355 + 0b011 => RRr(op_z), [INFO] [stdout] 356 + 0b100 => SLAr(op_z), [INFO] [stdout] 357 + 0b101 => SRAr(op_z), [INFO] [stdout] 358 + 0b110 => SWAPr(op_z), [INFO] [stdout] 359 + 0b111 => SRLr(op_z), [INFO] [stdout] 360 + _ => ErrInstr { opcode }, [INFO] [stdout] 361 + }, [INFO] [stdout] 362 + [INFO] [stdout] 363 + //rest are bit instructions [INFO] [stdout] 364 + 0b01 => BITnr { n: op_y, r: op_z }, [INFO] [stdout] 365 + 0b10 => RESnr { n: op_y, r: op_z }, [INFO] [stdout] 366 + 0b11 => SETnr { n: op_y, r: op_z }, [INFO] [stdout] 367 + _ => ErrInstr { opcode }, [INFO] [stdout] 368 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `SharpSM83` [INFO] [stdout] --> src/console/cpu.rs:53:5 [INFO] [stdout] | [INFO] [stdout] 53 | / pub fn new() -> SharpSM83 { [INFO] [stdout] 54 | | [INFO] [stdout] 55 | | SharpSM83 { [INFO] [stdout] 56 | | a: 0x00, [INFO] [stdout] ... | [INFO] [stdout] 78 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 42 + impl Default for SharpSM83 { [INFO] [stdout] 43 + fn default() -> Self { [INFO] [stdout] 44 + Self::new() [INFO] [stdout] 45 + } [INFO] [stdout] 46 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/console/cpu.rs:95:13 [INFO] [stdout] | [INFO] [stdout] 95 | / if self.ime == 1 { [INFO] [stdout] 96 | | if self.handle_interrupt(memory) { self.m_cycles += 4 }; [INFO] [stdout] 97 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 95 ~ if self.ime == 1 [INFO] [stdout] 96 ~ && self.handle_interrupt(memory) { self.m_cycles += 4 }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `y_flip` [INFO] [stdout] --> src/console/ppu.rs:230:41 [INFO] [stdout] | [INFO] [stdout] 230 | fn mix_bytes_obj(low: u8, high: u8, y_flip: bool, x_flip: bool) -> [u8; 8] { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_y_flip` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/console/cpu.rs:355:78 [INFO] [stdout] | [INFO] [stdout] 355 | self.set_flags(self.get_flag_bit(FLAG_Z) == 1, false, false, !(self.get_flag_bit(FLAG_N) == 1)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(self.get_flag_bit(FLAG_N) != 1)` [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: unused variable: `pace` [INFO] [stdout] --> src/console/apu.rs:55:13 [INFO] [stdout] | [INFO] [stdout] 55 | let pace = nr10 & 0b01110000 >> 4; [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_pace` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `env_dir` [INFO] [stdout] --> src/console/apu.rs:65:13 [INFO] [stdout] | [INFO] [stdout] 65 | let env_dir = nr12 & 0b00001000 >> 3; [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_env_dir` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `sweep_pace` [INFO] [stdout] --> src/console/apu.rs:66:13 [INFO] [stdout] | [INFO] [stdout] 66 | let sweep_pace = nr12 & 0b00000111; [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_sweep_pace` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `trigger` [INFO] [stdout] --> src/console/apu.rs:71:13 [INFO] [stdout] | [INFO] [stdout] 71 | let trigger = nr14 & 0b10000000 >> 7; [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_trigger` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `length_en` [INFO] [stdout] --> src/console/apu.rs:72:13 [INFO] [stdout] | [INFO] [stdout] 72 | let length_en = nr14 & 0b01000000 >> 6; [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_length_en` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/console/cpu.rs:358:17 [INFO] [stdout] | [INFO] [stdout] 358 | self.a = self.a ^ 0xFF; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.a ^= 0xFF` [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/console/cpu.rs:365:17 [INFO] [stdout] | [INFO] [stdout] 365 | self.a = self.a << 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.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/console/cpu.rs:378:17 [INFO] [stdout] | [INFO] [stdout] 378 | self.a = self.a >> 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.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/console/cpu.rs:506:51 [INFO] [stdout] | [INFO] [stdout] 506 | RLCr(_) | RLr(_) | SLAr(_) => rv = rv << 1, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `rv <<= 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/console/cpu.rs:507:61 [INFO] [stdout] | [INFO] [stdout] 507 | RRCr(_) | RRr(_) | SRAr(_) | SRLr(_) => rv = rv >> 1, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `rv >>= 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: value captured by `clock_timer` is never read [INFO] [stdout] --> src/console.rs:188:17 [INFO] [stdout] | [INFO] [stdout] 188 | clock_timer = Instant::now(); [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: did you mean to capture by reference instead? [INFO] [stdout] = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `clock_timer` is never read [INFO] [stdout] --> src/console.rs:188:17 [INFO] [stdout] | [INFO] [stdout] 188 | clock_timer = Instant::now(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `clock_timer` [INFO] [stdout] --> src/console.rs:158:13 [INFO] [stdout] | [INFO] [stdout] 158 | let mut clock_timer = Instant::now(); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_clock_timer` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/console/cpu.rs:559:9 [INFO] [stdout] | [INFO] [stdout] 559 | / return if !self.rom_control && addr < 0x100 && memory.read(0xFF50) == 0 { [INFO] [stdout] 560 | | self.boot_rom.read(addr) [INFO] [stdout] 561 | | } else { [INFO] [stdout] 562 | | memory.read(addr) [INFO] [stdout] 563 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 559 ~ if !self.rom_control && addr < 0x100 && memory.read(0xFF50) == 0 { [INFO] [stdout] 560 + self.boot_rom.read(addr) [INFO] [stdout] 561 + } else { [INFO] [stdout] 562 + memory.read(addr) [INFO] [stdout] 563 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `stop` [INFO] [stdout] --> src/console.rs:227:13 [INFO] [stdout] | [INFO] [stdout] 227 | let stop = Arc::new(AtomicBool::new(false)); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_stop` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `byte` [INFO] [stdout] --> src/console.rs:303:17 [INFO] [stdout] | [INFO] [stdout] 303 | let byte = data[i]; [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_byte` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `PerfError` is never constructed [INFO] [stdout] --> src/console.rs:51:8 [INFO] [stdout] | [INFO] [stdout] 51 | struct PerfError { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `PerfTimer` is never constructed [INFO] [stdout] --> src/console.rs:62:8 [INFO] [stdout] | [INFO] [stdout] 62 | struct PerfTimer { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `start`, `end`, and `avg` are never used [INFO] [stdout] --> src/console.rs:69:8 [INFO] [stdout] | [INFO] [stdout] 68 | impl PerfTimer { [INFO] [stdout] | --------------------------------- associated items in this implementation [INFO] [stdout] 69 | fn new() -> PerfTimer { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 76 | fn start(&mut self) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 79 | fn end(&mut self) -> Result<(), PerfError> { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 96 | fn avg(&self) -> f64 { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `run_cpu` is never used [INFO] [stdout] --> src/console.rs:157:8 [INFO] [stdout] | [INFO] [stdout] 147 | impl GameBoy { [INFO] [stdout] | ------------ method in this implementation [INFO] [stdout] ... [INFO] [stdout] 157 | fn run_cpu(&mut self, stop_signal: Arc, clock: Arc<(Mutex, Condvar)>) -> thread::JoinHandle<()> { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: it looks like you're manually copying between slices [INFO] [stdout] --> src/console/memory.rs:40:17 [INFO] [stdout] | [INFO] [stdout] 40 | / for i in 0..min(buffer.len(), size) { [INFO] [stdout] 41 | | data[i] = buffer[i]; [INFO] [stdout] 42 | | } [INFO] [stdout] | |_________________^ help: try replacing the loop by: `data[..min(buffer.len(), size)].copy_from_slice(&buffer[..min(buffer.len(), size)]);` [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: method `set_carry_flags` is never used [INFO] [stdout] --> src/console/cpu.rs:655:8 [INFO] [stdout] | [INFO] [stdout] 42 | impl SharpSM83 { [INFO] [stdout] | -------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 655 | fn set_carry_flags(&mut self, carry: bool, half_carry: bool) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `DMA` is never used [INFO] [stdout] --> src/console/ppu.rs:31:7 [INFO] [stdout] | [INFO] [stdout] 31 | const DMA: u16 = 0xFF46; [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `OBJ_EN` is never used [INFO] [stdout] --> src/console/ppu.rs:44:7 [INFO] [stdout] | [INFO] [stdout] 44 | const OBJ_EN: u8 = 1 << 1; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `LYC_INT_SEL` is never used [INFO] [stdout] --> src/console/ppu.rs:48:7 [INFO] [stdout] | [INFO] [stdout] 48 | const LYC_INT_SEL: u8 = 1 << 6; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `M2_INT_SEL` is never used [INFO] [stdout] --> src/console/ppu.rs:49:7 [INFO] [stdout] | [INFO] [stdout] 49 | const M2_INT_SEL: u8 = 1 << 5; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `M1_INT_SEL` is never used [INFO] [stdout] --> src/console/ppu.rs:50:7 [INFO] [stdout] | [INFO] [stdout] 50 | const M1_INT_SEL: u8 = 1 << 4; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `M0_INT_SEL` is never used [INFO] [stdout] --> src/console/ppu.rs:51:7 [INFO] [stdout] | [INFO] [stdout] 51 | const M0_INT_SEL: u8 = 1 << 3; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `LYC_EQ_LY` is never used [INFO] [stdout] --> src/console/ppu.rs:52:7 [INFO] [stdout] | [INFO] [stdout] 52 | const LYC_EQ_LY: u8 = 1 << 2; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `PPU_MODE` is never used [INFO] [stdout] --> src/console/ppu.rs:53:7 [INFO] [stdout] | [INFO] [stdout] 53 | const PPU_MODE: u8 = 0b11; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `sprite_prio` is never read [INFO] [stdout] --> src/console/ppu.rs:81:9 [INFO] [stdout] | [INFO] [stdout] 78 | struct Pixel { [INFO] [stdout] | ----- field in this struct [INFO] [stdout] ... [INFO] [stdout] 81 | pub sprite_prio: u8, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Pixel` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `channel3_pos` is never read [INFO] [stdout] --> src/console/apu.rs:37:5 [INFO] [stdout] | [INFO] [stdout] 31 | pub struct Apu { [INFO] [stdout] | --- field in this struct [INFO] [stdout] ... [INFO] [stdout] 37 | channel3_pos: u8, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Apu` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/console/memory.rs:76:12 [INFO] [stdout] | [INFO] [stdout] 76 | if addr >= 0xC000 && addr <= 0xDDFF { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0xC000..=0xDDFF).contains(&addr)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/console/memory.rs:80:12 [INFO] [stdout] | [INFO] [stdout] 80 | if addr >= 0xE000 && addr <= 0xFDFF { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0xE000..=0xFDFF).contains(&addr)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `writeln!` [INFO] [stdout] --> src/console/memory.rs:131:13 [INFO] [stdout] | [INFO] [stdout] 131 | writeln!(f, "")?; [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#writeln_empty_string [INFO] [stdout] = note: `#[warn(clippy::writeln_empty_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `usize` is unnecessary [INFO] [stdout] --> src/console/memory.rs:148:25 [INFO] [stdout] | [INFO] [stdout] 148 | for j in 0..16 as usize { [INFO] [stdout] | ^^^^^^^^^^^ help: try: `16_usize` [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: empty string literal in `println!` [INFO] [stdout] --> src/console/memory.rs:151:21 [INFO] [stdout] | [INFO] [stdout] 151 | 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: empty string literal in `println!` [INFO] [stdout] --> src/console/memory.rs:157:13 [INFO] [stdout] | [INFO] [stdout] 157 | 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] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `PPU` [INFO] [stdout] --> src/console/ppu.rs:128:5 [INFO] [stdout] | [INFO] [stdout] 128 | / pub fn new() -> PPU { [INFO] [stdout] 129 | | PPU { [INFO] [stdout] 130 | | dots: 0, [INFO] [stdout] 131 | | mode: 0, [INFO] [stdout] ... | [INFO] [stdout] 155 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 127 + impl Default for PPU { [INFO] [stdout] 128 + fn default() -> Self { [INFO] [stdout] 129 + Self::new() [INFO] [stdout] 130 + } [INFO] [stdout] 131 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/console/cpu/instruction.rs:142:9 [INFO] [stdout] | [INFO] [stdout] 142 | / return if opcode == 0x00 { [INFO] [stdout] 143 | | NOP [INFO] [stdout] 144 | | } else if opcode == 0x10 { [INFO] [stdout] 145 | | STOP [INFO] [stdout] ... | [INFO] [stdout] 339 | | ErrInstr { opcode } [INFO] [stdout] 340 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 142 ~ if opcode == 0x00 { [INFO] [stdout] 143 + NOP [INFO] [stdout] 144 + } else if opcode == 0x10 { [INFO] [stdout] 145 + STOP [INFO] [stdout] 146 + } else if opcode == 0x76 { [INFO] [stdout] 147 + HALT [INFO] [stdout] 148 + } else if opcode == 0xF3 { [INFO] [stdout] 149 + DI [INFO] [stdout] 150 + } else if opcode == 0xFB { [INFO] [stdout] 151 + EI [INFO] [stdout] 152 + } [INFO] [stdout] 153 + // 8-bit load / store instructions registers [INFO] [stdout] 154 + // LD r r [INFO] [stdout] 155 + else if op_x == 0b01 { [INFO] [stdout] 156 + LDRwR(op_y, op_z) [INFO] [stdout] 157 + } [INFO] [stdout] 158 + // LD r n [INFO] [stdout] 159 + else if op_x == 0b00 && op_z == 0b110 { [INFO] [stdout] 160 + LDRwN(op_y) [INFO] [stdout] 161 + } [INFO] [stdout] 162 + // LDH [INFO] [stdout] 163 + // 0xE0, 0xE2, 0xF0, 0xF2 [INFO] [stdout] 164 + // 0b1110_0000 [INFO] [stdout] 165 + // 0b1110_0010 [INFO] [stdout] 166 + // 0b1111_0000 [INFO] [stdout] 167 + // 0b1111_0010 [INFO] [stdout] 168 + else if op_x == 0b11 [INFO] [stdout] 169 + && (op_y == 0b110 || op_y == 0b100) [INFO] [stdout] 170 + && (op_z == 0b000 || op_z == 0b010) [INFO] [stdout] 171 + { [INFO] [stdout] 172 + LDH(op_y == 0b100, op_z == 0b000) [INFO] [stdout] 173 + } [INFO] [stdout] 174 + // LD A (nn) [INFO] [stdout] 175 + else if op_x == 0b11 && op_y & 0b101 == 0b101 && op_z == 0b010 { [INFO] [stdout] 176 + LDAwNNa(op_y == 0b101) [INFO] [stdout] 177 + } [INFO] [stdout] 178 + // LD (rr) A, LD A (rr) [INFO] [stdout] 179 + else if op_x == 0b00 && op_z == 0b010 { [INFO] [stdout] 180 + if op_q == 0b1 { [INFO] [stdout] 181 + LDAwRRa(op_p) [INFO] [stdout] 182 + } else { [INFO] [stdout] 183 + LDRRawA(op_p) [INFO] [stdout] 184 + } [INFO] [stdout] 185 + } [INFO] [stdout] 186 + // 16-bit loads [INFO] [stdout] 187 + // LD rr nn [INFO] [stdout] 188 + else if op_x == 0b00 && op_q == 0b0 && op_z == 0b001 { [INFO] [stdout] 189 + LDrrnn(op_p) [INFO] [stdout] 190 + } [INFO] [stdout] 191 + //LD (nn) SP [INFO] [stdout] 192 + else if opcode == 0x08 { [INFO] [stdout] 193 + LDNNawSP [INFO] [stdout] 194 + } [INFO] [stdout] 195 + // load stack pointer from HL [INFO] [stdout] 196 + else if opcode == 0xF9 { [INFO] [stdout] 197 + LDSPwHL [INFO] [stdout] 198 + } else if opcode == 0xF8 { [INFO] [stdout] 199 + LDHLwSP [INFO] [stdout] 200 + } [INFO] [stdout] 201 + // push rr [INFO] [stdout] 202 + else if op_x == 0b11 && op_q == 0 && op_z == 0b101 { [INFO] [stdout] 203 + PUSHrr(op_p) [INFO] [stdout] 204 + } [INFO] [stdout] 205 + // pop rr [INFO] [stdout] 206 + else if op_x == 0b11 && op_q == 0 && op_z == 0b001 { [INFO] [stdout] 207 + POPrr(op_p) [INFO] [stdout] 208 + } [INFO] [stdout] 209 + //-----------ARITHMETIC--------- [INFO] [stdout] 210 + [INFO] [stdout] 211 + //add, sub, adc, subc, and, or, xor, cp [INFO] [stdout] 212 + else if op_x == 0b10 && op_q == 0b0 { [INFO] [stdout] 213 + match op_p { [INFO] [stdout] 214 + 0 => Add(op_z), [INFO] [stdout] 215 + 1 => Sub(op_z), [INFO] [stdout] 216 + 2 => And(op_z), [INFO] [stdout] 217 + 3 => Or(op_z), [INFO] [stdout] 218 + _ => ErrInstr { opcode }, [INFO] [stdout] 219 + } [INFO] [stdout] 220 + } else if op_x == 0b10 && op_q == 0b1 { [INFO] [stdout] 221 + match op_p { [INFO] [stdout] 222 + 0 => Adc(op_z), [INFO] [stdout] 223 + 1 => Sbc(op_z), [INFO] [stdout] 224 + 2 => Xor(op_z), [INFO] [stdout] 225 + 3 => Cmp(op_z), [INFO] [stdout] 226 + _ => ErrInstr { opcode }, [INFO] [stdout] 227 + } [INFO] [stdout] 228 + } [INFO] [stdout] 229 + // arithmetic with n [INFO] [stdout] 230 + else if op_x == 0b11 && op_z == 0b110 { [INFO] [stdout] 231 + match op_y { [INFO] [stdout] 232 + 0b000 => Addn, [INFO] [stdout] 233 + 0b001 => Adcn, [INFO] [stdout] 234 + 0b010 => Subn, [INFO] [stdout] 235 + 0b011 => Sbcn, [INFO] [stdout] 236 + 0b100 => Andn, [INFO] [stdout] 237 + 0b101 => Xorn, [INFO] [stdout] 238 + 0b110 => Orn, [INFO] [stdout] 239 + 0b111 => Cmpn, [INFO] [stdout] 240 + _ => ErrInstr { opcode }, [INFO] [stdout] 241 + } [INFO] [stdout] 242 + } [INFO] [stdout] 243 + // increment / decrement registers [INFO] [stdout] 244 + else if op_x == 0b00 && op_z == 0b100 { [INFO] [stdout] 245 + IncR(op_y) [INFO] [stdout] 246 + } else if op_x == 0b00 && op_z == 0b101 { [INFO] [stdout] 247 + DecR(op_y) [INFO] [stdout] 248 + } [INFO] [stdout] 249 + // 16-bit arithmetic [INFO] [stdout] 250 + // ADD SP e [INFO] [stdout] 251 + else if opcode == 0xE8 { [INFO] [stdout] 252 + AddSpE [INFO] [stdout] 253 + } [INFO] [stdout] 254 + // ADD HL rr [INFO] [stdout] 255 + else if op_x == 0b00 && op_q == 0b1 && op_z == 0b001 { [INFO] [stdout] 256 + ADDHLrr(op_p) [INFO] [stdout] 257 + } [INFO] [stdout] 258 + // INC / DEC [INFO] [stdout] 259 + else if op_x == 0b00 && op_q == 0b0 && op_z == 0b011 { [INFO] [stdout] 260 + INCrr(op_p) [INFO] [stdout] 261 + } else if op_x == 0b00 && op_q == 0b1 && op_z == 0b011 { [INFO] [stdout] 262 + DECrr(op_p) [INFO] [stdout] 263 + } else if opcode == 0x27 { [INFO] [stdout] 264 + DAA [INFO] [stdout] 265 + } else if opcode == 0x37 { [INFO] [stdout] 266 + SCF [INFO] [stdout] 267 + } else if opcode == 0x2F { [INFO] [stdout] 268 + CPL [INFO] [stdout] 269 + } else if opcode == 0x3F { [INFO] [stdout] 270 + CCF [INFO] [stdout] 271 + } [INFO] [stdout] 272 + // ROTATES AND SHIFTS & Bit Ops [INFO] [stdout] 273 + // RLCA [INFO] [stdout] 274 + else if opcode == 0x07 { [INFO] [stdout] 275 + RLCA [INFO] [stdout] 276 + } [INFO] [stdout] 277 + // RLA [INFO] [stdout] 278 + else if opcode == 0x17 { [INFO] [stdout] 279 + RLA [INFO] [stdout] 280 + } [INFO] [stdout] 281 + // RRCA [INFO] [stdout] 282 + else if opcode == 0x0F { [INFO] [stdout] 283 + RRCA [INFO] [stdout] 284 + } [INFO] [stdout] 285 + // RRA [INFO] [stdout] 286 + else if opcode == 0x1F { [INFO] [stdout] 287 + RRA [INFO] [stdout] 288 + } [INFO] [stdout] 289 + // prefix CB [INFO] [stdout] 290 + else if opcode == 0xCB { [INFO] [stdout] 291 + CB [INFO] [stdout] 292 + } [INFO] [stdout] 293 + //--------CONTROL FLOW--------- [INFO] [stdout] 294 + [INFO] [stdout] 295 + //Jump nn [INFO] [stdout] 296 + else if opcode == 0b1100_0011 { [INFO] [stdout] 297 + JPnn [INFO] [stdout] 298 + } [INFO] [stdout] 299 + //jump HL [INFO] [stdout] 300 + else if opcode == 0b1110_1001 { [INFO] [stdout] 301 + JPHL [INFO] [stdout] 302 + } [INFO] [stdout] 303 + //jump cc, nn [INFO] [stdout] 304 + else if op_x == 0b11 && op_y & 0b100 == 0b000 && op_z == 0b010 { [INFO] [stdout] 305 + JPccnn(cc) [INFO] [stdout] 306 + } [INFO] [stdout] 307 + // JR e [INFO] [stdout] 308 + else if opcode == 0x18 { [INFO] [stdout] 309 + JRe [INFO] [stdout] 310 + } [INFO] [stdout] 311 + //JR cc, e [INFO] [stdout] 312 + else if op_x == 0b00 && (op_y & 0b100 == 0b100) && op_z == 0b000 { [INFO] [stdout] 313 + JRcce(cc) [INFO] [stdout] 314 + } [INFO] [stdout] 315 + // CALL nn [INFO] [stdout] 316 + else if opcode == 0xCD { [INFO] [stdout] 317 + CALLnn [INFO] [stdout] 318 + } [INFO] [stdout] 319 + //CALL cc, nn [INFO] [stdout] 320 + else if op_x == 0b11 && op_y & 0b100 == 0b000 && op_z == 0b100 { [INFO] [stdout] 321 + CALLccnn(cc) [INFO] [stdout] 322 + } [INFO] [stdout] 323 + //RET [INFO] [stdout] 324 + else if opcode == 0xC9 { [INFO] [stdout] 325 + RET [INFO] [stdout] 326 + } [INFO] [stdout] 327 + //RET cc [INFO] [stdout] 328 + else if op_x == 0b11 && op_y & 0b100 == 0b000 && op_z == 0b000 { [INFO] [stdout] 329 + RETcc(cc) [INFO] [stdout] 330 + } [INFO] [stdout] 331 + //RETI [INFO] [stdout] 332 + else if opcode == 0xD9 { [INFO] [stdout] 333 + RETI [INFO] [stdout] 334 + } [INFO] [stdout] 335 + //RST n [INFO] [stdout] 336 + else if op_x == 0b11 && op_z == 0b111 { [INFO] [stdout] 337 + RSTn(op_y) [INFO] [stdout] 338 + } else { [INFO] [stdout] 339 + ErrInstr { opcode } [INFO] [stdout] 340 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` branch is empty [INFO] [stdout] --> src/console/ppu.rs:274:9 [INFO] [stdout] | [INFO] [stdout] 274 | / if self.mode == 0 { [INFO] [stdout] 275 | | [INFO] [stdout] 276 | | } [INFO] [stdout] | |_________^ help: you can remove it [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_ifs [INFO] [stdout] = note: `#[warn(clippy::needless_ifs)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/console/ppu.rs:301:12 [INFO] [stdout] | [INFO] [stdout] 301 | if self.dots % 456 == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace with: `self.dots.is_multiple_of(456)` [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: unneeded `return` statement [INFO] [stdout] --> src/console/cpu/instruction.rs:349:9 [INFO] [stdout] | [INFO] [stdout] 349 | / return match op_x { [INFO] [stdout] 350 | | //these are all the rotates [INFO] [stdout] 351 | | 0b00 => match op_y { [INFO] [stdout] 352 | | 0b000 => RLCr(op_z), [INFO] [stdout] ... | [INFO] [stdout] 367 | | _ => ErrInstr { opcode }, [INFO] [stdout] 368 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 349 ~ match op_x { [INFO] [stdout] 350 + //these are all the rotates [INFO] [stdout] 351 + 0b00 => match op_y { [INFO] [stdout] 352 + 0b000 => RLCr(op_z), [INFO] [stdout] 353 + 0b001 => RRCr(op_z), [INFO] [stdout] 354 + 0b010 => RLr(op_z), [INFO] [stdout] 355 + 0b011 => RRr(op_z), [INFO] [stdout] 356 + 0b100 => SLAr(op_z), [INFO] [stdout] 357 + 0b101 => SRAr(op_z), [INFO] [stdout] 358 + 0b110 => SWAPr(op_z), [INFO] [stdout] 359 + 0b111 => SRLr(op_z), [INFO] [stdout] 360 + _ => ErrInstr { opcode }, [INFO] [stdout] 361 + }, [INFO] [stdout] 362 + [INFO] [stdout] 363 + //rest are bit instructions [INFO] [stdout] 364 + 0b01 => BITnr { n: op_y, r: op_z }, [INFO] [stdout] 365 + 0b10 => RESnr { n: op_y, r: op_z }, [INFO] [stdout] 366 + 0b11 => SETnr { n: op_y, r: op_z }, [INFO] [stdout] 367 + _ => ErrInstr { opcode }, [INFO] [stdout] 368 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `SharpSM83` [INFO] [stdout] --> src/console/cpu.rs:53:5 [INFO] [stdout] | [INFO] [stdout] 53 | / pub fn new() -> SharpSM83 { [INFO] [stdout] 54 | | [INFO] [stdout] 55 | | SharpSM83 { [INFO] [stdout] 56 | | a: 0x00, [INFO] [stdout] ... | [INFO] [stdout] 78 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 42 + impl Default for SharpSM83 { [INFO] [stdout] 43 + fn default() -> Self { [INFO] [stdout] 44 + Self::new() [INFO] [stdout] 45 + } [INFO] [stdout] 46 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `found_objects` [INFO] [stdout] --> src/console/ppu.rs:320:22 [INFO] [stdout] | [INFO] [stdout] 320 | for i in 0..min(found_objects.len(), 10) { [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] 320 - for i in 0..min(found_objects.len(), 10) { [INFO] [stdout] 320 + for in found_objects.iter().take(min(found_objects.len(), 10)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/console/ppu.rs:333:33 [INFO] [stdout] | [INFO] [stdout] 333 | if tile_index < 128 { VB_0 } else { VB_0 } [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/console/ppu.rs:333:47 [INFO] [stdout] | [INFO] [stdout] 333 | if tile_index < 128 { VB_0 } else { VB_0 } [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/console/cpu.rs:95:13 [INFO] [stdout] | [INFO] [stdout] 95 | / if self.ime == 1 { [INFO] [stdout] 96 | | if self.handle_interrupt(memory) { self.m_cycles += 4 }; [INFO] [stdout] 97 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 95 ~ if self.ime == 1 [INFO] [stdout] 96 ~ && self.handle_interrupt(memory) { self.m_cycles += 4 }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/console/cpu.rs:355:78 [INFO] [stdout] | [INFO] [stdout] 355 | self.set_flags(self.get_flag_bit(FLAG_Z) == 1, false, false, !(self.get_flag_bit(FLAG_N) == 1)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(self.get_flag_bit(FLAG_N) != 1)` [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: unneeded `return` statement [INFO] [stdout] --> src/console/ppu.rs:437:9 [INFO] [stdout] | [INFO] [stdout] 437 | return self.ly == 153; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 437 - return self.ly == 153; [INFO] [stdout] 437 + self.ly == 153 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the method `update` doesn't need a mutable reference [INFO] [stdout] --> src/console/ppu.rs:445:30 [INFO] [stdout] | [INFO] [stdout] 445 | texture.update(None, &mut self.bg, LCD_WIDTH * 4).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] = note: `#[warn(clippy::unnecessary_mut_passed)]` on by default [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 445 - texture.update(None, &mut self.bg, LCD_WIDTH * 4).unwrap(); [INFO] [stdout] 445 + texture.update(None, &self.bg, LCD_WIDTH * 4).unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `HTimer` [INFO] [stdout] --> src/console/timer.rs:24:5 [INFO] [stdout] | [INFO] [stdout] 24 | / pub fn new() -> HTimer { [INFO] [stdout] 25 | | HTimer { [INFO] [stdout] 26 | | div_dots: 0usize, [INFO] [stdout] 27 | | tima_dots: 0usize, [INFO] [stdout] ... | [INFO] [stdout] 33 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 23 + impl Default for HTimer { [INFO] [stdout] 24 + fn default() -> Self { [INFO] [stdout] 25 + Self::new() [INFO] [stdout] 26 + } [INFO] [stdout] 27 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/console/cpu.rs:358:17 [INFO] [stdout] | [INFO] [stdout] 358 | self.a = self.a ^ 0xFF; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.a ^= 0xFF` [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/console/cpu.rs:365:17 [INFO] [stdout] | [INFO] [stdout] 365 | self.a = self.a << 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.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/console/cpu.rs:378:17 [INFO] [stdout] | [INFO] [stdout] 378 | self.a = self.a >> 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.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: importing legacy numeric constants [INFO] [stdout] --> src/console.rs:34:5 [INFO] [stdout] | [INFO] [stdout] 34 | use std::u128; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `u128::` will resolve to the respective associated constant [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/console/cpu.rs:506:51 [INFO] [stdout] | [INFO] [stdout] 506 | RLCr(_) | RLr(_) | SLAr(_) => rv = rv << 1, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `rv <<= 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/console/cpu.rs:507:61 [INFO] [stdout] | [INFO] [stdout] 507 | RRCr(_) | RRr(_) | SRAr(_) | SRLr(_) => rv = rv >> 1, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `rv >>= 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: unneeded `return` statement [INFO] [stdout] --> src/console.rs:80:9 [INFO] [stdout] | [INFO] [stdout] 80 | / return match self.start { [INFO] [stdout] 81 | | None => { [INFO] [stdout] 82 | | println!("err"); [INFO] [stdout] 83 | | Err(PerfError{value: String::from("Must start timer before ending")}) [INFO] [stdout] ... | [INFO] [stdout] 94 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 80 ~ match self.start { [INFO] [stdout] 81 + None => { [INFO] [stdout] 82 + println!("err"); [INFO] [stdout] 83 + Err(PerfError{value: String::from("Must start timer before ending")}) [INFO] [stdout] 84 + }, [INFO] [stdout] 85 + Some(start) => { [INFO] [stdout] 86 + self.times[self.index] = start.elapsed().as_nanos(); [INFO] [stdout] 87 + self.index += 1; [INFO] [stdout] 88 + if self.index >= N { [INFO] [stdout] 89 + self.index = 0; [INFO] [stdout] 90 + } [INFO] [stdout] 91 + self.start = None; [INFO] [stdout] 92 + Ok(()) [INFO] [stdout] 93 + } [INFO] [stdout] 94 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/console/cpu.rs:559:9 [INFO] [stdout] | [INFO] [stdout] 559 | / return if !self.rom_control && addr < 0x100 && memory.read(0xFF50) == 0 { [INFO] [stdout] 560 | | self.boot_rom.read(addr) [INFO] [stdout] 561 | | } else { [INFO] [stdout] 562 | | memory.read(addr) [INFO] [stdout] 563 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 559 ~ if !self.rom_control && addr < 0x100 && memory.read(0xFF50) == 0 { [INFO] [stdout] 560 + self.boot_rom.read(addr) [INFO] [stdout] 561 + } else { [INFO] [stdout] 562 + memory.read(addr) [INFO] [stdout] 563 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `GBIO` [INFO] [stdout] --> src/console.rs:113:5 [INFO] [stdout] | [INFO] [stdout] 113 | / pub fn new() -> GBIO { [INFO] [stdout] 114 | | GBIO { [INFO] [stdout] 115 | | timer: HTimer::new(), [INFO] [stdout] 116 | | joypad: Joypad::default(), [INFO] [stdout] ... | [INFO] [stdout] 119 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 112 + impl Default for GBIO { [INFO] [stdout] 113 + fn default() -> Self { [INFO] [stdout] 114 + Self::new() [INFO] [stdout] 115 + } [INFO] [stdout] 116 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/console.rs:122:36 [INFO] [stdout] | [INFO] [stdout] 122 | self.joypad.update(memory, &keys); [INFO] [stdout] | ^^^^^ help: change this to: `keys` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/console.rs:243:28 [INFO] [stdout] | [INFO] [stdout] 243 | cpu.update(&mut memory); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `memory` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/console.rs:245:43 [INFO] [stdout] | [INFO] [stdout] 245 | cpu_cycles += cpu.run(&mut memory); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `memory` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `data` [INFO] [stdout] --> src/console.rs:302:18 [INFO] [stdout] | [INFO] [stdout] 302 | for i in 0..data.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] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 302 - for i in 0..data.len() { [INFO] [stdout] 302 + for in &data { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `buffer` [INFO] [stdout] --> src/console.rs:332:26 [INFO] [stdout] | [INFO] [stdout] 332 | for i in 0..buffer.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] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 332 - for i in 0..buffer.len() { [INFO] [stdout] 332 + for (i, ) in buffer.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `buffer` [INFO] [stdout] --> src/console.rs:338:30 [INFO] [stdout] | [INFO] [stdout] 338 | for i in 0xA000..0xBFFF { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 338 - for i in 0xA000..0xBFFF { [INFO] [stdout] 338 + for (i, ) in buffer.iter().enumerate().take(0xBFFF).skip(0xA000) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `buffer` [INFO] [stdout] --> src/console.rs:347:30 [INFO] [stdout] | [INFO] [stdout] 347 | for i in 0..min(buffer.len(), 0x10000) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 347 - for i in 0..min(buffer.len(), 0x10000) { [INFO] [stdout] 347 + for (i, ) in buffer.iter().enumerate().take(min(buffer.len(), 0x10000)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `logo` [INFO] [stdout] --> src/console.rs:351:30 [INFO] [stdout] | [INFO] [stdout] 351 | for i in 0..logo.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] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 351 - for i in 0..logo.len() { [INFO] [stdout] 351 + for (i, ) in logo.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: it looks like you're manually copying between slices [INFO] [stdout] --> src/console/memory.rs:40:17 [INFO] [stdout] | [INFO] [stdout] 40 | / for i in 0..min(buffer.len(), size) { [INFO] [stdout] 41 | | data[i] = buffer[i]; [INFO] [stdout] 42 | | } [INFO] [stdout] | |_________________^ help: try replacing the loop by: `data[..min(buffer.len(), size)].copy_from_slice(&buffer[..min(buffer.len(), size)]);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_memcpy [INFO] [stdout] = note: `#[warn(clippy::manual_memcpy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/console/memory.rs:76:12 [INFO] [stdout] | [INFO] [stdout] 76 | if addr >= 0xC000 && addr <= 0xDDFF { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0xC000..=0xDDFF).contains(&addr)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/console/memory.rs:80:12 [INFO] [stdout] | [INFO] [stdout] 80 | if addr >= 0xE000 && addr <= 0xFDFF { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0xE000..=0xFDFF).contains(&addr)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `writeln!` [INFO] [stdout] --> src/console/memory.rs:131:13 [INFO] [stdout] | [INFO] [stdout] 131 | writeln!(f, "")?; [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#writeln_empty_string [INFO] [stdout] = note: `#[warn(clippy::writeln_empty_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `usize` is unnecessary [INFO] [stdout] --> src/console/memory.rs:148:25 [INFO] [stdout] | [INFO] [stdout] 148 | for j in 0..16 as usize { [INFO] [stdout] | ^^^^^^^^^^^ help: try: `16_usize` [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: empty string literal in `println!` [INFO] [stdout] --> src/console/memory.rs:151:21 [INFO] [stdout] | [INFO] [stdout] 151 | 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: empty string literal in `println!` [INFO] [stdout] --> src/console/memory.rs:157:13 [INFO] [stdout] | [INFO] [stdout] 157 | 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] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `PPU` [INFO] [stdout] --> src/console/ppu.rs:128:5 [INFO] [stdout] | [INFO] [stdout] 128 | / pub fn new() -> PPU { [INFO] [stdout] 129 | | PPU { [INFO] [stdout] 130 | | dots: 0, [INFO] [stdout] 131 | | mode: 0, [INFO] [stdout] ... | [INFO] [stdout] 155 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 127 + impl Default for PPU { [INFO] [stdout] 128 + fn default() -> Self { [INFO] [stdout] 129 + Self::new() [INFO] [stdout] 130 + } [INFO] [stdout] 131 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` branch is empty [INFO] [stdout] --> src/console/ppu.rs:274:9 [INFO] [stdout] | [INFO] [stdout] 274 | / if self.mode == 0 { [INFO] [stdout] 275 | | [INFO] [stdout] 276 | | } [INFO] [stdout] | |_________^ help: you can remove it [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_ifs [INFO] [stdout] = note: `#[warn(clippy::needless_ifs)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/console/ppu.rs:301:12 [INFO] [stdout] | [INFO] [stdout] 301 | if self.dots % 456 == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace with: `self.dots.is_multiple_of(456)` [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: the loop variable `i` is only used to index `found_objects` [INFO] [stdout] --> src/console/ppu.rs:320:22 [INFO] [stdout] | [INFO] [stdout] 320 | for i in 0..min(found_objects.len(), 10) { [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] 320 - for i in 0..min(found_objects.len(), 10) { [INFO] [stdout] 320 + for in found_objects.iter().take(min(found_objects.len(), 10)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/console/ppu.rs:333:33 [INFO] [stdout] | [INFO] [stdout] 333 | if tile_index < 128 { VB_0 } else { VB_0 } [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/console/ppu.rs:333:47 [INFO] [stdout] | [INFO] [stdout] 333 | if tile_index < 128 { VB_0 } else { VB_0 } [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/console/ppu.rs:437:9 [INFO] [stdout] | [INFO] [stdout] 437 | return self.ly == 153; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 437 - return self.ly == 153; [INFO] [stdout] 437 + self.ly == 153 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the method `update` doesn't need a mutable reference [INFO] [stdout] --> src/console/ppu.rs:445:30 [INFO] [stdout] | [INFO] [stdout] 445 | texture.update(None, &mut self.bg, LCD_WIDTH * 4).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] = note: `#[warn(clippy::unnecessary_mut_passed)]` on by default [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 445 - texture.update(None, &mut self.bg, LCD_WIDTH * 4).unwrap(); [INFO] [stdout] 445 + texture.update(None, &self.bg, LCD_WIDTH * 4).unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `HTimer` [INFO] [stdout] --> src/console/timer.rs:24:5 [INFO] [stdout] | [INFO] [stdout] 24 | / pub fn new() -> HTimer { [INFO] [stdout] 25 | | HTimer { [INFO] [stdout] 26 | | div_dots: 0usize, [INFO] [stdout] 27 | | tima_dots: 0usize, [INFO] [stdout] ... | [INFO] [stdout] 33 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 23 + impl Default for HTimer { [INFO] [stdout] 24 + fn default() -> Self { [INFO] [stdout] 25 + Self::new() [INFO] [stdout] 26 + } [INFO] [stdout] 27 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: importing legacy numeric constants [INFO] [stdout] --> src/console.rs:34:5 [INFO] [stdout] | [INFO] [stdout] 34 | use std::u128; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `u128::` will resolve to the respective associated constant [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/console.rs:80:9 [INFO] [stdout] | [INFO] [stdout] 80 | / return match self.start { [INFO] [stdout] 81 | | None => { [INFO] [stdout] 82 | | println!("err"); [INFO] [stdout] 83 | | Err(PerfError{value: String::from("Must start timer before ending")}) [INFO] [stdout] ... | [INFO] [stdout] 94 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 80 ~ match self.start { [INFO] [stdout] 81 + None => { [INFO] [stdout] 82 + println!("err"); [INFO] [stdout] 83 + Err(PerfError{value: String::from("Must start timer before ending")}) [INFO] [stdout] 84 + }, [INFO] [stdout] 85 + Some(start) => { [INFO] [stdout] 86 + self.times[self.index] = start.elapsed().as_nanos(); [INFO] [stdout] 87 + self.index += 1; [INFO] [stdout] 88 + if self.index >= N { [INFO] [stdout] 89 + self.index = 0; [INFO] [stdout] 90 + } [INFO] [stdout] 91 + self.start = None; [INFO] [stdout] 92 + Ok(()) [INFO] [stdout] 93 + } [INFO] [stdout] 94 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `GBIO` [INFO] [stdout] --> src/console.rs:113:5 [INFO] [stdout] | [INFO] [stdout] 113 | / pub fn new() -> GBIO { [INFO] [stdout] 114 | | GBIO { [INFO] [stdout] 115 | | timer: HTimer::new(), [INFO] [stdout] 116 | | joypad: Joypad::default(), [INFO] [stdout] ... | [INFO] [stdout] 119 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 112 + impl Default for GBIO { [INFO] [stdout] 113 + fn default() -> Self { [INFO] [stdout] 114 + Self::new() [INFO] [stdout] 115 + } [INFO] [stdout] 116 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/console.rs:122:36 [INFO] [stdout] | [INFO] [stdout] 122 | self.joypad.update(memory, &keys); [INFO] [stdout] | ^^^^^ help: change this to: `keys` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/console.rs:243:28 [INFO] [stdout] | [INFO] [stdout] 243 | cpu.update(&mut memory); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `memory` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/console.rs:245:43 [INFO] [stdout] | [INFO] [stdout] 245 | cpu_cycles += cpu.run(&mut memory); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `memory` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `data` [INFO] [stdout] --> src/console.rs:302:18 [INFO] [stdout] | [INFO] [stdout] 302 | for i in 0..data.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] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 302 - for i in 0..data.len() { [INFO] [stdout] 302 + for in &data { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `buffer` [INFO] [stdout] --> src/console.rs:332:26 [INFO] [stdout] | [INFO] [stdout] 332 | for i in 0..buffer.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] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 332 - for i in 0..buffer.len() { [INFO] [stdout] 332 + for (i, ) in buffer.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `buffer` [INFO] [stdout] --> src/console.rs:338:30 [INFO] [stdout] | [INFO] [stdout] 338 | for i in 0xA000..0xBFFF { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 338 - for i in 0xA000..0xBFFF { [INFO] [stdout] 338 + for (i, ) in buffer.iter().enumerate().take(0xBFFF).skip(0xA000) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `buffer` [INFO] [stdout] --> src/console.rs:347:30 [INFO] [stdout] | [INFO] [stdout] 347 | for i in 0..min(buffer.len(), 0x10000) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 347 - for i in 0..min(buffer.len(), 0x10000) { [INFO] [stdout] 347 + for (i, ) in buffer.iter().enumerate().take(min(buffer.len(), 0x10000)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `logo` [INFO] [stdout] --> src/console.rs:351:30 [INFO] [stdout] | [INFO] [stdout] 351 | for i in 0..logo.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] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 351 - for i in 0..logo.len() { [INFO] [stdout] 351 + for (i, ) in logo.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit expression [INFO] [stdout] --> src/console/cpu.rs:151:17 [INFO] [stdout] | [INFO] [stdout] 151 | () [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/console/cpu.rs:839:13 [INFO] [stdout] | [INFO] [stdout] 839 | () [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] [INFO] [stdout] [INFO] [stdout] warning: unused import: `super::regids::IF` [INFO] [stdout] --> src/console/ppu.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use super::regids::IF; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `sdl2::pixels::Color` [INFO] [stdout] --> src/console/ppu.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use sdl2::pixels::Color; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `sdl2::rect::Point` [INFO] [stdout] --> src/console/ppu.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | use sdl2::rect::Point; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Canvas` [INFO] [stdout] --> src/console/ppu.rs:8:20 [INFO] [stdout] | [INFO] [stdout] 8 | use sdl2::render::{Canvas, Texture}; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `sdl2::surface::Surface` [INFO] [stdout] --> src/console/ppu.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | use sdl2::surface::Surface; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `sdl2::video::Window` [INFO] [stdout] --> src/console/ppu.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | use sdl2::video::Window; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `super::regids::*` [INFO] [stdout] --> src/console/apu.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use super::regids::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `AudioSpecDesired` [INFO] [stdout] --> src/console/apu.rs:5:34 [INFO] [stdout] | [INFO] [stdout] 5 | use sdl2::audio::{AudioCallback, AudioSpecDesired}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: digits of hex, binary or octal literal not in groups of equal size [INFO] [stdout] --> tests/instruction_test.rs:11:14 [INFO] [stdout] | [INFO] [stdout] 11 | opcode = 0b00_00_0001; [INFO] [stdout] | ^^^^^^^^^^^^ help: consider: `0b0000_0001` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unusual_byte_groupings [INFO] [stdout] = note: `#[warn(clippy::unusual_byte_groupings)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: digits of hex, binary or octal literal not in groups of equal size [INFO] [stdout] --> tests/instruction_test.rs:15:27 [INFO] [stdout] | [INFO] [stdout] 15 | opcode = opcode + 0b00_01_0000 [INFO] [stdout] | ^^^^^^^^^^^^ help: consider: `0b0001_0000` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unusual_byte_groupings [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: digits of hex, binary or octal literal not in groups of equal size [INFO] [stdout] --> tests/instruction_test.rs:19:14 [INFO] [stdout] | [INFO] [stdout] 19 | opcode = 0b00_00_0010; [INFO] [stdout] | ^^^^^^^^^^^^ help: consider: `0b0000_0010` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unusual_byte_groupings [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::sync::atomic::AtomicU64` [INFO] [stdout] --> src/console.rs:19:5 [INFO] [stdout] | [INFO] [stdout] 19 | use std::sync::atomic::AtomicU64; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: digits of hex, binary or octal literal not in groups of equal size [INFO] [stdout] --> tests/instruction_test.rs:23:27 [INFO] [stdout] | [INFO] [stdout] 23 | opcode = opcode + 0b00_01_0000 [INFO] [stdout] | ^^^^^^^^^^^^ help: consider: `0b0001_0000` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unusual_byte_groupings [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::sync::mpsc` [INFO] [stdout] --> src/console.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | use std::sync::mpsc; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: digits of hex, binary or octal literal not in groups of equal size [INFO] [stdout] --> tests/instruction_test.rs:27:14 [INFO] [stdout] | [INFO] [stdout] 27 | opcode = 0b00_00_1010; [INFO] [stdout] | ^^^^^^^^^^^^ help: consider: `0b0000_1010` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unusual_byte_groupings [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::sync::mpsc::channel` [INFO] [stdout] --> src/console.rs:22:5 [INFO] [stdout] | [INFO] [stdout] 22 | use std::sync::mpsc::channel; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: digits of hex, binary or octal literal not in groups of equal size [INFO] [stdout] --> tests/instruction_test.rs:31:27 [INFO] [stdout] | [INFO] [stdout] 31 | opcode = opcode + 0b00_01_0000 [INFO] [stdout] | ^^^^^^^^^^^^ help: consider: `0b0001_0000` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unusual_byte_groupings [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: digits of hex, binary or octal literal not in groups of equal size [INFO] [stdout] --> tests/instruction_test.rs:35:14 [INFO] [stdout] | [INFO] [stdout] 35 | opcode = 0b00_00_1000; [INFO] [stdout] | ^^^^^^^^^^^^ help: consider: `0b0000_1000` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unusual_byte_groupings [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::sync::mpsc::Receiver` [INFO] [stdout] --> src/console.rs:23:5 [INFO] [stdout] | [INFO] [stdout] 23 | use std::sync::mpsc::Receiver; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::sync::mpsc::Sender` [INFO] [stdout] --> src/console.rs:24:5 [INFO] [stdout] | [INFO] [stdout] 24 | use std::sync::mpsc::Sender; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::thread::JoinHandle` [INFO] [stdout] --> src/console.rs:29:5 [INFO] [stdout] | [INFO] [stdout] 29 | use std::thread::JoinHandle; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: digits of hex, binary or octal literal not in groups of equal size [INFO] [stdout] --> tests/instruction_test.rs:42:39 [INFO] [stdout] | [INFO] [stdout] 42 | let res = Instruction::decode(0b00_00_0011 + operand); [INFO] [stdout] | ^^^^^^^^^^^^ help: consider: `0b0000_0011` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unusual_byte_groupings [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: digits of hex, binary or octal literal not in groups of equal size [INFO] [stdout] --> tests/instruction_test.rs:44:39 [INFO] [stdout] | [INFO] [stdout] 44 | let res = Instruction::decode(0b00_00_1011 + operand); [INFO] [stdout] | ^^^^^^^^^^^^ help: consider: `0b0000_1011` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unusual_byte_groupings [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: digits of hex, binary or octal literal not in groups of equal size [INFO] [stdout] --> tests/instruction_test.rs:46:39 [INFO] [stdout] | [INFO] [stdout] 46 | let res = Instruction::decode(0b00_00_1001 + operand); [INFO] [stdout] | ^^^^^^^^^^^^ help: consider: `0b0000_1001` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unusual_byte_groupings [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: digits of hex, binary or octal literal not in groups of equal size [INFO] [stdout] --> tests/instruction_test.rs:64:10 [INFO] [stdout] | [INFO] [stdout] 64 | (0b00000_111, RLCA), [INFO] [stdout] | ^^^^^^^^^^^ help: consider: `0b0000_0111` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unusual_byte_groupings [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: digits of hex, binary or octal literal not in groups of equal size [INFO] [stdout] --> tests/instruction_test.rs:65:10 [INFO] [stdout] | [INFO] [stdout] 65 | (0b00001_111, RRCA), [INFO] [stdout] | ^^^^^^^^^^^ help: consider: `0b0000_1111` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unusual_byte_groupings [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: digits of hex, binary or octal literal not in groups of equal size [INFO] [stdout] --> tests/instruction_test.rs:66:10 [INFO] [stdout] | [INFO] [stdout] 66 | (0b00010_111, RLA), [INFO] [stdout] | ^^^^^^^^^^^ help: consider: `0b0001_0111` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unusual_byte_groupings [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: digits of hex, binary or octal literal not in groups of equal size [INFO] [stdout] --> tests/instruction_test.rs:67:10 [INFO] [stdout] | [INFO] [stdout] 67 | (0b00011_111, RRA), [INFO] [stdout] | ^^^^^^^^^^^ help: consider: `0b0001_1111` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unusual_byte_groupings [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: digits of hex, binary or octal literal not in groups of equal size [INFO] [stdout] --> tests/instruction_test.rs:68:10 [INFO] [stdout] | [INFO] [stdout] 68 | (0b00100_111, DAA), [INFO] [stdout] | ^^^^^^^^^^^ help: consider: `0b0010_0111` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unusual_byte_groupings [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: digits of hex, binary or octal literal not in groups of equal size [INFO] [stdout] --> tests/instruction_test.rs:69:10 [INFO] [stdout] | [INFO] [stdout] 69 | (0b00101_111, CPL), [INFO] [stdout] | ^^^^^^^^^^^ help: consider: `0b0010_1111` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unusual_byte_groupings [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: digits of hex, binary or octal literal not in groups of equal size [INFO] [stdout] --> tests/instruction_test.rs:70:10 [INFO] [stdout] | [INFO] [stdout] 70 | (0b00110_111, SCF), [INFO] [stdout] | ^^^^^^^^^^^ help: consider: `0b0011_0111` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unusual_byte_groupings [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: digits of hex, binary or octal literal not in groups of equal size [INFO] [stdout] --> tests/instruction_test.rs:71:10 [INFO] [stdout] | [INFO] [stdout] 71 | (0b00111_111, CCF), [INFO] [stdout] | ^^^^^^^^^^^ help: consider: `0b0011_1111` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unusual_byte_groupings [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: digits of hex, binary or octal literal not in groups of equal size [INFO] [stdout] --> tests/instruction_test.rs:80:40 [INFO] [stdout] | [INFO] [stdout] 80 | assert_eq!(Instruction::decode(0b001_00_000 + (i << 3)), JRcce(i)); [INFO] [stdout] | ^^^^^^^^^^^^ help: consider: `0b0010_0000` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unusual_byte_groupings [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: digits of hex, binary or octal literal not in groups of equal size [INFO] [stdout] --> tests/instruction_test.rs:102:40 [INFO] [stdout] | [INFO] [stdout] 102 | assert_eq!(Instruction::decode(0b10000_000 + operand), Add(operand)); [INFO] [stdout] | ^^^^^^^^^^^ help: consider: `0b1000_0000` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unusual_byte_groupings [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: digits of hex, binary or octal literal not in groups of equal size [INFO] [stdout] --> tests/instruction_test.rs:103:40 [INFO] [stdout] | [INFO] [stdout] 103 | assert_eq!(Instruction::decode(0b10001_000 + operand), Adc(operand)); [INFO] [stdout] | ^^^^^^^^^^^ help: consider: `0b1000_1000` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unusual_byte_groupings [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: digits of hex, binary or octal literal not in groups of equal size [INFO] [stdout] --> tests/instruction_test.rs:104:40 [INFO] [stdout] | [INFO] [stdout] 104 | assert_eq!(Instruction::decode(0b10010_000 + operand), Sub(operand)); [INFO] [stdout] | ^^^^^^^^^^^ help: consider: `0b1001_0000` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unusual_byte_groupings [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: digits of hex, binary or octal literal not in groups of equal size [INFO] [stdout] --> tests/instruction_test.rs:105:40 [INFO] [stdout] | [INFO] [stdout] 105 | assert_eq!(Instruction::decode(0b10011_000 + operand), Sbc(operand)); [INFO] [stdout] | ^^^^^^^^^^^ help: consider: `0b1001_1000` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unusual_byte_groupings [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: digits of hex, binary or octal literal not in groups of equal size [INFO] [stdout] --> tests/instruction_test.rs:106:40 [INFO] [stdout] | [INFO] [stdout] 106 | assert_eq!(Instruction::decode(0b10100_000 + operand), And(operand)); [INFO] [stdout] | ^^^^^^^^^^^ help: consider: `0b1010_0000` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unusual_byte_groupings [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: digits of hex, binary or octal literal not in groups of equal size [INFO] [stdout] --> tests/instruction_test.rs:107:40 [INFO] [stdout] | [INFO] [stdout] 107 | assert_eq!(Instruction::decode(0b10101_000 + operand), Xor(operand)); [INFO] [stdout] | ^^^^^^^^^^^ help: consider: `0b1010_1000` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unusual_byte_groupings [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: digits of hex, binary or octal literal not in groups of equal size [INFO] [stdout] --> tests/instruction_test.rs:108:40 [INFO] [stdout] | [INFO] [stdout] 108 | assert_eq!(Instruction::decode(0b10110_000 + operand), Or(operand)); [INFO] [stdout] | ^^^^^^^^^^^ help: consider: `0b1011_0000` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unusual_byte_groupings [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: digits of hex, binary or octal literal not in groups of equal size [INFO] [stdout] --> tests/instruction_test.rs:109:40 [INFO] [stdout] | [INFO] [stdout] 109 | assert_eq!(Instruction::decode(0b10111_000 + operand), Cmp(operand)); [INFO] [stdout] | ^^^^^^^^^^^ help: consider: `0b1011_1000` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unusual_byte_groupings [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: digits of hex, binary or octal literal not in groups of equal size [INFO] [stdout] --> tests/instruction_test.rs:115:36 [INFO] [stdout] | [INFO] [stdout] 115 | assert_eq!(Instruction::decode(0b11000_110), Addn); [INFO] [stdout] | ^^^^^^^^^^^ help: consider: `0b1100_0110` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unusual_byte_groupings [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: digits of hex, binary or octal literal not in groups of equal size [INFO] [stdout] --> tests/instruction_test.rs:116:36 [INFO] [stdout] | [INFO] [stdout] 116 | assert_eq!(Instruction::decode(0b11001_110), Adcn); [INFO] [stdout] | ^^^^^^^^^^^ help: consider: `0b1100_1110` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unusual_byte_groupings [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: digits of hex, binary or octal literal not in groups of equal size [INFO] [stdout] --> tests/instruction_test.rs:117:36 [INFO] [stdout] | [INFO] [stdout] 117 | assert_eq!(Instruction::decode(0b11010_110), Subn); [INFO] [stdout] | ^^^^^^^^^^^ help: consider: `0b1101_0110` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unusual_byte_groupings [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: digits of hex, binary or octal literal not in groups of equal size [INFO] [stdout] --> tests/instruction_test.rs:118:36 [INFO] [stdout] | [INFO] [stdout] 118 | assert_eq!(Instruction::decode(0b11011_110), Sbcn); [INFO] [stdout] | ^^^^^^^^^^^ help: consider: `0b1101_1110` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unusual_byte_groupings [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: digits of hex, binary or octal literal not in groups of equal size [INFO] [stdout] --> tests/instruction_test.rs:119:36 [INFO] [stdout] | [INFO] [stdout] 119 | assert_eq!(Instruction::decode(0b11100_110), Andn); [INFO] [stdout] | ^^^^^^^^^^^ help: consider: `0b1110_0110` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unusual_byte_groupings [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: digits of hex, binary or octal literal not in groups of equal size [INFO] [stdout] --> tests/instruction_test.rs:120:36 [INFO] [stdout] | [INFO] [stdout] 120 | assert_eq!(Instruction::decode(0b11101_110), Xorn); [INFO] [stdout] | ^^^^^^^^^^^ help: consider: `0b1110_1110` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unusual_byte_groupings [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: digits of hex, binary or octal literal not in groups of equal size [INFO] [stdout] --> tests/instruction_test.rs:121:36 [INFO] [stdout] | [INFO] [stdout] 121 | assert_eq!(Instruction::decode(0b11110_110), Orn); [INFO] [stdout] | ^^^^^^^^^^^ help: consider: `0b1111_0110` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unusual_byte_groupings [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: digits of hex, binary or octal literal not in groups of equal size [INFO] [stdout] --> tests/instruction_test.rs:122:36 [INFO] [stdout] | [INFO] [stdout] 122 | assert_eq!(Instruction::decode(0b11111_110), Cmpn); [INFO] [stdout] | ^^^^^^^^^^^ help: consider: `0b1111_1110` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unusual_byte_groupings [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: digits of hex, binary or octal literal not in groups of equal size [INFO] [stdout] --> tests/instruction_test.rs:127:40 [INFO] [stdout] | [INFO] [stdout] 127 | assert_eq!(Instruction::decode(0b110_00_000 + cond), RETcc(i)); [INFO] [stdout] | ^^^^^^^^^^^^ help: consider: `0b1100_0000` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unusual_byte_groupings [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: digits of hex, binary or octal literal not in groups of equal size [INFO] [stdout] --> tests/instruction_test.rs:128:40 [INFO] [stdout] | [INFO] [stdout] 128 | assert_eq!(Instruction::decode(0b110_00_010 + cond), JPccnn(i)); [INFO] [stdout] | ^^^^^^^^^^^^ help: consider: `0b1100_0010` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unusual_byte_groupings [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: digits of hex, binary or octal literal not in groups of equal size [INFO] [stdout] --> tests/instruction_test.rs:129:40 [INFO] [stdout] | [INFO] [stdout] 129 | assert_eq!(Instruction::decode(0b110_00_100 + cond), CALLccnn(i)); [INFO] [stdout] | ^^^^^^^^^^^^ help: consider: `0b1100_0100` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unusual_byte_groupings [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: digits of hex, binary or octal literal not in groups of equal size [INFO] [stdout] --> tests/instruction_test.rs:131:36 [INFO] [stdout] | [INFO] [stdout] 131 | assert_eq!(Instruction::decode(0b110_01_001), RET); [INFO] [stdout] | ^^^^^^^^^^^^ help: consider: `0b1100_1001` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unusual_byte_groupings [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: digits of hex, binary or octal literal not in groups of equal size [INFO] [stdout] --> tests/instruction_test.rs:132:36 [INFO] [stdout] | [INFO] [stdout] 132 | assert_eq!(Instruction::decode(0b110_11_001), RETI); [INFO] [stdout] | ^^^^^^^^^^^^ help: consider: `0b1101_1001` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unusual_byte_groupings [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: digits of hex, binary or octal literal not in groups of equal size [INFO] [stdout] --> tests/instruction_test.rs:133:36 [INFO] [stdout] | [INFO] [stdout] 133 | assert_eq!(Instruction::decode(0b110_00_011), JPnn); [INFO] [stdout] | ^^^^^^^^^^^^ help: consider: `0b1100_0011` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unusual_byte_groupings [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: digits of hex, binary or octal literal not in groups of equal size [INFO] [stdout] --> tests/instruction_test.rs:134:36 [INFO] [stdout] | [INFO] [stdout] 134 | assert_eq!(Instruction::decode(0b111_01_001), JPHL); [INFO] [stdout] | ^^^^^^^^^^^^ help: consider: `0b1110_1001` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unusual_byte_groupings [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: digits of hex, binary or octal literal not in groups of equal size [INFO] [stdout] --> tests/instruction_test.rs:135:36 [INFO] [stdout] | [INFO] [stdout] 135 | assert_eq!(Instruction::decode(0b110_01_101), CALLnn); [INFO] [stdout] | ^^^^^^^^^^^^ help: consider: `0b1100_1101` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unusual_byte_groupings [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: digits of hex, binary or octal literal not in groups of equal size [INFO] [stdout] --> tests/instruction_test.rs:144:40 [INFO] [stdout] | [INFO] [stdout] 144 | assert_eq!(Instruction::decode(0b11_00_0001 + (i << 4)), POPrr(i)); [INFO] [stdout] | ^^^^^^^^^^^^ help: consider: `0b1100_0001` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unusual_byte_groupings [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: digits of hex, binary or octal literal not in groups of equal size [INFO] [stdout] --> tests/instruction_test.rs:145:40 [INFO] [stdout] | [INFO] [stdout] 145 | assert_eq!(Instruction::decode(0b11_00_0101 + (i << 4)), PUSHrr(i)); [INFO] [stdout] | ^^^^^^^^^^^^ help: consider: `0b1100_0101` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unusual_byte_groupings [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: digits of hex, binary or octal literal not in groups of equal size [INFO] [stdout] --> tests/instruction_test.rs:152:36 [INFO] [stdout] | [INFO] [stdout] 152 | assert_eq!(Instruction::decode(0b111_000_10), LDH(true, false)); [INFO] [stdout] | ^^^^^^^^^^^^ help: consider: `0b1110_0010` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unusual_byte_groupings [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: digits of hex, binary or octal literal not in groups of equal size [INFO] [stdout] --> tests/instruction_test.rs:153:36 [INFO] [stdout] | [INFO] [stdout] 153 | assert_eq!(Instruction::decode(0b111_000_00), LDH(true, true)); [INFO] [stdout] | ^^^^^^^^^^^^ help: consider: `0b1110_0000` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unusual_byte_groupings [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: digits of hex, binary or octal literal not in groups of equal size [INFO] [stdout] --> tests/instruction_test.rs:154:36 [INFO] [stdout] | [INFO] [stdout] 154 | assert_eq!(Instruction::decode(0b111_100_10), LDH(false, false)); [INFO] [stdout] | ^^^^^^^^^^^^ help: consider: `0b1111_0010` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unusual_byte_groupings [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: digits of hex, binary or octal literal not in groups of equal size [INFO] [stdout] --> tests/instruction_test.rs:155:36 [INFO] [stdout] | [INFO] [stdout] 155 | assert_eq!(Instruction::decode(0b111_100_00), LDH(false, true)); [INFO] [stdout] | ^^^^^^^^^^^^ help: consider: `0b1111_0000` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unusual_byte_groupings [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: digits of hex, binary or octal literal not in groups of equal size [INFO] [stdout] --> tests/instruction_test.rs:158:36 [INFO] [stdout] | [INFO] [stdout] 158 | assert_eq!(Instruction::decode(0b111_010_10), LDAwNNa(true)); [INFO] [stdout] | ^^^^^^^^^^^^ help: consider: `0b1110_1010` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unusual_byte_groupings [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: digits of hex, binary or octal literal not in groups of equal size [INFO] [stdout] --> tests/instruction_test.rs:159:36 [INFO] [stdout] | [INFO] [stdout] 159 | assert_eq!(Instruction::decode(0b111_110_10), LDAwNNa(false)); [INFO] [stdout] | ^^^^^^^^^^^^ help: consider: `0b1111_1010` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unusual_byte_groupings [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: digits of hex, binary or octal literal not in groups of equal size [INFO] [stdout] --> tests/instruction_test.rs:174:43 [INFO] [stdout] | [INFO] [stdout] 174 | assert_eq!(Instruction::decode_cb(0b00000_000 + operand), RLCr(operand)); [INFO] [stdout] | ^^^^^^^^^^^ help: consider: `0b0000_0000` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unusual_byte_groupings [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: digits of hex, binary or octal literal not in groups of equal size [INFO] [stdout] --> tests/instruction_test.rs:175:43 [INFO] [stdout] | [INFO] [stdout] 175 | assert_eq!(Instruction::decode_cb(0b00001_000 + operand), RRCr(operand)); [INFO] [stdout] | ^^^^^^^^^^^ help: consider: `0b0000_1000` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unusual_byte_groupings [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: digits of hex, binary or octal literal not in groups of equal size [INFO] [stdout] --> tests/instruction_test.rs:176:43 [INFO] [stdout] | [INFO] [stdout] 176 | assert_eq!(Instruction::decode_cb(0b00010_000 + operand), RLr(operand)); [INFO] [stdout] | ^^^^^^^^^^^ help: consider: `0b0001_0000` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unusual_byte_groupings [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: digits of hex, binary or octal literal not in groups of equal size [INFO] [stdout] --> tests/instruction_test.rs:177:43 [INFO] [stdout] | [INFO] [stdout] 177 | assert_eq!(Instruction::decode_cb(0b00011_000 + operand), RRr(operand)); [INFO] [stdout] | ^^^^^^^^^^^ help: consider: `0b0001_1000` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unusual_byte_groupings [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: digits of hex, binary or octal literal not in groups of equal size [INFO] [stdout] --> tests/instruction_test.rs:178:43 [INFO] [stdout] | [INFO] [stdout] 178 | assert_eq!(Instruction::decode_cb(0b00100_000 + operand), SLAr(operand)); [INFO] [stdout] | ^^^^^^^^^^^ help: consider: `0b0010_0000` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unusual_byte_groupings [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: digits of hex, binary or octal literal not in groups of equal size [INFO] [stdout] --> tests/instruction_test.rs:179:43 [INFO] [stdout] | [INFO] [stdout] 179 | assert_eq!(Instruction::decode_cb(0b00101_000 + operand), SRAr(operand)); [INFO] [stdout] | ^^^^^^^^^^^ help: consider: `0b0010_1000` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unusual_byte_groupings [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: digits of hex, binary or octal literal not in groups of equal size [INFO] [stdout] --> tests/instruction_test.rs:180:43 [INFO] [stdout] | [INFO] [stdout] 180 | assert_eq!(Instruction::decode_cb(0b00110_000 + operand), SWAPr(operand)); [INFO] [stdout] | ^^^^^^^^^^^ help: consider: `0b0011_0000` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unusual_byte_groupings [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: digits of hex, binary or octal literal not in groups of equal size [INFO] [stdout] --> tests/instruction_test.rs:181:43 [INFO] [stdout] | [INFO] [stdout] 181 | assert_eq!(Instruction::decode_cb(0b00111_000 + operand), SRLr(operand)); [INFO] [stdout] | ^^^^^^^^^^^ help: consider: `0b0011_1000` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unusual_byte_groupings [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit expression [INFO] [stdout] --> src/console/cpu.rs:151:17 [INFO] [stdout] | [INFO] [stdout] 151 | () [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/console/cpu.rs:839:13 [INFO] [stdout] | [INFO] [stdout] 839 | () [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] [INFO] [stdout] [INFO] [stdout] warning: unused import: `super::regids::IF` [INFO] [stdout] --> src/console/ppu.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use super::regids::IF; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `sdl2::pixels::Color` [INFO] [stdout] --> src/console/ppu.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use sdl2::pixels::Color; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `sdl2::rect::Point` [INFO] [stdout] --> src/console/ppu.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | use sdl2::rect::Point; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Canvas` [INFO] [stdout] --> src/console/ppu.rs:8:20 [INFO] [stdout] | [INFO] [stdout] 8 | use sdl2::render::{Canvas, Texture}; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `sdl2::surface::Surface` [INFO] [stdout] --> src/console/ppu.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | use sdl2::surface::Surface; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `sdl2::video::Window` [INFO] [stdout] --> src/console/ppu.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | use sdl2::video::Window; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `super::regids::*` [INFO] [stdout] --> src/console/apu.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use super::regids::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `AudioSpecDesired` [INFO] [stdout] --> src/console/apu.rs:5:34 [INFO] [stdout] | [INFO] [stdout] 5 | use sdl2::audio::{AudioCallback, AudioSpecDesired}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::sync::atomic::AtomicU64` [INFO] [stdout] --> src/console.rs:19:5 [INFO] [stdout] | [INFO] [stdout] 19 | use std::sync::atomic::AtomicU64; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::sync::mpsc` [INFO] [stdout] --> src/console.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | use std::sync::mpsc; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::sync::mpsc::channel` [INFO] [stdout] --> src/console.rs:22:5 [INFO] [stdout] | [INFO] [stdout] 22 | use std::sync::mpsc::channel; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::sync::mpsc::Receiver` [INFO] [stdout] --> src/console.rs:23:5 [INFO] [stdout] | [INFO] [stdout] 23 | use std::sync::mpsc::Receiver; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::sync::mpsc::Sender` [INFO] [stdout] --> src/console.rs:24:5 [INFO] [stdout] | [INFO] [stdout] 24 | use std::sync::mpsc::Sender; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::thread::JoinHandle` [INFO] [stdout] --> src/console.rs:29:5 [INFO] [stdout] | [INFO] [stdout] 29 | use std::thread::JoinHandle; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> tests/instruction_test.rs:15:9 [INFO] [stdout] | [INFO] [stdout] 15 | opcode = opcode + 0b00_01_0000 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `opcode += 0b00_01_0000` [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] --> tests/instruction_test.rs:23:9 [INFO] [stdout] | [INFO] [stdout] 23 | opcode = opcode + 0b00_01_0000 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `opcode += 0b00_01_0000` [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] --> tests/instruction_test.rs:31:9 [INFO] [stdout] | [INFO] [stdout] 31 | opcode = opcode + 0b00_01_0000 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `opcode += 0b00_01_0000` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> tests/instruction_test.rs:174:43 [INFO] [stdout] | [INFO] [stdout] 174 | assert_eq!(Instruction::decode_cb(0b00000_000 + operand), RLCr(operand)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `operand` [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: unused variable: `y_flip` [INFO] [stdout] --> src/console/ppu.rs:230:41 [INFO] [stdout] | [INFO] [stdout] 230 | fn mix_bytes_obj(low: u8, high: u8, y_flip: bool, x_flip: bool) -> [u8; 8] { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_y_flip` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `pace` [INFO] [stdout] --> src/console/apu.rs:55:13 [INFO] [stdout] | [INFO] [stdout] 55 | let pace = nr10 & 0b01110000 >> 4; [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_pace` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `env_dir` [INFO] [stdout] --> src/console/apu.rs:65:13 [INFO] [stdout] | [INFO] [stdout] 65 | let env_dir = nr12 & 0b00001000 >> 3; [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_env_dir` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `sweep_pace` [INFO] [stdout] --> src/console/apu.rs:66:13 [INFO] [stdout] | [INFO] [stdout] 66 | let sweep_pace = nr12 & 0b00000111; [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_sweep_pace` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `trigger` [INFO] [stdout] --> src/console/apu.rs:71:13 [INFO] [stdout] | [INFO] [stdout] 71 | let trigger = nr14 & 0b10000000 >> 7; [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_trigger` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `length_en` [INFO] [stdout] --> src/console/apu.rs:72:13 [INFO] [stdout] | [INFO] [stdout] 72 | let length_en = nr14 & 0b01000000 >> 6; [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_length_en` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value captured by `clock_timer` is never read [INFO] [stdout] --> src/console.rs:188:17 [INFO] [stdout] | [INFO] [stdout] 188 | clock_timer = Instant::now(); [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: did you mean to capture by reference instead? [INFO] [stdout] = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `clock_timer` is never read [INFO] [stdout] --> src/console.rs:188:17 [INFO] [stdout] | [INFO] [stdout] 188 | clock_timer = Instant::now(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `clock_timer` [INFO] [stdout] --> src/console.rs:158:13 [INFO] [stdout] | [INFO] [stdout] 158 | let mut clock_timer = Instant::now(); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_clock_timer` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `stop` [INFO] [stdout] --> src/console.rs:227:13 [INFO] [stdout] | [INFO] [stdout] 227 | let stop = Arc::new(AtomicBool::new(false)); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_stop` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `byte` [INFO] [stdout] --> src/console.rs:303:17 [INFO] [stdout] | [INFO] [stdout] 303 | let byte = data[i]; [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_byte` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `PerfError` is never constructed [INFO] [stdout] --> src/console.rs:51:8 [INFO] [stdout] | [INFO] [stdout] 51 | struct PerfError { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `PerfTimer` is never constructed [INFO] [stdout] --> src/console.rs:62:8 [INFO] [stdout] | [INFO] [stdout] 62 | struct PerfTimer { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `start`, `end`, and `avg` are never used [INFO] [stdout] --> src/console.rs:69:8 [INFO] [stdout] | [INFO] [stdout] 68 | impl PerfTimer { [INFO] [stdout] | --------------------------------- associated items in this implementation [INFO] [stdout] 69 | fn new() -> PerfTimer { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 76 | fn start(&mut self) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 79 | fn end(&mut self) -> Result<(), PerfError> { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 96 | fn avg(&self) -> f64 { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `run_cpu` is never used [INFO] [stdout] --> src/console.rs:157:8 [INFO] [stdout] | [INFO] [stdout] 147 | impl GameBoy { [INFO] [stdout] | ------------ method in this implementation [INFO] [stdout] ... [INFO] [stdout] 157 | fn run_cpu(&mut self, stop_signal: Arc, clock: Arc<(Mutex, Condvar)>) -> thread::JoinHandle<()> { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `set_carry_flags` is never used [INFO] [stdout] --> src/console/cpu.rs:655:8 [INFO] [stdout] | [INFO] [stdout] 42 | impl SharpSM83 { [INFO] [stdout] | -------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 655 | fn set_carry_flags(&mut self, carry: bool, half_carry: bool) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `DMA` is never used [INFO] [stdout] --> src/console/ppu.rs:31:7 [INFO] [stdout] | [INFO] [stdout] 31 | const DMA: u16 = 0xFF46; [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `OBJ_EN` is never used [INFO] [stdout] --> src/console/ppu.rs:44:7 [INFO] [stdout] | [INFO] [stdout] 44 | const OBJ_EN: u8 = 1 << 1; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `LYC_INT_SEL` is never used [INFO] [stdout] --> src/console/ppu.rs:48:7 [INFO] [stdout] | [INFO] [stdout] 48 | const LYC_INT_SEL: u8 = 1 << 6; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `M2_INT_SEL` is never used [INFO] [stdout] --> src/console/ppu.rs:49:7 [INFO] [stdout] | [INFO] [stdout] 49 | const M2_INT_SEL: u8 = 1 << 5; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `M1_INT_SEL` is never used [INFO] [stdout] --> src/console/ppu.rs:50:7 [INFO] [stdout] | [INFO] [stdout] 50 | const M1_INT_SEL: u8 = 1 << 4; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `M0_INT_SEL` is never used [INFO] [stdout] --> src/console/ppu.rs:51:7 [INFO] [stdout] | [INFO] [stdout] 51 | const M0_INT_SEL: u8 = 1 << 3; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `LYC_EQ_LY` is never used [INFO] [stdout] --> src/console/ppu.rs:52:7 [INFO] [stdout] | [INFO] [stdout] 52 | const LYC_EQ_LY: u8 = 1 << 2; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `PPU_MODE` is never used [INFO] [stdout] --> src/console/ppu.rs:53:7 [INFO] [stdout] | [INFO] [stdout] 53 | const PPU_MODE: u8 = 0b11; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `sprite_prio` is never read [INFO] [stdout] --> src/console/ppu.rs:81:9 [INFO] [stdout] | [INFO] [stdout] 78 | struct Pixel { [INFO] [stdout] | ----- field in this struct [INFO] [stdout] ... [INFO] [stdout] 81 | pub sprite_prio: u8, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Pixel` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `channel3_pos` is never read [INFO] [stdout] --> src/console/apu.rs:37:5 [INFO] [stdout] | [INFO] [stdout] 31 | pub struct Apu { [INFO] [stdout] | --- field in this struct [INFO] [stdout] ... [INFO] [stdout] 37 | channel3_pos: u8, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Apu` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `pc_ret` [INFO] [stdout] --> tests/cpu_test.rs:300:9 [INFO] [stdout] | [INFO] [stdout] 300 | let pc_ret = cpu.pc; [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_pc_ret` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/console/cpu/instruction.rs:142:9 [INFO] [stdout] | [INFO] [stdout] 142 | / return if opcode == 0x00 { [INFO] [stdout] 143 | | NOP [INFO] [stdout] 144 | | } else if opcode == 0x10 { [INFO] [stdout] 145 | | STOP [INFO] [stdout] ... | [INFO] [stdout] 339 | | ErrInstr { opcode } [INFO] [stdout] 340 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 142 ~ if opcode == 0x00 { [INFO] [stdout] 143 + NOP [INFO] [stdout] 144 + } else if opcode == 0x10 { [INFO] [stdout] 145 + STOP [INFO] [stdout] 146 + } else if opcode == 0x76 { [INFO] [stdout] 147 + HALT [INFO] [stdout] 148 + } else if opcode == 0xF3 { [INFO] [stdout] 149 + DI [INFO] [stdout] 150 + } else if opcode == 0xFB { [INFO] [stdout] 151 + EI [INFO] [stdout] 152 + } [INFO] [stdout] 153 + // 8-bit load / store instructions registers [INFO] [stdout] 154 + // LD r r [INFO] [stdout] 155 + else if op_x == 0b01 { [INFO] [stdout] 156 + LDRwR(op_y, op_z) [INFO] [stdout] 157 + } [INFO] [stdout] 158 + // LD r n [INFO] [stdout] 159 + else if op_x == 0b00 && op_z == 0b110 { [INFO] [stdout] 160 + LDRwN(op_y) [INFO] [stdout] 161 + } [INFO] [stdout] 162 + // LDH [INFO] [stdout] 163 + // 0xE0, 0xE2, 0xF0, 0xF2 [INFO] [stdout] 164 + // 0b1110_0000 [INFO] [stdout] 165 + // 0b1110_0010 [INFO] [stdout] 166 + // 0b1111_0000 [INFO] [stdout] 167 + // 0b1111_0010 [INFO] [stdout] 168 + else if op_x == 0b11 [INFO] [stdout] 169 + && (op_y == 0b110 || op_y == 0b100) [INFO] [stdout] 170 + && (op_z == 0b000 || op_z == 0b010) [INFO] [stdout] 171 + { [INFO] [stdout] 172 + LDH(op_y == 0b100, op_z == 0b000) [INFO] [stdout] 173 + } [INFO] [stdout] 174 + // LD A (nn) [INFO] [stdout] 175 + else if op_x == 0b11 && op_y & 0b101 == 0b101 && op_z == 0b010 { [INFO] [stdout] 176 + LDAwNNa(op_y == 0b101) [INFO] [stdout] 177 + } [INFO] [stdout] 178 + // LD (rr) A, LD A (rr) [INFO] [stdout] 179 + else if op_x == 0b00 && op_z == 0b010 { [INFO] [stdout] 180 + if op_q == 0b1 { [INFO] [stdout] 181 + LDAwRRa(op_p) [INFO] [stdout] 182 + } else { [INFO] [stdout] 183 + LDRRawA(op_p) [INFO] [stdout] 184 + } [INFO] [stdout] 185 + } [INFO] [stdout] 186 + // 16-bit loads [INFO] [stdout] 187 + // LD rr nn [INFO] [stdout] 188 + else if op_x == 0b00 && op_q == 0b0 && op_z == 0b001 { [INFO] [stdout] 189 + LDrrnn(op_p) [INFO] [stdout] 190 + } [INFO] [stdout] 191 + //LD (nn) SP [INFO] [stdout] 192 + else if opcode == 0x08 { [INFO] [stdout] 193 + LDNNawSP [INFO] [stdout] 194 + } [INFO] [stdout] 195 + // load stack pointer from HL [INFO] [stdout] 196 + else if opcode == 0xF9 { [INFO] [stdout] 197 + LDSPwHL [INFO] [stdout] 198 + } else if opcode == 0xF8 { [INFO] [stdout] 199 + LDHLwSP [INFO] [stdout] 200 + } [INFO] [stdout] 201 + // push rr [INFO] [stdout] 202 + else if op_x == 0b11 && op_q == 0 && op_z == 0b101 { [INFO] [stdout] 203 + PUSHrr(op_p) [INFO] [stdout] 204 + } [INFO] [stdout] 205 + // pop rr [INFO] [stdout] 206 + else if op_x == 0b11 && op_q == 0 && op_z == 0b001 { [INFO] [stdout] 207 + POPrr(op_p) [INFO] [stdout] 208 + } [INFO] [stdout] 209 + //-----------ARITHMETIC--------- [INFO] [stdout] 210 + [INFO] [stdout] 211 + //add, sub, adc, subc, and, or, xor, cp [INFO] [stdout] 212 + else if op_x == 0b10 && op_q == 0b0 { [INFO] [stdout] 213 + match op_p { [INFO] [stdout] 214 + 0 => Add(op_z), [INFO] [stdout] 215 + 1 => Sub(op_z), [INFO] [stdout] 216 + 2 => And(op_z), [INFO] [stdout] 217 + 3 => Or(op_z), [INFO] [stdout] 218 + _ => ErrInstr { opcode }, [INFO] [stdout] 219 + } [INFO] [stdout] 220 + } else if op_x == 0b10 && op_q == 0b1 { [INFO] [stdout] 221 + match op_p { [INFO] [stdout] 222 + 0 => Adc(op_z), [INFO] [stdout] 223 + 1 => Sbc(op_z), [INFO] [stdout] 224 + 2 => Xor(op_z), [INFO] [stdout] 225 + 3 => Cmp(op_z), [INFO] [stdout] 226 + _ => ErrInstr { opcode }, [INFO] [stdout] 227 + } [INFO] [stdout] 228 + } [INFO] [stdout] 229 + // arithmetic with n [INFO] [stdout] 230 + else if op_x == 0b11 && op_z == 0b110 { [INFO] [stdout] 231 + match op_y { [INFO] [stdout] 232 + 0b000 => Addn, [INFO] [stdout] 233 + 0b001 => Adcn, [INFO] [stdout] 234 + 0b010 => Subn, [INFO] [stdout] 235 + 0b011 => Sbcn, [INFO] [stdout] 236 + 0b100 => Andn, [INFO] [stdout] 237 + 0b101 => Xorn, [INFO] [stdout] 238 + 0b110 => Orn, [INFO] [stdout] 239 + 0b111 => Cmpn, [INFO] [stdout] 240 + _ => ErrInstr { opcode }, [INFO] [stdout] 241 + } [INFO] [stdout] 242 + } [INFO] [stdout] 243 + // increment / decrement registers [INFO] [stdout] 244 + else if op_x == 0b00 && op_z == 0b100 { [INFO] [stdout] 245 + IncR(op_y) [INFO] [stdout] 246 + } else if op_x == 0b00 && op_z == 0b101 { [INFO] [stdout] 247 + DecR(op_y) [INFO] [stdout] 248 + } [INFO] [stdout] 249 + // 16-bit arithmetic [INFO] [stdout] 250 + // ADD SP e [INFO] [stdout] 251 + else if opcode == 0xE8 { [INFO] [stdout] 252 + AddSpE [INFO] [stdout] 253 + } [INFO] [stdout] 254 + // ADD HL rr [INFO] [stdout] 255 + else if op_x == 0b00 && op_q == 0b1 && op_z == 0b001 { [INFO] [stdout] 256 + ADDHLrr(op_p) [INFO] [stdout] 257 + } [INFO] [stdout] 258 + // INC / DEC [INFO] [stdout] 259 + else if op_x == 0b00 && op_q == 0b0 && op_z == 0b011 { [INFO] [stdout] 260 + INCrr(op_p) [INFO] [stdout] 261 + } else if op_x == 0b00 && op_q == 0b1 && op_z == 0b011 { [INFO] [stdout] 262 + DECrr(op_p) [INFO] [stdout] 263 + } else if opcode == 0x27 { [INFO] [stdout] 264 + DAA [INFO] [stdout] 265 + } else if opcode == 0x37 { [INFO] [stdout] 266 + SCF [INFO] [stdout] 267 + } else if opcode == 0x2F { [INFO] [stdout] 268 + CPL [INFO] [stdout] 269 + } else if opcode == 0x3F { [INFO] [stdout] 270 + CCF [INFO] [stdout] 271 + } [INFO] [stdout] 272 + // ROTATES AND SHIFTS & Bit Ops [INFO] [stdout] 273 + // RLCA [INFO] [stdout] 274 + else if opcode == 0x07 { [INFO] [stdout] 275 + RLCA [INFO] [stdout] 276 + } [INFO] [stdout] 277 + // RLA [INFO] [stdout] 278 + else if opcode == 0x17 { [INFO] [stdout] 279 + RLA [INFO] [stdout] 280 + } [INFO] [stdout] 281 + // RRCA [INFO] [stdout] 282 + else if opcode == 0x0F { [INFO] [stdout] 283 + RRCA [INFO] [stdout] 284 + } [INFO] [stdout] 285 + // RRA [INFO] [stdout] 286 + else if opcode == 0x1F { [INFO] [stdout] 287 + RRA [INFO] [stdout] 288 + } [INFO] [stdout] 289 + // prefix CB [INFO] [stdout] 290 + else if opcode == 0xCB { [INFO] [stdout] 291 + CB [INFO] [stdout] 292 + } [INFO] [stdout] 293 + //--------CONTROL FLOW--------- [INFO] [stdout] 294 + [INFO] [stdout] 295 + //Jump nn [INFO] [stdout] 296 + else if opcode == 0b1100_0011 { [INFO] [stdout] 297 + JPnn [INFO] [stdout] 298 + } [INFO] [stdout] 299 + //jump HL [INFO] [stdout] 300 + else if opcode == 0b1110_1001 { [INFO] [stdout] 301 + JPHL [INFO] [stdout] 302 + } [INFO] [stdout] 303 + //jump cc, nn [INFO] [stdout] 304 + else if op_x == 0b11 && op_y & 0b100 == 0b000 && op_z == 0b010 { [INFO] [stdout] 305 + JPccnn(cc) [INFO] [stdout] 306 + } [INFO] [stdout] 307 + // JR e [INFO] [stdout] 308 + else if opcode == 0x18 { [INFO] [stdout] 309 + JRe [INFO] [stdout] 310 + } [INFO] [stdout] 311 + //JR cc, e [INFO] [stdout] 312 + else if op_x == 0b00 && (op_y & 0b100 == 0b100) && op_z == 0b000 { [INFO] [stdout] 313 + JRcce(cc) [INFO] [stdout] 314 + } [INFO] [stdout] 315 + // CALL nn [INFO] [stdout] 316 + else if opcode == 0xCD { [INFO] [stdout] 317 + CALLnn [INFO] [stdout] 318 + } [INFO] [stdout] 319 + //CALL cc, nn [INFO] [stdout] 320 + else if op_x == 0b11 && op_y & 0b100 == 0b000 && op_z == 0b100 { [INFO] [stdout] 321 + CALLccnn(cc) [INFO] [stdout] 322 + } [INFO] [stdout] 323 + //RET [INFO] [stdout] 324 + else if opcode == 0xC9 { [INFO] [stdout] 325 + RET [INFO] [stdout] 326 + } [INFO] [stdout] 327 + //RET cc [INFO] [stdout] 328 + else if op_x == 0b11 && op_y & 0b100 == 0b000 && op_z == 0b000 { [INFO] [stdout] 329 + RETcc(cc) [INFO] [stdout] 330 + } [INFO] [stdout] 331 + //RETI [INFO] [stdout] 332 + else if opcode == 0xD9 { [INFO] [stdout] 333 + RETI [INFO] [stdout] 334 + } [INFO] [stdout] 335 + //RST n [INFO] [stdout] 336 + else if op_x == 0b11 && op_z == 0b111 { [INFO] [stdout] 337 + RSTn(op_y) [INFO] [stdout] 338 + } else { [INFO] [stdout] 339 + ErrInstr { opcode } [INFO] [stdout] 340 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion is always `true` [INFO] [stdout] --> tests/cpu_test.rs:52:21 [INFO] [stdout] | [INFO] [stdout] 52 | assert!(true); // somehow check for halt being true [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove the assertion [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] = note: `#[warn(clippy::assertions_on_constants)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/console/cpu/instruction.rs:349:9 [INFO] [stdout] | [INFO] [stdout] 349 | / return match op_x { [INFO] [stdout] 350 | | //these are all the rotates [INFO] [stdout] 351 | | 0b00 => match op_y { [INFO] [stdout] 352 | | 0b000 => RLCr(op_z), [INFO] [stdout] ... | [INFO] [stdout] 367 | | _ => ErrInstr { opcode }, [INFO] [stdout] 368 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 349 ~ match op_x { [INFO] [stdout] 350 + //these are all the rotates [INFO] [stdout] 351 + 0b00 => match op_y { [INFO] [stdout] 352 + 0b000 => RLCr(op_z), [INFO] [stdout] 353 + 0b001 => RRCr(op_z), [INFO] [stdout] 354 + 0b010 => RLr(op_z), [INFO] [stdout] 355 + 0b011 => RRr(op_z), [INFO] [stdout] 356 + 0b100 => SLAr(op_z), [INFO] [stdout] 357 + 0b101 => SRAr(op_z), [INFO] [stdout] 358 + 0b110 => SWAPr(op_z), [INFO] [stdout] 359 + 0b111 => SRLr(op_z), [INFO] [stdout] 360 + _ => ErrInstr { opcode }, [INFO] [stdout] 361 + }, [INFO] [stdout] 362 + [INFO] [stdout] 363 + //rest are bit instructions [INFO] [stdout] 364 + 0b01 => BITnr { n: op_y, r: op_z }, [INFO] [stdout] 365 + 0b10 => RESnr { n: op_y, r: op_z }, [INFO] [stdout] 366 + 0b11 => SETnr { n: op_y, r: op_z }, [INFO] [stdout] 367 + _ => ErrInstr { opcode }, [INFO] [stdout] 368 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `SharpSM83` [INFO] [stdout] --> src/console/cpu.rs:53:5 [INFO] [stdout] | [INFO] [stdout] 53 | / pub fn new() -> SharpSM83 { [INFO] [stdout] 54 | | [INFO] [stdout] 55 | | SharpSM83 { [INFO] [stdout] 56 | | a: 0x00, [INFO] [stdout] ... | [INFO] [stdout] 78 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 42 + impl Default for SharpSM83 { [INFO] [stdout] 43 + fn default() -> Self { [INFO] [stdout] 44 + Self::new() [INFO] [stdout] 45 + } [INFO] [stdout] 46 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `data` [INFO] [stdout] --> tests/cpu_test.rs:79:14 [INFO] [stdout] | [INFO] [stdout] 79 | for i in 0..data.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 and enumerate() [INFO] [stdout] | [INFO] [stdout] 79 - for i in 0..data.len() { [INFO] [stdout] 79 + for (i, ) in data.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/console/cpu.rs:95:13 [INFO] [stdout] | [INFO] [stdout] 95 | / if self.ime == 1 { [INFO] [stdout] 96 | | if self.handle_interrupt(memory) { self.m_cycles += 4 }; [INFO] [stdout] 97 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 95 ~ if self.ime == 1 [INFO] [stdout] 96 ~ && self.handle_interrupt(memory) { self.m_cycles += 4 }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/console/cpu.rs:355:78 [INFO] [stdout] | [INFO] [stdout] 355 | self.set_flags(self.get_flag_bit(FLAG_Z) == 1, false, false, !(self.get_flag_bit(FLAG_N) == 1)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(self.get_flag_bit(FLAG_N) != 1)` [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: the loop variable `i` is used to index `data` [INFO] [stdout] --> tests/cpu_test.rs:131:14 [INFO] [stdout] | [INFO] [stdout] 131 | for i in 0..data.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] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 131 - for i in 0..data.len() { [INFO] [stdout] 131 + for (i, ) in data.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/console/cpu.rs:358:17 [INFO] [stdout] | [INFO] [stdout] 358 | self.a = self.a ^ 0xFF; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.a ^= 0xFF` [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/console/cpu.rs:365:17 [INFO] [stdout] | [INFO] [stdout] 365 | self.a = self.a << 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.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/console/cpu.rs:378:17 [INFO] [stdout] | [INFO] [stdout] 378 | self.a = self.a >> 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.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: unused variable: `y_flip` [INFO] [stdout] --> src/console/ppu.rs:230:41 [INFO] [stdout] | [INFO] [stdout] 230 | fn mix_bytes_obj(low: u8, high: u8, y_flip: bool, x_flip: bool) -> [u8; 8] { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_y_flip` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/console/cpu.rs:506:51 [INFO] [stdout] | [INFO] [stdout] 506 | RLCr(_) | RLr(_) | SLAr(_) => rv = rv << 1, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `rv <<= 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/console/cpu.rs:507:61 [INFO] [stdout] | [INFO] [stdout] 507 | RRCr(_) | RRr(_) | SRAr(_) | SRLr(_) => rv = rv >> 1, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `rv >>= 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: the loop variable `i` is used to index `data` [INFO] [stdout] --> tests/cpu_test.rs:203:14 [INFO] [stdout] | [INFO] [stdout] 203 | for i in 0..data.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] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 203 - for i in 0..data.len() { [INFO] [stdout] 203 + for (i, ) in data.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/console/cpu.rs:559:9 [INFO] [stdout] | [INFO] [stdout] 559 | / return if !self.rom_control && addr < 0x100 && memory.read(0xFF50) == 0 { [INFO] [stdout] 560 | | self.boot_rom.read(addr) [INFO] [stdout] 561 | | } else { [INFO] [stdout] 562 | | memory.read(addr) [INFO] [stdout] 563 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 559 ~ if !self.rom_control && addr < 0x100 && memory.read(0xFF50) == 0 { [INFO] [stdout] 560 + self.boot_rom.read(addr) [INFO] [stdout] 561 + } else { [INFO] [stdout] 562 + memory.read(addr) [INFO] [stdout] 563 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `data` [INFO] [stdout] --> tests/cpu_test.rs:230:14 [INFO] [stdout] | [INFO] [stdout] 230 | for i in 0..data.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] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 230 - for i in 0..data.len() { [INFO] [stdout] 230 + for (i, ) in data.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `pace` [INFO] [stdout] --> src/console/apu.rs:55:13 [INFO] [stdout] | [INFO] [stdout] 55 | let pace = nr10 & 0b01110000 >> 4; [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_pace` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `env_dir` [INFO] [stdout] --> src/console/apu.rs:65:13 [INFO] [stdout] | [INFO] [stdout] 65 | let env_dir = nr12 & 0b00001000 >> 3; [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_env_dir` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `sweep_pace` [INFO] [stdout] --> src/console/apu.rs:66:13 [INFO] [stdout] | [INFO] [stdout] 66 | let sweep_pace = nr12 & 0b00000111; [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_sweep_pace` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `trigger` [INFO] [stdout] --> src/console/apu.rs:71:13 [INFO] [stdout] | [INFO] [stdout] 71 | let trigger = nr14 & 0b10000000 >> 7; [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_trigger` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `length_en` [INFO] [stdout] --> src/console/apu.rs:72:13 [INFO] [stdout] | [INFO] [stdout] 72 | let length_en = nr14 & 0b01000000 >> 6; [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_length_en` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `data` [INFO] [stdout] --> tests/cpu_test.rs:288:14 [INFO] [stdout] | [INFO] [stdout] 288 | for i in 0..data.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] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 288 - for i in 0..data.len() { [INFO] [stdout] 288 + for (i, ) in data.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value captured by `clock_timer` is never read [INFO] [stdout] --> src/console.rs:188:17 [INFO] [stdout] | [INFO] [stdout] 188 | clock_timer = Instant::now(); [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: did you mean to capture by reference instead? [INFO] [stdout] = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `clock_timer` is never read [INFO] [stdout] --> src/console.rs:188:17 [INFO] [stdout] | [INFO] [stdout] 188 | clock_timer = Instant::now(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `clock_timer` [INFO] [stdout] --> src/console.rs:158:13 [INFO] [stdout] | [INFO] [stdout] 158 | let mut clock_timer = Instant::now(); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_clock_timer` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> tests/cpu_test.rs:314:24 [INFO] [stdout] | [INFO] [stdout] 314 | assert_eq!(cpu.pc, pc_before + 0x0000); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `pc_before` [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: it looks like you're manually copying between slices [INFO] [stdout] --> src/console/memory.rs:40:17 [INFO] [stdout] | [INFO] [stdout] 40 | / for i in 0..min(buffer.len(), size) { [INFO] [stdout] 41 | | data[i] = buffer[i]; [INFO] [stdout] 42 | | } [INFO] [stdout] | |_________________^ help: try replacing the loop by: `data[..min(buffer.len(), size)].copy_from_slice(&buffer[..min(buffer.len(), size)]);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_memcpy [INFO] [stdout] = note: `#[warn(clippy::manual_memcpy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/console/memory.rs:76:12 [INFO] [stdout] | [INFO] [stdout] 76 | if addr >= 0xC000 && addr <= 0xDDFF { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0xC000..=0xDDFF).contains(&addr)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/console/memory.rs:80:12 [INFO] [stdout] | [INFO] [stdout] 80 | if addr >= 0xE000 && addr <= 0xFDFF { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0xE000..=0xFDFF).contains(&addr)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `data` [INFO] [stdout] --> tests/cpu_test.rs:343:14 [INFO] [stdout] | [INFO] [stdout] 343 | for i in 0..data.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] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 343 - for i in 0..data.len() { [INFO] [stdout] 343 + for (i, ) in data.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `stop` [INFO] [stdout] --> src/console.rs:227:13 [INFO] [stdout] | [INFO] [stdout] 227 | let stop = Arc::new(AtomicBool::new(false)); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_stop` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `writeln!` [INFO] [stdout] --> src/console/memory.rs:131:13 [INFO] [stdout] | [INFO] [stdout] 131 | writeln!(f, "")?; [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#writeln_empty_string [INFO] [stdout] = note: `#[warn(clippy::writeln_empty_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `byte` [INFO] [stdout] --> src/console.rs:303:17 [INFO] [stdout] | [INFO] [stdout] 303 | let byte = data[i]; [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_byte` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `usize` is unnecessary [INFO] [stdout] --> src/console/memory.rs:148:25 [INFO] [stdout] | [INFO] [stdout] 148 | for j in 0..16 as usize { [INFO] [stdout] | ^^^^^^^^^^^ help: try: `16_usize` [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: empty string literal in `println!` [INFO] [stdout] --> src/console/memory.rs:151:21 [INFO] [stdout] | [INFO] [stdout] 151 | 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: empty string literal in `println!` [INFO] [stdout] --> src/console/memory.rs:157:13 [INFO] [stdout] | [INFO] [stdout] 157 | 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] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `PPU` [INFO] [stdout] --> src/console/ppu.rs:128:5 [INFO] [stdout] | [INFO] [stdout] 128 | / pub fn new() -> PPU { [INFO] [stdout] 129 | | PPU { [INFO] [stdout] 130 | | dots: 0, [INFO] [stdout] 131 | | mode: 0, [INFO] [stdout] ... | [INFO] [stdout] 155 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 127 + impl Default for PPU { [INFO] [stdout] 128 + fn default() -> Self { [INFO] [stdout] 129 + Self::new() [INFO] [stdout] 130 + } [INFO] [stdout] 131 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `PerfError` is never constructed [INFO] [stdout] --> src/console.rs:51:8 [INFO] [stdout] | [INFO] [stdout] 51 | struct PerfError { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `PerfTimer` is never constructed [INFO] [stdout] --> src/console.rs:62:8 [INFO] [stdout] | [INFO] [stdout] 62 | struct PerfTimer { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `start`, `end`, and `avg` are never used [INFO] [stdout] --> src/console.rs:69:8 [INFO] [stdout] | [INFO] [stdout] 68 | impl PerfTimer { [INFO] [stdout] | --------------------------------- associated items in this implementation [INFO] [stdout] 69 | fn new() -> PerfTimer { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 76 | fn start(&mut self) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 79 | fn end(&mut self) -> Result<(), PerfError> { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 96 | fn avg(&self) -> f64 { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` branch is empty [INFO] [stdout] --> src/console/ppu.rs:274:9 [INFO] [stdout] | [INFO] [stdout] 274 | / if self.mode == 0 { [INFO] [stdout] 275 | | [INFO] [stdout] 276 | | } [INFO] [stdout] | |_________^ help: you can remove it [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_ifs [INFO] [stdout] = note: `#[warn(clippy::needless_ifs)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `run_cpu` is never used [INFO] [stdout] --> src/console.rs:157:8 [INFO] [stdout] | [INFO] [stdout] 147 | impl GameBoy { [INFO] [stdout] | ------------ method in this implementation [INFO] [stdout] ... [INFO] [stdout] 157 | fn run_cpu(&mut self, stop_signal: Arc, clock: Arc<(Mutex, Condvar)>) -> thread::JoinHandle<()> { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `set_carry_flags` is never used [INFO] [stdout] --> src/console/cpu.rs:655:8 [INFO] [stdout] | [INFO] [stdout] 42 | impl SharpSM83 { [INFO] [stdout] | -------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 655 | fn set_carry_flags(&mut self, carry: bool, half_carry: bool) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `DMA` is never used [INFO] [stdout] --> src/console/ppu.rs:31:7 [INFO] [stdout] | [INFO] [stdout] 31 | const DMA: u16 = 0xFF46; [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `OBJ_EN` is never used [INFO] [stdout] --> src/console/ppu.rs:44:7 [INFO] [stdout] | [INFO] [stdout] 44 | const OBJ_EN: u8 = 1 << 1; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `LYC_INT_SEL` is never used [INFO] [stdout] --> src/console/ppu.rs:48:7 [INFO] [stdout] | [INFO] [stdout] 48 | const LYC_INT_SEL: u8 = 1 << 6; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `M2_INT_SEL` is never used [INFO] [stdout] --> src/console/ppu.rs:49:7 [INFO] [stdout] | [INFO] [stdout] 49 | const M2_INT_SEL: u8 = 1 << 5; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `M1_INT_SEL` is never used [INFO] [stdout] --> src/console/ppu.rs:50:7 [INFO] [stdout] | [INFO] [stdout] 50 | const M1_INT_SEL: u8 = 1 << 4; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `M0_INT_SEL` is never used [INFO] [stdout] --> src/console/ppu.rs:51:7 [INFO] [stdout] | [INFO] [stdout] 51 | const M0_INT_SEL: u8 = 1 << 3; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `LYC_EQ_LY` is never used [INFO] [stdout] --> src/console/ppu.rs:52:7 [INFO] [stdout] | [INFO] [stdout] 52 | const LYC_EQ_LY: u8 = 1 << 2; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `PPU_MODE` is never used [INFO] [stdout] --> src/console/ppu.rs:53:7 [INFO] [stdout] | [INFO] [stdout] 53 | const PPU_MODE: u8 = 0b11; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/console/ppu.rs:301:12 [INFO] [stdout] | [INFO] [stdout] 301 | if self.dots % 456 == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace with: `self.dots.is_multiple_of(456)` [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: field `sprite_prio` is never read [INFO] [stdout] --> src/console/ppu.rs:81:9 [INFO] [stdout] | [INFO] [stdout] 78 | struct Pixel { [INFO] [stdout] | ----- field in this struct [INFO] [stdout] ... [INFO] [stdout] 81 | pub sprite_prio: u8, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Pixel` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `channel3_pos` is never read [INFO] [stdout] --> src/console/apu.rs:37:5 [INFO] [stdout] | [INFO] [stdout] 31 | pub struct Apu { [INFO] [stdout] | --- field in this struct [INFO] [stdout] ... [INFO] [stdout] 37 | channel3_pos: u8, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Apu` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `found_objects` [INFO] [stdout] --> src/console/ppu.rs:320:22 [INFO] [stdout] | [INFO] [stdout] 320 | for i in 0..min(found_objects.len(), 10) { [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] 320 - for i in 0..min(found_objects.len(), 10) { [INFO] [stdout] 320 + for in found_objects.iter().take(min(found_objects.len(), 10)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/console/ppu.rs:333:33 [INFO] [stdout] | [INFO] [stdout] 333 | if tile_index < 128 { VB_0 } else { VB_0 } [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/console/ppu.rs:333:47 [INFO] [stdout] | [INFO] [stdout] 333 | if tile_index < 128 { VB_0 } else { VB_0 } [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/console/ppu.rs:437:9 [INFO] [stdout] | [INFO] [stdout] 437 | return self.ly == 153; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 437 - return self.ly == 153; [INFO] [stdout] 437 + self.ly == 153 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the method `update` doesn't need a mutable reference [INFO] [stdout] --> src/console/ppu.rs:445:30 [INFO] [stdout] | [INFO] [stdout] 445 | texture.update(None, &mut self.bg, LCD_WIDTH * 4).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] = note: `#[warn(clippy::unnecessary_mut_passed)]` on by default [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 445 - texture.update(None, &mut self.bg, LCD_WIDTH * 4).unwrap(); [INFO] [stdout] 445 + texture.update(None, &self.bg, LCD_WIDTH * 4).unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `HTimer` [INFO] [stdout] --> src/console/timer.rs:24:5 [INFO] [stdout] | [INFO] [stdout] 24 | / pub fn new() -> HTimer { [INFO] [stdout] 25 | | HTimer { [INFO] [stdout] 26 | | div_dots: 0usize, [INFO] [stdout] 27 | | tima_dots: 0usize, [INFO] [stdout] ... | [INFO] [stdout] 33 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 23 + impl Default for HTimer { [INFO] [stdout] 24 + fn default() -> Self { [INFO] [stdout] 25 + Self::new() [INFO] [stdout] 26 + } [INFO] [stdout] 27 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/console/cpu/instruction.rs:142:9 [INFO] [stdout] | [INFO] [stdout] 142 | / return if opcode == 0x00 { [INFO] [stdout] 143 | | NOP [INFO] [stdout] 144 | | } else if opcode == 0x10 { [INFO] [stdout] 145 | | STOP [INFO] [stdout] ... | [INFO] [stdout] 339 | | ErrInstr { opcode } [INFO] [stdout] 340 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 142 ~ if opcode == 0x00 { [INFO] [stdout] 143 + NOP [INFO] [stdout] 144 + } else if opcode == 0x10 { [INFO] [stdout] 145 + STOP [INFO] [stdout] 146 + } else if opcode == 0x76 { [INFO] [stdout] 147 + HALT [INFO] [stdout] 148 + } else if opcode == 0xF3 { [INFO] [stdout] 149 + DI [INFO] [stdout] 150 + } else if opcode == 0xFB { [INFO] [stdout] 151 + EI [INFO] [stdout] 152 + } [INFO] [stdout] 153 + // 8-bit load / store instructions registers [INFO] [stdout] 154 + // LD r r [INFO] [stdout] 155 + else if op_x == 0b01 { [INFO] [stdout] 156 + LDRwR(op_y, op_z) [INFO] [stdout] 157 + } [INFO] [stdout] 158 + // LD r n [INFO] [stdout] 159 + else if op_x == 0b00 && op_z == 0b110 { [INFO] [stdout] 160 + LDRwN(op_y) [INFO] [stdout] 161 + } [INFO] [stdout] 162 + // LDH [INFO] [stdout] 163 + // 0xE0, 0xE2, 0xF0, 0xF2 [INFO] [stdout] 164 + // 0b1110_0000 [INFO] [stdout] 165 + // 0b1110_0010 [INFO] [stdout] 166 + // 0b1111_0000 [INFO] [stdout] 167 + // 0b1111_0010 [INFO] [stdout] 168 + else if op_x == 0b11 [INFO] [stdout] 169 + && (op_y == 0b110 || op_y == 0b100) [INFO] [stdout] 170 + && (op_z == 0b000 || op_z == 0b010) [INFO] [stdout] 171 + { [INFO] [stdout] 172 + LDH(op_y == 0b100, op_z == 0b000) [INFO] [stdout] 173 + } [INFO] [stdout] 174 + // LD A (nn) [INFO] [stdout] 175 + else if op_x == 0b11 && op_y & 0b101 == 0b101 && op_z == 0b010 { [INFO] [stdout] 176 + LDAwNNa(op_y == 0b101) [INFO] [stdout] 177 + } [INFO] [stdout] 178 + // LD (rr) A, LD A (rr) [INFO] [stdout] 179 + else if op_x == 0b00 && op_z == 0b010 { [INFO] [stdout] 180 + if op_q == 0b1 { [INFO] [stdout] 181 + LDAwRRa(op_p) [INFO] [stdout] 182 + } else { [INFO] [stdout] 183 + LDRRawA(op_p) [INFO] [stdout] 184 + } [INFO] [stdout] 185 + } [INFO] [stdout] 186 + // 16-bit loads [INFO] [stdout] 187 + // LD rr nn [INFO] [stdout] 188 + else if op_x == 0b00 && op_q == 0b0 && op_z == 0b001 { [INFO] [stdout] 189 + LDrrnn(op_p) [INFO] [stdout] 190 + } [INFO] [stdout] 191 + //LD (nn) SP [INFO] [stdout] 192 + else if opcode == 0x08 { [INFO] [stdout] 193 + LDNNawSP [INFO] [stdout] 194 + } [INFO] [stdout] 195 + // load stack pointer from HL [INFO] [stdout] 196 + else if opcode == 0xF9 { [INFO] [stdout] 197 + LDSPwHL [INFO] [stdout] 198 + } else if opcode == 0xF8 { [INFO] [stdout] 199 + LDHLwSP [INFO] [stdout] 200 + } [INFO] [stdout] 201 + // push rr [INFO] [stdout] 202 + else if op_x == 0b11 && op_q == 0 && op_z == 0b101 { [INFO] [stdout] 203 + PUSHrr(op_p) [INFO] [stdout] 204 + } [INFO] [stdout] 205 + // pop rr [INFO] [stdout] 206 + else if op_x == 0b11 && op_q == 0 && op_z == 0b001 { [INFO] [stdout] 207 + POPrr(op_p) [INFO] [stdout] 208 + } [INFO] [stdout] 209 + //-----------ARITHMETIC--------- [INFO] [stdout] 210 + [INFO] [stdout] 211 + //add, sub, adc, subc, and, or, xor, cp [INFO] [stdout] 212 + else if op_x == 0b10 && op_q == 0b0 { [INFO] [stdout] 213 + match op_p { [INFO] [stdout] 214 + 0 => Add(op_z), [INFO] [stdout] 215 + 1 => Sub(op_z), [INFO] [stdout] 216 + 2 => And(op_z), [INFO] [stdout] 217 + 3 => Or(op_z), [INFO] [stdout] 218 + _ => ErrInstr { opcode }, [INFO] [stdout] 219 + } [INFO] [stdout] 220 + } else if op_x == 0b10 && op_q == 0b1 { [INFO] [stdout] 221 + match op_p { [INFO] [stdout] 222 + 0 => Adc(op_z), [INFO] [stdout] 223 + 1 => Sbc(op_z), [INFO] [stdout] 224 + 2 => Xor(op_z), [INFO] [stdout] 225 + 3 => Cmp(op_z), [INFO] [stdout] 226 + _ => ErrInstr { opcode }, [INFO] [stdout] 227 + } [INFO] [stdout] 228 + } [INFO] [stdout] 229 + // arithmetic with n [INFO] [stdout] 230 + else if op_x == 0b11 && op_z == 0b110 { [INFO] [stdout] 231 + match op_y { [INFO] [stdout] 232 + 0b000 => Addn, [INFO] [stdout] 233 + 0b001 => Adcn, [INFO] [stdout] 234 + 0b010 => Subn, [INFO] [stdout] 235 + 0b011 => Sbcn, [INFO] [stdout] 236 + 0b100 => Andn, [INFO] [stdout] 237 + 0b101 => Xorn, [INFO] [stdout] 238 + 0b110 => Orn, [INFO] [stdout] 239 + 0b111 => Cmpn, [INFO] [stdout] 240 + _ => ErrInstr { opcode }, [INFO] [stdout] 241 + } [INFO] [stdout] 242 + } [INFO] [stdout] 243 + // increment / decrement registers [INFO] [stdout] 244 + else if op_x == 0b00 && op_z == 0b100 { [INFO] [stdout] 245 + IncR(op_y) [INFO] [stdout] 246 + } else if op_x == 0b00 && op_z == 0b101 { [INFO] [stdout] 247 + DecR(op_y) [INFO] [stdout] 248 + } [INFO] [stdout] 249 + // 16-bit arithmetic [INFO] [stdout] 250 + // ADD SP e [INFO] [stdout] 251 + else if opcode == 0xE8 { [INFO] [stdout] 252 + AddSpE [INFO] [stdout] 253 + } [INFO] [stdout] 254 + // ADD HL rr [INFO] [stdout] 255 + else if op_x == 0b00 && op_q == 0b1 && op_z == 0b001 { [INFO] [stdout] 256 + ADDHLrr(op_p) [INFO] [stdout] 257 + } [INFO] [stdout] 258 + // INC / DEC [INFO] [stdout] 259 + else if op_x == 0b00 && op_q == 0b0 && op_z == 0b011 { [INFO] [stdout] 260 + INCrr(op_p) [INFO] [stdout] 261 + } else if op_x == 0b00 && op_q == 0b1 && op_z == 0b011 { [INFO] [stdout] 262 + DECrr(op_p) [INFO] [stdout] 263 + } else if opcode == 0x27 { [INFO] [stdout] 264 + DAA [INFO] [stdout] 265 + } else if opcode == 0x37 { [INFO] [stdout] 266 + SCF [INFO] [stdout] 267 + } else if opcode == 0x2F { [INFO] [stdout] 268 + CPL [INFO] [stdout] 269 + } else if opcode == 0x3F { [INFO] [stdout] 270 + CCF [INFO] [stdout] 271 + } [INFO] [stdout] 272 + // ROTATES AND SHIFTS & Bit Ops [INFO] [stdout] 273 + // RLCA [INFO] [stdout] 274 + else if opcode == 0x07 { [INFO] [stdout] 275 + RLCA [INFO] [stdout] 276 + } [INFO] [stdout] 277 + // RLA [INFO] [stdout] 278 + else if opcode == 0x17 { [INFO] [stdout] 279 + RLA [INFO] [stdout] 280 + } [INFO] [stdout] 281 + // RRCA [INFO] [stdout] 282 + else if opcode == 0x0F { [INFO] [stdout] 283 + RRCA [INFO] [stdout] 284 + } [INFO] [stdout] 285 + // RRA [INFO] [stdout] 286 + else if opcode == 0x1F { [INFO] [stdout] 287 + RRA [INFO] [stdout] 288 + } [INFO] [stdout] 289 + // prefix CB [INFO] [stdout] 290 + else if opcode == 0xCB { [INFO] [stdout] 291 + CB [INFO] [stdout] 292 + } [INFO] [stdout] 293 + //--------CONTROL FLOW--------- [INFO] [stdout] 294 + [INFO] [stdout] 295 + //Jump nn [INFO] [stdout] 296 + else if opcode == 0b1100_0011 { [INFO] [stdout] 297 + JPnn [INFO] [stdout] 298 + } [INFO] [stdout] 299 + //jump HL [INFO] [stdout] 300 + else if opcode == 0b1110_1001 { [INFO] [stdout] 301 + JPHL [INFO] [stdout] 302 + } [INFO] [stdout] 303 + //jump cc, nn [INFO] [stdout] 304 + else if op_x == 0b11 && op_y & 0b100 == 0b000 && op_z == 0b010 { [INFO] [stdout] 305 + JPccnn(cc) [INFO] [stdout] 306 + } [INFO] [stdout] 307 + // JR e [INFO] [stdout] 308 + else if opcode == 0x18 { [INFO] [stdout] 309 + JRe [INFO] [stdout] 310 + } [INFO] [stdout] 311 + //JR cc, e [INFO] [stdout] 312 + else if op_x == 0b00 && (op_y & 0b100 == 0b100) && op_z == 0b000 { [INFO] [stdout] 313 + JRcce(cc) [INFO] [stdout] 314 + } [INFO] [stdout] 315 + // CALL nn [INFO] [stdout] 316 + else if opcode == 0xCD { [INFO] [stdout] 317 + CALLnn [INFO] [stdout] 318 + } [INFO] [stdout] 319 + //CALL cc, nn [INFO] [stdout] 320 + else if op_x == 0b11 && op_y & 0b100 == 0b000 && op_z == 0b100 { [INFO] [stdout] 321 + CALLccnn(cc) [INFO] [stdout] 322 + } [INFO] [stdout] 323 + //RET [INFO] [stdout] 324 + else if opcode == 0xC9 { [INFO] [stdout] 325 + RET [INFO] [stdout] 326 + } [INFO] [stdout] 327 + //RET cc [INFO] [stdout] 328 + else if op_x == 0b11 && op_y & 0b100 == 0b000 && op_z == 0b000 { [INFO] [stdout] 329 + RETcc(cc) [INFO] [stdout] 330 + } [INFO] [stdout] 331 + //RETI [INFO] [stdout] 332 + else if opcode == 0xD9 { [INFO] [stdout] 333 + RETI [INFO] [stdout] 334 + } [INFO] [stdout] 335 + //RST n [INFO] [stdout] 336 + else if op_x == 0b11 && op_z == 0b111 { [INFO] [stdout] 337 + RSTn(op_y) [INFO] [stdout] 338 + } else { [INFO] [stdout] 339 + ErrInstr { opcode } [INFO] [stdout] 340 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/console/cpu/instruction.rs:349:9 [INFO] [stdout] | [INFO] [stdout] 349 | / return match op_x { [INFO] [stdout] 350 | | //these are all the rotates [INFO] [stdout] 351 | | 0b00 => match op_y { [INFO] [stdout] 352 | | 0b000 => RLCr(op_z), [INFO] [stdout] ... | [INFO] [stdout] 367 | | _ => ErrInstr { opcode }, [INFO] [stdout] 368 | | }; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 349 ~ match op_x { [INFO] [stdout] 350 + //these are all the rotates [INFO] [stdout] 351 + 0b00 => match op_y { [INFO] [stdout] 352 + 0b000 => RLCr(op_z), [INFO] [stdout] 353 + 0b001 => RRCr(op_z), [INFO] [stdout] 354 + 0b010 => RLr(op_z), [INFO] [stdout] 355 + 0b011 => RRr(op_z), [INFO] [stdout] 356 + 0b100 => SLAr(op_z), [INFO] [stdout] 357 + 0b101 => SRAr(op_z), [INFO] [stdout] 358 + 0b110 => SWAPr(op_z), [INFO] [stdout] 359 + 0b111 => SRLr(op_z), [INFO] [stdout] 360 + _ => ErrInstr { opcode }, [INFO] [stdout] 361 + }, [INFO] [stdout] 362 + [INFO] [stdout] 363 + //rest are bit instructions [INFO] [stdout] 364 + 0b01 => BITnr { n: op_y, r: op_z }, [INFO] [stdout] 365 + 0b10 => RESnr { n: op_y, r: op_z }, [INFO] [stdout] 366 + 0b11 => SETnr { n: op_y, r: op_z }, [INFO] [stdout] 367 + _ => ErrInstr { opcode }, [INFO] [stdout] 368 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `SharpSM83` [INFO] [stdout] --> src/console/cpu.rs:53:5 [INFO] [stdout] | [INFO] [stdout] 53 | / pub fn new() -> SharpSM83 { [INFO] [stdout] 54 | | [INFO] [stdout] 55 | | SharpSM83 { [INFO] [stdout] 56 | | a: 0x00, [INFO] [stdout] ... | [INFO] [stdout] 78 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 42 + impl Default for SharpSM83 { [INFO] [stdout] 43 + fn default() -> Self { [INFO] [stdout] 44 + Self::new() [INFO] [stdout] 45 + } [INFO] [stdout] 46 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/console/cpu.rs:95:13 [INFO] [stdout] | [INFO] [stdout] 95 | / if self.ime == 1 { [INFO] [stdout] 96 | | if self.handle_interrupt(memory) { self.m_cycles += 4 }; [INFO] [stdout] 97 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 95 ~ if self.ime == 1 [INFO] [stdout] 96 ~ && self.handle_interrupt(memory) { self.m_cycles += 4 }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: importing legacy numeric constants [INFO] [stdout] --> src/console.rs:34:5 [INFO] [stdout] | [INFO] [stdout] 34 | use std::u128; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `u128::` will resolve to the respective associated constant [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/console/cpu.rs:355:78 [INFO] [stdout] | [INFO] [stdout] 355 | self.set_flags(self.get_flag_bit(FLAG_Z) == 1, false, false, !(self.get_flag_bit(FLAG_N) == 1)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(self.get_flag_bit(FLAG_N) != 1)` [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: unneeded `return` statement [INFO] [stdout] --> src/console.rs:80:9 [INFO] [stdout] | [INFO] [stdout] 80 | / return match self.start { [INFO] [stdout] 81 | | None => { [INFO] [stdout] 82 | | println!("err"); [INFO] [stdout] 83 | | Err(PerfError{value: String::from("Must start timer before ending")}) [INFO] [stdout] ... | [INFO] [stdout] 94 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 80 ~ match self.start { [INFO] [stdout] 81 + None => { [INFO] [stdout] 82 + println!("err"); [INFO] [stdout] 83 + Err(PerfError{value: String::from("Must start timer before ending")}) [INFO] [stdout] 84 + }, [INFO] [stdout] 85 + Some(start) => { [INFO] [stdout] 86 + self.times[self.index] = start.elapsed().as_nanos(); [INFO] [stdout] 87 + self.index += 1; [INFO] [stdout] 88 + if self.index >= N { [INFO] [stdout] 89 + self.index = 0; [INFO] [stdout] 90 + } [INFO] [stdout] 91 + self.start = None; [INFO] [stdout] 92 + Ok(()) [INFO] [stdout] 93 + } [INFO] [stdout] 94 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `GBIO` [INFO] [stdout] --> src/console.rs:113:5 [INFO] [stdout] | [INFO] [stdout] 113 | / pub fn new() -> GBIO { [INFO] [stdout] 114 | | GBIO { [INFO] [stdout] 115 | | timer: HTimer::new(), [INFO] [stdout] 116 | | joypad: Joypad::default(), [INFO] [stdout] ... | [INFO] [stdout] 119 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 112 + impl Default for GBIO { [INFO] [stdout] 113 + fn default() -> Self { [INFO] [stdout] 114 + Self::new() [INFO] [stdout] 115 + } [INFO] [stdout] 116 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/console.rs:122:36 [INFO] [stdout] | [INFO] [stdout] 122 | self.joypad.update(memory, &keys); [INFO] [stdout] | ^^^^^ help: change this to: `keys` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/console.rs:243:28 [INFO] [stdout] | [INFO] [stdout] 243 | cpu.update(&mut memory); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `memory` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/console.rs:245:43 [INFO] [stdout] | [INFO] [stdout] 245 | cpu_cycles += cpu.run(&mut memory); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `memory` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/console/cpu.rs:358:17 [INFO] [stdout] | [INFO] [stdout] 358 | self.a = self.a ^ 0xFF; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.a ^= 0xFF` [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/console/cpu.rs:365:17 [INFO] [stdout] | [INFO] [stdout] 365 | self.a = self.a << 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.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/console/cpu.rs:378:17 [INFO] [stdout] | [INFO] [stdout] 378 | self.a = self.a >> 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.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: the loop variable `i` is only used to index `data` [INFO] [stdout] --> src/console.rs:302:18 [INFO] [stdout] | [INFO] [stdout] 302 | for i in 0..data.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] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 302 - for i in 0..data.len() { [INFO] [stdout] 302 + for in &data { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `buffer` [INFO] [stdout] --> src/console.rs:332:26 [INFO] [stdout] | [INFO] [stdout] 332 | for i in 0..buffer.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] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 332 - for i in 0..buffer.len() { [INFO] [stdout] 332 + for (i, ) in buffer.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `buffer` [INFO] [stdout] --> src/console.rs:338:30 [INFO] [stdout] | [INFO] [stdout] 338 | for i in 0xA000..0xBFFF { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 338 - for i in 0xA000..0xBFFF { [INFO] [stdout] 338 + for (i, ) in buffer.iter().enumerate().take(0xBFFF).skip(0xA000) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `buffer` [INFO] [stdout] --> src/console.rs:347:30 [INFO] [stdout] | [INFO] [stdout] 347 | for i in 0..min(buffer.len(), 0x10000) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 347 - for i in 0..min(buffer.len(), 0x10000) { [INFO] [stdout] 347 + for (i, ) in buffer.iter().enumerate().take(min(buffer.len(), 0x10000)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `logo` [INFO] [stdout] --> src/console.rs:351:30 [INFO] [stdout] | [INFO] [stdout] 351 | for i in 0..logo.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] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 351 - for i in 0..logo.len() { [INFO] [stdout] 351 + for (i, ) in logo.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/console/cpu.rs:506:51 [INFO] [stdout] | [INFO] [stdout] 506 | RLCr(_) | RLr(_) | SLAr(_) => rv = rv << 1, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `rv <<= 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/console/cpu.rs:507:61 [INFO] [stdout] | [INFO] [stdout] 507 | RRCr(_) | RRr(_) | SRAr(_) | SRLr(_) => rv = rv >> 1, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `rv >>= 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: unneeded `return` statement [INFO] [stdout] --> src/console/cpu.rs:559:9 [INFO] [stdout] | [INFO] [stdout] 559 | / return if !self.rom_control && addr < 0x100 && memory.read(0xFF50) == 0 { [INFO] [stdout] 560 | | self.boot_rom.read(addr) [INFO] [stdout] 561 | | } else { [INFO] [stdout] 562 | | memory.read(addr) [INFO] [stdout] 563 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 559 ~ if !self.rom_control && addr < 0x100 && memory.read(0xFF50) == 0 { [INFO] [stdout] 560 + self.boot_rom.read(addr) [INFO] [stdout] 561 + } else { [INFO] [stdout] 562 + memory.read(addr) [INFO] [stdout] 563 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: it looks like you're manually copying between slices [INFO] [stdout] --> src/console/memory.rs:40:17 [INFO] [stdout] | [INFO] [stdout] 40 | / for i in 0..min(buffer.len(), size) { [INFO] [stdout] 41 | | data[i] = buffer[i]; [INFO] [stdout] 42 | | } [INFO] [stdout] | |_________________^ help: try replacing the loop by: `data[..min(buffer.len(), size)].copy_from_slice(&buffer[..min(buffer.len(), size)]);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_memcpy [INFO] [stdout] = note: `#[warn(clippy::manual_memcpy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/console/memory.rs:76:12 [INFO] [stdout] | [INFO] [stdout] 76 | if addr >= 0xC000 && addr <= 0xDDFF { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0xC000..=0xDDFF).contains(&addr)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/console/memory.rs:80:12 [INFO] [stdout] | [INFO] [stdout] 80 | if addr >= 0xE000 && addr <= 0xFDFF { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0xE000..=0xFDFF).contains(&addr)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `writeln!` [INFO] [stdout] --> src/console/memory.rs:131:13 [INFO] [stdout] | [INFO] [stdout] 131 | writeln!(f, "")?; [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#writeln_empty_string [INFO] [stdout] = note: `#[warn(clippy::writeln_empty_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `usize` is unnecessary [INFO] [stdout] --> src/console/memory.rs:148:25 [INFO] [stdout] | [INFO] [stdout] 148 | for j in 0..16 as usize { [INFO] [stdout] | ^^^^^^^^^^^ help: try: `16_usize` [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: empty string literal in `println!` [INFO] [stdout] --> src/console/memory.rs:151:21 [INFO] [stdout] | [INFO] [stdout] 151 | 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: empty string literal in `println!` [INFO] [stdout] --> src/console/memory.rs:157:13 [INFO] [stdout] | [INFO] [stdout] 157 | 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] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `PPU` [INFO] [stdout] --> src/console/ppu.rs:128:5 [INFO] [stdout] | [INFO] [stdout] 128 | / pub fn new() -> PPU { [INFO] [stdout] 129 | | PPU { [INFO] [stdout] 130 | | dots: 0, [INFO] [stdout] 131 | | mode: 0, [INFO] [stdout] ... | [INFO] [stdout] 155 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 127 + impl Default for PPU { [INFO] [stdout] 128 + fn default() -> Self { [INFO] [stdout] 129 + Self::new() [INFO] [stdout] 130 + } [INFO] [stdout] 131 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` branch is empty [INFO] [stdout] --> src/console/ppu.rs:274:9 [INFO] [stdout] | [INFO] [stdout] 274 | / if self.mode == 0 { [INFO] [stdout] 275 | | [INFO] [stdout] 276 | | } [INFO] [stdout] | |_________^ help: you can remove it [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_ifs [INFO] [stdout] = note: `#[warn(clippy::needless_ifs)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/console/ppu.rs:301:12 [INFO] [stdout] | [INFO] [stdout] 301 | if self.dots % 456 == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace with: `self.dots.is_multiple_of(456)` [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: the loop variable `i` is only used to index `found_objects` [INFO] [stdout] --> src/console/ppu.rs:320:22 [INFO] [stdout] | [INFO] [stdout] 320 | for i in 0..min(found_objects.len(), 10) { [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] 320 - for i in 0..min(found_objects.len(), 10) { [INFO] [stdout] 320 + for in found_objects.iter().take(min(found_objects.len(), 10)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/console/ppu.rs:333:33 [INFO] [stdout] | [INFO] [stdout] 333 | if tile_index < 128 { VB_0 } else { VB_0 } [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/console/ppu.rs:333:47 [INFO] [stdout] | [INFO] [stdout] 333 | if tile_index < 128 { VB_0 } else { VB_0 } [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/console/ppu.rs:437:9 [INFO] [stdout] | [INFO] [stdout] 437 | return self.ly == 153; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 437 - return self.ly == 153; [INFO] [stdout] 437 + self.ly == 153 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the method `update` doesn't need a mutable reference [INFO] [stdout] --> src/console/ppu.rs:445:30 [INFO] [stdout] | [INFO] [stdout] 445 | texture.update(None, &mut self.bg, LCD_WIDTH * 4).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] = note: `#[warn(clippy::unnecessary_mut_passed)]` on by default [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 445 - texture.update(None, &mut self.bg, LCD_WIDTH * 4).unwrap(); [INFO] [stdout] 445 + texture.update(None, &self.bg, LCD_WIDTH * 4).unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `HTimer` [INFO] [stdout] --> src/console/timer.rs:24:5 [INFO] [stdout] | [INFO] [stdout] 24 | / pub fn new() -> HTimer { [INFO] [stdout] 25 | | HTimer { [INFO] [stdout] 26 | | div_dots: 0usize, [INFO] [stdout] 27 | | tima_dots: 0usize, [INFO] [stdout] ... | [INFO] [stdout] 33 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 23 + impl Default for HTimer { [INFO] [stdout] 24 + fn default() -> Self { [INFO] [stdout] 25 + Self::new() [INFO] [stdout] 26 + } [INFO] [stdout] 27 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: importing legacy numeric constants [INFO] [stdout] --> src/console.rs:34:5 [INFO] [stdout] | [INFO] [stdout] 34 | use std::u128; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `u128::` will resolve to the respective associated constant [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/console.rs:80:9 [INFO] [stdout] | [INFO] [stdout] 80 | / return match self.start { [INFO] [stdout] 81 | | None => { [INFO] [stdout] 82 | | println!("err"); [INFO] [stdout] 83 | | Err(PerfError{value: String::from("Must start timer before ending")}) [INFO] [stdout] ... | [INFO] [stdout] 94 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 80 ~ match self.start { [INFO] [stdout] 81 + None => { [INFO] [stdout] 82 + println!("err"); [INFO] [stdout] 83 + Err(PerfError{value: String::from("Must start timer before ending")}) [INFO] [stdout] 84 + }, [INFO] [stdout] 85 + Some(start) => { [INFO] [stdout] 86 + self.times[self.index] = start.elapsed().as_nanos(); [INFO] [stdout] 87 + self.index += 1; [INFO] [stdout] 88 + if self.index >= N { [INFO] [stdout] 89 + self.index = 0; [INFO] [stdout] 90 + } [INFO] [stdout] 91 + self.start = None; [INFO] [stdout] 92 + Ok(()) [INFO] [stdout] 93 + } [INFO] [stdout] 94 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `GBIO` [INFO] [stdout] --> src/console.rs:113:5 [INFO] [stdout] | [INFO] [stdout] 113 | / pub fn new() -> GBIO { [INFO] [stdout] 114 | | GBIO { [INFO] [stdout] 115 | | timer: HTimer::new(), [INFO] [stdout] 116 | | joypad: Joypad::default(), [INFO] [stdout] ... | [INFO] [stdout] 119 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 112 + impl Default for GBIO { [INFO] [stdout] 113 + fn default() -> Self { [INFO] [stdout] 114 + Self::new() [INFO] [stdout] 115 + } [INFO] [stdout] 116 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/console.rs:122:36 [INFO] [stdout] | [INFO] [stdout] 122 | self.joypad.update(memory, &keys); [INFO] [stdout] | ^^^^^ help: change this to: `keys` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/console.rs:243:28 [INFO] [stdout] | [INFO] [stdout] 243 | cpu.update(&mut memory); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `memory` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/console.rs:245:43 [INFO] [stdout] | [INFO] [stdout] 245 | cpu_cycles += cpu.run(&mut memory); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `memory` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `data` [INFO] [stdout] --> src/console.rs:302:18 [INFO] [stdout] | [INFO] [stdout] 302 | for i in 0..data.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] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 302 - for i in 0..data.len() { [INFO] [stdout] 302 + for in &data { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `buffer` [INFO] [stdout] --> src/console.rs:332:26 [INFO] [stdout] | [INFO] [stdout] 332 | for i in 0..buffer.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] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 332 - for i in 0..buffer.len() { [INFO] [stdout] 332 + for (i, ) in buffer.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `buffer` [INFO] [stdout] --> src/console.rs:338:30 [INFO] [stdout] | [INFO] [stdout] 338 | for i in 0xA000..0xBFFF { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 338 - for i in 0xA000..0xBFFF { [INFO] [stdout] 338 + for (i, ) in buffer.iter().enumerate().take(0xBFFF).skip(0xA000) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `buffer` [INFO] [stdout] --> src/console.rs:347:30 [INFO] [stdout] | [INFO] [stdout] 347 | for i in 0..min(buffer.len(), 0x10000) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 347 - for i in 0..min(buffer.len(), 0x10000) { [INFO] [stdout] 347 + for (i, ) in buffer.iter().enumerate().take(min(buffer.len(), 0x10000)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `logo` [INFO] [stdout] --> src/console.rs:351:30 [INFO] [stdout] | [INFO] [stdout] 351 | for i in 0..logo.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] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 351 - for i in 0..logo.len() { [INFO] [stdout] 351 + for (i, ) in logo.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [optimized + debuginfo] target(s) in 9.26s [INFO] running `Command { std: "docker" "inspect" "1dd0726e580dede75c88fc5eec68fa05ace86f5d103ac5e9d2f5c404be691b64", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "1dd0726e580dede75c88fc5eec68fa05ace86f5d103ac5e9d2f5c404be691b64", kill_on_drop: false }` [INFO] [stdout] 1dd0726e580dede75c88fc5eec68fa05ace86f5d103ac5e9d2f5c404be691b64