Pass stdin as a generic BufRead, fix stdin tests

This commit is contained in:
sharkdp authored and David Peter committed 2020-04-21 08:57:15 +02:00
1 parent d5a31dc2ec
commit 1b8ce60054
3 files changed
+17 -8

No files matched your search

+1 -3
View File
@@ -56,10 +56,8 @@ impl<'b> Controller<'b> {
let writer = output_type.handle()?;
let mut no_errors: bool = true;
let stdin = io::stdin();
for input_file in self.config.files.iter() {
match input_file.get_reader(&stdin) {
match input_file.get_reader(io::stdin().lock()) {
Err(error) => {
handle_error(&error);
no_errors = false;