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
@@ -73,10 +73,12 @@ where
{
warn!(target: LOG_TARGET, "🥩 backend contains a BEEFY state of an obsolete version {v}. ignoring...")
},
Some(4) =>
return load_decode::<_, PersistedState<B, AuthorityId>>(backend, WORKER_STATE_KEY),
other =>
return Err(ClientError::Backend(format!("Unsupported BEEFY DB version: {:?}", other))),
Some(4) => {
return load_decode::<_, PersistedState<B, AuthorityId>>(backend, WORKER_STATE_KEY)
},
other => {
return Err(ClientError::Backend(format!("Unsupported BEEFY DB version: {:?}", other)))
},
}
// No persistent state found in DB.
@@ -150,12 +150,13 @@ impl<B: Block, AuthorityId: AuthorityIdBound> Filter<B, AuthorityId> {
f.start = cfg.start;
f.end = cfg.end;
},
_ =>
_ => {
self.inner = Some(FilterInner {
start: cfg.start,
end: cfg.end,
validator_set: cfg.validator_set.clone(),
}),
})
},
}
}
@@ -33,8 +33,9 @@ pub(crate) fn proof_block_num_and_set_id<Block: BlockT, AuthorityId: AuthorityId
proof: &BeefyVersionedFinalityProof<Block, AuthorityId>,
) -> (NumberFor<Block>, ValidatorSetId) {
match proof {
VersionedFinalityProof::V1(sc) =>
(sc.commitment.block_number, sc.commitment.validator_set_id),
VersionedFinalityProof::V1(sc) => {
(sc.commitment.block_number, sc.commitment.validator_set_id)
},
}
}
+3 -2
View File
@@ -787,10 +787,11 @@ where
Some(active) => return Ok(active),
// Move up the chain. Ultimately we'll get it from chain genesis state, or error out
// there.
None =>
None => {
header = wait_for_parent_header(blockchain, header, HEADER_SYNC_DELAY)
.await
.map_err(|e| Error::Backend(e.to_string()))?,
.map_err(|e| Error::Backend(e.to_string()))?
},
}
}
}
@@ -180,8 +180,8 @@ where
// add valid vote
let round = self.rounds.entry(vote.commitment.clone()).or_default();
if round.add_vote((vote.id, vote.signature)) &&
round.is_done(threshold(self.validator_set.len()))
if round.add_vote((vote.id, vote.signature))
&& round.is_done(threshold(self.validator_set.len()))
{
if let Some(round) = self.rounds.remove_entry(&vote.commitment) {
return VoteImportResult::RoundConcluded(self.signed_commitment(round));
@@ -1576,8 +1576,9 @@ async fn gossipped_finality_proofs() {
.ok()
.and_then(|message| match message {
GossipMessage::<Block, ecdsa_crypto::AuthorityId>::Vote(_) => unreachable!(),
GossipMessage::<Block, ecdsa_crypto::AuthorityId>::FinalityProof(proof) =>
Some(proof),
GossipMessage::<Block, ecdsa_crypto::AuthorityId>::FinalityProof(proof) => {
Some(proof)
},
})
})
.fuse(),
@@ -526,7 +526,7 @@ where
{
let block_num = vote.commitment.block_number;
match self.voting_oracle().triage_round(block_num)? {
RoundAction::Process =>
RoundAction::Process => {
if let Some(finality_proof) = self.handle_vote(vote)? {
let gossip_proof =
GossipMessage::<B, AuthorityId>::FinalityProof(finality_proof);
@@ -536,7 +536,8 @@ where
encoded_proof,
true,
);
},
}
},
RoundAction::Drop => metric_inc!(self.metrics, beefy_stale_votes),
RoundAction::Enqueue => error!(target: LOG_TARGET, "🥩 unexpected vote: {:?}.", vote),
};