From 31659407405d51de8202f8e8d1cf4be60e1c08e9 Mon Sep 17 00:00:00 2001 From: Ava Silver Date: Thu, 28 Dec 2023 16:59:31 -0800 Subject: [PATCH] clean up trace handling --- src/cpu/mod.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/cpu/mod.rs b/src/cpu/mod.rs index c2340c3..b920b6f 100644 --- a/src/cpu/mod.rs +++ b/src/cpu/mod.rs @@ -171,11 +171,10 @@ impl Mos6502 { let opcode = self.fetch(); if let Some(handler) = &mut self.trace { - let trace = CpuTrace { + handler.handle(&CpuTrace { opcode, address: self.registers.pc.address() - 1, - }; - handler.handle(&trace); + }); } match self.execute(opcode) {