Skip to content

Commit

Permalink
Make Clippy happy
Browse files Browse the repository at this point in the history
  • Loading branch information
ruuda committed Dec 23, 2021
1 parent 6771008 commit fbb1174
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions anker/src/processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,8 @@ fn process_send_rewards(

invoke_signed(
&instr,
// This vec is not useless, we want the data to go on the heap, not on the stack!
#[allow(clippy::useless_vec)]
&vec![
accounts.ust_reserve_account.clone(),
accounts.authority_signer_key.clone(),
Expand Down
8 changes: 4 additions & 4 deletions cli/src/anker_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,21 +39,21 @@ impl AnkerState {
anker_address: &Pubkey,
solido: &Lido,
) -> Result<Self> {
let anker = config.client.get_anker(&anker_address)?;
let anker = config.client.get_anker(anker_address)?;

let token_swap_account = config.client.get_account(&anker.token_swap_pool)?;
let token_swap = spl_token_swap::state::SwapV1::unpack(token_swap_account.data())?;
let token_swap_program_id = token_swap_account.owner;

let (anker_ust_reserve, _anker_ust_reserve_bump_seed) =
find_ust_reserve_account(&anker_program_id, anker_address);
find_ust_reserve_account(anker_program_id, anker_address);
let ust_reserve_balance =
MicroUst(config.client.get_spl_token_balance(&anker_ust_reserve)?);
let ust_account: spl_token::state::Account =
config.client.get_unpack(&anker_ust_reserve)?;

let (anker_st_sol_reserve, _anker_st_sol_reserve_bump_seed) =
find_st_sol_reserve_account(&anker_program_id, anker_address);
find_st_sol_reserve_account(anker_program_id, anker_address);
let st_sol_reserve_balance =
StLamports(config.client.get_spl_token_balance(&anker_st_sol_reserve)?);

Expand All @@ -68,7 +68,7 @@ impl AnkerState {
};

Ok(AnkerState {
anker_program_id: anker_program_id.clone(),
anker_program_id: *anker_program_id,
anker,
b_sol_total_supply_amount,
pool_st_sol_account,
Expand Down

0 comments on commit fbb1174

Please sign in to comment.