index: remove walk_revs() from trait API

It only makes sense for the DefaultIndexStore.
This commit is contained in:
Yuya Nishihara 2023-04-21 19:45:58 +09:00
parent e24fe817c9
commit 8157c4a926
2 changed files with 0 additions and 11 deletions

View file

@ -720,10 +720,6 @@ impl Index for MutableIndexImpl {
CompositeIndex(self).common_ancestors(set1, set2)
}
fn walk_revs(&self, wanted: &[CommitId], unwanted: &[CommitId]) -> RevWalk {
CompositeIndex(self).walk_revs(wanted, unwanted)
}
fn heads(&self, candidates: &mut dyn Iterator<Item = &CommitId>) -> Vec<CommitId> {
CompositeIndex(self).heads(candidates)
}
@ -2018,10 +2014,6 @@ impl Index for ReadonlyIndexImpl {
CompositeIndex(self).common_ancestors(set1, set2)
}
fn walk_revs(&self, wanted: &[CommitId], unwanted: &[CommitId]) -> RevWalk {
CompositeIndex(self).walk_revs(wanted, unwanted)
}
fn heads(&self, candidates: &mut dyn Iterator<Item = &CommitId>) -> Vec<CommitId> {
CompositeIndex(self).heads(candidates)
}

View file

@ -20,7 +20,6 @@ use thiserror::Error;
use crate::backend::{CommitId, ObjectId};
use crate::commit::Commit;
use crate::default_index_store::RevWalk;
use crate::op_store::OperationId;
use crate::operation::Operation;
use crate::revset::{ResolvedExpression, Revset, RevsetEvaluationError};
@ -59,8 +58,6 @@ pub trait Index: Send + Sync {
fn common_ancestors(&self, set1: &[CommitId], set2: &[CommitId]) -> Vec<CommitId>;
fn walk_revs(&self, wanted: &[CommitId], unwanted: &[CommitId]) -> RevWalk;
fn heads(&self, candidates: &mut dyn Iterator<Item = &CommitId>) -> Vec<CommitId>;
/// Parents before children