Increment self.len in specialized ZipImpl to avoid underflow in size_hint
This commit is contained in:
parent
939b14334d
commit
66a260617a
1 changed files with 1 additions and 0 deletions
|
@ -200,6 +200,7 @@ where
|
|||
} else if A::MAY_HAVE_SIDE_EFFECT && self.index < self.a.size() {
|
||||
let i = self.index;
|
||||
self.index += 1;
|
||||
self.len += 1;
|
||||
// match the base implementation's potential side effects
|
||||
// SAFETY: we just checked that `i` < `self.a.len()`
|
||||
unsafe {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue