2
0
Fork 1
mirror of https://github.com/async-rs/async-std.git synced 2025-02-06 04:35:32 +00:00

fix macros, take II

Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
This commit is contained in:
Yoshua Wuyts 2019-10-16 14:34:11 +02:00
parent aaa1b6ca39
commit 4d34a15363
No known key found for this signature in database
GPG key ID: 24EA8164F96777ED

View file

@ -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;
}
);
}