mirror of
https://github.com/Noratrieb/elven-forest.git
synced 2026-01-14 10:45:03 +01:00
add text bloat flag
This commit is contained in:
parent
4ae7bf8ad5
commit
a7f34d3025
3 changed files with 60 additions and 0 deletions
|
|
@ -18,6 +18,16 @@ pub const fn Addr(value: u64) -> Addr {
|
|||
Addr { value }
|
||||
}
|
||||
|
||||
impl Addr {
|
||||
pub fn usize(self) -> usize {
|
||||
self.value.try_into().unwrap()
|
||||
}
|
||||
|
||||
pub fn u64(self) -> u64 {
|
||||
self.value
|
||||
}
|
||||
}
|
||||
|
||||
impl Debug for Addr {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
write!(f, "0x{:x}", self.value)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue