summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoriximeow <me@iximeow.net>2019-03-10 17:39:32 -0700
committeriximeow <me@iximeow.net>2020-01-12 17:23:02 -0800
commit54e6987bcf85d238d76923f38e9f4274bb46c054 (patch)
tree45978fd269960e457df518ec530401e6f289e5f9 /src
parente90196a82884abcbd950f17a457e0109fa1ca1b5 (diff)
update lifetimes due to yaxpeax-arch changes
Diffstat (limited to 'src')
-rw-r--r--src/lib.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 1ef6f13..2da8e1f 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -14,20 +14,23 @@ pub struct Instruction {
impl LengthedInstruction for Instruction {
type Unit = <PIC24 as Arch>::Address;
+ fn min_size() -> Self::Unit {
+ 3
+ }
fn len(&self) -> Self::Unit {
3 // ish
}
}
impl Decodable for Instruction {
- fn decode<'a, T: IntoIterator<Item=&'a u8>>(bytes: T) -> Option<Self> {
+ fn decode<T: IntoIterator<Item=u8>>(bytes: T) -> Option<Self> {
let mut blank = Instruction { opcode: Opcode::NOP };
match blank.decode_into(bytes) {
Some(_) => Some(blank),
None => None
}
}
- fn decode_into<'a, T: IntoIterator<Item=&'a u8>>(&mut self, bytes: T) -> Option<()> {
+ fn decode_into<T: IntoIterator<Item=u8>>(&mut self, bytes: T) -> Option<()> {
match bytes.into_iter().next() {
Some(0x00) => {
self.opcode = Opcode::NOP;