diff --git a/src/common.rs b/src/common.rs index 78f9fbf64..7750d9ea5 100644 --- a/src/common.rs +++ b/src/common.rs @@ -34,3 +34,8 @@ macro_rules! xx { From::from(From::from($x)) } } + +pub fn flush(s: String) { + ::std::io::stdout().write(s.as_bytes()).unwrap(); + ::std::io::stdout().flush().unwrap(); +}