mirror of
https://github.com/sharkdp/bat.git
synced 2025-01-29 17:08:44 +01:00
Fix clippy suggestion: .or_else(|| Some(…)) => .or(Some(…))
This commit is contained in:
parent
03a2710a08
commit
cd7be018fe
@ -2,7 +2,7 @@ use bat::input::Input;
|
||||
use std::ffi::OsStr;
|
||||
|
||||
pub fn new_file_input<'a>(file: &'a OsStr, name: Option<&'a OsStr>) -> Input<'a> {
|
||||
named(Input::ordinary_file(file), name.or_else(|| Some(file)))
|
||||
named(Input::ordinary_file(file), name.or(Some(file)))
|
||||
}
|
||||
|
||||
pub fn new_stdin_input(name: Option<&OsStr>) -> Input {
|
||||
|
Loading…
Reference in New Issue
Block a user