Skip to content

Commit

Permalink
Remove useless comparison since now self.index <= self.len is an inva…
Browse files Browse the repository at this point in the history
…riant
  • Loading branch information
SkiFire13 committed Mar 3, 2021
1 parent 8b9ac4d commit aeb4ea7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/core/src/iter/adapters/zip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ where
if sz_a != sz_b {
let sz_a = self.a.size();
if A::MAY_HAVE_SIDE_EFFECT && sz_a > self.len {
for _ in 0..sz_a - cmp::max(self.len, self.index) {
for _ in 0..sz_a - self.len {
self.a.next_back();
}
}
Expand Down

0 comments on commit aeb4ea7

Please sign in to comment.