@@ -260,17 +260,15 @@ impl App {
260260
261261 let mut file_input = Vec::new();
262262 for (input, name) in files_or_none.zip(filenames_or_none) {
263− match input {
264− Some(input) => {
265− if input.to_str().unwrap() == "-" {
266− file_input.push(InputFile::StdIn(name));
267− } else {
268− file_input.push(InputFile::Ordinary(OrdinaryFile::from_path_with_name(
269− input, name,
270− )))
271− }
263+ if let Some(input) = input {
264+ if input.to_str().unwrap() == "-" {
265+ file_input.push(InputFile::StdIn(name));
266+ } else {
267+ let ofile = name.map_or(OrdinaryFile::from_path(input), |n| {
268+ OrdinaryFile::from_path_with_name(input, n)
269+ });
270+ file_input.push(InputFile::Ordinary(ofile))
272271 }
273− None => {}
274272 }
275273 }
276274 return Ok(file_input);