log-server: fix const warnings on rust 1.48

Rust 1.48 changed how warnings of const values operate.

Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
Sean Cross 2020-11-23 17:21:03 +08:00
parent b24719a0fc
commit 12532e1734

View file

@ -7,7 +7,7 @@ macro_rules! print
{ {
($($args:tt)+) => ({ ($($args:tt)+) => ({
use core::fmt::Write; use core::fmt::Write;
let _ = write!(crate::debug::DEFAULT, $($args)+); let _ = write!(crate::debug::Uart {}, $($args)+);
}); });
} }
#[macro_export] #[macro_export]
@ -28,7 +28,7 @@ macro_rules! println
fn handle_irq(irq_no: usize, arg: *mut usize) { fn handle_irq(irq_no: usize, arg: *mut usize) {
print!("Handling IRQ {} (arg: {:08x}): ", irq_no, arg as usize); print!("Handling IRQ {} (arg: {:08x}): ", irq_no, arg as usize);
while let Some(c) = crate::debug::DEFAULT.getc() { while let Some(c) = {crate::debug::Uart {}}.getc() {
print!("{}", c as char); print!("{}", c as char);
} }
println!(); println!();