Skip to content

Commit

Permalink
revset: detach index from predicate fn, turn it into position-based
Browse files Browse the repository at this point in the history
This is the step towards removing &CompositeIndex references from the revset
evaluation tree. The filter input is changed from &IndexEntry to IndexPosition
to simplify the lifetime thingy. We might want to pass around CommitId or
Commit object once it's loaded, but that can be implemented later. I don't
see significant performance difference in revset benches.
  • Loading branch information
yuja committed Mar 12, 2024
1 parent 97e69d1 commit a733b0b
Show file tree
Hide file tree
Showing 2 changed files with 112 additions and 126 deletions.
2 changes: 0 additions & 2 deletions lib/src/default_index/rev_walk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ pub(super) struct EagerRevWalk<T> {
}

impl<T: Iterator> EagerRevWalk<T> {
#[cfg(test)] // TODO
pub fn new(iter: T) -> Self {
EagerRevWalk { iter: iter.fuse() }
}
Expand Down Expand Up @@ -136,7 +135,6 @@ impl<I: ?Sized, W: RevWalk<I>> PeekableRevWalk<I, W> {
self.peeked.as_ref()
}

#[cfg(test)] // TODO
pub fn next_if(
&mut self,
index: &I,
Expand Down
Loading

0 comments on commit a733b0b

Please sign in to comment.