diff options
Diffstat (limited to 'src/macros.rs')
-rw-r--r-- | src/macros.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/macros.rs b/src/macros.rs index 35e69f2d..464110e6 100644 --- a/src/macros.rs +++ b/src/macros.rs @@ -29,3 +29,19 @@ macro_rules! maybe { } } } + +#[macro_export] +macro_rules! print { + ($($arg:tt)*) => {{ + use std::io::Write; + let _ = write!(::std::io::stdout(), $($arg)*); + }}; +} + +#[macro_export] +macro_rules! eprint { + ($($arg:tt)*) => {{ + use std::io::Write; + let _ = write!(::std::io::stderr(), $($arg)*); + }}; +} |