From 361101bd316c9484e96853de1023ec53d67b46db Mon Sep 17 00:00:00 2001 From: "Jeff Washington (jwash)" <75863576+jeffwashington@users.noreply.github.com> Date: Sun, 12 Sep 2021 10:25:09 -0500 Subject: [PATCH] rename generic V -> T. Matches intent better. V is now a larger type that contains T (#19798) --- runtime/src/in_mem_accounts_index.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/runtime/src/in_mem_accounts_index.rs b/runtime/src/in_mem_accounts_index.rs index 229ce78a8a..d7e790dad3 100644 --- a/runtime/src/in_mem_accounts_index.rs +++ b/runtime/src/in_mem_accounts_index.rs @@ -10,31 +10,31 @@ type K = Pubkey; // one instance of this represents one bin of the accounts index. #[derive(Debug, Default)] -pub struct InMemAccountsIndex { +pub struct InMemAccountsIndex { // backing store - map: HashMap>, + map: HashMap>, } -impl InMemAccountsIndex { +impl InMemAccountsIndex { pub fn new() -> Self { Self { map: HashMap::new(), } } - pub fn entry(&mut self, pubkey: Pubkey) -> Entry> { + pub fn entry(&mut self, pubkey: Pubkey) -> Entry> { self.map.entry(pubkey) } - pub fn items(&self) -> Vec<(K, AccountMapEntry)> { + pub fn items(&self) -> Vec<(K, AccountMapEntry)> { self.map.iter().map(|(k, v)| (*k, v.clone())).collect() } - pub fn keys(&self) -> Keys> { + pub fn keys(&self) -> Keys> { self.map.keys() } - pub fn get(&self, key: &K) -> Option> { + pub fn get(&self, key: &K) -> Option> { self.map.get(key).cloned() }