Skip to content

Commit 8c9fe23

Browse files
committed
Rollup merge of #22833 - laijs:remove-redundant-else-branch, r=dotdash
The branch \"else { continue }\" is the last code inside a loop body, it is just useless. Signed-off-by: Lai Jiangshan <[email protected]>
2 parents ce5f1b3 + 9cdb256 commit 8c9fe23

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

src/libcore/iter.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1637,8 +1637,6 @@ impl<I: Iterator, P> Iterator for Filter<I, P> where P: FnMut(&I::Item) -> bool
16371637
for x in self.iter.by_ref() {
16381638
if (self.predicate)(&x) {
16391639
return Some(x);
1640-
} else {
1641-
continue
16421640
}
16431641
}
16441642
None

0 commit comments

Comments
 (0)