diff --git a/lib/src/default_index/composite.rs b/lib/src/default_index/composite.rs index 40ae4e85a..24bb13ee1 100644 --- a/lib/src/default_index/composite.rs +++ b/lib/src/default_index/composite.rs @@ -483,12 +483,6 @@ impl Index for &CompositeIndex { .collect() } - fn topo_order(&self, input: &mut dyn Iterator) -> Vec { - let mut ids = input.cloned().collect_vec(); - ids.sort_by_cached_key(|id| self.commit_id_to_pos(id).unwrap()); - ids - } - fn evaluate_revset<'index>( &'index self, expression: &ResolvedExpression, diff --git a/lib/src/default_index/mutable.rs b/lib/src/default_index/mutable.rs index 67cc2dfbf..efb91b185 100644 --- a/lib/src/default_index/mutable.rs +++ b/lib/src/default_index/mutable.rs @@ -504,10 +504,6 @@ impl Index for DefaultMutableIndex { self.as_composite().heads(candidates) } - fn topo_order(&self, input: &mut dyn Iterator) -> Vec { - self.as_composite().topo_order(input) - } - fn evaluate_revset<'index>( &'index self, expression: &ResolvedExpression, diff --git a/lib/src/default_index/readonly.rs b/lib/src/default_index/readonly.rs index 8365b4558..8a88ee435 100644 --- a/lib/src/default_index/readonly.rs +++ b/lib/src/default_index/readonly.rs @@ -607,10 +607,6 @@ impl Index for DefaultReadonlyIndex { self.as_composite().heads(candidates) } - fn topo_order(&self, input: &mut dyn Iterator) -> Vec { - self.as_composite().topo_order(input) - } - fn evaluate_revset<'index>( &'index self, expression: &ResolvedExpression, diff --git a/lib/src/index.rs b/lib/src/index.rs index cc00e9b8a..70d8880eb 100644 --- a/lib/src/index.rs +++ b/lib/src/index.rs @@ -116,10 +116,6 @@ pub trait Index: Send + Sync { /// `candidates` list it will appear at most once in the output. fn heads(&self, candidates: &mut dyn Iterator) -> Vec; - /// Orders a list of commit IDs such that parent commits appear before any - /// of their children. Commit IDs in the `input` are not deduplicated. - fn topo_order(&self, input: &mut dyn Iterator) -> Vec; - /// Resolves the revset `expression` against the index and corresponding /// `store`. fn evaluate_revset<'index>(