diff --git a/runtime/src/stakes.rs b/runtime/src/stakes.rs index a28f3a5b68..50e004cb59 100644 --- a/runtime/src/stakes.rs +++ b/runtime/src/stakes.rs @@ -14,7 +14,7 @@ use { }, solana_stake_program::stake_state, solana_vote_program::vote_state::VoteState, - std::{borrow::Borrow, collections::HashMap, sync::Arc}, + std::{collections::HashMap, sync::Arc}, }; #[derive(Default, Clone, PartialEq, Debug, Deserialize, Serialize, AbiExample)] @@ -212,7 +212,7 @@ impl Stakes { } pub fn vote_accounts(&self) -> &HashMap { - self.vote_accounts.borrow() + self.vote_accounts.as_ref() } pub fn stake_delegations(&self) -> &HashMap { diff --git a/runtime/src/vote_account.rs b/runtime/src/vote_account.rs index dc385f9748..91539bc9d4 100644 --- a/runtime/src/vote_account.rs +++ b/runtime/src/vote_account.rs @@ -7,7 +7,6 @@ use { }, solana_vote_program::vote_state::VoteState, std::{ - borrow::Borrow, cmp::Ordering, collections::{hash_map::Entry, HashMap}, iter::FromIterator, @@ -268,8 +267,8 @@ impl From for VoteAccounts { } } -impl Borrow for VoteAccounts { - fn borrow(&self) -> &VoteAccountsHashMap { +impl AsRef for VoteAccounts { + fn as_ref(&self) -> &VoteAccountsHashMap { &self.vote_accounts } }