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
@@ -289,11 +289,11 @@ impl<P: FinalitySyncPipeline, SC: SourceClient<P>, TC: TargetClient<P>> Finality
let (prev_time, prev_best_number_at_target) = self.progress;
let now = Instant::now();
let needs_update = now - prev_time > Duration::from_secs(10) ||
prev_best_number_at_target
let needs_update = now - prev_time > Duration::from_secs(10)
|| prev_best_number_at_target
.map(|prev_best_number_at_target| {
info.best_number_at_target.saturating_sub(prev_best_number_at_target) >
10.into()
info.best_number_at_target.saturating_sub(prev_best_number_at_target)
> 10.into()
})
.unwrap_or(true);
+10 -8
View File
@@ -128,8 +128,9 @@ impl<P: FinalitySyncPipeline> JustifiedHeaderSelector<P> {
) -> Option<JustifiedHeader<P>> {
let (unjustified_headers, maybe_justified_header) = match self {
JustifiedHeaderSelector::Mandatory(justified_header) => return Some(justified_header),
JustifiedHeaderSelector::Regular(unjustified_headers, justified_header) =>
(unjustified_headers, Some(justified_header)),
JustifiedHeaderSelector::Regular(unjustified_headers, justified_header) => {
(unjustified_headers, Some(justified_header))
},
JustifiedHeaderSelector::None(unjustified_headers) => (unjustified_headers, None),
};
@@ -194,14 +195,15 @@ fn need_to_relay<P: FinalitySyncPipeline>(
match headers_to_relay {
HeadersToRelay::All => true,
HeadersToRelay::Mandatory => header.is_mandatory(),
HeadersToRelay::Free =>
header.is_mandatory() ||
free_headers_interval
HeadersToRelay::Free => {
header.is_mandatory()
|| free_headers_interval
.map(|free_headers_interval| {
header.number().saturating_sub(info.best_number_at_target) >=
free_headers_interval
header.number().saturating_sub(info.best_number_at_target)
>= free_headers_interval
})
.unwrap_or(false),
.unwrap_or(false)
},
}
}