Skip to content

Commit

Permalink
Fix clippy and formatting warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Granddave committed Jan 2, 2024
1 parent 511fdde commit 2cc0552
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 15 deletions.
15 changes: 1 addition & 14 deletions src/emulator/cpu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ pub enum RunOption {
StopOnBreakInstruction,
}

#[derive(Debug, Clone, PartialEq, Eq)]
#[derive(Debug, Default, Clone, PartialEq, Eq)]
pub struct Cpu {
/// CPU registers
regs: Registers,
Expand All @@ -50,19 +50,6 @@ pub struct Cpu {
last_instruction: Option<ASTInstructionNode>,
}

impl Default for Cpu {
fn default() -> Self {
Self {
regs: Registers::default(),
reset_interrupt_pending: false,
nmi_interrupt_pending: false,
irq_interrupt_pending: false,
cycles_left_for_instruction: 0,
last_instruction: None,
}
}
}

// CPU implementation
impl Cpu {
#[tracing::instrument]
Expand Down
2 changes: 1 addition & 1 deletion tests/emulator_test.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use mos6502::emulator::cpu::RunOption;
use mos6502::{
assembler::compile_code,
emulator::{
Expand All @@ -6,7 +7,6 @@ use mos6502::{
memory::{Bus, Memory},
},
};
use mos6502::emulator::cpu::RunOption;

#[test]
fn test_loop_program() {
Expand Down

0 comments on commit 2cc0552

Please sign in to comment.