Fix clippy suggestion: .or_else(|| Some(…)) => .or(Some(…))

This commit is contained in:
sharkdp 2021-01-09 15:28:21 +01:00 committed by David Peter
parent 03a2710a08
commit cd7be018fe
1 changed files with 1 additions and 1 deletions

View File

@ -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 {