Add flush function.

This commit is contained in:
Gav Wood 2016-01-15 13:11:30 +01:00
parent 23fbe39408
commit 1136e65f0d

View File

@ -34,3 +34,8 @@ macro_rules! xx {
From::from(From::from($x)) From::from(From::from($x))
} }
} }
pub fn flush(s: String) {
::std::io::stdout().write(s.as_bytes()).unwrap();
::std::io::stdout().flush().unwrap();
}