From ef37d67cdc7c99c03b45c716f4c40091e7f18895 Mon Sep 17 00:00:00 2001 From: Bruce Mitchener Date: Tue, 14 Nov 2023 07:42:37 +0700 Subject: [PATCH] clippy: Suppress `identity_op` lint. This code is for tetss and is to line up and draw attention to the offsets. Better to suppress than eliminate. --- src/offset_of.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/offset_of.rs b/src/offset_of.rs index f5a7ba6..dbd0991 100644 --- a/src/offset_of.rs +++ b/src/offset_of.rs @@ -200,6 +200,8 @@ macro_rules! offset_of_union { #[cfg(test)] mod tests { + #![cfg_attr(allow_clippy, allow(clippy::identity_op))] // For `... + 0` constructs below. + #[test] fn offset_simple() { #[repr(C)]