diff options
Diffstat (limited to 'src/bin/bat/input.rs')
-rw-r--r-- | src/bin/bat/input.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/bin/bat/input.rs b/src/bin/bat/input.rs index 8e65d800..3c928906 100644 --- a/src/bin/bat/input.rs +++ b/src/bin/bat/input.rs @@ -1,15 +1,15 @@ use bat::input::Input; -use std::ffi::OsStr; +use std::path::Path; -pub fn new_file_input<'a>(file: &'a OsStr, name: Option<&'a OsStr>) -> Input<'a> { +pub fn new_file_input<'a>(file: &'a Path, name: Option<&'a Path>) -> Input<'a> { named(Input::ordinary_file(file), name.or(Some(file))) } -pub fn new_stdin_input(name: Option<&OsStr>) -> Input { +pub fn new_stdin_input(name: Option<&Path>) -> Input { named(Input::stdin(), name) } -fn named<'a>(input: Input<'a>, name: Option<&OsStr>) -> Input<'a> { +fn named<'a>(input: Input<'a>, name: Option<&Path>) -> Input<'a> { if let Some(provided_name) = name { let mut input = input.with_name(Some(provided_name)); input.description_mut().set_kind(Some("File".to_owned())); |