From 54e6987bcf85d238d76923f38e9f4274bb46c054 Mon Sep 17 00:00:00 2001 From: iximeow Date: Sun, 10 Mar 2019 17:39:32 -0700 Subject: update lifetimes due to yaxpeax-arch changes --- src/lib.rs | 7 +++++-- 1 file 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 = ::Address; + fn min_size() -> Self::Unit { + 3 + } fn len(&self) -> Self::Unit { 3 // ish } } impl Decodable for Instruction { - fn decode<'a, T: IntoIterator>(bytes: T) -> Option { + fn decode>(bytes: T) -> Option { let mut blank = Instruction { opcode: Opcode::NOP }; match blank.decode_into(bytes) { Some(_) => Some(blank), None => None } } - fn decode_into<'a, T: IntoIterator>(&mut self, bytes: T) -> Option<()> { + fn decode_into>(&mut self, bytes: T) -> Option<()> { match bytes.into_iter().next() { Some(0x00) => { self.opcode = Opcode::NOP; -- cgit v1.1