mirror of
https://github.com/Dummi26/mers.git
synced 2025-03-10 14:13:52 +01:00
added stdio::flush so that we can print partial lines using print/eprint
This commit is contained in:
parent
2c9fb1b4a4
commit
79660c1976
@ -1,4 +1,7 @@
|
||||
use std::sync::{Arc, Mutex};
|
||||
use std::{
|
||||
io::Write,
|
||||
sync::{Arc, Mutex},
|
||||
};
|
||||
|
||||
use crate::{
|
||||
data::{self, Data, Type},
|
||||
@ -48,6 +51,7 @@ impl Config {
|
||||
out: Arc::new(|a, i| Ok(Type::empty_tuple())),
|
||||
run: Arc::new(|a, _i| {
|
||||
eprint!("{}", a.get());
|
||||
std::io::stderr().lock().flush();
|
||||
Data::empty_tuple()
|
||||
}),
|
||||
}),
|
||||
@ -72,6 +76,7 @@ impl Config {
|
||||
out: Arc::new(|a, i| Ok(Type::empty_tuple())),
|
||||
run: Arc::new(|a, _i| {
|
||||
print!("{}", a.get());
|
||||
std::io::stdout().lock().flush();
|
||||
Data::empty_tuple()
|
||||
}),
|
||||
}),
|
||||
|
Loading…
Reference in New Issue
Block a user