mirror of
https://github.com/martinvonz/jj.git
synced 2025-01-15 16:53:25 +00:00
revset: inline RevWalkRevsetIterator which is just an identity iterator
This commit is contained in:
parent
52fadc046e
commit
5b13c0b38f
1 changed files with 1 additions and 15 deletions
|
@ -1378,21 +1378,7 @@ struct RevWalkRevset<'repo> {
|
|||
|
||||
impl<'repo> Revset<'repo> for RevWalkRevset<'repo> {
|
||||
fn iter<'revset>(&'revset self) -> RevsetIterator<'revset, 'repo> {
|
||||
RevsetIterator::new(Box::new(RevWalkRevsetIterator {
|
||||
walk: self.walk.clone(),
|
||||
}))
|
||||
}
|
||||
}
|
||||
|
||||
struct RevWalkRevsetIterator<'repo> {
|
||||
walk: RevWalk<'repo>,
|
||||
}
|
||||
|
||||
impl<'repo> Iterator for RevWalkRevsetIterator<'repo> {
|
||||
type Item = IndexEntry<'repo>;
|
||||
|
||||
fn next(&mut self) -> Option<Self::Item> {
|
||||
self.walk.next()
|
||||
RevsetIterator::new(Box::new(self.walk.clone()))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue