diff --git a/clicky-core/src/devices/generic/asanram.rs b/clicky-core/src/devices/generic/asanram.rs index dc31e13..0f0e9c9 100644 --- a/clicky-core/src/devices/generic/asanram.rs +++ b/clicky-core/src/devices/generic/asanram.rs @@ -67,7 +67,7 @@ impl AsanRam { ContractViolation { msg, severity: log::Level::Warn, - stub_val: Some(stub as u32), + stub_val: Some(stub), } } } diff --git a/clicky-core/src/devices/platform/pp/flash.rs b/clicky-core/src/devices/platform/pp/flash.rs index 3374894..0abe812 100644 --- a/clicky-core/src/devices/platform/pp/flash.rs +++ b/clicky-core/src/devices/platform/pp/flash.rs @@ -110,7 +110,7 @@ impl Memory for Flash { } (CFIState::ReadSoftwareID, 0x0) => Ok(0x00BF), // Manufacturer ID (SST) (CFIState::ReadSoftwareID, 0x1) => Ok(0x273F), // Device ID (SST39WF800A) - _ => return Err(Unimplemented) + _ => Err(Unimplemented), } } diff --git a/clicky-core/src/devices/platform/pp/intcon.rs b/clicky-core/src/devices/platform/pp/intcon.rs index 907efe3..43a1cdf 100644 --- a/clicky-core/src/devices/platform/pp/intcon.rs +++ b/clicky-core/src/devices/platform/pp/intcon.rs @@ -40,8 +40,9 @@ struct IntConCpuRegs { priority: u32, } -#[derive(Debug)] +#[derive(Debug, Default)] enum IrqKind { + #[default] Unregistered, Shared(irq::Reciever), // i.e: mailbox @@ -51,12 +52,6 @@ enum IrqKind { }, } -impl Default for IrqKind { - fn default() -> IrqKind { - IrqKind::Unregistered - } -} - /// Half of the PP5020 Interrupt Controller. #[derive(Debug, Default)] struct IntCon32 { diff --git a/clicky-core/src/sys/ipod4g/mod.rs b/clicky-core/src/sys/ipod4g/mod.rs index 2b43fab..4fad2c1 100644 --- a/clicky-core/src/sys/ipod4g/mod.rs +++ b/clicky-core/src/sys/ipod4g/mod.rs @@ -464,10 +464,10 @@ macro_rules! mmap { fn $fn(&mut self, addr: u32) -> MemResult<$ret> { let mut addr = addr; if (0x00..0x1F).contains(&addr) && self.cachecon.local_evt { - addr = addr | 0x6000_f100; + addr |= 0x6000_f100; } - let (mut addr, prot) = self.memcon.virt_to_phys(addr); + let (addr, prot) = self.memcon.virt_to_phys(addr); if !prot.r { return Err(MemException::MmuViolation) }