From b9c8fd8ef3602f4a63f67dfe52d6950620d2e8b6 Mon Sep 17 00:00:00 2001 From: Yuya Nishihara Date: Fri, 26 May 2023 15:57:26 +0900 Subject: [PATCH] index: make ReadonlyIndexImpl crate local This ensure that callers will use ReadonlyIndexWrapper as the implementation type. --- lib/src/default_index_store.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/src/default_index_store.rs b/lib/src/default_index_store.rs index 09141ce0e..d6de37a9c 100644 --- a/lib/src/default_index_store.rs +++ b/lib/src/default_index_store.rs @@ -409,7 +409,7 @@ pub enum IndexLoadError { // TODO: replace the table by a trie so we don't have to repeat the full commit // ids // TODO: add a fanout table like git's commit graph has? -pub struct ReadonlyIndexImpl { +pub(crate) struct ReadonlyIndexImpl { parent_file: Option>, num_parent_commits: u32, name: String, @@ -484,7 +484,7 @@ impl MutableIndexImpl { } } - pub fn incremental(parent_file: Arc) -> Self { + pub(crate) fn incremental(parent_file: Arc) -> Self { let num_parent_commits = parent_file.num_parent_commits + parent_file.num_local_commits; let commit_id_length = parent_file.commit_id_length; let change_id_length = parent_file.change_id_length;