From cd7be018fea57e76399290876fe31764b990bafb Mon Sep 17 00:00:00 2001 From: sharkdp Date: Sat, 9 Jan 2021 15:28:21 +0100 Subject: [PATCH] =?UTF-8?q?Fix=20clippy=20suggestion:=20.or=5Felse(||=20So?= =?UTF-8?q?me(=E2=80=A6))=20=3D>=20.or(Some(=E2=80=A6))?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/bin/bat/input.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/bat/input.rs b/src/bin/bat/input.rs index 9b596274..8e65d800 100644 --- a/src/bin/bat/input.rs +++ b/src/bin/bat/input.rs @@ -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 {