Skip to content

Commit

Permalink
fmt fixes (paritytech#1413)
Browse files Browse the repository at this point in the history
  • Loading branch information
chevdor authored Sep 6, 2023
1 parent 3b6a3c1 commit 8254c92
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
8 changes: 2 additions & 6 deletions substrate/frame/broker/src/dispatchable_impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -333,12 +333,8 @@ impl<T: Config> Pallet<T> {
region.begin = r + 1;
contribution.length.saturating_dec();

let Some(mut pool_record) = InstaPoolHistory::<T>::get(r) else {
continue
};
let Some(total_payout) = pool_record.maybe_payout else {
break
};
let Some(mut pool_record) = InstaPoolHistory::<T>::get(r) else { continue };
let Some(total_payout) = pool_record.maybe_payout else { break };
let p = total_payout
.saturating_mul(contributed_parts.into())
.checked_div(&pool_record.private_contributions.into())
Expand Down
8 changes: 2 additions & 6 deletions substrate/frame/broker/src/tick_impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,7 @@ impl<T: Config> Pallet<T> {
}

pub(crate) fn process_revenue() -> bool {
let Some((until, amount)) = T::Coretime::check_notify_revenue_info() else {
return false
};
let Some((until, amount)) = T::Coretime::check_notify_revenue_info() else { return false };
let when: Timeslice =
(until / T::TimeslicePeriod::get()).saturating_sub(One::one()).saturated_into();
let mut revenue = T::ConvertBalance::convert_back(amount);
Expand Down Expand Up @@ -289,9 +287,7 @@ impl<T: Config> Pallet<T> {
rc_begin: RelayBlockNumberOf<T>,
core: CoreIndex,
) {
let Some(workplan) = Workplan::<T>::take((timeslice, core)) else {
return
};
let Some(workplan) = Workplan::<T>::take((timeslice, core)) else { return };
let workload = Workload::<T>::get(core);
let parts_used = workplan.iter().map(|i| i.mask).fold(CoreMask::void(), |a, i| a | i);
let mut workplan = workplan.into_inner();
Expand Down

0 comments on commit 8254c92

Please sign in to comment.