From 2e5c2e50df22bdf5cf6ca533a1cd87a2e6955996 Mon Sep 17 00:00:00 2001 From: HaoranYi Date: Mon, 28 Aug 2023 14:27:59 +0000 Subject: [PATCH] clippy --- accounts-db/src/accounts_hash.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/accounts-db/src/accounts_hash.rs b/accounts-db/src/accounts_hash.rs index 5e8eae967f6952..dbf21cc254052c 100644 --- a/accounts-db/src/accounts_hash.rs +++ b/accounts-db/src/accounts_hash.rs @@ -1050,9 +1050,10 @@ impl<'a> AccountsHasher<'a> { let mut offset = first_pubkey_in_bin; while let Some(k) = key { - if !working_set.contains_key(&k) { + if let std::collections::btree_map::Entry::Vacant(e) = working_set.entry(k) + { // found a new key, insert into working_set - working_set.insert(k, (i, offset)); + e.insert((i, offset)); break; } else { // key already exist in working_set, find next key.