From d76a1cf75b0ae29147054d9f32a694e6a6d13ef0 Mon Sep 17 00:00:00 2001 From: iximeow Date: Wed, 20 Mar 2019 03:05:00 -0700 Subject: add impls for address as used by x86_64 --- src/lib.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index b0df1ec..f1671b3 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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 } } -- cgit v1.1