@@ -21,7 +21,7 @@ async fn test_create_system_account() {
2121
2222 // Generate a new keypair for the account we'll create
2323 let new_account = Keypair :: new ( ) ;
24-
24+
2525 // Test data
2626 let name = "John Doe" ;
2727 let address = "123 Blockchain Street" ;
@@ -44,7 +44,11 @@ async fn test_create_system_account() {
4444
4545 // Process transaction
4646 let result = banks_client. process_transaction ( transaction) . await ;
47- assert ! ( result. is_ok( ) , "Failed to process transaction: {:?}" , result) ;
47+ assert ! (
48+ result. is_ok( ) ,
49+ "Failed to process transaction: {:?}" ,
50+ result
51+ ) ;
4852
4953 // Fetch and verify the created account
5054 let account = banks_client
@@ -54,30 +58,38 @@ async fn test_create_system_account() {
5458 . expect ( "Account not found" ) ;
5559
5660 // Verify account owner
57- assert_eq ! ( account. owner, rent_example_api:: ID , "Incorrect account owner" ) ;
61+ assert_eq ! (
62+ account. owner,
63+ rent_example_api:: ID ,
64+ "Incorrect account owner"
65+ ) ;
5866
5967 // Deserialize and verify account data
60- let address_account = Address :: try_from_bytes ( & account . data )
61- . expect ( "Failed to deserialize account data" ) ;
68+ let address_account =
69+ Address :: try_from_bytes ( & account . data ) . expect ( "Failed to deserialize account data" ) ;
6270
6371 // Convert stored bytes back to strings for comparison
6472 let stored_name = String :: from_utf8 (
65- address_account. name
73+ address_account
74+ . name
6675 . iter ( )
6776 . take_while ( |& & b| b != 0 )
6877 . cloned ( )
69- . collect :: < Vec < u8 > > ( )
70- ) . unwrap ( ) ;
78+ . collect :: < Vec < u8 > > ( ) ,
79+ )
80+ . unwrap ( ) ;
7181
7282 let stored_address = String :: from_utf8 (
73- address_account. address
83+ address_account
84+ . address
7485 . iter ( )
7586 . take_while ( |& & b| b != 0 )
7687 . cloned ( )
77- . collect :: < Vec < u8 > > ( )
78- ) . unwrap ( ) ;
88+ . collect :: < Vec < u8 > > ( ) ,
89+ )
90+ . unwrap ( ) ;
7991
8092 // Verify the stored data matches what we sent
8193 assert_eq ! ( stored_name, name, "Stored name doesn't match" ) ;
8294 assert_eq ! ( stored_address, address, "Stored address doesn't match" ) ;
83- }
95+ }
0 commit comments