Skip to content

Commit 7986b12

Browse files
authored
fmt fixes (#1413)
1 parent 51dcc9f commit 7986b12

File tree

3 files changed

+7
-14
lines changed

3 files changed

+7
-14
lines changed

polkadot/xcm/src/v3/multiasset.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ use crate::v2::{
3434
WildMultiAsset as OldWildMultiAsset,
3535
};
3636
use alloc::{vec, vec::Vec};
37+
use bounded_collections::{BoundedVec, ConstU32};
3738
use core::{
3839
cmp::Ordering,
3940
convert::{TryFrom, TryInto},
4041
};
4142
use parity_scale_codec::{self as codec, Decode, Encode, MaxEncodedLen};
4243
use scale_info::TypeInfo;
43-
use bounded_collections::{BoundedVec, ConstU32};
4444

4545
/// A general identifier for an instance of a non-fungible asset class.
4646
#[derive(
@@ -518,7 +518,8 @@ impl MaxEncodedLen for MultiAssets {
518518

519519
impl Decode for MultiAssets {
520520
fn decode<I: codec::Input>(input: &mut I) -> Result<Self, codec::Error> {
521-
let bounded_instructions = BoundedVec::<MultiAsset, ConstU32<{ MAX_ITEMS_IN_MULTIASSETS as u32 }>>::decode(input)?;
521+
let bounded_instructions =
522+
BoundedVec::<MultiAsset, ConstU32<{ MAX_ITEMS_IN_MULTIASSETS as u32 }>>::decode(input)?;
522523
Self::from_sorted_and_deduplicated(bounded_instructions.into_inner())
523524
.map_err(|()| "Out of order".into())
524525
}

substrate/frame/broker/src/dispatchable_impls.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -333,12 +333,8 @@ impl<T: Config> Pallet<T> {
333333
region.begin = r + 1;
334334
contribution.length.saturating_dec();
335335

336-
let Some(mut pool_record) = InstaPoolHistory::<T>::get(r) else {
337-
continue
338-
};
339-
let Some(total_payout) = pool_record.maybe_payout else {
340-
break
341-
};
336+
let Some(mut pool_record) = InstaPoolHistory::<T>::get(r) else { continue };
337+
let Some(total_payout) = pool_record.maybe_payout else { break };
342338
let p = total_payout
343339
.saturating_mul(contributed_parts.into())
344340
.checked_div(&pool_record.private_contributions.into())

substrate/frame/broker/src/tick_impls.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,7 @@ impl<T: Config> Pallet<T> {
9595
}
9696

9797
pub(crate) fn process_revenue() -> bool {
98-
let Some((until, amount)) = T::Coretime::check_notify_revenue_info() else {
99-
return false
100-
};
98+
let Some((until, amount)) = T::Coretime::check_notify_revenue_info() else { return false };
10199
let when: Timeslice =
102100
(until / T::TimeslicePeriod::get()).saturating_sub(One::one()).saturated_into();
103101
let mut revenue = T::ConvertBalance::convert_back(amount);
@@ -289,9 +287,7 @@ impl<T: Config> Pallet<T> {
289287
rc_begin: RelayBlockNumberOf<T>,
290288
core: CoreIndex,
291289
) {
292-
let Some(workplan) = Workplan::<T>::take((timeslice, core)) else {
293-
return
294-
};
290+
let Some(workplan) = Workplan::<T>::take((timeslice, core)) else { return };
295291
let workload = Workload::<T>::get(core);
296292
let parts_used = workplan.iter().map(|i| i.mask).fold(CoreMask::void(), |a, i| a | i);
297293
let mut workplan = workplan.into_inner();

0 commit comments

Comments
 (0)