Skip to content

Commit

Permalink
fix: Clippy you annoying thing
Browse files Browse the repository at this point in the history
  • Loading branch information
mustermeiszer committed Apr 16, 2024
1 parent ec1a96b commit 2c2edc0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
3 changes: 2 additions & 1 deletion pallets/loans/src/entities/input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use crate::{
entities::pricing::external::ExternalAmount,
pallet::{Config, Error},
types::RepaidAmount,
PriceOf,
};

#[derive(Encode, Decode, Clone, PartialEq, Eq, TypeInfo, RuntimeDebugNoBound, MaxEncodedLen)]
Expand Down Expand Up @@ -61,6 +62,6 @@ impl<T: Config> RepaidInput<T> {
#[scale_info(skip_type_params(T))]
pub enum PriceCollectionInput<T: Config> {
Empty,
Custom(BoundedBTreeMap<T::PriceId, (T::Balance, T::Moment), T::MaxActiveLoansPerPool>),
Custom(BoundedBTreeMap<T::PriceId, PriceOf<T>, T::MaxActiveLoansPerPool>),
FromRegistry,
}
7 changes: 3 additions & 4 deletions runtime/common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,9 @@ where
>,
{
let input_prices: PriceCollectionInput<T> =
if let Ok(prices) = pallet_loans::Pallet::<T>::registered_prices(pool_id) {
PriceCollectionInput::FromRegistry
} else {
PriceCollectionInput::Empty
match pallet_loans::Pallet::<T>::registered_prices(pool_id) {
Ok(_) => PriceCollectionInput::FromRegistry,
Err(_) => PriceCollectionInput::Empty,
};

update_nav_with_input::<T>(pool_id, input_prices)
Expand Down

0 comments on commit 2c2edc0

Please sign in to comment.