Format code
This commit is contained in:
parent
172c967095
commit
51351e054a
|
|
@ -11,9 +11,9 @@ use x86_64::instructions::hlt;
|
||||||
|
|
||||||
mod color;
|
mod color;
|
||||||
mod serial;
|
mod serial;
|
||||||
mod vga_buffer;
|
|
||||||
mod testable;
|
mod testable;
|
||||||
mod utils;
|
mod utils;
|
||||||
|
mod vga_buffer;
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
fn test_runner(tests: &[&dyn Fn()]) {
|
fn test_runner(tests: &[&dyn Fn()]) {
|
||||||
|
|
@ -30,7 +30,6 @@ fn trivial_assertion() {
|
||||||
assert_eq!(1, 1);
|
assert_eq!(1, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#[cfg(not(test))]
|
#[cfg(not(test))]
|
||||||
#[panic_handler]
|
#[panic_handler]
|
||||||
fn panic(info: &PanicInfo) -> ! {
|
fn panic(info: &PanicInfo) -> ! {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
use crate::{serial_print,serial_println};
|
use crate::{serial_print, serial_println};
|
||||||
|
|
||||||
pub trait Testable {
|
pub trait Testable {
|
||||||
fn run(&self) -> ();
|
fn run(&self) -> ();
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,6 @@ pub fn exit_qemu(exit_code: QemuExitCode) {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn print_logo() {
|
pub fn print_logo() {
|
||||||
|
|
||||||
let text = r###"
|
let text = r###"
|
||||||
_ _ __
|
_ _ __
|
||||||
_ |_ |_) _ _|_/ \(_
|
_ |_ |_) _ _|_/ \(_
|
||||||
|
|
|
||||||
|
|
@ -100,8 +100,7 @@ impl fmt::Write for Writer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn change_color(color: Color) {
|
||||||
pub fn change_color(color : Color) {
|
|
||||||
WRITER.lock().color_code = ColorCode::new(color, Color::Black);
|
WRITER.lock().color_code = ColorCode::new(color, Color::Black);
|
||||||
}
|
}
|
||||||
pub fn reset_color() {
|
pub fn reset_color() {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue