Skip to content

Commit

Permalink
refactor: removing redundant variables
Browse files Browse the repository at this point in the history
  • Loading branch information
DeveloperC286 committed Jan 28, 2021
1 parent f2bb202 commit 152f500
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions library/core/src/iter/adapters/zip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,13 +113,12 @@ where
// of `next_back` does this, otherwise we will break the restriction
// on calls to `self.next_back()` after calling `get_unchecked()`.
if sz_a != sz_b {
let sz_a = self.a.size();
if a_side_effect && sz_a > self.len {
for _ in 0..sz_a - cmp::max(self.len, self.index) {
self.a.next_back();
}
}
let sz_b = self.b.size();

if b_side_effect && sz_b > self.len {
for _ in 0..sz_b - self.len {
self.b.next_back();
Expand Down

0 comments on commit 152f500

Please sign in to comment.