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 {
513513 // we have to transmute since we don't know if it's a u64 or u128
514514 #[ allow( clippy:: transmute_ptr_to_ptr) ]
515515 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) ;
517517 }
518518 } else {
519519 // special case if we can't get a whole u64 out without running outside the buffer
@@ -526,7 +526,7 @@ impl BitVector for MmapBitVec {
526526 }
527527
528528 // 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) )
530530 }
531531
532532 /// Set an unaligned range of bits using a `u64`.
You can’t perform that action at this time.
0 commit comments