Skip to content

Commit

Permalink
refactor(clippy): fix new clippy checks (#352)
Browse files Browse the repository at this point in the history
  • Loading branch information
Xenira authored Jan 9, 2025
1 parent 64fbb41 commit ac3220a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/zend/handlers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit ac3220a

Please sign in to comment.