mirror of
https://github.com/panpaul/tiny_os
synced 2024-09-20 09:45:19 +08:00
chore: kernel: make clippy happy
This commit is contained in:
parent
c2d4e3d129
commit
607c4dc0c6
@ -23,7 +23,7 @@ impl ConsoleDevice for EarlyConsole {
|
|||||||
unsafe { uart.write_volatile(ch) }
|
unsafe { uart.write_volatile(ch) }
|
||||||
}
|
}
|
||||||
|
|
||||||
fn write_str(&mut self, s: &str) -> () {
|
fn write_str(&mut self, s: &str) {
|
||||||
for ch in s.bytes() {
|
for ch in s.bytes() {
|
||||||
self.write(ch);
|
self.write(ch);
|
||||||
}
|
}
|
||||||
|
@ -172,7 +172,7 @@ impl ConsoleDevice for UartSifive {
|
|||||||
self.tx_write(n);
|
self.tx_write(n);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn write_str(&mut self, s: &str) -> () {
|
fn write_str(&mut self, s: &str) {
|
||||||
for ch in s.bytes() {
|
for ch in s.bytes() {
|
||||||
self.write(ch);
|
self.write(ch);
|
||||||
}
|
}
|
||||||
|
@ -41,7 +41,7 @@ impl ConsoleDevice for Uart16550 {
|
|||||||
self.port.send(byte);
|
self.port.send(byte);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn write_str(&mut self, s: &str) -> () {
|
fn write_str(&mut self, s: &str) {
|
||||||
self.port.write_str(s).unwrap()
|
self.port.write_str(s).unwrap()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -38,7 +38,7 @@ impl ConsoleDevice for SilenceConsole {
|
|||||||
|
|
||||||
fn write(&mut self, _: u8) {}
|
fn write(&mut self, _: u8) {}
|
||||||
|
|
||||||
fn write_str(&mut self, _: &str) -> () {}
|
fn write_str(&mut self, _: &str) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub static CONSOLE: Mutex<ConsoleDriver> = Mutex::new(ConsoleDriver::SilenceConsole(SilenceConsole));
|
pub static CONSOLE: Mutex<ConsoleDriver> = Mutex::new(ConsoleDriver::SilenceConsole(SilenceConsole));
|
||||||
|
Loading…
Reference in New Issue
Block a user