@@ -226,6 +226,7 @@ pub trait ReadableAccount: Sized {
226226 fn owner ( & self ) -> & Pubkey ;
227227 fn executable ( & self ) -> bool ;
228228 fn rent_epoch ( & self ) -> Epoch ;
229+ <<<<<<< HEAD
229230 #[ deprecated ( since = "3.2.0" ) ]
230231 fn to_account_shared_data ( & self ) -> AccountSharedData {
231232 AccountSharedData :: create (
@@ -236,6 +237,8 @@ pub trait ReadableAccount: Sized {
236237 self . rent_epoch ( ) ,
237238 )
238239 }
240+ =======
241+ >>>>>>> 8546 c642 ( Remove to_account_shared_data from ReadableAccount )
239242}
240243
241244impl ReadableAccount for Account {
@@ -344,10 +347,6 @@ impl ReadableAccount for AccountSharedData {
344347 fn rent_epoch ( & self ) -> Epoch {
345348 self . rent_epoch
346349 }
347- fn to_account_shared_data ( & self ) -> AccountSharedData {
348- // avoid data copy here
349- self . clone ( )
350- }
351350}
352351
353352impl ReadableAccount for Ref < ' _ , AccountSharedData > {
@@ -366,16 +365,6 @@ impl ReadableAccount for Ref<'_, AccountSharedData> {
366365 fn rent_epoch ( & self ) -> Epoch {
367366 self . rent_epoch
368367 }
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- }
379368}
380369
381370impl ReadableAccount for Ref < ' _ , Account > {
@@ -918,18 +907,6 @@ pub mod tests {
918907 account2. serialize_data ( & "hello world" ) . unwrap ( ) ;
919908 }
920909
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-
933910 #[ test]
934911 fn test_account_shared_data ( ) {
935912 let key = Pubkey :: new_unique ( ) ;
0 commit comments