diff --git a/src/apu.rs b/src/apu.rs index 871907b5024e2d1a60a9308edaf0e95ec8f6ed48..5992e584546cda73fc6acfd9208fd8a44f9c28a2 100644 --- a/src/apu.rs +++ b/src/apu.rs @@ -106,11 +106,9 @@ impl Apu { } pub fn read(&mut self, addr: u16) -> u8 { - match addr { - _ => { - warnln!("Reading from unknown APU location 0x{:04x}", addr); - 0xff - } + { + warnln!("Reading from unknown APU location 0x{:04x}", addr); + 0xff } } @@ -262,3 +260,9 @@ impl Apu { self.output_buffer.clear(); } } + +impl Default for Apu { + fn default() -> Self { + Self::new() + } +}