forked from mirror/async-std
fix macros, take II
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
This commit is contained in:
parent
aaa1b6ca39
commit
4d34a15363
1 changed files with 5 additions and 1 deletions
|
@ -86,7 +86,10 @@ macro_rules! print {
|
||||||
#[macro_export]
|
#[macro_export]
|
||||||
macro_rules! println {
|
macro_rules! println {
|
||||||
() => ($crate::print!("\n"));
|
() => ($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.
|
/// Prints to the standard error.
|
||||||
|
@ -158,6 +161,7 @@ macro_rules! eprintln {
|
||||||
($($arg:tt)*) => (
|
($($arg:tt)*) => (
|
||||||
async {
|
async {
|
||||||
$crate::io::_eprint(format_args!($($arg)*)).await;
|
$crate::io::_eprint(format_args!($($arg)*)).await;
|
||||||
|
$crate::io::_eprint(format_args!("\n")).await;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue