Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
HaoranYi committed Aug 28, 2023
1 parent 566cbad commit 2e5c2e5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions accounts-db/src/accounts_hash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 2e5c2e5

Please sign in to comment.