From 15fd1cc36a78f0b770668dc10700987254a5e500 Mon Sep 17 00:00:00 2001 From: iximeow Date: Sun, 3 May 2020 14:04:43 -0700 Subject: version bump, bumping yaxpeax-arch to 0.0.4 --- Cargo.toml | 4 ++-- src/lib.rs | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index d48ac94..daf3a9f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,14 +1,14 @@ [package] name = "yaxpeax-msp430" -version = "0.0.4" +version = "0.0.5" authors = [ "iximeow " ] license = "0BSD" repository = "http://git.iximeow.net/yaxpeax-msp430/" description = "msp430 decoders for the yaxpeax project" [dependencies] -yaxpeax-arch = { version = "0.0.3", default-features = false, features = [] } +yaxpeax-arch = { version = "0.0.4", default-features = false, features = [] } "termion" = "1.4.0" "serde" = { version = "1.0", optional = true } "serde_derive" = { version = "1.0", optional = true } diff --git a/src/lib.rs b/src/lib.rs index ccaf2ec..7977c88 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -8,7 +8,7 @@ extern crate serde; extern crate yaxpeax_arch; extern crate termion; -use yaxpeax_arch::{Arch, Decoder, LengthedInstruction}; +use yaxpeax_arch::{Arch, AddressDiff, Decoder, LengthedInstruction}; mod display; pub use display::NoContext; @@ -52,9 +52,9 @@ impl Default for 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 { let mut size = 2; @@ -72,7 +72,7 @@ impl LengthedInstruction for Instruction { Operand::Absolute(_) => { size += 2; }, _ => {} }; - size + AddressDiff::from_const(size) } } -- cgit v1.1