File tree Expand file tree Collapse file tree 4 files changed +16
-15
lines changed Expand file tree Collapse file tree 4 files changed +16
-15
lines changed Original file line number Diff line number Diff line change 2222 toolchain : ${{ steps.nightly.outputs.version }}
2323 components : rustfmt
2424 - name : Run format
25- run : make format-check
25+ run : make format
2626
2727 rust_clippy :
2828 name : Clippy
Original file line number Diff line number Diff line change 22 mollusk_svm:: Mollusk ,
33 solana_account:: Account ,
44 solana_pubkey:: Pubkey ,
5+ solana_rent:: Rent ,
56 spl_associated_token_account:: get_associated_token_address_with_program_id,
67 spl_token:: { solana_program:: program_pack:: Pack , state:: Account as TokenAccount } ,
7- solana_rent:: Rent ,
88} ;
99
1010pub const ID : Pubkey = solana_pubkey:: pubkey!( "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL" ) ;
11- const TOKEN_PROGRAM_ID : Pubkey = solana_pubkey:: pubkey!( "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" ) ;
12- const TOKEN_2022_PROGRAM_ID : Pubkey = solana_pubkey:: pubkey!( "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb" ) ;
11+ const TOKEN_PROGRAM_ID : Pubkey =
12+ solana_pubkey:: pubkey!( "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" ) ;
13+ const TOKEN_2022_PROGRAM_ID : Pubkey =
14+ solana_pubkey:: pubkey!( "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb" ) ;
1315
1416pub const ELF : & [ u8 ] = include_bytes ! ( "elf/associated_token.so" ) ;
1517
Original file line number Diff line number Diff line change 22 mollusk_svm:: Mollusk ,
33 solana_account:: Account ,
44 solana_pubkey:: Pubkey ,
5- spl_token:: solana_program:: program_pack:: Pack ,
6- spl_token:: state:: { Account as TokenAccount , Mint } ,
75 solana_rent:: Rent ,
6+ spl_token:: {
7+ solana_program:: program_pack:: Pack ,
8+ state:: { Account as TokenAccount , Mint } ,
9+ } ,
810} ;
911
1012pub const ID : Pubkey = solana_pubkey:: pubkey!( "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" ) ;
@@ -45,9 +47,7 @@ pub fn create_account_for_mint(mint_data: Mint) -> Account {
4547}
4648
4749/// Create a Token Account
48- pub fn create_account_for_token_account (
49- token_account_data : TokenAccount ,
50- ) -> Account {
50+ pub fn create_account_for_token_account ( token_account_data : TokenAccount ) -> Account {
5151 let mut data = vec ! [ 0u8 ; TokenAccount :: LEN ] ;
5252 TokenAccount :: pack ( token_account_data, & mut data) . unwrap ( ) ;
5353
Original file line number Diff line number Diff line change 33 solana_account:: Account ,
44 solana_pubkey:: Pubkey ,
55 solana_rent:: Rent ,
6- spl_token:: solana_program:: program_pack:: Pack ,
7- spl_token:: state:: { Mint , Account as TokenAccount } ,
6+ spl_token:: {
7+ solana_program:: program_pack:: Pack ,
8+ state:: { Account as TokenAccount , Mint } ,
9+ } ,
810} ;
911
1012pub const ID : Pubkey = solana_pubkey:: pubkey!( "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb" ) ;
@@ -45,9 +47,7 @@ pub fn create_account_for_mint(mint_data: Mint) -> Account {
4547}
4648
4749/// Create a Token Account
48- pub fn create_account_for_token_account (
49- token_account_data : TokenAccount ,
50- ) -> Account {
50+ pub fn create_account_for_token_account ( token_account_data : TokenAccount ) -> Account {
5151 let mut data = vec ! [ 0u8 ; TokenAccount :: LEN ] ;
5252 TokenAccount :: pack ( token_account_data, & mut data) . unwrap ( ) ;
5353
@@ -59,4 +59,3 @@ pub fn create_account_for_token_account(
5959 rent_epoch : 0 ,
6060 }
6161}
62-
You can’t perform that action at this time.
0 commit comments