From ba0f70c14c947a7ea365b0b4a2716075f88bf222 Mon Sep 17 00:00:00 2001 From: toints Date: Tue, 10 Sep 2024 15:47:15 +0800 Subject: [PATCH] style: format code with rustc-1.81.0 --- client/coretime/bulk/src/lib.rs | 13 +++++++------ pallets/liquidation/src/lib.rs | 3 ++- runtime/src/xcms/xcm_weight.rs | 3 ++- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/client/coretime/bulk/src/lib.rs b/client/coretime/bulk/src/lib.rs index 76acf33..cac6112 100644 --- a/client/coretime/bulk/src/lib.rs +++ b/client/coretime/bulk/src/lib.rs @@ -198,12 +198,13 @@ where let constant_query = subxt::dynamic::constant("Broker", "TimeslicePeriod"); - let time_slice = - api.constants() - .at(&constant_query)? - .to_value()? - .as_u128() - .expect("coretime parachain time slice none") as u32; + let time_slice = api + .constants() + .at(&constant_query)? + .to_value()? + .as_u128() + .expect("coretime parachain time slice none") + as u32; item.end_relaychain_height = ev.when + item.duration * time_slice; diff --git a/pallets/liquidation/src/lib.rs b/pallets/liquidation/src/lib.rs index 772e6c5..a55fcfd 100644 --- a/pallets/liquidation/src/lib.rs +++ b/pallets/liquidation/src/lib.rs @@ -673,7 +673,8 @@ pub mod pallet { let total_existing_operation_ratio: u32 = OperationRatios::::iter().map(|(_, r)| r).sum(); let total_ratio = system_ratio - + treasury_ratio + collator_ratio + + treasury_ratio + + collator_ratio + total_existing_operation_ratio + ratio; log::info!("3 -+-+-+-+-+ set operation ratio, total ratio:{:?}, system_ratio:{:?}, treasury_ratio:{:?}, collator_ratio:{:?}, operation account:{:?}, op_ratio:{:?}", diff --git a/runtime/src/xcms/xcm_weight.rs b/runtime/src/xcms/xcm_weight.rs index 12a2b7f..0977a19 100644 --- a/runtime/src/xcms/xcm_weight.rs +++ b/runtime/src/xcms/xcm_weight.rs @@ -285,7 +285,8 @@ impl< AccountId, Currency: CurrencyT, OnUnbalanced: OnUnbalancedT, - > WeightTrader for UsingComponentsEx + > WeightTrader + for UsingComponentsEx { fn new() -> Self { Self(Weight::zero(), Zero::zero(), PhantomData)