Run cargo fmt
This commit is contained in:
parent
5c0ea91e65
commit
1cfd133cb2
@ -17,5 +17,3 @@ pub extern "C" fn _start() -> ! {
|
||||
println!("Gamarjoba, munde!");
|
||||
loop {}
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
use core::fmt;
|
||||
use spin::Mutex;
|
||||
use lazy_static::lazy_static;
|
||||
|
||||
use spin::Mutex;
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! print {
|
||||
@ -48,7 +47,6 @@ pub enum Color {
|
||||
White = 15,
|
||||
}
|
||||
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
#[repr(transparent)]
|
||||
pub struct ColorCode(u8);
|
||||
@ -87,7 +85,6 @@ impl Writer {
|
||||
color_code,
|
||||
buffer: unsafe { &mut *(0xb8000 as *mut Buffer) },
|
||||
}
|
||||
|
||||
}
|
||||
pub fn write_string(&mut self, s: &str) {
|
||||
for byte in s.bytes() {
|
||||
@ -111,7 +108,8 @@ impl Writer {
|
||||
|
||||
let ptr = &mut self.buffer.chars[row][col] as *mut ScreenChar;
|
||||
let screenchar = ScreenChar {
|
||||
ascii_char: byte, color_code,
|
||||
ascii_char: byte,
|
||||
color_code,
|
||||
};
|
||||
|
||||
unsafe {
|
||||
@ -161,10 +159,7 @@ impl fmt::Write for Writer {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
lazy_static! {
|
||||
pub static ref WRITER: Mutex<Writer> = Mutex::new(Writer::new(
|
||||
ColorCode::new(Color::Yellow, Color::Black)
|
||||
));
|
||||
pub static ref WRITER: Mutex<Writer> =
|
||||
Mutex::new(Writer::new(ColorCode::new(Color::Yellow, Color::Black)));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user