chore: satisfy clippy
This commit is contained in:
20
src/bus.rs
20
src/bus.rs
@@ -10,7 +10,7 @@ use crate::work_ram::{VariableWorkRam, WorkRam};
|
||||
|
||||
pub(crate) const BOOT_SIZE: usize = 0x100;
|
||||
|
||||
#[derive(Debug)]
|
||||
#[derive(Debug, Default)]
|
||||
pub struct Bus {
|
||||
boot: Option<[u8; BOOT_SIZE]>, // Boot ROM is 256b long
|
||||
pub(crate) cart: Option<Cartridge>,
|
||||
@@ -25,24 +25,6 @@ pub struct Bus {
|
||||
pub(crate) joyp: Joypad,
|
||||
}
|
||||
|
||||
impl Default for Bus {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
boot: None,
|
||||
cart: None,
|
||||
ppu: Default::default(),
|
||||
work_ram: Default::default(),
|
||||
var_ram: Default::default(),
|
||||
timer: Default::default(),
|
||||
int: Default::default(),
|
||||
apu: Default::default(),
|
||||
high_ram: Default::default(),
|
||||
serial: Default::default(),
|
||||
joyp: Default::default(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Bus {
|
||||
pub(crate) fn with_boot(rom: [u8; 256]) -> Self {
|
||||
Self {
|
||||
|
||||
Reference in New Issue
Block a user