Skip to content

Commit d033e84

Browse files
committed
Fix raw
1 parent 9277f65 commit d033e84

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

src/raw/mod.rs

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1807,7 +1807,7 @@ impl<T> RawIter<T> {
18071807
return;
18081808
}
18091809

1810-
if self.iter.inner.next_ctrl < self.iter.inner.end
1810+
if self.iter.next_ctrl < self.iter.end
18111811
&& b.as_ptr() <= self.iter.data.next_n(Group::WIDTH).as_ptr()
18121812
{
18131813
// The iterator has not yet reached the bucket's group.
@@ -1818,7 +1818,7 @@ impl<T> RawIter<T> {
18181818
// To do that, we need to find its control byte. We know that self.iter.data is
18191819
// at self.iter.next_ctrl - Group::WIDTH, so we work from there:
18201820
let offset = offset_from(self.iter.data.as_ptr(), b.as_ptr());
1821-
let ctrl = self.iter.inner.next_ctrl.sub(Group::WIDTH).add(offset);
1821+
let ctrl = self.iter.next_ctrl.sub(Group::WIDTH).add(offset);
18221822
// This method should be called _before_ a removal, or _after_ an insert,
18231823
// so in both cases the ctrl byte should indicate that the bucket is full.
18241824
assert!(is_full(*ctrl));
@@ -1841,7 +1841,7 @@ impl<T> RawIter<T> {
18411841
// - Otherwise, update the iterator cached group so that it won't
18421842
// yield a to-be-removed bucket, or _will_ yield a to-be-added bucket.
18431843
// We'll also need ot update the item count accordingly.
1844-
if let Some(index) = self.iter.inner.current_group.lowest_set_bit() {
1844+
if let Some(index) = self.iter.current_group.lowest_set_bit() {
18451845
let next_bucket = self.iter.data.next_n(index);
18461846
if b.as_ptr() > next_bucket.as_ptr() {
18471847
// The toggled bucket is "before" the bucket the iterator would yield next. We
@@ -1862,7 +1862,7 @@ impl<T> RawIter<T> {
18621862
// Instead, we _just_ flip the bit for the particular bucket the caller asked
18631863
// us to reflect.
18641864
let our_bit = offset_from(self.iter.data.as_ptr(), b.as_ptr());
1865-
let was_full = self.iter.inner.current_group.flip(our_bit);
1865+
let was_full = self.iter.current_group.flip(our_bit);
18661866
debug_assert_ne!(was_full, is_insert);
18671867

18681868
if is_insert {
@@ -1874,16 +1874,10 @@ impl<T> RawIter<T> {
18741874
if cfg!(debug_assertions) {
18751875
if b.as_ptr() == next_bucket.as_ptr() {
18761876
// The removed bucket should no longer be next
1877-
debug_assert_ne!(
1878-
self.iter.inner.current_group.lowest_set_bit(),
1879-
Some(index)
1880-
);
1877+
debug_assert_ne!(self.iter.current_group.lowest_set_bit(), Some(index));
18811878
} else {
18821879
// We should not have changed what bucket comes next.
1883-
debug_assert_eq!(
1884-
self.iter.inner.current_group.lowest_set_bit(),
1885-
Some(index)
1886-
);
1880+
debug_assert_eq!(self.iter.current_group.lowest_set_bit(), Some(index));
18871881
}
18881882
}
18891883
}

0 commit comments

Comments
 (0)