Return an error if end of file is reached on stdin
This commit is contained in:
parent
dfa61a9eaa
commit
6b532242ef
1 changed files with 1 additions and 1 deletions
|
@ -52,7 +52,7 @@ impl FilterInput for StdIn {
|
|||
},
|
||||
};
|
||||
if len == 0 {
|
||||
continue;
|
||||
return Err(Error::new("Unable to read on stdin."));
|
||||
}
|
||||
// Put the buffer's content in self.input
|
||||
self.input += match self.buffer.iter().position(|&x| x == 0) {
|
||||
|
|
Reference in a new issue