This commit is contained in:
Erin 2023-05-28 23:37:43 +02:00
parent 119ce4405f
commit 7eaa01f53c

View file

@ -24,7 +24,7 @@ impl IndexMut<u8> for Registers {
impl Default for Registers { impl Default for Registers {
fn default() -> Self { fn default() -> Self {
Self([Value { u: 0 }; 60]) Self([Value { i: 0 }; 60])
} }
} }
@ -55,13 +55,12 @@ macro_rules! value_def {
} }
value_def! { value_def! {
u: u64, unsigned; i: u64, int;
s: i64, signed;
f: f64, float; f: f64, float;
} }
impl Debug for Value { impl Debug for Value {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
self.unsigned().fmt(f) self.int().fmt(f)
} }
} }