Skip to content

Commit e158098

Browse files
committed
acpi: fix misc clippy warnings
1 parent 87041ea commit e158098

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

acpi/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
//! * Use `AcpiTables::from_rsdp` if you have the physical address of the RSDP
2929
//! * Use `AcpiTables::from_rsdt` if you have the physical address of the RSDT/XSDT
3030
//! * Use `AcpiTables::search_for_rsdp_bios` if you don't have the address of either, but **you know you are
31-
//! running on BIOS, not UEFI**
31+
//! running on BIOS, not UEFI**
3232
//!
3333
//! `AcpiTables` stores the addresses of all of the tables detected on a platform. The SDTs are parsed by this
3434
//! library, or can be accessed directly with `from_sdt`, while the `DSDT` and any `SSDTs` should be parsed with

acpi/src/madt.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,8 @@ unsafe impl AcpiTable for Madt {
5353
impl Madt {
5454
pub fn get_mpwk_mailbox_addr(&self) -> Result<u64, AcpiError> {
5555
for entry in self.entries() {
56-
match entry {
57-
MadtEntry::MultiprocessorWakeup(entry) => {
58-
return Ok(entry.mailbox_address);
59-
}
60-
_ => {}
56+
if let MadtEntry::MultiprocessorWakeup(entry) = entry {
57+
return Ok(entry.mailbox_address);
6158
}
6259
}
6360
Err(AcpiError::InvalidMadt(MadtError::UnexpectedEntry))

0 commit comments

Comments
 (0)