mirror of
https://github.com/panpaul/tiny_os
synced 2024-09-20 09:45:19 +08:00
chore: logging: make clippy happy
This commit is contained in:
parent
78133158b6
commit
d8c1ba45ed
@ -9,7 +9,7 @@ use log::{LevelFilter, Log, Metadata, Record};
|
||||
macro_rules! print {
|
||||
($($arg:tt)*) => {{
|
||||
use core::fmt::Write;
|
||||
use crate::plat::console::CONSOLE;
|
||||
use $crate::plat::console::CONSOLE;
|
||||
CONSOLE.lock().write_fmt(format_args!($($arg)*)).unwrap();
|
||||
}};
|
||||
}
|
||||
@ -73,8 +73,7 @@ pub fn set_log_level(fdt: &Fdt) {
|
||||
.map(|args| args.split_ascii_whitespace())
|
||||
.map(|args| args.filter(|arg| arg.starts_with("loglevel=")))
|
||||
.map(|args| args.map(|arg| arg["loglevel=".len()..].parse::<usize>()))
|
||||
.map(|args| args.last())
|
||||
.flatten()
|
||||
.and_then(|args| args.last())
|
||||
.map(|level| level.unwrap_or(UNKNOWN_LEVEL))
|
||||
.unwrap_or(UNKNOWN_LEVEL);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user