Skip to content

Commit 31ea550

Browse files
committed
Fix new toolchain clippy warning about is_multiple_of
Signed-off-by: Lucy Menon <168595099+syntactically@users.noreply.github.com>
1 parent 820d60c commit 31ea550

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/hyperlight_common/src/version_note.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,13 +103,13 @@ impl<const NAME_SZ: usize, const DESC_SZ: usize> ElfNote<NAME_SZ, DESC_SZ> {
103103

104104
// desc must start at an 8-byte aligned offset from the note start.
105105
assert!(
106-
core::mem::offset_of!(Self, desc) % 8 == 0,
106+
core::mem::offset_of!(Self, desc).is_multiple_of(8),
107107
"desc is not 8-byte aligned"
108108
);
109109

110110
// Total note size must be a multiple of 8 for next-entry alignment.
111111
assert!(
112-
size_of::<Self>() % 8 == 0,
112+
size_of::<Self>().is_multiple_of(8),
113113
"total note size is not 8-byte aligned"
114114
);
115115

0 commit comments

Comments
 (0)