fixup clippy

This commit is contained in:
Maybe Waffle 2024-02-08 20:32:45 +01:00
parent 1233b913ab
commit 8ffac3802c

View file

@ -144,12 +144,14 @@ macro_rules! impl_api_error {
} }
}; };
(@de $value:ident, $variant:ident ($var_inner:ty), $val:literal, $block:expr) => { (@de $value:ident, $variant:ident ($var_inner:ty), $val:literal, $block:expr) => {
#[allow(clippy::redundant_closure_call)]
match $block($value) { match $block($value) {
Some(data) => return Ok(Self::Value::$variant(data)), Some(data) => return Ok(Self::Value::$variant(data)),
_ => {} _ => {}
} }
}; };
(@de $value:ident, $variant:ident, $val:literal, $block:expr) => { (@de $value:ident, $variant:ident, $val:literal, $block:expr) => {
#[allow(clippy::redundant_closure_call)]
if $block($value) { if $block($value) {
return Ok(Self::Value::$variant); return Ok(Self::Value::$variant);
} }