We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 431e7ac commit dc131b1Copy full SHA for dc131b1
src/raw/mod.rs
@@ -554,8 +554,9 @@ impl<T> RawTable<T> {
554
// size. If both the new and old position fall within the
555
// same unaligned group, then there is no benefit in moving
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
+ let probe_index = |pos: usize| {
+ (pos.wrapping_sub(guard.probe_seq(hash).offset) & guard.bucket_mask)
559
+ / Group::WIDTH
560
};
561
if likely(probe_index(i) == probe_index(new_i)) {
562
guard.set_ctrl(i, h2(hash));
0 commit comments