chore: satisfy clippy

This commit is contained in:
2021-11-30 04:13:12 -04:00
parent 9d23b571fb
commit 4a1a21a08f
3 changed files with 133 additions and 160 deletions

View File

@@ -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 {