From 4d34a153633ad5b4de5e68becc5bfee9b5f858a6 Mon Sep 17 00:00:00 2001 From: Yoshua Wuyts Date: Wed, 16 Oct 2019 14:34:11 +0200 Subject: [PATCH] fix macros, take II Signed-off-by: Yoshua Wuyts --- src/macros.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/macros.rs b/src/macros.rs index d70b779..12ca7ed 100644 --- a/src/macros.rs +++ b/src/macros.rs @@ -86,7 +86,10 @@ macro_rules! print { #[macro_export] macro_rules! println { () => ($crate::print!("\n")); - ($($arg:tt)*) => ($crate::io::_print(format_args!($($arg)*))) + ($($arg:tt)*) => (async { + $crate::io::_print(format_args!($($arg)*)).await; + $crate::io::_print(format_args!("\n")).await; + }) } /// Prints to the standard error. @@ -158,6 +161,7 @@ macro_rules! eprintln { ($($arg:tt)*) => ( async { $crate::io::_eprint(format_args!($($arg)*)).await; + $crate::io::_eprint(format_args!("\n")).await; } ); }