diff --git a/lib/src/default_index_store.rs b/lib/src/default_index_store.rs index d0c7fffe6..6eb90cd5a 100644 --- a/lib/src/default_index_store.rs +++ b/lib/src/default_index_store.rs @@ -692,10 +692,6 @@ impl Index for MutableIndexImpl { self } - fn commit_id_to_pos(&self, commit_id: &CommitId) -> Option { - CompositeIndex(self).commit_id_to_pos(commit_id) - } - fn shortest_unique_commit_id_prefix_len(&self, commit_id: &CommitId) -> usize { CompositeIndex(self).shortest_unique_commit_id_prefix_len(commit_id) } @@ -708,10 +704,6 @@ impl Index for MutableIndexImpl { CompositeIndex(self).entry_by_id(commit_id) } - fn entry_by_pos(&self, pos: IndexPosition) -> IndexEntry { - CompositeIndex(self).entry_by_pos(pos) - } - fn has_id(&self, commit_id: &CommitId) -> bool { CompositeIndex(self).has_id(commit_id) } @@ -1773,10 +1765,6 @@ impl Index for ReadonlyIndexImpl { self } - fn commit_id_to_pos(&self, commit_id: &CommitId) -> Option { - CompositeIndex(self).commit_id_to_pos(commit_id) - } - fn shortest_unique_commit_id_prefix_len(&self, commit_id: &CommitId) -> usize { CompositeIndex(self).shortest_unique_commit_id_prefix_len(commit_id) } @@ -1789,10 +1777,6 @@ impl Index for ReadonlyIndexImpl { CompositeIndex(self).entry_by_id(commit_id) } - fn entry_by_pos(&self, pos: IndexPosition) -> IndexEntry { - CompositeIndex(self).entry_by_pos(pos) - } - fn has_id(&self, commit_id: &CommitId) -> bool { CompositeIndex(self).has_id(commit_id) } diff --git a/lib/src/index.rs b/lib/src/index.rs index ec19df57b..c6d1fa0e7 100644 --- a/lib/src/index.rs +++ b/lib/src/index.rs @@ -20,7 +20,7 @@ use thiserror::Error; use crate::backend::{CommitId, ObjectId}; use crate::commit::Commit; -use crate::default_index_store::{IndexEntry, IndexPosition, RevWalk}; +use crate::default_index_store::{IndexEntry, RevWalk}; use crate::op_store::OperationId; use crate::operation::Operation; use crate::repo::Repo; @@ -50,16 +50,12 @@ pub trait IndexStore: Send + Sync + Debug { pub trait Index: Send + Sync { fn as_any(&self) -> &dyn Any; - fn commit_id_to_pos(&self, commit_id: &CommitId) -> Option; - fn shortest_unique_commit_id_prefix_len(&self, commit_id: &CommitId) -> usize; fn resolve_prefix(&self, prefix: &HexPrefix) -> PrefixResolution; fn entry_by_id(&self, commit_id: &CommitId) -> Option; - fn entry_by_pos(&self, pos: IndexPosition) -> IndexEntry; - fn has_id(&self, commit_id: &CommitId) -> bool; fn is_ancestor(&self, ancestor_id: &CommitId, descendant_id: &CommitId) -> bool;