From 43bb787d52e948bde335349fbb026e1387994297 Mon Sep 17 00:00:00 2001 From: Julian Orth Date: Thu, 10 Oct 2024 16:52:43 +0200 Subject: [PATCH] all: address clippy lints --- src/macros.rs | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/src/macros.rs b/src/macros.rs index 5fed533d..3a1a764f 100644 --- a/src/macros.rs +++ b/src/macros.rs @@ -740,20 +740,28 @@ macro_rules! ei_object_base { macro_rules! logical_to_client_wire_scale { ($client:expr, $($field:expr),+ $(,)?) => { - if let Some(scale) = $client.wire_scale.get() { - $( - $field = $field * scale; - )+ + #[expect(clippy::allow_attributes)] + { + #[allow(clippy::assign_op_pattern)] + if let Some(scale) = $client.wire_scale.get() { + $( + $field = $field * scale; + )+ + } } }; } macro_rules! client_wire_scale_to_logical { ($client:expr, $($field:expr),+ $(,)?) => { - if let Some(scale) = $client.wire_scale.get() { - $( - $field = $field / scale; - )+ + #[expect(clippy::allow_attributes)] + { + #[allow(clippy::assign_op_pattern)] + if let Some(scale) = $client.wire_scale.get() { + $( + $field = $field / scale; + )+ + } } }; }