Use writeln!() rather than print!() + concat!() in println!()
This fixes using format arg captures
This commit is contained in:
+4
-3
@@ -10,7 +10,8 @@ macro_rules! print {
|
||||
/// Print with new line to console
|
||||
#[macro_export]
|
||||
macro_rules! println {
|
||||
() => (print!("\n"));
|
||||
($fmt:expr_2021) => (print!(concat!($fmt, "\n")));
|
||||
($fmt:expr_2021, $($arg:tt)*) => (print!(concat!($fmt, "\n"), $($arg)*));
|
||||
($($arg:tt)*) => ({
|
||||
use core::fmt::Write;
|
||||
let _ = writeln!($crate::arch::debug::Writer::new(), $($arg)*);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user