From a4b3da193915d0e31c68cfe205d872e51439be38 Mon Sep 17 00:00:00 2001 From: Rekai Musuka Date: Mon, 7 Sep 2020 21:51:20 -0500 Subject: [PATCH] chore: replace unimplemented!() with unreachable!() --- src/instruction.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/instruction.rs b/src/instruction.rs index 2daa8a4..1ec067b 100644 --- a/src/instruction.rs +++ b/src/instruction.rs @@ -199,7 +199,7 @@ impl Instruction { cpu.set_register(Register::A, cpu.read_byte(nn)); Cycles(16) } - _ => unimplemented!(), + _ => unreachable!(), }, Instruction::STOP => Cycles(4), Instruction::JR(cond, offset) => { @@ -1334,7 +1334,7 @@ impl Instruction { (3, 5, 1, _, 0) => Self::CALL(JumpCondition::Always, nn), // CALL nn // (3, 5, 1, _, 1..=3) => unreachable!(), (removed in documentation) (3, 6, _, _, _) => Table::x3_alu(y, n), - (3, 7, _, _, _) => Self::RST(y * 8), // RST y * 8 + (3, 7, _, _, _) => Self::RST(y * 8), // RST n _ => panic!( "Unknown Opcode: {:#x?}\n x: {}, z: {}, q: {}, y: {}, p: {}", opcode, x, z, q, y, p