mirror of
https://github.com/jht5945/rust_util.git
synced 2025-12-27 15:40:03 +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() {
|
pub fn flush_stdout() {
|
||||||
match io::stdout().flush() {
|
io::stdout().flush().ok();
|
||||||
Err(err) => print_message(MessageType::ERROR, &format!("Flush stdout failed: {}", err)),
|
|
||||||
Ok(_) => (),
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn clear_lastline() {
|
pub fn clear_lastline() {
|
||||||
|
|||||||
Reference in New Issue
Block a user