Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
0xripleys committed Sep 15, 2023
1 parent 4d6c16d commit 6753e68
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
4 changes: 2 additions & 2 deletions token-lending/program/src/processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -534,9 +534,9 @@ fn _refresh_reserve<'a>(

/// Lite version of refresh_reserve that should be used when the oracle price doesn't need to be updated
/// BE CAREFUL WHEN USING THIS
fn _refresh_reserve_interest<'a>(
fn _refresh_reserve_interest(
program_id: &Pubkey,
reserve_info: &AccountInfo<'a>,
reserve_info: &AccountInfo<'_>,
clock: &Clock,
) -> ProgramResult {
let mut reserve = Reserve::unpack(&reserve_info.data.borrow())?;
Expand Down
2 changes: 1 addition & 1 deletion token-lending/program/tests/helpers/mock_pyth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ impl Processor {
msg!("Mock Pyth: Set price");
let price_account_info = next_account_info(account_info_iter)?;
let data = &mut price_account_info.try_borrow_mut_data()?;
let mut price_account: &mut PriceAccount = load_mut(data).unwrap();
let price_account: &mut PriceAccount = load_mut(data).unwrap();

price_account.agg.price = price;
price_account.agg.conf = conf;
Expand Down
10 changes: 3 additions & 7 deletions token-lending/sdk/src/instruction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ pub enum LendingInstruction {
/// 0. `[]` Reserve account.
/// 1. `[signer]` fee payer.
/// 3. '[]' System Program
ResizeReserve
ResizeReserve,
}

impl LendingInstruction {
Expand Down Expand Up @@ -971,7 +971,7 @@ impl LendingInstruction {
buf.extend_from_slice(&liquidity_amount.to_le_bytes());
}
// special handling for this instruction, bc the instruction is too big to deserialize
Self::UpdateMarketMetadata => {},
Self::UpdateMarketMetadata => {}
Self::ResizeReserve => {
buf.push(23);
}
Expand Down Expand Up @@ -1702,11 +1702,7 @@ pub fn update_market_metadata(
}

/// Creates a `ResizeReserve` instruction
pub fn resize_reserve(
program_id: Pubkey,
reserve_pubkey: Pubkey,
signer: Pubkey,
) -> Instruction {
pub fn resize_reserve(program_id: Pubkey, reserve_pubkey: Pubkey, signer: Pubkey) -> Instruction {
Instruction {
program_id,
accounts: vec![
Expand Down

0 comments on commit 6753e68

Please sign in to comment.