|
|
|
@ -257,7 +257,7 @@ impl App {
|
|
|
|
|
let files: Option<Vec<&OsStr>> = self.matches.values_of_os("FILE").map(|vs| vs.collect());
|
|
|
|
|
|
|
|
|
|
if files.is_none() {
|
|
|
|
|
let input = Input::stdin().as_file(filenames_or_none.next().unwrap_or(None));
|
|
|
|
|
let input = Input::stdin_as_file(filenames_or_none.next().unwrap_or(None));
|
|
|
|
|
return Ok(vec![input]);
|
|
|
|
|
}
|
|
|
|
|
let files_or_none: Box<dyn Iterator<Item = _>> = match files {
|
|
|
|
@ -269,9 +269,9 @@ impl App {
|
|
|
|
|
for (filepath, provided_name) in files_or_none.zip(filenames_or_none) {
|
|
|
|
|
if let Some(filepath) = filepath {
|
|
|
|
|
if filepath.to_str().unwrap_or_default() == "-" {
|
|
|
|
|
file_input.push(Input::stdin().as_file(provided_name));
|
|
|
|
|
file_input.push(Input::stdin_as_file(provided_name));
|
|
|
|
|
} else {
|
|
|
|
|
file_input.push(Input::ordinary_file(filepath).as_file(provided_name));
|
|
|
|
|
file_input.push(Input::ordinary_file(filepath).with_name(provided_name));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|