From 30dafc713529b9b13887b0bc286b56e16974465b Mon Sep 17 00:00:00 2001 From: "Jeff Washington (jwash)" Date: Sun, 27 Feb 2022 23:08:58 -0600 Subject: [PATCH] list -> slot_list (#23355) --- runtime/src/in_mem_accounts_index.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/runtime/src/in_mem_accounts_index.rs b/runtime/src/in_mem_accounts_index.rs index 1b70dfc8fd..5fd4e1cfc5 100644 --- a/runtime/src/in_mem_accounts_index.rs +++ b/runtime/src/in_mem_accounts_index.rs @@ -469,7 +469,7 @@ impl InMemAccountsIndex { /// or, 'account_info' is appended to the slot list if the slot did not exist previously. /// returns true if caller should addref fn update_slot_list( - list: &mut SlotList, + slot_list: &mut SlotList, slot: Slot, account_info: T, _other_slot: Option, @@ -479,20 +479,20 @@ impl InMemAccountsIndex { let mut addref = !account_info.is_cached(); // find other dirty entries from the same slot - for list_index in 0..list.len() { - let (s, previous_update_value) = &list[list_index]; + for list_index in 0..slot_list.len() { + let (s, previous_update_value) = &slot_list[list_index]; if *s == slot { let previous_was_cached = previous_update_value.is_cached(); addref = addref && previous_was_cached; let mut new_item = (slot, account_info); - std::mem::swap(&mut new_item, &mut list[list_index]); + std::mem::swap(&mut new_item, &mut slot_list[list_index]); if previous_slot_entry_was_cached { assert!(previous_was_cached); } else { reclaims.push(new_item); } - list[(list_index + 1)..] + slot_list[(list_index + 1)..] .iter() .for_each(|item| assert!(item.0 != slot)); return addref; @@ -500,7 +500,7 @@ impl InMemAccountsIndex { } // if we make it here, we did not find the slot in the list - list.push((slot, account_info)); + slot_list.push((slot, account_info)); addref }