diff --git a/crates/pcap/tests/support/mod.rs b/crates/pcap/tests/support/mod.rs index f897b5142..708864c83 100644 --- a/crates/pcap/tests/support/mod.rs +++ b/crates/pcap/tests/support/mod.rs @@ -136,7 +136,7 @@ pub fn pcap(frames: &[Vec]) -> Vec { pub fn block(t: u32, body: &[u8]) -> Vec { let mut body = body.to_vec(); - while body.len() % 4 != 0 { + while !body.len().is_multiple_of(4) { body.push(0); } let len = (body.len() + 12) as u32;