Removed the Opcode::NotAnOpcode variant, replaced its uses with Option<Opcode>, and used the NonZero optimization to maintain the small 1-byte size of an optional Opcode.
This commit is contained in:
committed by
Jakob Stoklund Olesen
parent
855c429d31
commit
e002011602
@@ -1088,7 +1088,7 @@ impl<'a> Parser<'a> {
|
||||
// Parse the operands following the instruction opcode.
|
||||
// This depends on the format of the opcode.
|
||||
fn parse_inst_operands(&mut self, ctx: &Context, opcode: Opcode) -> Result<InstructionData> {
|
||||
Ok(match opcode.format().unwrap() {
|
||||
Ok(match opcode.format() {
|
||||
InstructionFormat::Nullary => {
|
||||
InstructionData::Nullary {
|
||||
opcode: opcode,
|
||||
|
||||
Reference in New Issue
Block a user