Skip to content

Commit

Permalink
clippy: Suppress identity_op lint.
Browse files Browse the repository at this point in the history
This code is for tetss and is to line up and draw attention to the
offsets. Better to suppress than eliminate.
  • Loading branch information
waywardmonkeys committed Nov 14, 2023
1 parent 2d22f1c commit ef37d67
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/offset_of.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down

0 comments on commit ef37d67

Please sign in to comment.