style: Migrate to stable-only rustfmt configuration

- Remove nightly-only features from .rustfmt.toml and vendor/ss58-registry/rustfmt.toml
- Removed features: imports_granularity, wrap_comments, comment_width,
  reorder_impl_items, spaces_around_ranges, binop_separator,
  match_arm_blocks, trailing_semicolon, trailing_comma
- Format all 898 affected files with stable rustfmt
- Ensures long-term reliability without nightly toolchain dependency
This commit is contained in:
2025-12-22 17:12:58 +03:00
parent 65b7f5e640
commit 4c8f281051
898 changed files with 8671 additions and 6432 deletions
@@ -148,10 +148,11 @@ where
let paras_inherent_data = match paras_inherent_data {
Some(p) => p,
None =>
None => {
return Err(
format!("Could not create paras inherent data at {:?}", relay_parent).into()
),
)
},
};
let mut other_inherent_data = self
@@ -118,13 +118,14 @@ where
async move {
let mut collation_requests = match params.collation_request_receiver {
Some(receiver) => receiver,
None =>
None => {
pezcumulus_client_collator::relay_chain_driven::init(
params.collator_key,
params.para_id,
params.overseer_handle,
)
.await,
.await
},
};
let mut collator = {
@@ -225,8 +226,8 @@ where
//
// With https://github.com/pezkuwichain/pezkuwi-sdk/issues/127 this implementation will be
// obsolete and also the underlying issue will be fixed.
if last_processed_slot >= *claim.slot() &&
last_relay_chain_block < *relay_parent_header.number()
if last_processed_slot >= *claim.slot()
&& last_relay_chain_block < *relay_parent_header.number()
{
continue;
}
@@ -138,7 +138,7 @@ async fn check_validation_code_or_log(
};
match state_validation_code_hash {
Some(state) =>
Some(state) => {
if state != *local_validation_code_hash {
tracing::warn!(
target: super::LOG_TARGET,
@@ -148,7 +148,8 @@ async fn check_validation_code_or_log(
relay_validation_code_hash = ?state,
"Teyrchain code doesn't match validation code stored in the relay chain state.",
);
},
}
},
None => {
tracing::warn!(
target: super::LOG_TARGET,
@@ -183,8 +184,8 @@ async fn scheduling_lookahead(
)
.unwrap_or_default();
if teyrchain_host_runtime_api_version <
RuntimeApiRequest::SCHEDULING_LOOKAHEAD_RUNTIME_REQUIREMENT
if teyrchain_host_runtime_api_version
< RuntimeApiRequest::SCHEDULING_LOOKAHEAD_RUNTIME_REQUIREMENT
{
return None;
}
@@ -607,10 +607,11 @@ pub(crate) async fn determine_core<H: HeaderT, RI: RelayChainInterface + 'static
} else {
match extract_relay_parent(para_parent.digest()) {
Some(last_relay_parent) => last_relay_parent != relay_parent.hash(),
None =>
None => {
rpsr_digest::extract_relay_parent_storage_root(para_parent.digest())
.ok_or(())?
.0 != *relay_parent.state_root(),
.0 != *relay_parent.state_root()
},
}
};
@@ -101,8 +101,8 @@ fn compute_next_wake_up_time(
// we should still produce two blocks if we are scheduled on every relay block.
let mut block_production_interval = min(para_slot_duration.as_duration(), relay_slot_duration);
if assigned_core_num > para_slots_per_relay_block &&
para_slot_duration.as_duration() >= relay_slot_duration
if assigned_core_num > para_slots_per_relay_block
&& para_slot_duration.as_duration() >= relay_slot_duration
{
block_production_interval =
max(relay_slot_duration / assigned_core_num, BLOCK_PRODUCTION_MINIMUM_INTERVAL_MS);
@@ -204,8 +204,8 @@ fn adjust_authoring_duration(
// without issues.
// - Block 11: next slot change in 0.993s - skipped by the deadline
// - Block 12: next slot change in 0.493s - skipped by the deadline
if authoring_duration <
BLOCK_PRODUCTION_MINIMUM_INTERVAL_MS.saturating_sub(BLOCK_PRODUCTION_THRESHOLD_MS)
if authoring_duration
< BLOCK_PRODUCTION_MINIMUM_INTERVAL_MS.saturating_sub(BLOCK_PRODUCTION_THRESHOLD_MS)
{
tracing::debug!(
target: LOG_TARGET,
@@ -233,9 +233,9 @@ fn time_until_next_attempt(
) -> (Duration, Timestamp) {
let now = now.as_millis().saturating_sub(offset.as_millis());
let next_slot_time = ((now + block_production_interval.as_millis()) /
block_production_interval.as_millis()) *
block_production_interval.as_millis();
let next_slot_time = ((now + block_production_interval.as_millis())
/ block_production_interval.as_millis())
* block_production_interval.as_millis();
let remaining_millis = next_slot_time - now;
(Duration::from_millis(remaining_millis as u64), Timestamp::from(next_slot_time as u64))
}
@@ -177,8 +177,8 @@ where
let relay_parent =
match CumulusDigestItem::find_relay_block_identifier(pre_header.digest()) {
None => Default::default(),
Some(RelayBlockIdentifier::ByHash(h)) |
Some(RelayBlockIdentifier::ByStorageRoot {
Some(RelayBlockIdentifier::ByHash(h))
| Some(RelayBlockIdentifier::ByStorageRoot {
storage_root: h, ..
}) => h,
};
@@ -219,11 +219,12 @@ where
post_hash, slot
));
},
Err(e) =>
Err(e) => {
return Err(format!(
"Rejecting block ({:?}) with invalid seal ({:?})",
post_hash, e
)),
))
},
}
}
@@ -396,9 +396,9 @@ pub fn search_child_branches_for_parents<Block: BlockT>(
for child in backend.blockchain().children(hash).ok().into_iter().flatten() {
tracing::trace!(target: PARENT_SEARCH_LOG_TARGET, ?child, child_depth, ?pending_distance, "Looking at child.");
let aligned_with_pending = parent_aligned_with_pending &&
(pending_distance.map_or(true, |dist| child_depth > dist) ||
is_child_pending(child));
let aligned_with_pending = parent_aligned_with_pending
&& (pending_distance.map_or(true, |dist| child_depth > dist)
|| is_child_pending(child));
if ignore_alternative_branches && !aligned_with_pending {
tracing::trace!(target: PARENT_SEARCH_LOG_TARGET, ?child, "Child is not aligned with pending block.");