Clippy lints

This commit is contained in:
August 2025-10-02 01:04:58 -04:00
parent 8a87fa80b1
commit b3fe90ba25
Signed by: shibedrill
GPG Key ID: 5FE0CB25945EFAA2
2 changed files with 5 additions and 3 deletions

View File

@ -192,7 +192,7 @@ impl SerialPort {
/// Get the baud rate divisor.
pub fn get_divisor(&mut self) -> u16 {
self.set_dlab(true);
let result: u16 = unsafe { self.base_port.read() as u16 | ((self.interrupt_enable.read() as u16) << 8) as u16};
let result: u16 = unsafe { self.base_port.read() as u16 | ((self.interrupt_enable.read() as u16) << 8)};
self.set_dlab(false);
result
}
@ -322,7 +322,7 @@ impl SerialPort {
/// This OVERWRITES all held flags. To set specific flags, first store the current
/// value using `get_modem_control()`, then modify the flags you want to change.
pub fn set_modem_control(&mut self, control: BitFlags<ModemControl>) {
unsafe { self.modem_control.write(control.bits() as u8) };
unsafe { self.modem_control.write(control.bits()) };
}
/// Get the Modem Control register flags.
pub fn get_modem_control(&mut self) -> BitFlags<ModemControl> {

View File

@ -9,9 +9,11 @@ use lazy_static::lazy_static;
use spin::Mutex;
use crate::format;
pub type LogDevice = dyn Fn(&str) + Send + Sync;
pub struct Logger {
pub level: LogLevel,
devices: Vec<Box<dyn Fn(&str) + Send + Sync>>
devices: Vec<Box<LogDevice>>
}
lazy_static! {