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() }