diff --git a/src/card.rs b/src/card.rs index d58b100..e7dd331 100644 --- a/src/card.rs +++ b/src/card.rs @@ -149,7 +149,6 @@ pub trait Mmu: Debug { ) -> NullableResult; } - #[allow(dead_code)] pub const fn u64_set_be_byte(val: u64, idx: u8, byte: u8) -> u64 { let mut bytes = val.to_be_bytes(); diff --git a/src/mmu.rs b/src/mmu.rs index 481e5ea..36e7867 100644 --- a/src/mmu.rs +++ b/src/mmu.rs @@ -143,32 +143,28 @@ impl Card for MmuCard { impl Display for MmuCard { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { let q1 = if self.map_frames_enabled[0] { - Some(self.map_frames[0]) + format!("{:#x}", self.map_frames[0]) } else { - None + "disabled".to_string() }; let q2 = if self.map_frames_enabled[1] { - Some(self.map_frames[1]) + format!("{:#x}", self.map_frames[1]) } else { - None + "disabled".to_string() }; let q3 = if self.map_frames_enabled[2] { - Some(self.map_frames[2]) + format!("{:#x}", self.map_frames[2]) } else { - None + "disabled".to_string() }; let q4 = if self.map_frames_enabled[3] { - Some(self.map_frames[3]) + format!("{:#x}", self.map_frames[3]) } else { - None + "disabled".to_string() }; f.write_fmt(format_args!( - "MMU card, {} (Q1: {:?}, Q2: {:?}, Q3: {:?}, Q4: {:?})", + "MMU card, {} (Q1: {q1}, Q2: {q2}, Q3: {q3}, Q4: {q4})", if self.enabled { "enabled" } else { "disabled" }, - q1, - q2, - q3, - q4 )) } }