diff --git a/accounts-db/src/accounts_db.rs b/accounts-db/src/accounts_db.rs index 9b1690f8721621..445bc6d10347de 100644 --- a/accounts-db/src/accounts_db.rs +++ b/accounts-db/src/accounts_db.rs @@ -71,10 +71,7 @@ use { }, blake3::traits::digest::Digest, crossbeam_channel::{unbounded, Receiver, Sender}, - dashmap::{ - mapref::entry::Entry::{Occupied, Vacant}, - DashMap, DashSet, - }, + dashmap::{DashMap, DashSet}, log::*, rand::{thread_rng, Rng}, rayon::{prelude::*, ThreadPool}, @@ -9368,12 +9365,7 @@ impl AccountsDb { let unique_keys = HashSet::::from_iter(slot_keys.iter().map(|(_, key)| *key)); for (slot, key) in slot_keys { - match self.uncleaned_pubkeys.entry(slot) { - Occupied(mut occupied) => occupied.get_mut().push(key), - Vacant(vacant) => { - vacant.insert(vec![key]); - } - } + self.uncleaned_pubkeys.entry(slot).or_default().push(key); } let unique_pubkeys_by_bin_inner = unique_keys.into_iter().collect::>();