Skip to content

Commit 2e2e789

Browse files
authored
Ensure cumulus/bridges is ignored by formatter and run it (paritytech#1369)
1 parent 39c6e5b commit 2e2e789

File tree

6 files changed

+18
-16
lines changed

6 files changed

+18
-16
lines changed

substrate/client/network/src/service.rs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -943,9 +943,10 @@ where
943943
peers: HashSet<Multiaddr>,
944944
) -> Result<(), String> {
945945
let Some(set_id) = self.notification_protocol_ids.get(&protocol) else {
946-
return Err(
947-
format!("Cannot add peers to reserved set of unknown protocol: {}", protocol)
948-
)
946+
return Err(format!(
947+
"Cannot add peers to reserved set of unknown protocol: {}",
948+
protocol
949+
))
949950
};
950951

951952
let peers = self.split_multiaddr_and_peer_id(peers)?;
@@ -974,9 +975,10 @@ where
974975
peers: Vec<PeerId>,
975976
) -> Result<(), String> {
976977
let Some(set_id) = self.notification_protocol_ids.get(&protocol) else {
977-
return Err(
978-
format!("Cannot remove peers from reserved set of unknown protocol: {}", protocol)
979-
)
978+
return Err(format!(
979+
"Cannot remove peers from reserved set of unknown protocol: {}",
980+
protocol
981+
))
980982
};
981983

982984
for peer_id in peers.into_iter() {

substrate/client/rpc-spec-v2/src/chain_head/chain_head.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,8 @@ where
462462
follow_subscription: String,
463463
operation_id: String,
464464
) -> RpcResult<()> {
465-
let Some(operation) = self.subscriptions.get_operation(&follow_subscription, &operation_id) else {
465+
let Some(operation) = self.subscriptions.get_operation(&follow_subscription, &operation_id)
466+
else {
466467
return Ok(())
467468
};
468469

@@ -479,7 +480,8 @@ where
479480
follow_subscription: String,
480481
operation_id: String,
481482
) -> RpcResult<()> {
482-
let Some(operation) = self.subscriptions.get_operation(&follow_subscription, &operation_id) else {
483+
let Some(operation) = self.subscriptions.get_operation(&follow_subscription, &operation_id)
484+
else {
483485
return Ok(())
484486
};
485487

substrate/client/rpc-spec-v2/src/chain_head/chain_head_storage.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,7 @@ where
166166

167167
let mut ret = Vec::with_capacity(self.operation_max_storage_items);
168168
for _ in 0..self.operation_max_storage_items {
169-
let Some(key) = keys_iter.next() else {
170-
break
171-
};
169+
let Some(key) = keys_iter.next() else { break };
172170

173171
let result = match ty {
174172
IterQueryType::Value => self.query_storage_value(hash, &key, child_key),

substrate/frame/broker/src/dispatchable_impls.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,10 +334,10 @@ impl<T: Config> Pallet<T> {
334334
contribution.length.saturating_dec();
335335

336336
let Some(mut pool_record) = InstaPoolHistory::<T>::get(r) else {
337-
continue;
337+
continue
338338
};
339339
let Some(total_payout) = pool_record.maybe_payout else {
340-
break;
340+
break
341341
};
342342
let p = total_payout
343343
.saturating_mul(contributed_parts.into())

substrate/frame/broker/src/tick_impls.rs

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

9797
pub(crate) fn process_revenue() -> bool {
9898
let Some((until, amount)) = T::Coretime::check_notify_revenue_info() else {
99-
return false;
99+
return false
100100
};
101101
let when: Timeslice =
102102
(until / T::TimeslicePeriod::get()).saturating_sub(One::one()).saturated_into();
@@ -290,7 +290,7 @@ impl<T: Config> Pallet<T> {
290290
core: CoreIndex,
291291
) {
292292
let Some(workplan) = Workplan::<T>::take((timeslice, core)) else {
293-
return;
293+
return
294294
};
295295
let workload = Workload::<T>::get(core);
296296
let parts_used = workplan.iter().map(|i| i.mask).fold(CoreMask::void(), |a, i| a | i);

substrate/frame/safe-mode/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ pub mod pallet {
398398
/// [`EnteredUntil`].
399399
fn on_initialize(current: BlockNumberFor<T>) -> Weight {
400400
let Some(limit) = EnteredUntil::<T>::get() else {
401-
return T::WeightInfo::on_initialize_noop();
401+
return T::WeightInfo::on_initialize_noop()
402402
};
403403

404404
if current > limit {

0 commit comments

Comments
 (0)