diff options
author | iximeow <me@iximeow.net> | 2019-03-10 17:39:32 -0700 |
---|---|---|
committer | iximeow <me@iximeow.net> | 2020-01-12 17:23:02 -0800 |
commit | 54e6987bcf85d238d76923f38e9f4274bb46c054 (patch) | |
tree | 45978fd269960e457df518ec530401e6f289e5f9 /src | |
parent | e90196a82884abcbd950f17a457e0109fa1ca1b5 (diff) |
update lifetimes due to yaxpeax-arch changes
Diffstat (limited to 'src')
-rw-r--r-- | src/lib.rs | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -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; |