Skip to content

Commit 9cdb256

Browse files
author
Lai Jiangshan
committed
remove the redundant else branch
The branch "else { continue }" is the last code inside a loop body, it is just useless. Signed-off-by: Lai Jiangshan <[email protected]>
1 parent 4db0b32 commit 9cdb256

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

src/libcore/iter.rs

-2
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)