summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Cargo.toml6
-rw-r--r--src/lib.rs8
2 files changed, 7 insertions, 7 deletions
diff --git a/Cargo.toml b/Cargo.toml
index 5e60296..735fb74 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,14 +1,14 @@
[package]
name = "yaxpeax-pic17"
-version = "0.0.2"
+version = "0.0.3"
authors = [ "iximeow <me@iximeow.net>" ]
license = "0BSD"
repository = "http://git.iximeow.net/yaxpeax-pic17/"
description = "pic17 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 }
@@ -20,4 +20,4 @@ yaxpeax-arch = { version = "0.0.3", default-features = false, features = [] }
[features]
default = []
-use-serde = []
+use-serde = ["serde", "serde_derive"]
diff --git a/src/lib.rs b/src/lib.rs
index e8775eb..3083938 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, Colorize, Decoder, LengthedInstruction, ShowContextual, YaxColors};
+use yaxpeax_arch::{Arch, AddressDiff, Colorize, Decoder, LengthedInstruction, ShowContextual, YaxColors};
use std::fmt::{self, Display, Formatter};
@@ -56,13 +56,13 @@ impl Display for Instruction {
}
impl LengthedInstruction for Instruction {
- type Unit = <PIC17 as Arch>::Address;
+ type Unit = AddressDiff<<PIC17 as Arch>::Address>;
fn min_size() -> Self::Unit {
- 2
+ AddressDiff::from_const(2)
}
fn len(&self) -> Self::Unit {
match self.opcode {
- _ => 2
+ _ => AddressDiff::from_const(2)
}
}
}