From a89010cc89798fcde5984e60ad0454435dc3a2cc Mon Sep 17 00:00:00 2001 From: "Jeff Washington (jwash)" Date: Tue, 27 Sep 2022 08:48:05 -0700 Subject: [PATCH] fix duplicate local variable (#28093) --- runtime/src/in_mem_accounts_index.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/runtime/src/in_mem_accounts_index.rs b/runtime/src/in_mem_accounts_index.rs index 657292190d0e74..eb7136ffefa72b 100644 --- a/runtime/src/in_mem_accounts_index.rs +++ b/runtime/src/in_mem_accounts_index.rs @@ -1053,7 +1053,6 @@ impl InMemAccountsIndex { // 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); @@ -1066,7 +1065,7 @@ impl InMemAccountsIndex { 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 => {