@@ -244,24 +244,20 @@ impl App {
245 None => Box::new(std::iter::repeat(None)),
245 None => Box::new(std::iter::repeat(None)),
247− let files: Option<Vec<&str>> = self
247+ let files: Option<Vec<&OsStr>> = self.matches.values_of_os("FILE").map(|vs| vs.collect());
249− .values_of_os("FILE")
250− .map(|values| values.map(|fname| fname.to_str()).collect())
253 if files.is_none() {
249 if files.is_none() {
254 return Ok(vec![InputFile::StdIn(filenames_or_none.nth(0).unwrap())]);
250 return Ok(vec![InputFile::StdIn(filenames_or_none.nth(0).unwrap())]);
256 let files_or_none: Box<dyn Iterator<Item = _>> = match files {
252 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))),
258 None => Box::new(std::iter::repeat(None)),
254 None => Box::new(std::iter::repeat(None)),
261 let mut file_input = Vec::new();
257 let mut file_input = Vec::new();
262 for (input, name) in files_or_none.zip(filenames_or_none) {
258 for (input, name) in files_or_none.zip(filenames_or_none) {
263 if let Some(input) = input {
259 if let Some(input) = input {
264− if input.to_str().unwrap() == "-" {
260+ if input.to_str().unwrap_or_default() == "-" {
265 file_input.push(InputFile::StdIn(name));
261 file_input.push(InputFile::StdIn(name));
267 let mut ofile = OrdinaryFile::from_path(input);
263 let mut ofile = OrdinaryFile::from_path(input);