mirror of
https://github.com/sharkdp/bat.git
synced 2025-09-02 11:22:30 +01:00
Use to_string_lossy
This commit is contained in:
@@ -237,7 +237,7 @@ impl<'a> Printer for InteractivePrinter<'a> {
|
|||||||
InputFile::Ordinary(ofile) => {
|
InputFile::Ordinary(ofile) => {
|
||||||
format!("file '{}'", &ofile.filename().to_string_lossy())
|
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::StdIn(None) => "STDIN".to_owned(),
|
||||||
InputFile::ThemePreviewFile => "".to_owned(),
|
InputFile::ThemePreviewFile => "".to_owned(),
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user