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