1
0
mirror of https://github.com/jht5945/rust_util.git synced 2025-12-27 07:30:05 +08:00

modify flush_stdout logic

This commit is contained in:
2019-08-03 22:45:54 +08:00
parent db35e8e55b
commit ba3fe4366d

View File

@@ -166,10 +166,7 @@ pub fn print_message(mt: MessageType, message: &str) {
}
pub fn flush_stdout() {
match io::stdout().flush() {
Err(err) => print_message(MessageType::ERROR, &format!("Flush stdout failed: {}", err)),
Ok(_) => (),
}
io::stdout().flush().ok();
}
pub fn clear_lastline() {