mirror of
https://github.com/sharkdp/bat.git
synced 2025-09-01 19:02:22 +01:00
Fix clippy suggestion: .or_else(|| Some(…)) => .or(Some(…))
This commit is contained in:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user