Skip to content

Commit

Permalink
clean up pub crate (solana-labs#33214)
Browse files Browse the repository at this point in the history
Co-authored-by: HaoranYi <[email protected]>
  • Loading branch information
HaoranYi and HaoranYi authored Sep 12, 2023
1 parent 09936aa commit 3cd3994
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions accounts-db/src/cache_hash_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ impl CacheHashDataFile {
}
}

pub struct CacheHashData {
pub(crate) struct CacheHashData {
cache_dir: PathBuf,
pre_existing_cache_files: Arc<Mutex<HashSet<PathBuf>>>,
should_delete_old_cache_files_on_drop: bool,
Expand All @@ -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())
});
Expand Down Expand Up @@ -292,7 +295,7 @@ impl CacheHashData {
}

/// save 'data' to 'file_name'
pub fn save(
pub(crate) fn save(
&self,
file_name: impl AsRef<Path>,
data: &SavedTypeSlice,
Expand Down

0 comments on commit 3cd3994

Please sign in to comment.