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 @@ -513,7 +513,7 @@ impl BitVector for MmapBitVec {
513
513
// we have to transmute since we don't know if it's a u64 or u128
514
514
#[ allow( clippy:: transmute_ptr_to_ptr) ]
515
515
let lg_ptr: * const u128 = transmute ( ptr. add ( byte_idx_st) ) ;
516
- v |= ( * lg_ptr) . to_be ( ) << ( r. start & 7 ) >> ( 128 - new_size) ;
516
+ v |= lg_ptr. read_unaligned ( ) . to_be ( ) << ( r. start & 7 ) >> ( 128 - new_size) ;
517
517
}
518
518
} else {
519
519
// special case if we can't get a whole u64 out without running outside the buffer
@@ -526,7 +526,7 @@ impl BitVector for MmapBitVec {
526
526
}
527
527
528
528
// mask out the high bits in case we copied extra
529
- v & ( u128:: max_value ( ) >> ( 128 - new_size) )
529
+ v & ( u128:: MAX >> ( 128 - new_size) )
530
530
}
531
531
532
532
/// Set an unaligned range of bits using a `u64`.
You can’t perform that action at this time.
0 commit comments