Skip to content

Commit 7f979c4

Browse files
committed
Fix compilation.
1 parent be1a2a4 commit 7f979c4

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/processor/instructions.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ pub enum Instruction {
88
LoadConst(usize),
99
LoadName(usize),
1010
LoadFast(u16),
11-
CallFunction(u16),
11+
CallFunction(u8, u8),
1212
}
1313

1414
#[derive(Debug)]
@@ -24,9 +24,8 @@ impl<I> InstructionDecoder<I> where I: Iterator {
2424

2525
impl<'a, I> InstructionDecoder<I> where I: Iterator<Item=&'a u8> {
2626
fn read_byte(&mut self) -> u8 {
27-
match (self.bytestream.next(), self.bytestream.next()) {
28-
(Some(b1), Some(b2)) => {
29-
((*b2 as u16) << 8) + (*b1 as u16)},
27+
match self.bytestream.next() {
28+
Some(b) => *b,
3029
_ => panic!("End of stream in the middle of an instruction."),
3130
}
3231
}

0 commit comments

Comments
 (0)