mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 22:11:02 +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
b72ae577a0
commit
299d25ba4b
@@ -137,58 +137,54 @@ impl Contains<RuntimeCall> for SafeCallFilter {
|
||||
}
|
||||
}
|
||||
|
||||
match call {
|
||||
matches!(
|
||||
call,
|
||||
RuntimeCall::System(
|
||||
frame_system::Call::set_heap_pages { .. } |
|
||||
frame_system::Call::set_code { .. } |
|
||||
frame_system::Call::set_code_without_checks { .. } |
|
||||
frame_system::Call::kill_prefix { .. },
|
||||
) |
|
||||
RuntimeCall::ParachainSystem(..) |
|
||||
RuntimeCall::Timestamp(..) |
|
||||
RuntimeCall::Balances(..) |
|
||||
RuntimeCall::CollatorSelection(
|
||||
pallet_collator_selection::Call::set_desired_candidates { .. } |
|
||||
pallet_collator_selection::Call::set_candidacy_bond { .. } |
|
||||
pallet_collator_selection::Call::register_as_candidate { .. } |
|
||||
pallet_collator_selection::Call::leave_intent { .. },
|
||||
) |
|
||||
RuntimeCall::Session(pallet_session::Call::purge_keys { .. }) |
|
||||
RuntimeCall::PolkadotXcm(pallet_xcm::Call::force_xcm_version { .. }) |
|
||||
RuntimeCall::XcmpQueue(..) |
|
||||
RuntimeCall::DmpQueue(..) |
|
||||
RuntimeCall::Utility(pallet_utility::Call::as_derivative { .. }) |
|
||||
RuntimeCall::Alliance(
|
||||
// `init_members` accepts unbounded vecs as arguments,
|
||||
// but the call can be initiated only by root origin.
|
||||
pallet_alliance::Call::init_members { .. } |
|
||||
pallet_alliance::Call::vote { .. } |
|
||||
pallet_alliance::Call::disband { .. } |
|
||||
pallet_alliance::Call::set_rule { .. } |
|
||||
pallet_alliance::Call::announce { .. } |
|
||||
pallet_alliance::Call::remove_announcement { .. } |
|
||||
pallet_alliance::Call::join_alliance { .. } |
|
||||
pallet_alliance::Call::nominate_ally { .. } |
|
||||
pallet_alliance::Call::elevate_ally { .. } |
|
||||
pallet_alliance::Call::give_retirement_notice { .. } |
|
||||
pallet_alliance::Call::retire { .. } |
|
||||
pallet_alliance::Call::kick_member { .. } |
|
||||
pallet_alliance::Call::close { .. } |
|
||||
pallet_alliance::Call::abdicate_fellow_status { .. },
|
||||
) |
|
||||
RuntimeCall::AllianceMotion(
|
||||
frame_system::Call::set_code { .. } |
|
||||
frame_system::Call::set_code_without_checks { .. } |
|
||||
frame_system::Call::kill_prefix { .. },
|
||||
) | RuntimeCall::ParachainSystem(..) |
|
||||
RuntimeCall::Timestamp(..) |
|
||||
RuntimeCall::Balances(..) |
|
||||
RuntimeCall::CollatorSelection(
|
||||
pallet_collator_selection::Call::set_desired_candidates { .. } |
|
||||
pallet_collator_selection::Call::set_candidacy_bond { .. } |
|
||||
pallet_collator_selection::Call::register_as_candidate { .. } |
|
||||
pallet_collator_selection::Call::leave_intent { .. },
|
||||
) | RuntimeCall::Session(pallet_session::Call::purge_keys { .. }) |
|
||||
RuntimeCall::PolkadotXcm(pallet_xcm::Call::force_xcm_version { .. }) |
|
||||
RuntimeCall::XcmpQueue(..) |
|
||||
RuntimeCall::DmpQueue(..) |
|
||||
RuntimeCall::Utility(pallet_utility::Call::as_derivative { .. }) |
|
||||
RuntimeCall::Alliance(
|
||||
// `init_members` accepts unbounded vecs as arguments,
|
||||
// but the call can be initiated only by root origin.
|
||||
pallet_alliance::Call::init_members { .. } |
|
||||
pallet_alliance::Call::vote { .. } |
|
||||
pallet_alliance::Call::disband { .. } |
|
||||
pallet_alliance::Call::set_rule { .. } |
|
||||
pallet_alliance::Call::announce { .. } |
|
||||
pallet_alliance::Call::remove_announcement { .. } |
|
||||
pallet_alliance::Call::join_alliance { .. } |
|
||||
pallet_alliance::Call::nominate_ally { .. } |
|
||||
pallet_alliance::Call::elevate_ally { .. } |
|
||||
pallet_alliance::Call::give_retirement_notice { .. } |
|
||||
pallet_alliance::Call::retire { .. } |
|
||||
pallet_alliance::Call::kick_member { .. } |
|
||||
pallet_alliance::Call::close { .. } |
|
||||
pallet_alliance::Call::abdicate_fellow_status { .. },
|
||||
) | RuntimeCall::AllianceMotion(
|
||||
pallet_collective::Call::vote { .. } |
|
||||
pallet_collective::Call::disapprove_proposal { .. } |
|
||||
pallet_collective::Call::close { .. },
|
||||
) |
|
||||
RuntimeCall::FellowshipCollective(
|
||||
pallet_collective::Call::disapprove_proposal { .. } |
|
||||
pallet_collective::Call::close { .. },
|
||||
) | RuntimeCall::FellowshipCollective(
|
||||
pallet_ranked_collective::Call::add_member { .. } |
|
||||
pallet_ranked_collective::Call::promote_member { .. } |
|
||||
pallet_ranked_collective::Call::demote_member { .. } |
|
||||
pallet_ranked_collective::Call::remove_member { .. },
|
||||
) => true,
|
||||
_ => false,
|
||||
}
|
||||
pallet_ranked_collective::Call::promote_member { .. } |
|
||||
pallet_ranked_collective::Call::demote_member { .. } |
|
||||
pallet_ranked_collective::Call::remove_member { .. },
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user