Skip to content

Commit 07898ed

Browse files
authored
fix:clippy errros rust 1.9.0 update (apache#2419)
1 parent 4d4d8c8 commit 07898ed

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

native/core/src/common/bit.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,7 @@ impl BitReader {
657657
debug_assert!(self.bit_offset == 0 || i == num_bits_to_read);
658658

659659
// Check if there's opportunity to directly copy bytes using `memcpy`.
660-
if (offset + i) % 8 == 0 && i < num_bits_to_read {
660+
if (offset + i).is_multiple_of(8) && i < num_bits_to_read {
661661
let num_bytes = (num_bits_to_read - i) / 8;
662662
let dst_byte_offset = (offset + i) / 8;
663663
if num_bytes > 0 {
@@ -671,7 +671,7 @@ impl BitReader {
671671
}
672672
}
673673

674-
debug_assert!((offset + i) % 8 != 0 || num_bits_to_read - i < 8);
674+
debug_assert!(!(offset + i).is_multiple_of(8) || num_bits_to_read - i < 8);
675675

676676
// Now copy the remaining bits if there's any.
677677
while i < num_bits_to_read {

0 commit comments

Comments
 (0)