diff --git a/src/instruction.rs b/src/instruction.rs index ab5bb0d..9a5f0c6 100644 --- a/src/instruction.rs +++ b/src/instruction.rs @@ -1,4 +1,5 @@ -use std::fmt::{Display, Formatter, Write}; +use std::fmt; +use std::fmt::{Display, Formatter, LowerHex}; #[derive(Debug)] pub struct Instruction { @@ -9,7 +10,7 @@ impl Instruction { /// Creates a new instruction instance. pub(crate) fn new(data: [u8; 2]) -> Self { Instruction { - data: (data[1] as u16) << 8u8 | (data[0] as u16), + data: (data[0] as u16) << 8u8 | (data[1] as u16), } } }