From 2b33746fd0f947b0343981941cc49f59e88daa4b Mon Sep 17 00:00:00 2001 From: iximeow Date: Sun, 3 May 2020 14:06:21 -0700 Subject: version bump, bumping yaxpeax-arch to 0.0.4 --- src/lib.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/lib.rs b/src/lib.rs index 506a0e5..74937fb 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -9,7 +9,7 @@ use std::fmt; extern crate yaxpeax_arch; -use yaxpeax_arch::{Arch, Decoder, LengthedInstruction}; +use yaxpeax_arch::{Arch, AddressDiff, Decoder, LengthedInstruction}; pub mod consts; pub mod display; @@ -37,9 +37,9 @@ pub struct Instruction { } impl LengthedInstruction for Instruction { - type Unit = ::Address; + type Unit = AddressDiff<::Address>; fn min_size() -> Self::Unit { - 2 + AddressDiff::from_const(2) } fn len(&self) -> Self::Unit { match self.opcode { @@ -49,9 +49,9 @@ impl LengthedInstruction for Instruction { | Opcode::CALL | Opcode::LFSR | Opcode::GOTO => { - 4 + AddressDiff::from_const(4) }, - _ => 2 + _ => AddressDiff::from_const(2) } } } -- cgit v1.1