From 24e7974d04c4f6610fcdfc2d490e3f5b60a109e2 Mon Sep 17 00:00:00 2001 From: Philipp Oppermann Date: Sun, 18 Nov 2018 14:30:40 +0100 Subject: [PATCH] Update to a newer println definition --- src/vga_buffer.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/vga_buffer.rs b/src/vga_buffer.rs index 887d0917..729241c6 100644 --- a/src/vga_buffer.rs +++ b/src/vga_buffer.rs @@ -154,12 +154,11 @@ macro_rules! print { ($($arg:tt)*) => ($crate::vga_buffer::_print(format_args!($($arg)*))); } -/// Like the `print!` macro in the standard library, but prints to the VGA text buffer. +/// Like the `println!` macro in the standard library, but prints to the VGA text buffer. #[macro_export] macro_rules! println { () => ($crate::print!("\n")); - ($fmt:expr) => ($crate::print!(concat!($fmt, "\n"))); - ($fmt:expr, $($arg:tt)*) => ($crate::print!(concat!($fmt, "\n"), $($arg)*)); + ($($arg:tt)*) => ($crate::print!("{}\n", format_args!($($arg)*))); } /// Prints the given formatted string to the VGA text buffer through the global `WRITER` instance.