[INFO] cloning repository https://github.com/Dhi13man/gb-emulator [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/Dhi13man/gb-emulator" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FDhi13man%2Fgb-emulator", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FDhi13man%2Fgb-emulator'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] ef4d5299998d76a35e90a40f102906b921a25f81 [INFO] linting Dhi13man/gb-emulator against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FDhi13man%2Fgb-emulator" "/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/Dhi13man/gb-emulator [INFO] finished tweaking git repo https://github.com/Dhi13man/gb-emulator [INFO] tweaked toml for git repo https://github.com/Dhi13man/gb-emulator written to /workspace/builds/worker-1-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/Dhi13man/gb-emulator on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/Dhi13man/gb-emulator already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded jiff-static v0.2.20 [INFO] [stderr] Downloaded jiff v0.2.20 [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] bfdcc8a01fb924195e3d96c9b9bfe3b3383ebb59fc06304f972a2f66e4806344 [INFO] running `Command { std: "docker" "start" "-a" "bfdcc8a01fb924195e3d96c9b9bfe3b3383ebb59fc06304f972a2f66e4806344", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "bfdcc8a01fb924195e3d96c9b9bfe3b3383ebb59fc06304f972a2f66e4806344", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "bfdcc8a01fb924195e3d96c9b9bfe3b3383ebb59fc06304f972a2f66e4806344", kill_on_drop: false }` [INFO] [stdout] bfdcc8a01fb924195e3d96c9b9bfe3b3383ebb59fc06304f972a2f66e4806344 [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] c9ba3ecd3abaed732420b3cb1187274a59c8f5120635da88143b5742d78219f9 [INFO] running `Command { std: "docker" "start" "-a" "c9ba3ecd3abaed732420b3cb1187274a59c8f5120635da88143b5742d78219f9", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.181 [INFO] [stderr] Compiling unicode-ident v1.0.23 [INFO] [stderr] Compiling rustix v1.1.3 [INFO] [stderr] Checking linux-raw-sys v0.11.0 [INFO] [stderr] Checking dlib v0.5.2 [INFO] [stderr] Compiling wayland-sys v0.31.8 [INFO] [stderr] Compiling cc v1.2.55 [INFO] [stderr] Compiling quick-xml v0.38.4 [INFO] [stderr] Compiling zerocopy v0.8.39 [INFO] [stderr] Compiling proc-macro2 v1.0.106 [INFO] [stderr] Compiling wayland-client v0.31.12 [INFO] [stderr] Compiling ahash v0.8.12 [INFO] [stderr] Checking bytemuck v1.25.0 [INFO] [stderr] Compiling rustix v0.38.44 [INFO] [stderr] Checking linux-raw-sys v0.4.15 [INFO] [stderr] Compiling quote v1.0.44 [INFO] [stderr] Compiling ash v0.37.3+1.3.251 [INFO] [stderr] Checking bit-set v0.5.3 [INFO] [stderr] Compiling syn v2.0.115 [INFO] [stderr] Compiling wayland-scanner v0.31.8 [INFO] [stderr] Compiling wgpu-hal v0.19.5 [INFO] [stderr] Checking getrandom v0.3.4 [INFO] [stderr] Checking parking_lot_core v0.9.12 [INFO] [stderr] Checking gpu-descriptor-types v0.1.2 [INFO] [stderr] Checking gpu-alloc-types v0.3.0 [INFO] [stderr] Checking spirv v0.3.0+sdk-1.3.268.0 [INFO] [stderr] Checking libloading v0.7.4 [INFO] [stderr] Checking memchr v2.8.0 [INFO] [stderr] Compiling wayland-backend v0.3.12 [INFO] [stderr] Checking aho-corasick v1.1.4 [INFO] [stderr] Checking gpu-alloc v0.6.0 [INFO] [stderr] Checking parking_lot v0.12.5 [INFO] [stderr] Checking khronos-egl v6.0.0 [INFO] [stderr] Compiling wgpu-core v0.19.4 [INFO] [stderr] Compiling alsa-sys v0.3.1 [INFO] [stderr] Checking wgpu-types v0.19.2 [INFO] [stderr] Compiling smithay-client-toolkit v0.19.2 [INFO] [stderr] Checking xcursor v0.3.10 [INFO] [stderr] Checking ttf-parser v0.25.1 [INFO] [stderr] Checking regex-syntax v0.8.9 [INFO] [stderr] Compiling thiserror-impl v1.0.69 [INFO] [stderr] Checking xkeysym v0.2.1 [INFO] [stderr] Checking cursor-icon v1.2.0 [INFO] [stderr] Checking tiny-skia-path v0.11.4 [INFO] [stderr] Checking regex-automata v0.4.14 [INFO] [stderr] Checking memmap2 v0.9.9 [INFO] [stderr] Checking safe_arch v0.7.4 [INFO] [stderr] Compiling wgpu v0.19.4 [INFO] [stderr] Checking hashbrown v0.14.5 [INFO] [stderr] Compiling x11-dl v2.21.0 [INFO] [stderr] Checking ab_glyph_rasterizer v0.1.10 [INFO] [stderr] Checking thiserror v1.0.69 [INFO] [stderr] Checking naga v0.19.2 [INFO] [stderr] Compiling winit v0.30.12 [INFO] [stderr] Checking wide v0.7.33 [INFO] [stderr] Checking gpu-descriptor v0.2.4 [INFO] [stderr] Checking tiny-skia v0.11.4 [INFO] [stderr] Checking x11rb-protocol v0.13.2 [INFO] [stderr] Checking owned_ttf_parser v0.25.1 [INFO] [stderr] Checking ab_glyph v0.2.32 [INFO] [stderr] Checking polling v3.11.0 [INFO] [stderr] Checking calloop v0.13.0 [INFO] [stderr] Checking regex v1.12.3 [INFO] [stderr] Checking wayland-csd-frame v0.3.0 [INFO] [stderr] Checking gethostname v1.1.0 [INFO] [stderr] Checking tracing-core v0.1.36 [INFO] [stderr] Checking env_filter v1.0.0 [INFO] [stderr] Checking ultraviolet v0.9.2 [INFO] [stderr] Checking anstream v0.6.21 [INFO] [stderr] Checking alsa v0.9.1 [INFO] [stderr] Checking tracing v0.1.44 [INFO] [stderr] Checking xkbcommon-dl v0.4.2 [INFO] [stderr] Checking jiff v0.2.20 [INFO] [stderr] Checking dpi v0.1.2 [INFO] [stderr] Checking wayland-protocols v0.32.10 [INFO] [stderr] Checking calloop-wayland-source v0.3.0 [INFO] [stderr] Checking wayland-cursor v0.31.12 [INFO] [stderr] Checking pollster v0.3.0 [INFO] [stderr] Checking cpal v0.15.3 [INFO] [stderr] Checking gb-core v0.1.0 (/opt/rustwide/workdir/gb-core) [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> gb-core/src/apu/mod.rs:20:1 [INFO] [stdout] | [INFO] [stdout] 20 | / /// FF30-FF3F: Wave RAM [INFO] [stdout] 21 | | [INFO] [stdout] | |_^ [INFO] [stdout] 22 | extern crate alloc; [INFO] [stdout] | ------------------ the comment documents this extern crate [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the comment should document the parent module use an inner doc comment [INFO] [stdout] | [INFO] [stdout] 1 ~ //! APU (Audio Processing Unit): Generates the Game Boy's sound output. [INFO] [stdout] 2 ~ //! [INFO] [stdout] 3 ~ //! The DMG APU contains four channels: [INFO] [stdout] 4 ~ //! CH1: Square wave with frequency sweep [INFO] [stdout] 5 ~ //! CH2: Square wave [INFO] [stdout] 6 ~ //! CH3: Programmable wave [INFO] [stdout] 7 ~ //! CH4: Noise (LFSR) [INFO] [stdout] 8 ~ //! [INFO] [stdout] 9 ~ //! All channels are mixed into stereo output via NR50 (master volume) [INFO] [stdout] 10 ~ //! and NR51 (panning) registers. NR52 controls the master power. [INFO] [stdout] 11 ~ //! [INFO] [stdout] 12 ~ //! Audio I/O register map: FF10-FF3F [INFO] [stdout] 13 ~ //! FF10-FF14: CH1 (square with sweep) [INFO] [stdout] 14 ~ //! FF16-FF19: CH2 (square, no sweep; FF15 doesn't exist) [INFO] [stdout] 15 ~ //! FF1A-FF1E: CH3 (wave) [INFO] [stdout] 16 ~ //! FF20-FF23: CH4 (noise) [INFO] [stdout] 17 ~ //! FF24: NR50 (master volume / Vin routing) [INFO] [stdout] 18 ~ //! FF25: NR51 (channel panning) [INFO] [stdout] 19 ~ //! FF26: NR52 (master enable / channel status) [INFO] [stdout] 20 ~ //! FF30-FF3F: Wave RAM [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> gb-core/src/apu/square.rs:8:1 [INFO] [stdout] | [INFO] [stdout] 8 | / /// NRx4: Trigger + Length enable + Frequency high [INFO] [stdout] 9 | | [INFO] [stdout] | |_^ [INFO] [stdout] 10 | /// Duty waveforms: 8 steps each [INFO] [stdout] 11 | const DUTY_TABLE: [[u8; 8]; 4] = [ [INFO] [stdout] | ---------------- the comment documents this constant item [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the comment should document the parent module use an inner doc comment [INFO] [stdout] | [INFO] [stdout] 1 ~ //! Square wave channel, used for both CH1 (with sweep) and CH2 (without sweep). [INFO] [stdout] 2 ~ //! [INFO] [stdout] 3 ~ //! Registers (relative to channel base): [INFO] [stdout] 4 ~ //! NRx0: Sweep (CH1 only) [INFO] [stdout] 5 ~ //! NRx1: Duty + Length [INFO] [stdout] 6 ~ //! NRx2: Volume Envelope [INFO] [stdout] 7 ~ //! NRx3: Frequency low [INFO] [stdout] 8 ~ //! NRx4: Trigger + Length enable + Frequency high [INFO] [stdout] | [INFO] [stdout] help: if the documentation should include the empty line include it in the comment [INFO] [stdout] | [INFO] [stdout] 9 | /// [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> gb-core/src/apu/wave.rs:9:1 [INFO] [stdout] | [INFO] [stdout] 9 | / /// FF30-FF3F: Wave RAM (16 bytes = 32 4-bit samples) [INFO] [stdout] 10 | | [INFO] [stdout] | |_^ [INFO] [stdout] 11 | pub struct WaveChannel { [INFO] [stdout] | ---------------------- the comment documents this struct [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the comment should document the parent module use an inner doc comment [INFO] [stdout] | [INFO] [stdout] 1 ~ //! Wave channel (CH3): Plays samples from a 32-entry wave table. [INFO] [stdout] 2 ~ //! [INFO] [stdout] 3 ~ //! Registers: [INFO] [stdout] 4 ~ //! FF1A (NR30): DAC enable [INFO] [stdout] 5 ~ //! FF1B (NR31): Length [INFO] [stdout] 6 ~ //! FF1C (NR32): Volume code [INFO] [stdout] 7 ~ //! FF1D (NR33): Frequency low [INFO] [stdout] 8 ~ //! FF1E (NR34): Trigger + Length enable + Frequency high [INFO] [stdout] 9 ~ //! FF30-FF3F: Wave RAM (16 bytes = 32 4-bit samples) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> gb-core/src/apu/noise.rs:8:1 [INFO] [stdout] | [INFO] [stdout] 8 | / /// FF23 (NR44): Trigger + Length enable [INFO] [stdout] 9 | | [INFO] [stdout] | |_^ [INFO] [stdout] 10 | /// Divisor table: divisor_code 0 uses 8, not 0. [INFO] [stdout] 11 | const DIVISOR_TABLE: [u32; 8] = [8, 16, 32, 48, 64, 80, 96, 112]; [INFO] [stdout] | ------------------- the comment documents this constant item [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the comment should document the parent module use an inner doc comment [INFO] [stdout] | [INFO] [stdout] 1 ~ //! Noise channel (CH4): Generates pseudo-random noise via a linear feedback [INFO] [stdout] 2 ~ //! shift register (LFSR). [INFO] [stdout] 3 ~ //! [INFO] [stdout] 4 ~ //! Registers: [INFO] [stdout] 5 ~ //! FF20 (NR41): Length [INFO] [stdout] 6 ~ //! FF21 (NR42): Volume Envelope [INFO] [stdout] 7 ~ //! FF22 (NR43): Polynomial counter (clock shift, width mode, divisor code) [INFO] [stdout] 8 ~ //! FF23 (NR44): Trigger + Length enable [INFO] [stdout] | [INFO] [stdout] help: if the documentation should include the empty line include it in the comment [INFO] [stdout] | [INFO] [stdout] 9 | /// [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> gb-core/src/apu/frame_seq.rs:4:1 [INFO] [stdout] | [INFO] [stdout] 4 | / /// (length counters, envelope, sweep) should be clocked each step. [INFO] [stdout] 5 | | [INFO] [stdout] | |_^ [INFO] [stdout] 6 | const FRAME_SEQUENCER_PERIOD: u32 = 8192; [INFO] [stdout] | ---------------------------- the comment documents this constant item [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the comment should document the parent module use an inner doc comment [INFO] [stdout] | [INFO] [stdout] 1 ~ //! Frame sequencer: clocked at 512 Hz (every 8192 T-cycles). [INFO] [stdout] 2 ~ //! [INFO] [stdout] 3 ~ //! Steps through an 8-step pattern that determines which APU components [INFO] [stdout] 4 ~ //! (length counters, envelope, sweep) should be clocked each step. [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> gb-core/src/apu/square.rs:232:17 [INFO] [stdout] | [INFO] [stdout] 232 | / if self.has_sweep { [INFO] [stdout] 233 | | 0x80 // bit 7 unused [INFO] [stdout] 234 | | | (self.sweep_period << 4) [INFO] [stdout] 235 | | | if self.sweep_negate { 0x08 } else { 0 } [INFO] [stdout] ... | [INFO] [stdout] 238 | | 0xFF [INFO] [stdout] 239 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 231 ~ 0 [INFO] [stdout] 232 ~ if self.has_sweep => { [INFO] [stdout] 233 | 0x80 // bit 7 unused [INFO] [stdout] ... [INFO] [stdout] 236 | | self.sweep_shift [INFO] [stdout] 237 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> gb-core/src/apu/square.rs:262:17 [INFO] [stdout] | [INFO] [stdout] 262 | / if self.has_sweep { [INFO] [stdout] 263 | | self.sweep_period = (value >> 4) & 0x07; [INFO] [stdout] 264 | | let new_negate = value & 0x08 != 0; [INFO] [stdout] ... | [INFO] [stdout] 271 | | self.sweep_shift = value & 0x07; [INFO] [stdout] 272 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 261 ~ 0 [INFO] [stdout] 262 ~ if self.has_sweep => { [INFO] [stdout] 263 | self.sweep_period = (value >> 4) & 0x07; [INFO] [stdout] ... [INFO] [stdout] 271 | self.sweep_shift = value & 0x07; [INFO] [stdout] 272 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `WaveChannel` [INFO] [stdout] --> gb-core/src/apu/wave.rs:25:5 [INFO] [stdout] | [INFO] [stdout] 25 | / pub fn new() -> Self { [INFO] [stdout] 26 | | Self { [INFO] [stdout] 27 | | enabled: false, [INFO] [stdout] 28 | | dac_enabled: false, [INFO] [stdout] ... | [INFO] [stdout] 38 | | } [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] 24 + impl Default for WaveChannel { [INFO] [stdout] 25 + fn default() -> Self { [INFO] [stdout] 26 + Self::new() [INFO] [stdout] 27 + } [INFO] [stdout] 28 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `NoiseChannel` [INFO] [stdout] --> gb-core/src/apu/noise.rs:41:5 [INFO] [stdout] | [INFO] [stdout] 41 | / pub fn new() -> Self { [INFO] [stdout] 42 | | Self { [INFO] [stdout] 43 | | enabled: false, [INFO] [stdout] 44 | | dac_enabled: false, [INFO] [stdout] ... | [INFO] [stdout] 62 | | } [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] 40 + impl Default for NoiseChannel { [INFO] [stdout] 41 + fn default() -> Self { [INFO] [stdout] 42 + Self::new() [INFO] [stdout] 43 + } [INFO] [stdout] 44 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `FrameSequencer` [INFO] [stdout] --> gb-core/src/apu/frame_seq.rs:23:5 [INFO] [stdout] | [INFO] [stdout] 23 | / pub fn new() -> Self { [INFO] [stdout] 24 | | Self { [INFO] [stdout] 25 | | step: 0, [INFO] [stdout] 26 | | timer: FRAME_SEQUENCER_PERIOD, [INFO] [stdout] 27 | | } [INFO] [stdout] 28 | | } [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] 22 + impl Default for FrameSequencer { [INFO] [stdout] 23 + fn default() -> Self { [INFO] [stdout] 24 + Self::new() [INFO] [stdout] 25 + } [INFO] [stdout] 26 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Apu` [INFO] [stdout] --> gb-core/src/apu/mod.rs:105:5 [INFO] [stdout] | [INFO] [stdout] 105 | / pub fn new() -> Self { [INFO] [stdout] 106 | | Self::with_sample_rate(DEFAULT_SAMPLE_RATE) [INFO] [stdout] 107 | | } [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] 104 + impl Default for Apu { [INFO] [stdout] 105 + fn default() -> Self { [INFO] [stdout] 106 + Self::new() [INFO] [stdout] 107 + } [INFO] [stdout] 108 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> gb-core/src/cartridge/mbc2.rs:57:9 [INFO] [stdout] | [INFO] [stdout] 57 | / match addr { [INFO] [stdout] 58 | | 0x0000..=0x3FFF => { [INFO] [stdout] ... | [INFO] [stdout] 74 | | _ => {} [INFO] [stdout] 75 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 57 ~ if let 0x0000..=0x3FFF = addr { [INFO] [stdout] 58 + // Bit 8 of the address determines the operation: [INFO] [stdout] 59 ~ // bit 8 == 0 → RAM enable/disable [INFO] [stdout] 60 ~ // bit 8 == 1 → ROM bank select [INFO] [stdout] 61 + if addr & 0x0100 == 0 { [INFO] [stdout] 62 + // RAM enable: any write with low nibble == 0x0A enables. [INFO] [stdout] 63 + self.ram_enabled = (value & 0x0F) == 0x0A; [INFO] [stdout] 64 + } else { [INFO] [stdout] 65 + // ROM bank: only lower 4 bits. Bank 0 maps to 1. [INFO] [stdout] 66 + let mut bank = value & 0x0F; [INFO] [stdout] 67 + if bank == 0 { [INFO] [stdout] 68 + bank = 1; [INFO] [stdout] 69 + } [INFO] [stdout] 70 + self.rom_bank = bank; [INFO] [stdout] 71 + } [INFO] [stdout] 72 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> gb-core/src/cartridge/mod.rs:18:1 [INFO] [stdout] | [INFO] [stdout] 18 | / pub enum Cartridge { [INFO] [stdout] 19 | | NoMbc(NoMbc), [INFO] [stdout] 20 | | Mbc1(Mbc1), [INFO] [stdout] 21 | | Mbc2(Mbc2), [INFO] [stdout] | | ---------- the largest variant contains at least 552 bytes [INFO] [stdout] 22 | | Mbc3(Mbc3), [INFO] [stdout] | | ---------- the second-largest variant contains at least 80 bytes [INFO] [stdout] 23 | | Mbc5(Mbc5), [INFO] [stdout] 24 | | } [INFO] [stdout] | |_^ the entire enum is at least 552 bytes [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant [INFO] [stdout] = note: `#[warn(clippy::large_enum_variant)]` on by default [INFO] [stdout] help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum [INFO] [stdout] | [INFO] [stdout] 21 - Mbc2(Mbc2), [INFO] [stdout] 21 + Mbc2(Box), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this OR pattern can be rewritten using a range [INFO] [stdout] --> gb-core/src/cartridge/mod.rs:48:13 [INFO] [stdout] | [INFO] [stdout] 48 | 0x01 | 0x02 | 0x03 => Cartridge::Mbc1(Mbc1::new(rom, ram_size)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `0x01..=0x03` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_patterns [INFO] [stdout] = note: `#[warn(clippy::manual_range_patterns)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this OR pattern can be rewritten using a range [INFO] [stdout] --> gb-core/src/cartridge/mod.rs:55:13 [INFO] [stdout] | [INFO] [stdout] 55 | 0x0F | 0x10 | 0x11 | 0x12 | 0x13 => Cartridge::Mbc3(Mbc3::new(rom, ram_size)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `0x0F..=0x13` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_patterns [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this OR pattern can be rewritten using a range [INFO] [stdout] --> gb-core/src/cartridge/mod.rs:59:13 [INFO] [stdout] | [INFO] [stdout] 59 | 0x19 | 0x1A | 0x1B | 0x1C | 0x1D | 0x1E => Cartridge::Mbc5(Mbc5::new(rom, ram_size)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `0x19..=0x1E` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_patterns [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Registers` [INFO] [stdout] --> gb-core/src/cpu/registers.rs:46:5 [INFO] [stdout] | [INFO] [stdout] 46 | / pub fn new() -> Self { [INFO] [stdout] 47 | | Self { [INFO] [stdout] 48 | | a: 0x01, [INFO] [stdout] 49 | | f: Flags::from(0xB0), [INFO] [stdout] ... | [INFO] [stdout] 59 | | } [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] 44 + impl Default for Registers { [INFO] [stdout] 45 + fn default() -> Self { [INFO] [stdout] 46 + Self::new() [INFO] [stdout] 47 + } [INFO] [stdout] 48 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: there is no need to manually implement bit rotation [INFO] [stdout] --> gb-core/src/cpu/cb_opcodes.rs:207:22 [INFO] [stdout] | [INFO] [stdout] 207 | let result = (value >> 4) | (value << 4); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: this expression can be rewritten as: `value.rotate_left(4)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_rotate [INFO] [stdout] = note: `#[warn(clippy::manual_rotate)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Cpu` [INFO] [stdout] --> gb-core/src/cpu/mod.rs:28:5 [INFO] [stdout] | [INFO] [stdout] 28 | / pub fn new() -> Self { [INFO] [stdout] 29 | | Self { [INFO] [stdout] 30 | | regs: Registers::new(), [INFO] [stdout] 31 | | state: CpuState::Running, [INFO] [stdout] ... | [INFO] [stdout] 36 | | } [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] 27 + impl Default for Cpu { [INFO] [stdout] 28 + fn default() -> Self { [INFO] [stdout] 29 + Self::new() [INFO] [stdout] 30 + } [INFO] [stdout] 31 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Dma` [INFO] [stdout] --> gb-core/src/dma.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 15 | / pub fn new() -> Self { [INFO] [stdout] 16 | | Self { [INFO] [stdout] 17 | | active: false, [INFO] [stdout] 18 | | source: 0, [INFO] [stdout] ... | [INFO] [stdout] 22 | | } [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] 14 + impl Default for Dma { [INFO] [stdout] 15 + fn default() -> Self { [INFO] [stdout] 16 + Self::new() [INFO] [stdout] 17 + } [INFO] [stdout] 18 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> gb-core/src/dma.rs:63:16 [INFO] [stdout] | [INFO] [stdout] 63 | if self.cycles_remaining % 4 == 0 && self.byte_index < 160 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `self.cycles_remaining.is_multiple_of(4)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `InterruptController` [INFO] [stdout] --> gb-core/src/interrupts.rs:36:5 [INFO] [stdout] | [INFO] [stdout] 36 | / pub fn new() -> Self { [INFO] [stdout] 37 | | Self { [INFO] [stdout] 38 | | ie: 0x00, [INFO] [stdout] 39 | | if_reg: 0xE1, // Post-boot value [INFO] [stdout] ... | [INFO] [stdout] 43 | | } [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] 35 + impl Default for InterruptController { [INFO] [stdout] 36 + fn default() -> Self { [INFO] [stdout] 37 + Self::new() [INFO] [stdout] 38 + } [INFO] [stdout] 39 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Joypad` [INFO] [stdout] --> gb-core/src/joypad.rs:25:5 [INFO] [stdout] | [INFO] [stdout] 25 | / pub fn new() -> Self { [INFO] [stdout] 26 | | Self { [INFO] [stdout] 27 | | select: 0x30, [INFO] [stdout] 28 | | directions: 0x0F, [INFO] [stdout] ... | [INFO] [stdout] 32 | | } [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] 24 + impl Default for Joypad { [INFO] [stdout] 25 + fn default() -> Self { [INFO] [stdout] 26 + Self::new() [INFO] [stdout] 27 + } [INFO] [stdout] 28 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Ppu` [INFO] [stdout] --> gb-core/src/ppu/mod.rs:111:5 [INFO] [stdout] | [INFO] [stdout] 111 | / pub fn new() -> Self { [INFO] [stdout] 112 | | Self { [INFO] [stdout] 113 | | vram: [0; 0x2000], [INFO] [stdout] 114 | | oam: [0; 0xA0], [INFO] [stdout] ... | [INFO] [stdout] 145 | | } [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] 109 + impl Default for Ppu { [INFO] [stdout] 110 + fn default() -> Self { [INFO] [stdout] 111 + Self::new() [INFO] [stdout] 112 + } [INFO] [stdout] 113 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> gb-core/src/apu/mod.rs:20:1 [INFO] [stdout] | [INFO] [stdout] 20 | / /// FF30-FF3F: Wave RAM [INFO] [stdout] 21 | | [INFO] [stdout] | |_^ [INFO] [stdout] 22 | extern crate alloc; [INFO] [stdout] | ------------------ the comment documents this extern crate [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the comment should document the parent module use an inner doc comment [INFO] [stdout] | [INFO] [stdout] 1 ~ //! APU (Audio Processing Unit): Generates the Game Boy's sound output. [INFO] [stdout] 2 ~ //! [INFO] [stdout] 3 ~ //! The DMG APU contains four channels: [INFO] [stdout] 4 ~ //! CH1: Square wave with frequency sweep [INFO] [stdout] 5 ~ //! CH2: Square wave [INFO] [stdout] 6 ~ //! CH3: Programmable wave [INFO] [stdout] 7 ~ //! CH4: Noise (LFSR) [INFO] [stdout] 8 ~ //! [INFO] [stdout] 9 ~ //! All channels are mixed into stereo output via NR50 (master volume) [INFO] [stdout] 10 ~ //! and NR51 (panning) registers. NR52 controls the master power. [INFO] [stdout] 11 ~ //! [INFO] [stdout] 12 ~ //! Audio I/O register map: FF10-FF3F [INFO] [stdout] 13 ~ //! FF10-FF14: CH1 (square with sweep) [INFO] [stdout] 14 ~ //! FF16-FF19: CH2 (square, no sweep; FF15 doesn't exist) [INFO] [stdout] 15 ~ //! FF1A-FF1E: CH3 (wave) [INFO] [stdout] 16 ~ //! FF20-FF23: CH4 (noise) [INFO] [stdout] 17 ~ //! FF24: NR50 (master volume / Vin routing) [INFO] [stdout] 18 ~ //! FF25: NR51 (channel panning) [INFO] [stdout] 19 ~ //! FF26: NR52 (master enable / channel status) [INFO] [stdout] 20 ~ //! FF30-FF3F: Wave RAM [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> gb-core/src/apu/square.rs:8:1 [INFO] [stdout] | [INFO] [stdout] 8 | / /// NRx4: Trigger + Length enable + Frequency high [INFO] [stdout] 9 | | [INFO] [stdout] | |_^ [INFO] [stdout] 10 | /// Duty waveforms: 8 steps each [INFO] [stdout] 11 | const DUTY_TABLE: [[u8; 8]; 4] = [ [INFO] [stdout] | ---------------- the comment documents this constant item [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the comment should document the parent module use an inner doc comment [INFO] [stdout] | [INFO] [stdout] 1 ~ //! Square wave channel, used for both CH1 (with sweep) and CH2 (without sweep). [INFO] [stdout] 2 ~ //! [INFO] [stdout] 3 ~ //! Registers (relative to channel base): [INFO] [stdout] 4 ~ //! NRx0: Sweep (CH1 only) [INFO] [stdout] 5 ~ //! NRx1: Duty + Length [INFO] [stdout] 6 ~ //! NRx2: Volume Envelope [INFO] [stdout] 7 ~ //! NRx3: Frequency low [INFO] [stdout] 8 ~ //! NRx4: Trigger + Length enable + Frequency high [INFO] [stdout] | [INFO] [stdout] help: if the documentation should include the empty line include it in the comment [INFO] [stdout] | [INFO] [stdout] 9 | /// [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> gb-core/src/apu/wave.rs:9:1 [INFO] [stdout] | [INFO] [stdout] 9 | / /// FF30-FF3F: Wave RAM (16 bytes = 32 4-bit samples) [INFO] [stdout] 10 | | [INFO] [stdout] | |_^ [INFO] [stdout] 11 | pub struct WaveChannel { [INFO] [stdout] | ---------------------- the comment documents this struct [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the comment should document the parent module use an inner doc comment [INFO] [stdout] | [INFO] [stdout] 1 ~ //! Wave channel (CH3): Plays samples from a 32-entry wave table. [INFO] [stdout] 2 ~ //! [INFO] [stdout] 3 ~ //! Registers: [INFO] [stdout] 4 ~ //! FF1A (NR30): DAC enable [INFO] [stdout] 5 ~ //! FF1B (NR31): Length [INFO] [stdout] 6 ~ //! FF1C (NR32): Volume code [INFO] [stdout] 7 ~ //! FF1D (NR33): Frequency low [INFO] [stdout] 8 ~ //! FF1E (NR34): Trigger + Length enable + Frequency high [INFO] [stdout] 9 ~ //! FF30-FF3F: Wave RAM (16 bytes = 32 4-bit samples) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> gb-core/src/ppu/mod.rs:288:73 [INFO] [stdout] | [INFO] [stdout] 288 | let m: [u8; 8] = core::array::from_fn(|i| self.vram[(0x9800 - 0x8000 + i) as usize]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `((0x9800 - 0x8000 + i))` [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: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> gb-core/src/ppu/mod.rs:296:29 [INFO] [stdout] | [INFO] [stdout] 296 | ... let _ = write!( [INFO] [stdout] | _______________^ [INFO] [stdout] 297 | | ... buf, [INFO] [stdout] 298 | | ... "F{} LY={:3} LCDC={:02X} SCX={:3} SCY={:3} WY={:3} BGP={:02X} MAP={:02X}{:02X}{:02X}{:02X}{:02X}{:02X}{:02X}{:02X}\n", [INFO] [stdout] 299 | | ... fn_, ly, lcdc, scx, scy, wy, bgp, [INFO] [stdout] 300 | | ... m[0], m[1], m[2], m[3], m[4], m[5], m[6], m[7], [INFO] [stdout] 301 | | ... ); [INFO] [stdout] | |_______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] = note: `#[warn(clippy::write_with_newline)]` on by default [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 296 ~ let _ = writeln!( [INFO] [stdout] 297 | buf, [INFO] [stdout] 298 ~ "F{} LY={:3} LCDC={:02X} SCX={:3} SCY={:3} WY={:3} BGP={:02X} MAP={:02X}{:02X}{:02X}{:02X}{:02X}{:02X}{:02X}{:02X}", [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> gb-core/src/apu/noise.rs:8:1 [INFO] [stdout] | [INFO] [stdout] 8 | / /// FF23 (NR44): Trigger + Length enable [INFO] [stdout] 9 | | [INFO] [stdout] | |_^ [INFO] [stdout] 10 | /// Divisor table: divisor_code 0 uses 8, not 0. [INFO] [stdout] 11 | const DIVISOR_TABLE: [u32; 8] = [8, 16, 32, 48, 64, 80, 96, 112]; [INFO] [stdout] | ------------------- the comment documents this constant item [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the comment should document the parent module use an inner doc comment [INFO] [stdout] | [INFO] [stdout] 1 ~ //! Noise channel (CH4): Generates pseudo-random noise via a linear feedback [INFO] [stdout] 2 ~ //! shift register (LFSR). [INFO] [stdout] 3 ~ //! [INFO] [stdout] 4 ~ //! Registers: [INFO] [stdout] 5 ~ //! FF20 (NR41): Length [INFO] [stdout] 6 ~ //! FF21 (NR42): Volume Envelope [INFO] [stdout] 7 ~ //! FF22 (NR43): Polynomial counter (clock shift, width mode, divisor code) [INFO] [stdout] 8 ~ //! FF23 (NR44): Trigger + Length enable [INFO] [stdout] | [INFO] [stdout] help: if the documentation should include the empty line include it in the comment [INFO] [stdout] | [INFO] [stdout] 9 | /// [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> gb-core/src/apu/frame_seq.rs:4:1 [INFO] [stdout] | [INFO] [stdout] 4 | / /// (length counters, envelope, sweep) should be clocked each step. [INFO] [stdout] 5 | | [INFO] [stdout] | |_^ [INFO] [stdout] 6 | const FRAME_SEQUENCER_PERIOD: u32 = 8192; [INFO] [stdout] | ---------------------------- the comment documents this constant item [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the comment should document the parent module use an inner doc comment [INFO] [stdout] | [INFO] [stdout] 1 ~ //! Frame sequencer: clocked at 512 Hz (every 8192 T-cycles). [INFO] [stdout] 2 ~ //! [INFO] [stdout] 3 ~ //! Steps through an 8-step pattern that determines which APU components [INFO] [stdout] 4 ~ //! (length counters, envelope, sweep) should be clocked each step. [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> gb-core/src/ppu/mod.rs:453:9 [INFO] [stdout] | [INFO] [stdout] 453 | sprites.sort_by(|a, b| a.1.x.cmp(&b.1.x)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] = note: `#[warn(clippy::unnecessary_sort_by)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 453 - sprites.sort_by(|a, b| a.1.x.cmp(&b.1.x)); [INFO] [stdout] 453 + sprites.sort_by_key(|a| a.1.x); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> gb-core/src/ppu/mod.rs:615:33 [INFO] [stdout] | [INFO] [stdout] 615 | self.stat = (self.stat & 0xFC) | 0; // mode 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `((self.stat & 0xFC))` [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: you should consider adding a `Default` implementation for `Serial` [INFO] [stdout] --> gb-core/src/serial.rs:18:5 [INFO] [stdout] | [INFO] [stdout] 18 | / pub fn new() -> Self { [INFO] [stdout] 19 | | Self { [INFO] [stdout] 20 | | data: 0x00, [INFO] [stdout] 21 | | control: 0x7E, [INFO] [stdout] ... | [INFO] [stdout] 26 | | } [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] 17 + impl Default for Serial { [INFO] [stdout] 18 + fn default() -> Self { [INFO] [stdout] 19 + Self::new() [INFO] [stdout] 20 + } [INFO] [stdout] 21 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Timer` [INFO] [stdout] --> gb-core/src/timer.rs:24:5 [INFO] [stdout] | [INFO] [stdout] 24 | / pub fn new() -> Self { [INFO] [stdout] 25 | | Self { [INFO] [stdout] 26 | | div_counter: 0xABCC, // Post-boot value [INFO] [stdout] 27 | | tima: 0x00, [INFO] [stdout] ... | [INFO] [stdout] 34 | | } [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 Timer { [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: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> gb-core/src/apu/square.rs:232:17 [INFO] [stdout] | [INFO] [stdout] 232 | / if self.has_sweep { [INFO] [stdout] 233 | | 0x80 // bit 7 unused [INFO] [stdout] 234 | | | (self.sweep_period << 4) [INFO] [stdout] 235 | | | if self.sweep_negate { 0x08 } else { 0 } [INFO] [stdout] ... | [INFO] [stdout] 238 | | 0xFF [INFO] [stdout] 239 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 231 ~ 0 [INFO] [stdout] 232 ~ if self.has_sweep => { [INFO] [stdout] 233 | 0x80 // bit 7 unused [INFO] [stdout] ... [INFO] [stdout] 236 | | self.sweep_shift [INFO] [stdout] 237 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> gb-core/src/apu/square.rs:262:17 [INFO] [stdout] | [INFO] [stdout] 262 | / if self.has_sweep { [INFO] [stdout] 263 | | self.sweep_period = (value >> 4) & 0x07; [INFO] [stdout] 264 | | let new_negate = value & 0x08 != 0; [INFO] [stdout] ... | [INFO] [stdout] 271 | | self.sweep_shift = value & 0x07; [INFO] [stdout] 272 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 261 ~ 0 [INFO] [stdout] 262 ~ if self.has_sweep => { [INFO] [stdout] 263 | self.sweep_period = (value >> 4) & 0x07; [INFO] [stdout] ... [INFO] [stdout] 271 | self.sweep_shift = value & 0x07; [INFO] [stdout] 272 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `WaveChannel` [INFO] [stdout] --> gb-core/src/apu/wave.rs:25:5 [INFO] [stdout] | [INFO] [stdout] 25 | / pub fn new() -> Self { [INFO] [stdout] 26 | | Self { [INFO] [stdout] 27 | | enabled: false, [INFO] [stdout] 28 | | dac_enabled: false, [INFO] [stdout] ... | [INFO] [stdout] 38 | | } [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] 24 + impl Default for WaveChannel { [INFO] [stdout] 25 + fn default() -> Self { [INFO] [stdout] 26 + Self::new() [INFO] [stdout] 27 + } [INFO] [stdout] 28 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `NoiseChannel` [INFO] [stdout] --> gb-core/src/apu/noise.rs:41:5 [INFO] [stdout] | [INFO] [stdout] 41 | / pub fn new() -> Self { [INFO] [stdout] 42 | | Self { [INFO] [stdout] 43 | | enabled: false, [INFO] [stdout] 44 | | dac_enabled: false, [INFO] [stdout] ... | [INFO] [stdout] 62 | | } [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] 40 + impl Default for NoiseChannel { [INFO] [stdout] 41 + fn default() -> Self { [INFO] [stdout] 42 + Self::new() [INFO] [stdout] 43 + } [INFO] [stdout] 44 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `FrameSequencer` [INFO] [stdout] --> gb-core/src/apu/frame_seq.rs:23:5 [INFO] [stdout] | [INFO] [stdout] 23 | / pub fn new() -> Self { [INFO] [stdout] 24 | | Self { [INFO] [stdout] 25 | | step: 0, [INFO] [stdout] 26 | | timer: FRAME_SEQUENCER_PERIOD, [INFO] [stdout] 27 | | } [INFO] [stdout] 28 | | } [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] 22 + impl Default for FrameSequencer { [INFO] [stdout] 23 + fn default() -> Self { [INFO] [stdout] 24 + Self::new() [INFO] [stdout] 25 + } [INFO] [stdout] 26 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Apu` [INFO] [stdout] --> gb-core/src/apu/mod.rs:105:5 [INFO] [stdout] | [INFO] [stdout] 105 | / pub fn new() -> Self { [INFO] [stdout] 106 | | Self::with_sample_rate(DEFAULT_SAMPLE_RATE) [INFO] [stdout] 107 | | } [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] 104 + impl Default for Apu { [INFO] [stdout] 105 + fn default() -> Self { [INFO] [stdout] 106 + Self::new() [INFO] [stdout] 107 + } [INFO] [stdout] 108 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> gb-core/src/cartridge/mbc2.rs:57:9 [INFO] [stdout] | [INFO] [stdout] 57 | / match addr { [INFO] [stdout] 58 | | 0x0000..=0x3FFF => { [INFO] [stdout] ... | [INFO] [stdout] 74 | | _ => {} [INFO] [stdout] 75 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 57 ~ if let 0x0000..=0x3FFF = addr { [INFO] [stdout] 58 + // Bit 8 of the address determines the operation: [INFO] [stdout] 59 ~ // bit 8 == 0 → RAM enable/disable [INFO] [stdout] 60 ~ // bit 8 == 1 → ROM bank select [INFO] [stdout] 61 + if addr & 0x0100 == 0 { [INFO] [stdout] 62 + // RAM enable: any write with low nibble == 0x0A enables. [INFO] [stdout] 63 + self.ram_enabled = (value & 0x0F) == 0x0A; [INFO] [stdout] 64 + } else { [INFO] [stdout] 65 + // ROM bank: only lower 4 bits. Bank 0 maps to 1. [INFO] [stdout] 66 + let mut bank = value & 0x0F; [INFO] [stdout] 67 + if bank == 0 { [INFO] [stdout] 68 + bank = 1; [INFO] [stdout] 69 + } [INFO] [stdout] 70 + self.rom_bank = bank; [INFO] [stdout] 71 + } [INFO] [stdout] 72 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> gb-core/src/cartridge/mod.rs:18:1 [INFO] [stdout] | [INFO] [stdout] 18 | / pub enum Cartridge { [INFO] [stdout] 19 | | NoMbc(NoMbc), [INFO] [stdout] 20 | | Mbc1(Mbc1), [INFO] [stdout] 21 | | Mbc2(Mbc2), [INFO] [stdout] | | ---------- the largest variant contains at least 552 bytes [INFO] [stdout] 22 | | Mbc3(Mbc3), [INFO] [stdout] | | ---------- the second-largest variant contains at least 80 bytes [INFO] [stdout] 23 | | Mbc5(Mbc5), [INFO] [stdout] 24 | | } [INFO] [stdout] | |_^ the entire enum is at least 552 bytes [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant [INFO] [stdout] = note: `#[warn(clippy::large_enum_variant)]` on by default [INFO] [stdout] help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum [INFO] [stdout] | [INFO] [stdout] 21 - Mbc2(Mbc2), [INFO] [stdout] 21 + Mbc2(Box), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this OR pattern can be rewritten using a range [INFO] [stdout] --> gb-core/src/cartridge/mod.rs:48:13 [INFO] [stdout] | [INFO] [stdout] 48 | 0x01 | 0x02 | 0x03 => Cartridge::Mbc1(Mbc1::new(rom, ram_size)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `0x01..=0x03` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_patterns [INFO] [stdout] = note: `#[warn(clippy::manual_range_patterns)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this OR pattern can be rewritten using a range [INFO] [stdout] --> gb-core/src/cartridge/mod.rs:55:13 [INFO] [stdout] | [INFO] [stdout] 55 | 0x0F | 0x10 | 0x11 | 0x12 | 0x13 => Cartridge::Mbc3(Mbc3::new(rom, ram_size)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `0x0F..=0x13` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_patterns [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this OR pattern can be rewritten using a range [INFO] [stdout] --> gb-core/src/cartridge/mod.rs:59:13 [INFO] [stdout] | [INFO] [stdout] 59 | 0x19 | 0x1A | 0x1B | 0x1C | 0x1D | 0x1E => Cartridge::Mbc5(Mbc5::new(rom, ram_size)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `0x19..=0x1E` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_patterns [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Registers` [INFO] [stdout] --> gb-core/src/cpu/registers.rs:46:5 [INFO] [stdout] | [INFO] [stdout] 46 | / pub fn new() -> Self { [INFO] [stdout] 47 | | Self { [INFO] [stdout] 48 | | a: 0x01, [INFO] [stdout] 49 | | f: Flags::from(0xB0), [INFO] [stdout] ... | [INFO] [stdout] 59 | | } [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] 44 + impl Default for Registers { [INFO] [stdout] 45 + fn default() -> Self { [INFO] [stdout] 46 + Self::new() [INFO] [stdout] 47 + } [INFO] [stdout] 48 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: there is no need to manually implement bit rotation [INFO] [stdout] --> gb-core/src/cpu/cb_opcodes.rs:207:22 [INFO] [stdout] | [INFO] [stdout] 207 | let result = (value >> 4) | (value << 4); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: this expression can be rewritten as: `value.rotate_left(4)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_rotate [INFO] [stdout] = note: `#[warn(clippy::manual_rotate)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Cpu` [INFO] [stdout] --> gb-core/src/cpu/mod.rs:28:5 [INFO] [stdout] | [INFO] [stdout] 28 | / pub fn new() -> Self { [INFO] [stdout] 29 | | Self { [INFO] [stdout] 30 | | regs: Registers::new(), [INFO] [stdout] 31 | | state: CpuState::Running, [INFO] [stdout] ... | [INFO] [stdout] 36 | | } [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] 27 + impl Default for Cpu { [INFO] [stdout] 28 + fn default() -> Self { [INFO] [stdout] 29 + Self::new() [INFO] [stdout] 30 + } [INFO] [stdout] 31 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Dma` [INFO] [stdout] --> gb-core/src/dma.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 15 | / pub fn new() -> Self { [INFO] [stdout] 16 | | Self { [INFO] [stdout] 17 | | active: false, [INFO] [stdout] 18 | | source: 0, [INFO] [stdout] ... | [INFO] [stdout] 22 | | } [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] 14 + impl Default for Dma { [INFO] [stdout] 15 + fn default() -> Self { [INFO] [stdout] 16 + Self::new() [INFO] [stdout] 17 + } [INFO] [stdout] 18 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> gb-core/src/dma.rs:63:16 [INFO] [stdout] | [INFO] [stdout] 63 | if self.cycles_remaining % 4 == 0 && self.byte_index < 160 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `self.cycles_remaining.is_multiple_of(4)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `InterruptController` [INFO] [stdout] --> gb-core/src/interrupts.rs:36:5 [INFO] [stdout] | [INFO] [stdout] 36 | / pub fn new() -> Self { [INFO] [stdout] 37 | | Self { [INFO] [stdout] 38 | | ie: 0x00, [INFO] [stdout] 39 | | if_reg: 0xE1, // Post-boot value [INFO] [stdout] ... | [INFO] [stdout] 43 | | } [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] 35 + impl Default for InterruptController { [INFO] [stdout] 36 + fn default() -> Self { [INFO] [stdout] 37 + Self::new() [INFO] [stdout] 38 + } [INFO] [stdout] 39 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Joypad` [INFO] [stdout] --> gb-core/src/joypad.rs:25:5 [INFO] [stdout] | [INFO] [stdout] 25 | / pub fn new() -> Self { [INFO] [stdout] 26 | | Self { [INFO] [stdout] 27 | | select: 0x30, [INFO] [stdout] 28 | | directions: 0x0F, [INFO] [stdout] ... | [INFO] [stdout] 32 | | } [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] 24 + impl Default for Joypad { [INFO] [stdout] 25 + fn default() -> Self { [INFO] [stdout] 26 + Self::new() [INFO] [stdout] 27 + } [INFO] [stdout] 28 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Ppu` [INFO] [stdout] --> gb-core/src/ppu/mod.rs:111:5 [INFO] [stdout] | [INFO] [stdout] 111 | / pub fn new() -> Self { [INFO] [stdout] 112 | | Self { [INFO] [stdout] 113 | | vram: [0; 0x2000], [INFO] [stdout] 114 | | oam: [0; 0xA0], [INFO] [stdout] ... | [INFO] [stdout] 145 | | } [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] 109 + impl Default for Ppu { [INFO] [stdout] 110 + fn default() -> Self { [INFO] [stdout] 111 + Self::new() [INFO] [stdout] 112 + } [INFO] [stdout] 113 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> gb-core/src/ppu/mod.rs:288:73 [INFO] [stdout] | [INFO] [stdout] 288 | let m: [u8; 8] = core::array::from_fn(|i| self.vram[(0x9800 - 0x8000 + i) as usize]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `((0x9800 - 0x8000 + i))` [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: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> gb-core/src/ppu/mod.rs:296:29 [INFO] [stdout] | [INFO] [stdout] 296 | ... let _ = write!( [INFO] [stdout] | _______________^ [INFO] [stdout] 297 | | ... buf, [INFO] [stdout] 298 | | ... "F{} LY={:3} LCDC={:02X} SCX={:3} SCY={:3} WY={:3} BGP={:02X} MAP={:02X}{:02X}{:02X}{:02X}{:02X}{:02X}{:02X}{:02X}\n", [INFO] [stdout] 299 | | ... fn_, ly, lcdc, scx, scy, wy, bgp, [INFO] [stdout] 300 | | ... m[0], m[1], m[2], m[3], m[4], m[5], m[6], m[7], [INFO] [stdout] 301 | | ... ); [INFO] [stdout] | |_______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] = note: `#[warn(clippy::write_with_newline)]` on by default [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 296 ~ let _ = writeln!( [INFO] [stdout] 297 | buf, [INFO] [stdout] 298 ~ "F{} LY={:3} LCDC={:02X} SCX={:3} SCY={:3} WY={:3} BGP={:02X} MAP={:02X}{:02X}{:02X}{:02X}{:02X}{:02X}{:02X}{:02X}", [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> gb-core/src/ppu/mod.rs:453:9 [INFO] [stdout] | [INFO] [stdout] 453 | sprites.sort_by(|a, b| a.1.x.cmp(&b.1.x)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] = note: `#[warn(clippy::unnecessary_sort_by)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 453 - sprites.sort_by(|a, b| a.1.x.cmp(&b.1.x)); [INFO] [stdout] 453 + sprites.sort_by_key(|a| a.1.x); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> gb-core/src/ppu/mod.rs:615:33 [INFO] [stdout] | [INFO] [stdout] 615 | self.stat = (self.stat & 0xFC) | 0; // mode 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `((self.stat & 0xFC))` [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: you should consider adding a `Default` implementation for `Serial` [INFO] [stdout] --> gb-core/src/serial.rs:18:5 [INFO] [stdout] | [INFO] [stdout] 18 | / pub fn new() -> Self { [INFO] [stdout] 19 | | Self { [INFO] [stdout] 20 | | data: 0x00, [INFO] [stdout] 21 | | control: 0x7E, [INFO] [stdout] ... | [INFO] [stdout] 26 | | } [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] 17 + impl Default for Serial { [INFO] [stdout] 18 + fn default() -> Self { [INFO] [stdout] 19 + Self::new() [INFO] [stdout] 20 + } [INFO] [stdout] 21 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Timer` [INFO] [stdout] --> gb-core/src/timer.rs:24:5 [INFO] [stdout] | [INFO] [stdout] 24 | / pub fn new() -> Self { [INFO] [stdout] 25 | | Self { [INFO] [stdout] 26 | | div_counter: 0xABCC, // Post-boot value [INFO] [stdout] 27 | | tima: 0x00, [INFO] [stdout] ... | [INFO] [stdout] 34 | | } [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 Timer { [INFO] [stdout] 24 + fn default() -> Self { [INFO] [stdout] 25 + Self::new() [INFO] [stdout] 26 + } [INFO] [stdout] 27 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking env_logger v0.11.9 [INFO] [stderr] Checking wayland-protocols-wlr v0.3.10 [INFO] [stderr] Checking wayland-protocols-plasma v0.3.10 [INFO] [stderr] Checking sctk-adwaita v0.10.1 [INFO] [stderr] Checking x11rb v0.13.2 [INFO] [stderr] Checking pixels v0.15.0 [INFO] [stderr] Checking gb-frontend v0.1.0 (/opt/rustwide/workdir/gb-frontend) [INFO] [stdout] warning: method `save_screenshot` is never used [INFO] [stdout] --> gb-frontend/src/main.rs:50:8 [INFO] [stdout] | [INFO] [stdout] 35 | impl App { [INFO] [stdout] | -------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 50 | fn save_screenshot(&self, frame: &[u8]) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> gb-frontend/src/main.rs:135:38 [INFO] [stdout] | [INFO] [stdout] 135 | gb.set_ppu_debug(fc >= 280 && fc <= 550); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: use: `(280..=550).contains(&fc)` [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 implementation of `.is_multiple_of()` [INFO] [stdout] --> gb-frontend/src/main.rs:148:28 [INFO] [stdout] | [INFO] [stdout] 148 | if fc % 60 == 0 && fc <= 720 { [INFO] [stdout] | ^^^^^^^^^^^^ help: replace with: `fc.is_multiple_of(60)` [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: method `save_screenshot` is never used [INFO] [stdout] --> gb-frontend/src/main.rs:50:8 [INFO] [stdout] | [INFO] [stdout] 35 | impl App { [INFO] [stdout] | -------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 50 | fn save_screenshot(&self, frame: &[u8]) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> gb-frontend/src/main.rs:135:38 [INFO] [stdout] | [INFO] [stdout] 135 | gb.set_ppu_debug(fc >= 280 && fc <= 550); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: use: `(280..=550).contains(&fc)` [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 implementation of `.is_multiple_of()` [INFO] [stdout] --> gb-frontend/src/main.rs:148:28 [INFO] [stdout] | [INFO] [stdout] 148 | if fc % 60 == 0 && fc <= 720 { [INFO] [stdout] | ^^^^^^^^^^^^ help: replace with: `fc.is_multiple_of(60)` [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] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 2m 09s [INFO] running `Command { std: "docker" "inspect" "c9ba3ecd3abaed732420b3cb1187274a59c8f5120635da88143b5742d78219f9", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "c9ba3ecd3abaed732420b3cb1187274a59c8f5120635da88143b5742d78219f9", kill_on_drop: false }` [INFO] [stdout] c9ba3ecd3abaed732420b3cb1187274a59c8f5120635da88143b5742d78219f9