on master help sign in
Fix clippy suggestion: .or_else(|| Some(…)) => .or(Some(…))
commitcd7be018fea57e76399290876fe31764b990bafb authorsharkdp <davidpeter@web.de> dateSat 9 Jan 2021, 15:28 (6 years ago) parent03a2710
1 file changed+1−1
src/bin/bat/input.rs+1−1
src/bin/bat/input.rs+1−1
@@ -2,7 +2,7 @@ use bat::input::Input;
22use std::ffi::OsStr;
33
44pub fn new_file_input<'a>(file: &'a OsStr, name: Option<&'a OsStr>) -> Input<'a> {
5− named(Input::ordinary_file(file), name.or_else(|| Some(file)))
5+ named(Input::ordinary_file(file), name.or(Some(file)))
66}
77
88pub fn new_stdin_input(name: Option<&OsStr>) -> Input {