diff options
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; | 
