boxxy/
macros.rs

1#[macro_export]
2macro_rules! shprintln {
3    ($dst:expr, $fmt:expr) => ({
4        use std::io::Write;
5        writeln!($dst, $fmt).unwrap();
6        $dst.flush().unwrap();
7    });
8    ($dst:expr, $fmt:expr, $($arg:tt)*) => ({
9        use std::io::Write;
10        writeln!($dst, $fmt, $($arg)*).unwrap();
11        $dst.flush().unwrap();
12    });
13}