@@ -244,24 +244,20 @@ impl App {
244244 }
245245 None => Box::new(std::iter::repeat(None)),
246246 };
247− let files: Option<Vec<&str>> = self
248− .matches
249− .values_of_os("FILE")
250− .map(|values| values.map(|fname| fname.to_str()).collect())
251− .unwrap_or(None);
247+ let files: Option<Vec<&OsStr>> = self.matches.values_of_os("FILE").map(|vs| vs.collect());
252248
253249 if files.is_none() {
254250 return Ok(vec![InputFile::StdIn(filenames_or_none.nth(0).unwrap())]);
255251 }
256252 let files_or_none: Box<dyn Iterator<Item = _>> = match files {
257− Some(ref files) => Box::new(files.into_iter().map(|name| Some(OsStr::new(*name)))),
253+ Some(ref files) => Box::new(files.into_iter().map(|name| Some(*name))),
258254 None => Box::new(std::iter::repeat(None)),
259255 };
260256
261257 let mut file_input = Vec::new();
262258 for (input, name) in files_or_none.zip(filenames_or_none) {
263259 if let Some(input) = input {
264− if input.to_str().unwrap() == "-" {
260+ if input.to_str().unwrap_or_default() == "-" {
265261 file_input.push(InputFile::StdIn(name));
266262 } else {
267263 let mut ofile = OrdinaryFile::from_path(input);