Skip to content
This repository was archived by the owner on Mar 11, 2025. It is now read-only.

Commit ebc1678

Browse files
committed
clippy
1 parent 18468b5 commit ebc1678

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

token-lending/program/src/math/decimal.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ impl Decimal {
5555
}
5656

5757
/// Return raw scaled value if it fits within u128
58+
#[allow(clippy::wrong_self_convention)]
5859
pub fn to_scaled_val(&self) -> Result<u128, ProgramError> {
5960
Ok(u128::try_from(self.0).map_err(|_| LendingError::MathOverflow)?)
6061
}

token-lending/program/src/math/rate.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ impl Rate {
6262
}
6363

6464
/// Return raw scaled value
65+
#[allow(clippy::wrong_self_convention)]
6566
pub fn to_scaled_val(&self) -> u128 {
6667
self.0.as_u128()
6768
}

token-lending/program/tests/genesis_accounts.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ async fn test_genesis_accounts() {
3636
// price of 2210.5
3737
const fn lamports_to_usdc_fractional(lamports: u64) -> u64 {
3838
lamports / LAMPORTS_TO_SOL * (2210 + 2211) / 2 * FRACTIONAL_TO_USDC / 1000
39-
};
39+
}
4040

4141
const USER_SOL_DEPOSIT_LAMPORTS: u64 = 10_000 * LAMPORTS_TO_SOL;
4242
const USER_SOL_COLLATERAL_LAMPORTS: u64 = 8_500 * LAMPORTS_TO_SOL;

0 commit comments

Comments
 (0)