minor cleanup (#22610)

This commit is contained in:
Jeff Washington (jwash) 2022-01-20 18:11:00 -06:00 committed by GitHub
parent 41fb98c771
commit 0eb488580d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -147,6 +147,7 @@ impl CacheHashData {
parent_folder.as_ref().join("calculate_accounts_hash_cache") parent_folder.as_ref().join("calculate_accounts_hash_cache")
} }
/// load from 'file_name' into 'accumulator'
pub fn load<P: AsRef<Path> + std::fmt::Debug>( pub fn load<P: AsRef<Path> + std::fmt::Debug>(
&self, &self,
file_name: &P, file_name: &P,
@ -239,6 +240,7 @@ impl CacheHashData {
Ok(()) Ok(())
} }
/// save 'data' to 'file_name'
pub fn save(&self, file_name: &Path, data: &SavedTypeSlice) -> Result<(), std::io::Error> { pub fn save(&self, file_name: &Path, data: &SavedTypeSlice) -> Result<(), std::io::Error> {
let mut stats = CacheHashDataStats::default(); let mut stats = CacheHashDataStats::default();
let result = self.save_internal(file_name, data, &mut stats); let result = self.save_internal(file_name, data, &mut stats);
@ -246,7 +248,7 @@ impl CacheHashData {
result result
} }
pub fn save_internal( fn save_internal(
&self, &self,
file_name: &Path, file_name: &Path,
data: &SavedTypeSlice, data: &SavedTypeSlice,