Make clippy happy

This commit is contained in:
2019-04-01 12:51:40 +02:00
parent 8159943199
commit 4d618efe42
8 changed files with 54 additions and 41 deletions

View File

@@ -155,17 +155,17 @@ impl Machine {
for arg in &args {
let v = match arg {
Args::Byte => self.block.read_i8()? as i32,
Args::Short => self.block.read_i16()? as i32,
Args::Byte => i32::from(self.block.read_i8()?),
Args::Short => i32::from(self.block.read_i16()?),
Args::Var => {
if wide {
self.block.read_u16()? as i32
i32::from(self.block.read_u16()?)
} else {
self.block.read_u8()? as i32
i32::from(self.block.read_u8()?)
}
},
Args::Label => self.block.read_i16()? as i32,
Args::Constant => self.block.read_u16()? as i32,
Args::Label => i32::from(self.block.read_i16()?),
Args::Constant => i32::from(self.block.read_u16()?),
};
params.push(v);
}