Fixed missing feature flag and clippy

This commit is contained in:
transistor 2024-03-20 20:47:38 -07:00
parent 12861b8493
commit 3a6e3379f4
4 changed files with 8 additions and 13 deletions

3
Cargo.lock generated
View File

@ -390,6 +390,9 @@ checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a"
[[package]]
name = "emulator-hal"
version = "0.1.0"
dependencies = [
"femtos",
]
[[package]]
name = "emulator-hal-memory"

View File

@ -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 }

View File

@ -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
@ -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);
}
}

View File

@ -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,