Skip to content

Commit 9cbe22d

Browse files
committed
another clippy fix
1 parent b04e68c commit 9cbe22d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

micropb/src/decode.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -727,7 +727,7 @@ mod tests {
727727
type Error = Infallible;
728728

729729
fn pb_read_chunk(&mut self) -> Result<&[u8], Self::Error> {
730-
let n = if self.len() % 2 == 0 { 2 } else { 1 };
730+
let n = if self.len().is_multiple_of(2) { 2 } else { 1 };
731731
Ok(&self.0[..n.min(self.len())])
732732
}
733733

0 commit comments

Comments
 (0)