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 {
122122 /// - `FULL => DELETED`
123123 #[ inline]
124124 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 ) )
127127 }
128128}
Original file line number Diff line number Diff line change @@ -554,8 +554,9 @@ impl<T> RawTable<T> {
554554 // size. If both the new and old position fall within the
555555 // same unaligned group, then there is no benefit in moving
556556 // 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
559560 } ;
560561 if likely ( probe_index ( i) == probe_index ( new_i) ) {
561562 guard. set_ctrl ( i, h2 ( hash) ) ;
You can’t perform that action at this time.
0 commit comments