From 3cd3994939d5939e14917702d5a3691fe0a82d08 Mon Sep 17 00:00:00 2001 From: HaoranYi Date: Mon, 11 Sep 2023 19:28:26 -0500 Subject: [PATCH] clean up pub crate (#33214) Co-authored-by: HaoranYi --- accounts-db/src/cache_hash_data.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/accounts-db/src/cache_hash_data.rs b/accounts-db/src/cache_hash_data.rs index c6a0dc217c9ce0..a58bf50d030025 100644 --- a/accounts-db/src/cache_hash_data.rs +++ b/accounts-db/src/cache_hash_data.rs @@ -196,7 +196,7 @@ impl CacheHashDataFile { } } -pub struct CacheHashData { +pub(crate) struct CacheHashData { cache_dir: PathBuf, pre_existing_cache_files: Arc>>, should_delete_old_cache_files_on_drop: bool, @@ -213,7 +213,10 @@ impl Drop for CacheHashData { } impl CacheHashData { - pub fn new(cache_dir: PathBuf, should_delete_old_cache_files_on_drop: bool) -> CacheHashData { + pub(crate) fn new( + cache_dir: PathBuf, + should_delete_old_cache_files_on_drop: bool, + ) -> CacheHashData { std::fs::create_dir_all(&cache_dir).unwrap_or_else(|err| { panic!("error creating cache dir {}: {err}", cache_dir.display()) }); @@ -292,7 +295,7 @@ impl CacheHashData { } /// save 'data' to 'file_name' - pub fn save( + pub(crate) fn save( &self, file_name: impl AsRef, data: &SavedTypeSlice,