Skip to content

Commit 00eb5fb

Browse files
author
Markus Westerlind
committed
nits
1 parent 5831421 commit 00eb5fb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/raw/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ struct ProbeSeq {
150150
}
151151

152152
impl ProbeSeq {
153+
#[inline]
153154
fn move_next(&mut self, bucket_mask: usize) {
154155
// We should have found an empty bucket by now and ended the probe.
155156
debug_assert!(
@@ -621,11 +622,10 @@ impl<T> RawTable<T> {
621622
fn find_insert_slot(&self, hash: u64) -> usize {
622623
let mut probe_seq = self.probe_seq(hash);
623624
loop {
624-
let pos = probe_seq.pos;
625625
unsafe {
626-
let group = Group::load(self.ctrl(pos));
626+
let group = Group::load(self.ctrl(probe_seq.pos));
627627
if let Some(bit) = group.match_empty_or_deleted().lowest_set_bit() {
628-
let result = (pos + bit) & self.bucket_mask;
628+
let result = (probe_seq.pos + bit) & self.bucket_mask;
629629

630630
// In tables smaller than the group width, trailing control
631631
// bytes outside the range of the table are filled with
@@ -638,7 +638,7 @@ impl<T> RawTable<T> {
638638
// control bytes (containing EMPTY).
639639
if unlikely(is_full(*self.ctrl(result))) {
640640
debug_assert!(self.bucket_mask < Group::WIDTH);
641-
debug_assert_ne!(pos, 0);
641+
debug_assert_ne!(probe_seq.pos, 0);
642642
return Group::load_aligned(self.ctrl(0))
643643
.match_empty_or_deleted()
644644
.lowest_set_bit_nonzero();

0 commit comments

Comments
 (0)