mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-18 08:21:03 +00:00
Fix Clippy (#2522)
* Import Clippy config from Polkadot Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Auto clippy fix Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * No tabs in comments Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Prefer matches Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Dont drop references Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Trivial Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Refactor Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * fmt Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * add clippy to ci * Clippy reborrow Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Update client/pov-recovery/src/lib.rs Co-authored-by: Bastian Köcher <git@kchr.de> * Update client/pov-recovery/src/lib.rs Co-authored-by: Bastian Köcher <git@kchr.de> * Partially revert 'Prefer matches' Using matches! instead of match does give less compiler checks as per review from @chevdor. Partially reverts 8c0609677f3ea040f77fffd5be6facf7c3fec95c Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Update .cargo/config.toml Co-authored-by: Chevdor <chevdor@users.noreply.github.com> * Revert revert 💩 Should be fine to use matches! macro since it is an explicit whitelist, not wildcard matching. --------- Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: alvicsam <alvicsam@gmail.com> Co-authored-by: Bastian Köcher <git@kchr.de> Co-authored-by: Chevdor <chevdor@users.noreply.github.com> Co-authored-by: parity-processbot <>
This commit is contained in:
committed by
GitHub
parent
4dc50c8d89
commit
c312f0b9a6
@@ -104,7 +104,7 @@ benchmarks! {
|
||||
// create slash destination account
|
||||
let lane = LaneId([0, 0, 0, 0]);
|
||||
let slash_destination = RewardsAccountParams::new(lane, *b"test", RewardsAccountOwner::ThisChain);
|
||||
T::prepare_rewards_account(slash_destination.clone(), Zero::zero());
|
||||
T::prepare_rewards_account(slash_destination, Zero::zero());
|
||||
}: {
|
||||
crate::Pallet::<T>::slash_and_deregister(&relayer, slash_destination)
|
||||
}
|
||||
@@ -121,10 +121,10 @@ benchmarks! {
|
||||
let account_params =
|
||||
RewardsAccountParams::new(lane, *b"test", RewardsAccountOwner::ThisChain);
|
||||
}: {
|
||||
crate::Pallet::<T>::register_relayer_reward(account_params.clone(), &relayer, One::one());
|
||||
crate::Pallet::<T>::register_relayer_reward(account_params, &relayer, One::one());
|
||||
}
|
||||
verify {
|
||||
assert_eq!(RelayerRewards::<T>::get(relayer, &account_params), Some(One::one()));
|
||||
assert_eq!(RelayerRewards::<T>::get(relayer, account_params), Some(One::one()));
|
||||
}
|
||||
|
||||
impl_benchmark_test_suite!(Pallet, crate::mock::new_test_ext(), crate::mock::TestRuntime)
|
||||
|
||||
Reference in New Issue
Block a user