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
+8 -7
View File
@@ -1024,8 +1024,8 @@ fn handle_peer_messages<RawMessage: Decode, OutMessage: From<RawMessage>>(
outgoing_events.push(match message {
WireMessage::ViewUpdate(new_view) => {
if new_view.len() > MAX_VIEW_HEADS ||
new_view.finalized_number < peer_data.view.finalized_number
if new_view.len() > MAX_VIEW_HEADS
|| new_view.finalized_number < peer_data.view.finalized_number
{
reports.push(MALFORMED_VIEW_COST);
continue;
@@ -1040,8 +1040,9 @@ fn handle_peer_messages<RawMessage: Decode, OutMessage: From<RawMessage>>(
NetworkBridgeEvent::PeerViewChange(peer, peer_data.view.clone())
}
},
WireMessage::ProtocolMessage(message) =>
NetworkBridgeEvent::PeerMessage(peer, message.into()),
WireMessage::ProtocolMessage(message) => {
NetworkBridgeEvent::PeerMessage(peer, message.into())
},
})
}
@@ -1123,9 +1124,9 @@ async fn dispatch_validation_events_to_all<I>(
// NetworkBridgeEvent::OurViewChange(..) must also be here,
// but it is sent via an unbounded channel.
// See https://github.com/pezkuwichain/pezkuwi-sdk/issues/108
NetworkBridgeEvent::PeerConnected(..) |
NetworkBridgeEvent::PeerDisconnected(..) |
NetworkBridgeEvent::PeerViewChange(..)
NetworkBridgeEvent::PeerConnected(..)
| NetworkBridgeEvent::PeerDisconnected(..)
| NetworkBridgeEvent::PeerViewChange(..)
);
let message = $message::from(event);
if has_high_priority {
+11 -8
View File
@@ -488,8 +488,8 @@ async fn await_peer_connections(
loop {
{
let shared = shared.0.lock();
if shared.validation_peers.len() == num_validation_peers &&
shared.collation_peers.len() == num_collation_peers
if shared.validation_peers.len() == num_validation_peers
&& shared.collation_peers.len() == num_collation_peers
{
break;
}
@@ -1516,13 +1516,16 @@ fn network_protocol_versioning_view_update() {
for &(peer_id, peer_set, version) in &peers {
let wire_msg = match (version.into(), peer_set) {
(1, PeerSet::Collation) =>
WireMessage::<protocol_v1::CollationProtocol>::ViewUpdate(view.clone()).encode(),
(2, PeerSet::Collation) =>
WireMessage::<protocol_v2::CollationProtocol>::ViewUpdate(view.clone()).encode(),
(3, PeerSet::Validation) =>
(1, PeerSet::Collation) => {
WireMessage::<protocol_v1::CollationProtocol>::ViewUpdate(view.clone()).encode()
},
(2, PeerSet::Collation) => {
WireMessage::<protocol_v2::CollationProtocol>::ViewUpdate(view.clone()).encode()
},
(3, PeerSet::Validation) => {
WireMessage::<protocol_v3::ValidationProtocol>::ViewUpdate(view.clone())
.encode(),
.encode()
},
_ => unreachable!(),
};
assert_network_actions_contains(
+3 -2
View File
@@ -288,8 +288,9 @@ where
metrics.on_message("chunk_fetching_v1")
}
},
Requests::AvailableDataFetchingV1(_) =>
metrics.on_message("available_data_fetching_v1"),
Requests::AvailableDataFetchingV1(_) => {
metrics.on_message("available_data_fetching_v1")
},
Requests::CollationFetchingV1(_) => metrics.on_message("collation_fetching_v1"),
Requests::CollationFetchingV2(_) => metrics.on_message("collation_fetching_v2"),
Requests::PoVFetchingV1(_) => metrics.on_message("pov_fetching_v1"),