Revert "tmp: temporary AccountCache"
This reverts commit 726da7dabf5bf089a463309c41be3f6e11d0c43d.
This commit is contained in:
@@ -90,14 +90,6 @@ impl AccountCache {
|
|||||||
.get_mut(&self.selected)
|
.get_mut(&self.selected)
|
||||||
.expect("guarenteed that selected exists in accounts")
|
.expect("guarenteed that selected exists in accounts")
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn contains(&self, pk: &[u8; 32]) -> bool {
|
|
||||||
self.accounts.contains_key(pk)
|
|
||||||
}
|
|
||||||
|
|
||||||
pub(super) fn iter_mut(&mut self) -> AccountCacheIterMut<'_> {
|
|
||||||
AccountCacheIterMut(self.accounts.iter_mut())
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> IntoIterator for &'a AccountCache {
|
impl<'a> IntoIterator for &'a AccountCache {
|
||||||
@@ -108,13 +100,3 @@ impl<'a> IntoIterator for &'a AccountCache {
|
|||||||
self.accounts.iter()
|
self.accounts.iter()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(super) struct AccountCacheIterMut<'a>(hashbrown::hash_map::IterMut<'a, Pubkey, UserAccount>);
|
|
||||||
|
|
||||||
impl<'a> Iterator for AccountCacheIterMut<'a> {
|
|
||||||
type Item = (&'a Pubkey, &'a mut UserAccount);
|
|
||||||
|
|
||||||
fn next(&mut self) -> Option<Self::Item> {
|
|
||||||
self.0.next()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user