Skip to content
This repository was archived by the owner on Oct 28, 2025. It is now read-only.

Commit 4ad4e5b

Browse files
committed
fix: resolve clippy manual_is_multiple_of warning
1 parent 085aec0 commit 4ad4e5b

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

wasm-host/src/data_provider.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,10 @@ pub struct LocatorUnpacker {
104104
impl LocatorUnpacker {
105105
pub fn from_bytes(buffer: Vec<u8>) -> Option<LocatorUnpacker> {
106106
let packed_bytes: usize = buffer.len();
107-
if packed_bytes > LOCATOR_BUFFER_SIZE || packed_bytes == 0 || packed_bytes % 4 != 0 {
107+
if packed_bytes > LOCATOR_BUFFER_SIZE
108+
|| packed_bytes == 0
109+
|| !packed_bytes.is_multiple_of(4)
110+
{
108111
None
109112
} else {
110113
Some(LocatorUnpacker {

0 commit comments

Comments
 (0)