File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff 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 {
You can’t perform that action at this time.
0 commit comments