mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-23 16:41:06 +00:00
Fix clippy suggestions. (#179)
* Fix clippy errors. * Cargo fmt. * Enable clippy checks. * Create if does not exist. * Fix warnings and enable sccache for clippy. * chmod +x * Revert and ignore errors. * Update cancel-workflow-action. * Fixes. * Clippy fixes. * Fix compilation. * Fix new clippy warnings. * fmt --all * Fix the rest. * fmt --all * Conditional. * Bump smallvec. * Use separate cache dir for clippy to prevent races. * Remove unused imports in tests * Remove "useless conversion" * Move clippy to main worfklow to avoid clashes. * Fix clippy error. * Fix remaning clippy errors. * cargo fmt --all Co-authored-by: Hernando Castano <castano.ha@gmail.com>
This commit is contained in:
committed by
Bastian Köcher
parent
65852944e3
commit
bdf6901ce2
@@ -132,7 +132,7 @@ decl_module! {
|
||||
match deposit_result {
|
||||
Ok(_) => (),
|
||||
Err(ExchangeError::DepositPartiallyFailed) => (),
|
||||
Err(error) => Err(Error::<T>::from(error))?,
|
||||
Err(error) => return Err(Error::<T>::from(error).into()),
|
||||
}
|
||||
Transfers::<T>::insert(&transfer_id, ())
|
||||
}
|
||||
@@ -273,12 +273,10 @@ mod tests {
|
||||
type Amount = u64;
|
||||
|
||||
fn deposit_into(_recipient: Self::Recipient, amount: Self::Amount) -> sp_currency_exchange::Result<()> {
|
||||
if amount < MAX_DEPOSIT_AMOUNT * 10 {
|
||||
Ok(())
|
||||
} else if amount == MAX_DEPOSIT_AMOUNT * 10 {
|
||||
Err(ExchangeError::DepositPartiallyFailed)
|
||||
} else {
|
||||
Err(ExchangeError::DepositFailed)
|
||||
match amount {
|
||||
amount if amount < MAX_DEPOSIT_AMOUNT * 10 => Ok(()),
|
||||
amount if amount == MAX_DEPOSIT_AMOUNT * 10 => Err(ExchangeError::DepositPartiallyFailed),
|
||||
_ => Err(ExchangeError::DepositFailed),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user