mirror of
https://github.com/martinvonz/jj.git
synced 2025-01-14 16:37:42 +00:00
revsets: replace while loop by for loop, as pointed out by clippy
This commit is contained in:
parent
82b62e92f1
commit
f722e8662f
1 changed files with 3 additions and 3 deletions
|
@ -681,9 +681,9 @@ impl<'revset, 'repo> Iterator for FilterRevsetIterator<'revset, 'repo> {
|
|||
type Item = IndexEntry<'repo>;
|
||||
|
||||
fn next(&mut self) -> Option<Self::Item> {
|
||||
while let Some(next) = self.iter.next() {
|
||||
if (self.predicate)(&next) {
|
||||
return Some(next);
|
||||
for entry in &mut self.iter {
|
||||
if (self.predicate)(&entry) {
|
||||
return Some(entry);
|
||||
}
|
||||
}
|
||||
None
|
||||
|
|
Loading…
Reference in a new issue