Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix misc clippy issues in clicky-core #19

Merged
merged 1 commit into from
May 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion clicky-core/src/devices/generic/asanram.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ impl AsanRam {
ContractViolation {
msg,
severity: log::Level::Warn,
stub_val: Some(stub as u32),
stub_val: Some(stub),
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion clicky-core/src/devices/platform/pp/flash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ impl Memory for Flash {
}
(CFIState::ReadSoftwareID, 0x0) => Ok(0x00BF), // Manufacturer ID (SST)
(CFIState::ReadSoftwareID, 0x1) => Ok(0x273F), // Device ID (SST39WF800A)
_ => return Err(Unimplemented)
_ => Err(Unimplemented),
}
}

Expand Down
9 changes: 2 additions & 7 deletions clicky-core/src/devices/platform/pp/intcon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@ struct IntConCpuRegs {
priority: u32,
}

#[derive(Debug)]
#[derive(Debug, Default)]
enum IrqKind {
#[default]
Unregistered,
Shared(irq::Reciever),
// i.e: mailbox
Expand All @@ -51,12 +52,6 @@ enum IrqKind {
},
}

impl Default for IrqKind {
fn default() -> IrqKind {
IrqKind::Unregistered
}
}

/// Half of the PP5020 Interrupt Controller.
#[derive(Debug, Default)]
struct IntCon32 {
Expand Down
4 changes: 2 additions & 2 deletions clicky-core/src/sys/ipod4g/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -464,10 +464,10 @@ macro_rules! mmap {
fn $fn(&mut self, addr: u32) -> MemResult<$ret> {
let mut addr = addr;
if (0x00..0x1F).contains(&addr) && self.cachecon.local_evt {
addr = addr | 0x6000_f100;
addr |= 0x6000_f100;
}

let (mut addr, prot) = self.memcon.virt_to_phys(addr);
let (addr, prot) = self.memcon.virt_to_phys(addr);
if !prot.r {
return Err(MemException::MmuViolation)
}
Expand Down
Loading