revsets: replace while loop by for loop, as pointed out by clippy
@@ -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
