diff options
| author | Giacomo Stevanato <giaco.stevanato@gmail.com> | 2021-02-19 12:17:48 +0100 |
|---|---|---|
| committer | Giacomo Stevanato <giaco.stevanato@gmail.com> | 2021-03-03 21:19:31 +0100 |
| commit | aeb4ea739efb70e0002a4a9c4c7b8027dd0620b3 (patch) | |
| tree | 0ec550510a859cf047c4dc62e041cf022061320b | |
| parent | 8b9ac4d4155c74db5b317046033ab9c05a09e351 (diff) | |
| download | rust-aeb4ea739efb70e0002a4a9c4c7b8027dd0620b3.tar.gz rust-aeb4ea739efb70e0002a4a9c4c7b8027dd0620b3.zip | |
Remove useless comparison since now self.index <= self.len is an invariant
| -rw-r--r-- | library/core/src/iter/adapters/zip.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/library/core/src/iter/adapters/zip.rs b/library/core/src/iter/adapters/zip.rs index ce48016afcd..817fc2a51e9 100644 --- a/library/core/src/iter/adapters/zip.rs +++ b/library/core/src/iter/adapters/zip.rs @@ -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(); } } |
