diff --git a/src/cli.rs b/src/cli.rs index bb00a1c..a60260e 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -695,7 +695,7 @@ impl Opts { pub fn max_results(&self) -> Option { self.max_results .filter(|&m| m > 0) - .or_else(|| self.max_one_result.then(|| 1)) + .or_else(|| self.max_one_result.then_some(1)) } #[cfg(feature = "completions")]