File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -122,7 +122,7 @@ impl Group {
122
122
/// - `FULL => DELETED`
123
123
#[ inline]
124
124
pub fn convert_special_to_empty_and_full_to_deleted ( & self ) -> Group {
125
- let special = self . 0 & repeat ( 0x80 ) ;
126
- Group ( special + ( !special >> 7 ) )
125
+ let full = ! self . 0 & repeat ( 0x80 ) ;
126
+ Group ( !full + ( full >> 7 ) )
127
127
}
128
128
}
Original file line number Diff line number Diff line change @@ -554,8 +554,9 @@ impl<T> RawTable<T> {
554
554
// size. If both the new and old position fall within the
555
555
// same unaligned group, then there is no benefit in moving
556
556
// it and we can just continue to the next item.
557
- let probe_index = |pos| {
558
- ( ( pos - guard. probe_seq ( hash) . offset ) & guard. bucket_mask ) / Group :: WIDTH
557
+ let probe_index = |pos : usize | {
558
+ ( pos. wrapping_sub ( guard. probe_seq ( hash) . offset ) & guard. bucket_mask )
559
+ / Group :: WIDTH
559
560
} ;
560
561
if likely ( probe_index ( i) == probe_index ( new_i) ) {
561
562
guard. set_ctrl ( i, h2 ( hash) ) ;
You can’t perform that action at this time.
0 commit comments