@@ -204,14 +204,6 @@ pub trait WritableAccount: ReadableAccount {
204204 fn copy_into_owner_from_slice ( & mut self , source : & [ u8 ] ) ;
205205 fn set_executable ( & mut self , executable : bool ) ;
206206 fn set_rent_epoch ( & mut self , epoch : Epoch ) ;
207- #[ deprecated( since = "3.3.0" ) ]
208- fn create (
209- lamports : u64 ,
210- data : Vec < u8 > ,
211- owner : Pubkey ,
212- executable : bool ,
213- rent_epoch : Epoch ,
214- ) -> Self ;
215207}
216208
217209pub trait ReadableAccount : Sized {
@@ -220,17 +212,6 @@ pub trait ReadableAccount: Sized {
220212 fn owner ( & self ) -> & Pubkey ;
221213 fn executable ( & self ) -> bool ;
222214 fn rent_epoch ( & self ) -> Epoch ;
223- #[ deprecated( since = "3.2.0" ) ]
224- fn to_account_shared_data ( & self ) -> AccountSharedData {
225- #[ allow( deprecated) ]
226- AccountSharedData :: create (
227- self . lamports ( ) ,
228- self . data ( ) . to_vec ( ) ,
229- * self . owner ( ) ,
230- self . executable ( ) ,
231- self . rent_epoch ( ) ,
232- )
233- }
234215}
235216
236217impl < T > ReadableAccount for T
@@ -292,21 +273,6 @@ impl WritableAccount for Account {
292273 fn set_rent_epoch ( & mut self , epoch : Epoch ) {
293274 self . rent_epoch = epoch;
294275 }
295- fn create (
296- lamports : u64 ,
297- data : Vec < u8 > ,
298- owner : Pubkey ,
299- executable : bool ,
300- rent_epoch : Epoch ,
301- ) -> Self {
302- Account {
303- lamports,
304- data,
305- owner,
306- executable,
307- rent_epoch,
308- }
309- }
310276}
311277
312278impl WritableAccount for AccountSharedData {
@@ -328,21 +294,6 @@ impl WritableAccount for AccountSharedData {
328294 fn set_rent_epoch ( & mut self , epoch : Epoch ) {
329295 self . rent_epoch = epoch;
330296 }
331- fn create (
332- lamports : u64 ,
333- data : Vec < u8 > ,
334- owner : Pubkey ,
335- executable : bool ,
336- rent_epoch : Epoch ,
337- ) -> Self {
338- AccountSharedData {
339- lamports,
340- data : Arc :: new ( data) ,
341- owner,
342- executable,
343- rent_epoch,
344- }
345- }
346297}
347298
348299impl ReadableAccount for AccountSharedData {
@@ -361,10 +312,6 @@ impl ReadableAccount for AccountSharedData {
361312 fn rent_epoch ( & self ) -> Epoch {
362313 self . rent_epoch
363314 }
364- fn to_account_shared_data ( & self ) -> AccountSharedData {
365- // avoid data copy here
366- self . clone ( )
367- }
368315}
369316
370317fn debug_fmt < T : ReadableAccount > ( item : & T , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
@@ -845,18 +792,6 @@ pub mod tests {
845792 account2. serialize_data ( & "hello world" ) . unwrap ( ) ;
846793 }
847794
848- #[ test]
849- #[ allow( deprecated) ]
850- fn test_to_account_shared_data ( ) {
851- let key = Pubkey :: new_unique ( ) ;
852- let ( account1, account2) = make_two_accounts ( & key) ;
853- assert ! ( accounts_equal( & account1, & account2) ) ;
854- let account3 = account1. to_account_shared_data ( ) ;
855- let account4 = account2. to_account_shared_data ( ) ;
856- assert ! ( accounts_equal( & account1, & account3) ) ;
857- assert ! ( accounts_equal( & account1, & account4) ) ;
858- }
859-
860795 #[ test]
861796 fn test_account_shared_data ( ) {
862797 let key = Pubkey :: new_unique ( ) ;
0 commit comments