Skip to content

Commit 8f7e1fe

Browse files
committed
fixup
1 parent 4b47c82 commit 8f7e1fe

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

token-lending/sdk/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ edition = "2018"
1111
arrayref = "0.3.6"
1212
borsh = "0.10.3"
1313
bytemuck = "1.5.1"
14-
num-derive = "0.3"
15-
num-traits = "0.2"
14+
num-derive = "=0.4"
15+
num-traits = "=0.2"
1616
solana-program = ">=1.9,<2"
1717
spl-token = { version = "^3.2.0,<4", features=["no-entrypoint"] }
1818
static_assertions = "1.1.0"

token-lending/sdk/src/error.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
//! Error types
22
3-
use num_derive::FromPrimitive;
3+
// use num_derive::FromPrimitive;
44
use num_traits::FromPrimitive;
55
use solana_program::{decode_error::DecodeError, program_error::ProgramError};
66
use solana_program::{msg, program_error::PrintProgramError};
77
use thiserror::Error;
88

99
/// Errors that may be returned by the TokenLending program.
10-
#[derive(Clone, Debug, Eq, Error, FromPrimitive, PartialEq)]
10+
#[derive(Clone, Debug, Eq, Error, PartialEq)]
1111
pub enum LendingError {
1212
// 0
1313
/// Invalid instruction data passed in.

token-lending/sdk/src/state/reserve.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ use crate::{
44
math::{Decimal, Rate, TryAdd, TryDiv, TryMul, TrySub},
55
};
66
use arrayref::{array_mut_ref, array_ref, array_refs, mut_array_refs};
7-
use num_derive::FromPrimitive;
8-
use num_traits::FromPrimitive;
7+
use num_traits::FromPrimitive as _;
98
use solana_program::{
109
clock::Slot,
1110
entrypoint::ProgramResult,
@@ -971,7 +970,7 @@ pub struct ReserveConfig {
971970
pub fee_receiver: Pubkey,
972971
/// Cut of the liquidation bonus that the protocol receives, in deca bps
973972
pub protocol_liquidation_fee: u8,
974-
/// Protocol take rate is the amount borrowed interest protocol recieves, as a percentage
973+
/// Protocol take rate is the amount borrowed interest protocol recieves, as a percentage
975974
pub protocol_take_rate: u8,
976975
/// Added borrow weight in basis points. THIS FIELD SHOULD NEVER BE USED DIRECTLY. Always use
977976
/// borrow_weight()
@@ -1094,7 +1093,8 @@ pub fn validate_reserve_config(config: ReserveConfig) -> ProgramResult {
10941093
Ok(())
10951094
}
10961095

1097-
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, FromPrimitive)]
1096+
#[allow(non_local_definitions)]
1097+
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, num_derive::FromPrimitive)]
10981098
/// Asset Type of the reserve
10991099
pub enum ReserveType {
11001100
#[default]

0 commit comments

Comments
 (0)