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

@ -1209,7 +1209,7 @@ pub mod tests {
self, create_genesis_config_with_vote_accounts, ValidatorVoteKeypairs,
};
use solana_sdk::{
account::AccountSharedData,
account::{AccountSharedData, WritableAccount},
epoch_schedule::EpochSchedule,
hash::Hash,
pubkey::Pubkey,
@ -3353,7 +3353,7 @@ pub mod tests {
&solana_vote_program::id(),
);
let versioned = VoteStateVersions::new_current(vote_state);
VoteState::serialize(&versioned, &mut vote_account.data).unwrap();
VoteState::serialize(&versioned, vote_account.data_as_mut_slice()).unwrap();
(
solana_sdk::pubkey::new_rand(),
(stake, ArcVoteAccount::from(vote_account)),