Skip to content

Commit

Permalink
fix duplicate local variable (backport #28093) (#28108)
Browse files Browse the repository at this point in the history
fix duplicate local variable (#28093)

(cherry picked from commit a89010c)

Co-authored-by: Jeff Washington (jwash) <[email protected]>
  • Loading branch information
mergify[bot] and jeffwashington authored Sep 28, 2022
1 parent 4d7f20b commit 02feb73
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions runtime/src/in_mem_accounts_index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1112,7 +1112,6 @@ impl<T: IndexValue> InMemAccountsIndex<T> {

// merge all items into the disk index now
let disk = self.bucket.as_ref().unwrap();
let mut duplicate = vec![];
let mut count = 0;
insert.into_iter().for_each(|(slot, k, v)| {
let entry = (slot, v);
Expand All @@ -1125,7 +1124,7 @@ impl<T: IndexValue> InMemAccountsIndex<T> {
slot_list.extend_from_slice(current_slot_list);
slot_list.push(entry); // will never be from the same slot that already exists in the list
ref_count += new_ref_count;
duplicate.push((slot, k));
duplicates.push((slot, k));
Some((slot_list, ref_count))
}
None => {
Expand Down

0 comments on commit 02feb73

Please sign in to comment.