mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 03:31:05 +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
@@ -783,7 +783,7 @@ impl_runtime_apis! {
|
||||
list_benchmarks!(list, extra);
|
||||
|
||||
let storage_info = AllPalletsWithSystem::storage_info();
|
||||
return (list, storage_info)
|
||||
(list, storage_info)
|
||||
}
|
||||
|
||||
fn dispatch_benchmark(
|
||||
|
||||
@@ -225,12 +225,12 @@ pub trait Reserve {
|
||||
// Takes the chain part of a MultiAsset
|
||||
impl Reserve for MultiAsset {
|
||||
fn reserve(&self) -> Option<MultiLocation> {
|
||||
if let AssetId::Concrete(location) = self.id.clone() {
|
||||
if let AssetId::Concrete(location) = self.id {
|
||||
let first_interior = location.first_interior();
|
||||
let parents = location.parent_count();
|
||||
match (parents, first_interior.clone()) {
|
||||
(0, Some(Parachain(id))) => Some(MultiLocation::new(0, X1(Parachain(id.clone())))),
|
||||
(1, Some(Parachain(id))) => Some(MultiLocation::new(1, X1(Parachain(id.clone())))),
|
||||
match (parents, first_interior) {
|
||||
(0, Some(Parachain(id))) => Some(MultiLocation::new(0, X1(Parachain(*id)))),
|
||||
(1, Some(Parachain(id))) => Some(MultiLocation::new(1, X1(Parachain(*id)))),
|
||||
(1, _) => Some(MultiLocation::parent()),
|
||||
_ => None,
|
||||
}
|
||||
|
||||
@@ -219,10 +219,10 @@ impl pallet_timestamp::Config for Runtime {
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
pub const ExistentialDeposit: u128 = 1 * MILLIROC;
|
||||
pub const TransferFee: u128 = 1 * MILLIROC;
|
||||
pub const CreationFee: u128 = 1 * MILLIROC;
|
||||
pub const TransactionByteFee: u128 = 1 * MICROROC;
|
||||
pub const ExistentialDeposit: u128 = MILLIROC;
|
||||
pub const TransferFee: u128 = MILLIROC;
|
||||
pub const CreationFee: u128 = MILLIROC;
|
||||
pub const TransactionByteFee: u128 = MICROROC;
|
||||
}
|
||||
|
||||
impl pallet_balances::Config for Runtime {
|
||||
@@ -505,11 +505,11 @@ impl cumulus_ping::Config for Runtime {
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
pub const AssetDeposit: Balance = 1 * ROC;
|
||||
pub const AssetAccountDeposit: Balance = 1 * ROC;
|
||||
pub const AssetDeposit: Balance = ROC;
|
||||
pub const AssetAccountDeposit: Balance = ROC;
|
||||
pub const ApprovalDeposit: Balance = 100 * MILLIROC;
|
||||
pub const AssetsStringLimit: u32 = 50;
|
||||
pub const MetadataDepositBase: Balance = 1 * ROC;
|
||||
pub const MetadataDepositBase: Balance = ROC;
|
||||
pub const MetadataDepositPerByte: Balance = 10 * MILLIROC;
|
||||
pub const UnitBody: BodyId = BodyId::Unit;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user