Reset the "force_read" flag
This commit is contained in:
parent
45639f18c0
commit
681563934a
1 changed files with 2 additions and 0 deletions
|
@ -36,6 +36,8 @@ impl FilterInput for StdIn {
|
|||
let mut force_read = false;
|
||||
loop {
|
||||
if force_read || self.input.is_empty() {
|
||||
// Reset the flag
|
||||
force_read = false;
|
||||
// Read stdin in self.buffer
|
||||
self.buffer.copy_from_slice(&[0; BUFFER_SIZE]);
|
||||
let len = self.stdin.read(&mut self.buffer)?;
|
||||
|
|
Reference in a new issue