remove unused return value from reset_uncleaned_roots (#33030)

This commit is contained in:
Jeff Washington (jwash) 2023-08-28 13:17:52 -07:00 committed by GitHub
parent 1238e53c9f
commit ce71461bad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -1934,7 +1934,7 @@ impl<T: IndexValue, U: DiskIndexValue + From<T> + Into<T>> AccountsIndex<T, U> {
self.roots_tracker.read().unwrap().min_alive_root()
}
pub fn reset_uncleaned_roots(&self, max_clean_root: Option<Slot>) -> HashSet<Slot> {
pub(crate) fn reset_uncleaned_roots(&self, max_clean_root: Option<Slot>) {
let mut cleaned_roots = HashSet::new();
let mut w_roots_tracker = self.roots_tracker.write().unwrap();
w_roots_tracker.uncleaned_roots.retain(|root| {
@ -1947,7 +1947,7 @@ impl<T: IndexValue, U: DiskIndexValue + From<T> + Into<T>> AccountsIndex<T, U> {
// Only keep the slots that have yet to be cleaned
!is_cleaned
});
std::mem::replace(&mut w_roots_tracker.previous_uncleaned_roots, cleaned_roots)
w_roots_tracker.previous_uncleaned_roots = cleaned_roots;
}
#[cfg(test)]