Run rustfmt

This commit is contained in:
Philipp Oppermann
2018-04-02 17:34:37 +02:00
parent 5d0503e250
commit 21fb890328
4 changed files with 45 additions and 40 deletions

View File

@@ -3,9 +3,9 @@
#![no_std] // don't link the Rust standard library
#![no_main] // disable all Rust-level entry points
extern crate volatile;
extern crate rlibc;
extern crate spin;
extern crate volatile;
#[macro_use]
extern crate lazy_static;
@@ -24,9 +24,11 @@ pub extern "C" fn _start() -> ! {
/// This function is called on panic.
#[lang = "panic_fmt"]
#[no_mangle]
pub extern "C" fn rust_begin_panic(_msg: core::fmt::Arguments,
_file: &'static str,
_line: u32,
_column: u32) -> ! {
pub extern "C" fn rust_begin_panic(
_msg: core::fmt::Arguments,
_file: &'static str,
_line: u32,
_column: u32,
) -> ! {
loop {}
}

View File

@@ -18,22 +18,22 @@ lazy_static! {
#[derive(Debug, Clone, Copy)]
#[repr(u8)]
pub enum Color {
Black = 0,
Blue = 1,
Green = 2,
Cyan = 3,
Red = 4,
Magenta = 5,
Brown = 6,
LightGray = 7,
DarkGray = 8,
LightBlue = 9,
Black = 0,
Blue = 1,
Green = 2,
Cyan = 3,
Red = 4,
Magenta = 5,
Brown = 6,
LightGray = 7,
DarkGray = 8,
LightBlue = 9,
LightGreen = 10,
LightCyan = 11,
LightRed = 12,
Pink = 13,
Yellow = 14,
White = 15,
LightCyan = 11,
LightRed = 12,
Pink = 13,
Yellow = 14,
White = 15,
}
/// A combination of a foreground and a background color.
@@ -119,7 +119,7 @@ impl Writer {
self.buffer.chars[row - 1][col].write(character);
}
}
self.clear_row(BUFFER_HEIGHT-1);
self.clear_row(BUFFER_HEIGHT - 1);
self.column_position = 0;
}