From 79388a4ff09fe21d31fe41a68e59a92263c2eea5 Mon Sep 17 00:00:00 2001 From: iximeow Date: Sun, 3 May 2020 13:38:08 -0700 Subject: bump yaxpeax-arch to 0.0.4, use AddressDiff, fix warnings in ffi --- src/protected_mode/mod.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/protected_mode') diff --git a/src/protected_mode/mod.rs b/src/protected_mode/mod.rs index 4405cc8..3370aaa 100644 --- a/src/protected_mode/mod.rs +++ b/src/protected_mode/mod.rs @@ -3,7 +3,7 @@ mod display; use core::hint::unreachable_unchecked; -use yaxpeax_arch::{Decoder, LengthedInstruction}; +use yaxpeax_arch::{AddressDiff, Decoder, LengthedInstruction}; #[cfg(feature="use-serde")] #[derive(Copy, Clone, Debug, PartialOrd, Ord, Eq, PartialEq, Serialize, Deserialize)] @@ -1311,12 +1311,12 @@ impl yaxpeax_arch::Arch for Arch { } impl LengthedInstruction for Instruction { - type Unit = u32; - fn len(&self) -> u32 { - self.length.into() + type Unit = AddressDiff; + fn len(&self) -> Self::Unit { + AddressDiff::from_const(self.length.into()) } - fn min_size() -> u32 { - 1 + fn min_size() -> Self::Unit { + AddressDiff::from_const(1) } } -- cgit v1.1