Skip to content

Commit 43ff949

Browse files
committed
fix formatting
1 parent 5f4d642 commit 43ff949

File tree

4 files changed

+16
-15
lines changed

4 files changed

+16
-15
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
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

programs/token/src/associated_token.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,16 @@ use {
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

1010
pub 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

1416
pub const ELF: &[u8] = include_bytes!("elf/associated_token.so");
1517

programs/token/src/token.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@ use {
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

1012
pub 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

programs/token/src/token2022.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@ use {
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

1012
pub 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-

0 commit comments

Comments
 (0)