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:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user