Don't render Const computed values in hexadecimal for Display

This commit is contained in:
Guillaume Gomez
2022-02-17 17:58:38 +01:00
parent 6421a499a5
commit c5ce3e1dbc
3 changed files with 17 additions and 1 deletions

View File

@@ -374,3 +374,10 @@ impl fmt::UpperHex for ScalarInt {
write!(f, "{:01$X}", { self.data }, self.size as usize * 2)
}
}
impl fmt::Display for ScalarInt {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
self.check_data();
write!(f, "{}", { self.data })
}
}