@@ -226,16 +226,6 @@ pub trait ReadableAccount: Sized {
226226 fn owner ( & self ) -> & Pubkey ;
227227 fn executable ( & self ) -> bool ;
228228 fn rent_epoch ( & self ) -> Epoch ;
229- #[ deprecated( since = "3.2.0" ) ]
230- fn to_account_shared_data ( & self ) -> AccountSharedData {
231- AccountSharedData :: create (
232- self . lamports ( ) ,
233- self . data ( ) . to_vec ( ) ,
234- * self . owner ( ) ,
235- self . executable ( ) ,
236- self . rent_epoch ( ) ,
237- )
238- }
239229}
240230
241231impl ReadableAccount for Account {
@@ -344,10 +334,6 @@ impl ReadableAccount for AccountSharedData {
344334 fn rent_epoch ( & self ) -> Epoch {
345335 self . rent_epoch
346336 }
347- fn to_account_shared_data ( & self ) -> AccountSharedData {
348- // avoid data copy here
349- self . clone ( )
350- }
351337}
352338
353339impl ReadableAccount for Ref < ' _ , AccountSharedData > {
@@ -366,16 +352,6 @@ impl ReadableAccount for Ref<'_, AccountSharedData> {
366352 fn rent_epoch ( & self ) -> Epoch {
367353 self . rent_epoch
368354 }
369- fn to_account_shared_data ( & self ) -> AccountSharedData {
370- AccountSharedData {
371- lamports : self . lamports ( ) ,
372- // avoid data copy here
373- data : Arc :: clone ( & self . data ) ,
374- owner : * self . owner ( ) ,
375- executable : self . executable ( ) ,
376- rent_epoch : self . rent_epoch ( ) ,
377- }
378- }
379355}
380356
381357impl ReadableAccount for Ref < ' _ , Account > {
@@ -918,18 +894,6 @@ pub mod tests {
918894 account2. serialize_data ( & "hello world" ) . unwrap ( ) ;
919895 }
920896
921- #[ test]
922- #[ allow( deprecated) ]
923- fn test_to_account_shared_data ( ) {
924- let key = Pubkey :: new_unique ( ) ;
925- let ( account1, account2) = make_two_accounts ( & key) ;
926- assert ! ( accounts_equal( & account1, & account2) ) ;
927- let account3 = account1. to_account_shared_data ( ) ;
928- let account4 = account2. to_account_shared_data ( ) ;
929- assert ! ( accounts_equal( & account1, & account3) ) ;
930- assert ! ( accounts_equal( & account1, & account4) ) ;
931- }
932-
933897 #[ test]
934898 fn test_account_shared_data ( ) {
935899 let key = Pubkey :: new_unique ( ) ;
0 commit comments