yazi/yazi-macro/src/stdio.rs
Wenxuan 00e8adc3de
fix: handle broken pipe errors gracefully (#2110)
Co-authored-by: sxyazi <sxyazi@gmail.com>
2024-12-30 23:52:52 +08:00

15 lines
249 B
Rust

#[macro_export]
macro_rules! outln {
($($tt:tt)*) => {{
use std::io::Write;
writeln!(std::io::stdout(), $($tt)*)
}}
}
#[macro_export]
macro_rules! errln {
($($tt:tt)*) => {{
use std::io::Write;
writeln!(std::io::stderr(), $($tt)*)
}}
}