From f7b879448258a058b8607916da0ddf13b83896d9 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Sun, 15 Jan 2023 10:50:34 +0100 Subject: [PATCH] thanks clippy --- src/shared.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared.rs b/src/shared.rs index 5b7e3984041..c8c4bd44129 100644 --- a/src/shared.rs +++ b/src/shared.rs @@ -253,7 +253,7 @@ mod clap { type Value = BString; fn parse_ref(&self, _cmd: &Command, _arg: Option<&Arg>, value: &OsStr) -> Result { - git::env::os_str_to_bstring(value).ok_or(Error::new(ErrorKind::InvalidUtf8)) + git::env::os_str_to_bstring(value).ok_or_else(|| Error::new(ErrorKind::InvalidUtf8)) } }