Skip to content

Commit

Permalink
Fixed missing feature flag and clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
transistorfet committed Mar 21, 2024
1 parent 12861b8 commit 3a6e337
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 13 deletions.
3 changes: 3 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion emulator/cpus/m68k/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ log = "0.4"
thiserror = "1.0"
femtos = "0.1"
moa-parsing = { path = "../../libraries/parsing" }
emulator-hal = { path = "../../libraries/emulator-hal/emulator-hal" }
emulator-hal = { path = "../../libraries/emulator-hal/emulator-hal", features = ["femtos"] }

moa-core = { path = "../../core", optional = true }

Expand Down
6 changes: 3 additions & 3 deletions emulator/cpus/m68k/src/debugger.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ where

type Error = M68kError<BusError>;

fn inspect(&mut self, info: Self::InfoType, bus: &mut Bus, writer: &mut Writer) -> Result<(), Self::Error> {
fn inspect(&mut self, info: Self::InfoType, _bus: &mut Bus, writer: &mut Writer) -> Result<(), Self::Error> {
match info {
M68kInfo::State => self
.state
Expand Down Expand Up @@ -77,11 +77,11 @@ where
}

fn add_breakpoint(&mut self, address: M68kAddress) {
self.debugger.breakpoints.push(address as u32);
self.debugger.breakpoints.push(address);
}

fn remove_breakpoint(&mut self, address: M68kAddress) {
if let Some(index) = self.debugger.breakpoints.iter().position(|a| *a == address as u32) {
if let Some(index) = self.debugger.breakpoints.iter().position(|a| *a == address) {
self.debugger.breakpoints.remove(index);
}
}
Expand Down
10 changes: 1 addition & 9 deletions emulator/cpus/m68k/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,19 +194,11 @@ pub enum M68kError<BusError> {
Other(String),
}

#[derive(Clone)]
#[derive(Clone, Default)]
pub struct M68kStatistics {
pub cycle_number: usize,
}

impl Default for M68kStatistics {
fn default() -> Self {
Self {
cycle_number: 0,
}
}
}

#[derive(Clone)]
pub struct M68k<Instant> {
pub info: CpuInfo,
Expand Down

0 comments on commit 3a6e337

Please sign in to comment.