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 3208f208c0
commit abc4c3989b
898 changed files with 8671 additions and 6432 deletions
+21 -14
View File
@@ -168,20 +168,22 @@ impl PeerSet {
// Unfortunately, labels must be static strings, so we must manually cover them
// for all protocol versions here.
match self {
PeerSet::Validation =>
PeerSet::Validation => {
if version == ValidationVersion::V3.into() {
Some("validation/3")
} else {
None
},
PeerSet::Collation =>
}
},
PeerSet::Collation => {
if version == CollationVersion::V1.into() {
Some("collation/1")
} else if version == CollationVersion::V2.into() {
Some("collation/2")
} else {
None
},
}
},
}
}
}
@@ -320,7 +322,7 @@ impl PeerSetProtocolNames {
let mut names = HashMap::new();
for protocol in PeerSet::iter() {
match protocol {
PeerSet::Validation =>
PeerSet::Validation => {
for version in ValidationVersion::iter() {
Self::register_main_protocol(
&mut protocols,
@@ -330,7 +332,8 @@ impl PeerSetProtocolNames {
&genesis_hash,
fork_id,
);
},
}
},
PeerSet::Collation => {
for version in CollationVersion::iter() {
Self::register_main_protocol(
@@ -566,7 +569,7 @@ mod tests {
for protocol in PeerSet::iter() {
match protocol {
PeerSet::Validation =>
PeerSet::Validation => {
for version in ValidationVersion::iter() {
assert_eq!(
protocol_names.get_name(protocol, version.into()),
@@ -577,8 +580,9 @@ mod tests {
version.into(),
),
);
},
PeerSet::Collation =>
}
},
PeerSet::Collation => {
for version in CollationVersion::iter() {
assert_eq!(
protocol_names.get_name(protocol, version.into()),
@@ -589,7 +593,8 @@ mod tests {
version.into(),
),
);
},
}
},
}
}
}
@@ -598,18 +603,20 @@ mod tests {
fn all_protocol_versions_have_labels() {
for protocol in PeerSet::iter() {
match protocol {
PeerSet::Validation =>
PeerSet::Validation => {
for version in ValidationVersion::iter() {
protocol
.get_protocol_label(version.into())
.expect("All validation protocol versions must have a label.");
},
PeerSet::Collation =>
}
},
PeerSet::Collation => {
for version in CollationVersion::iter() {
protocol
.get_protocol_label(version.into())
.expect("All collation protocol versions must have a label.");
},
}
},
}
}
}