From 374a31064a6708ec2e14e94227729c520b1b847f Mon Sep 17 00:00:00 2001 From: pjht Date: Mon, 23 Sep 2024 15:24:39 -0500 Subject: [PATCH] Fix lints --- src/main.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main.rs b/src/main.rs index d5931ed..5cf6ea6 100644 --- a/src/main.rs +++ b/src/main.rs @@ -8,7 +8,7 @@ use device_types::{Class, InvalidClass}; use pci_rpc::Server; use serde::{Deserialize, Serialize}; use spin::Mutex; -use x86_64::{instructions::port::{Port, PortWriteOnly}, registers::control}; +use x86_64::instructions::port::{Port, PortWriteOnly}; pub mod device_types; @@ -78,7 +78,7 @@ impl ConfigRaw { match Cursor::new(&self.data).read_le() { Ok(cfg) => Ok(cfg), Err(binread::Error::NoVariantMatch { pos: _ }) => Err(InvalidHeaderType), - Err(err) => Err(err).expect("Only NoVariantMatch should be possible"), + Err(err) => panic!("Only NoVariantMatch should be possible: {:?}", err), } } } @@ -391,9 +391,9 @@ fn main() { let size = !(info_bits) + 1; accessor.write(bar_idx, bar); if bar & 0x1 == 1 { - syslog_client.send_text_message("pci", format!("BAR {}: IO {:#x}, size {:#x}", i, bar & (!0x3), size)); + syslog_client.send_text_message("pci", format!("BAR {}: IO {:#x}, size {:#x}", i, bar & (!0x3), size)).unwrap(); } else { - syslog_client.send_text_message("pci", format!("BAR {}: MEM {:#x}, size {:#x}", i, bar & (!0xF), size)); + syslog_client.send_text_message("pci", format!("BAR {}: MEM {:#x}, size {:#x}", i, bar & (!0xF), size)).unwrap(); } } }