Skip to content

Commit

Permalink
clippy again
Browse files Browse the repository at this point in the history
  • Loading branch information
brenzi committed Jul 15, 2024
1 parent e3b9255 commit 9eb4079
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion claims/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ impl<T: Config> Pallet<T> {
}

// We first need to deposit the balance to ensure that the account exists.
CurrencyOf::<T>::deposit_creating(&dest, balance_due);
let _ = CurrencyOf::<T>::deposit_creating(&dest, balance_due);

// Check if this claim should have a vesting schedule.
if let Some(vs) = vesting {
Expand Down
2 changes: 1 addition & 1 deletion enclave-bridge/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -386,8 +386,8 @@ pub mod pallet {
let new_status: ShardSignerStatusVec<T> = Self::shard_status(shard)
.ok_or(Error::<T>::ShardNotFound)?
.iter()
.filter(|&signer_status| signer_status.signer != subject)
.cloned()
.filter(|signer_status| signer_status.signer != subject)
.collect::<Vec<ShardSignerStatus<T>>>()
.try_into()
.expect("can only become smaller by filtering");
Expand Down
9 changes: 4 additions & 5 deletions teerdays/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
//!
//! ### Terminology
//! - **Bonding**: Locking up TEER tokens for a certain period of time into the future.
//! Bonded TEER tokens are not liquid and appear in "frozen" balance but can still be used for voting in network governance
//! Bonded TEER tokens are not liquid and appear in "frozen" balance but can still be used for voting in network governance
//! - **Unbonding**: Starting the unlock process of bonded TEER tokens
//! - **TEERdays**: Accumulated time of bonded TEER tokens
//! - **TokenTime**: The technical unit of TEERdays storage: TokenTime = Balance (TEER with its 12 digits) * Moment (Milliseconds)
Expand All @@ -33,7 +33,7 @@
//! 3. *Use your accumulated TEERdays for governance or other features*
//! 4. Unbond TEER tokens: `unbond(value)`.
//! - unbonding is only possible if no unlock is pending
//! - unbonding burns accumulated TEERdays pro rata bonded amount before and after unbonding
//! - unbonding burns accumulated TEERdays pro rata bonded amount before and after unbonding
//! 5. wait for `UnlockPeriod` to pass
//! 6. Withdraw unbonded TEER tokens: `withdraw_unbonded()`
//!
Expand Down Expand Up @@ -308,8 +308,7 @@ impl<T: Config> Pallet<T> {
fn try_withdraw_unbonded(
account: &T::AccountId,
) -> Result<BalanceOf<T>, sp_runtime::DispatchError> {
let (due, amount) =
Self::pending_unlock(account).ok_or_else(|| Error::<T>::NotUnlocking)?;
let (due, amount) = Self::pending_unlock(account).ok_or(Error::<T>::NotUnlocking)?;
let now = pallet_timestamp::Pallet::<T>::get();
if now < due {
return Err(Error::<T>::PendingUnlock.into())
Expand All @@ -327,7 +326,7 @@ impl<T: Config> Pallet<T> {
);
}
PendingUnlock::<T>::remove(account);
return Ok(amount)
Ok(amount)
}
}

Expand Down

0 comments on commit 9eb4079

Please sign in to comment.