From ac3220a8823f8ca1b91de62de0457c5b81425345 Mon Sep 17 00:00:00 2001 From: Xenira <1288524+Xenira@users.noreply.github.com> Date: Thu, 9 Jan 2025 22:58:14 +0100 Subject: [PATCH] refactor(clippy): fix new clippy checks (#352) --- src/args.rs | 2 +- src/zend/handlers.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/args.rs b/src/args.rs index d21075b2b..f0e30c1a4 100644 --- a/src/args.rs +++ b/src/args.rs @@ -240,7 +240,7 @@ impl<'a, 'b> ArgParser<'a, 'b> { let max_num_args = self.args.len(); let min_num_args = self.min_num_args.unwrap_or(max_num_args); let num_args = self.arg_zvals.len(); - let has_variadic = self.args.last().map_or(false, |arg| arg.variadic); + let has_variadic = self.args.last().is_some_and(|arg| arg.variadic); if num_args < min_num_args || (!has_variadic && num_args > max_num_args) { // SAFETY: Exported C function is safe, return value is unused and parameters diff --git a/src/zend/handlers.rs b/src/zend/handlers.rs index 5c0da7394..d8f8ac148 100644 --- a/src/zend/handlers.rs +++ b/src/zend/handlers.rs @@ -241,7 +241,7 @@ impl ZendObjectHandlers { cfg_if::cfg_if! { if #[cfg(php84)] { #[allow(clippy::unnecessary_mut_passed)] - if zend_is_true(&mut zv) == true { + if zend_is_true(&mut zv) { return Ok(1); } } else {