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 21bfd9a commit cf1602aCopy full SHA for cf1602a
src/raw/mod.rs
@@ -1963,10 +1963,14 @@ impl<T> Iterator for RawIterRange<T> {
1963
#[inline]
1964
fn size_hint(&self) -> (usize, Option<usize>) {
1965
// We don't have an item count, so just guess based on the range size.
1966
- (
1967
- 0,
1968
- Some(unsafe { offset_from(self.end, self.next_ctrl) + Group::WIDTH }),
1969
- )
+ let remaining_buckets = if self.end > self.next_ctrl {
+ unsafe { offset_from(self.end, self.next_ctrl) }
+ } else {
+ 0
1970
+ };
1971
+
1972
+ // Add a group width to include the group we are currently processing.
1973
+ (0, Some(Group::WIDTH + remaining_buckets))
1974
}
1975
1976
0 commit comments