Skip to content

Commit aeb4ea7

Browse files
committed
Remove useless comparison since now self.index <= self.len is an invariant
1 parent 8b9ac4d commit aeb4ea7

File tree

1 file changed

+1
-1
lines changed
  • library/core/src/iter/adapters

1 file changed

+1
-1
lines changed

library/core/src/iter/adapters/zip.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ where
259259
if sz_a != sz_b {
260260
let sz_a = self.a.size();
261261
if A::MAY_HAVE_SIDE_EFFECT && sz_a > self.len {
262-
for _ in 0..sz_a - cmp::max(self.len, self.index) {
262+
for _ in 0..sz_a - self.len {
263263
self.a.next_back();
264264
}
265265
}

0 commit comments

Comments
 (0)