Just inlining some statements

This commit is contained in:
gil 2024-05-17 09:54:07 -05:00
parent 391b13a314
commit 2bce140e57

View file

@ -102,9 +102,7 @@ extern "C" fn start() -> ! {
// poll console for input and print characters back // poll console for input and print characters back
loop { loop {
let c = uart::CONSOLE.lock().as_mut().and_then(uart::Device::get); let c = uart::CONSOLE.lock().as_mut().and_then(uart::Device::get);
if let Some(c) = c { if let Some(c) = c { print!("{}", c as char); }
print!("{}", c as char);
}
} }
} }
@ -121,11 +119,7 @@ fn panic(info: &PanicInfo) -> ! {
#[no_mangle] #[no_mangle]
extern "C" fn abort() -> ! { extern "C" fn abort() -> ! {
use core::arch::asm; use core::arch::asm;
loop { loop { unsafe { asm!("wfi"); } }
unsafe {
asm!("wfi");
}
}
} }
// TODO unit testing // TODO unit testing