diff options
author | iximeow <me@iximeow.net> | 2019-03-20 03:05:00 -0700 |
---|---|---|
committer | iximeow <me@iximeow.net> | 2020-01-12 16:26:39 -0800 |
commit | d76a1cf75b0ae29147054d9f32a694e6a6d13ef0 (patch) | |
tree | 0b1cd8cac2a6a9a167b9cececa94a7124a793622 /src/lib.rs | |
parent | f8b14dd92bf97841791e1938394a20aca982689f (diff) |
add impls for address as used by x86_64
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -39,6 +39,12 @@ impl AddressDisplay for usize { } } +impl AddressDisplay for u64 { + fn stringy(&self) -> String { + format!("{:#x}", self) + } +} + impl AddressDisplay for u32 { fn stringy(&self) -> String { format!("{:#x}", self) @@ -59,6 +65,10 @@ impl Address for u32 { fn to_linear(&self) -> usize { *self as usize } } +impl Address for u64 { + fn to_linear(&self) -> usize { *self as usize } +} + impl Address for usize { fn to_linear(&self) -> usize { *self } } |