diff --git a/src/logging.rs b/src/logging.rs index f8f75ff..ce3533d 100644 --- a/src/logging.rs +++ b/src/logging.rs @@ -44,8 +44,7 @@ impl Log for SimpleLogger { } pub fn init() { - static LOGGER: SimpleLogger = SimpleLogger; - log::set_logger(&LOGGER).unwrap(); + log::set_logger(&SimpleLogger).unwrap(); // TODO: get log level from boot env log::set_max_level(LevelFilter::Trace); diff --git a/src/plat/io.rs b/src/plat/io.rs index ce3e283..75b62a5 100644 --- a/src/plat/io.rs +++ b/src/plat/io.rs @@ -1,15 +1,13 @@ pub struct RawConsole -where RawConsole: Printer; +where RawConsole: Printer + Reader; pub trait Printer: core::fmt::Write { fn put_char(c: char); - #[inline] fn put_str(s: &str) { s.chars().for_each(Self::put_char); } - #[inline] fn put_line(s: &str) { Self::put_str(s); Self::put_char('\n');