Use to_string_lossy

This commit is contained in:
sharkdp 2020-04-18 11:39:11 +02:00 committed by David Peter
parent 1b8ce60054
commit 98ba9e0101
1 changed files with 1 additions and 1 deletions

View File

@ -237,7 +237,7 @@ impl<'a> Printer for InteractivePrinter<'a> {
InputFile::Ordinary(ofile) => {
format!("file '{}'", &ofile.filename().to_string_lossy())
}
InputFile::StdIn(Some(name)) => name.to_str().unwrap().to_string(),
InputFile::StdIn(Some(name)) => name.to_string_lossy().into_owned(),
InputFile::StdIn(None) => "STDIN".to_owned(),
InputFile::ThemePreviewFile => "".to_owned(),
};