mut data refs as slice (#15782)

This commit is contained in:
Jeff Washington (jwash)
2021-03-10 15:28:03 -06:00
committed by GitHub
parent 56923c91bf
commit 1135ffd595
13 changed files with 125 additions and 68 deletions

View File

@ -1253,7 +1253,11 @@ pub mod test {
},
};
use solana_sdk::{
account::AccountSharedData, clock::Slot, hash::Hash, pubkey::Pubkey, signature::Signer,
account::{AccountSharedData, WritableAccount},
clock::Slot,
hash::Hash,
pubkey::Pubkey,
signature::Signer,
slot_history::SlotHistory,
};
use solana_vote_program::{
@ -1582,7 +1586,7 @@ pub mod test {
}
VoteState::serialize(
&VoteStateVersions::new_current(vote_state),
&mut account.data,
&mut account.data_as_mut_slice(),
)
.expect("serialize state");
stakes.push((