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
@@ -106,17 +106,17 @@ pub fn log_error(
Ok(()) => Ok(()),
Err(jfyi) => {
match jfyi {
JfyiError::UnexpectedPoV |
JfyiError::InvalidValidatorIndex |
JfyiError::NoSuchCachedSession { .. } |
JfyiError::QueryAvailableDataResponseChannel(_) |
JfyiError::QueryChunkResponseChannel(_) |
JfyiError::FailedNodeFeatures(_) |
JfyiError::ErasureCoding(_) => gum::warn!(target: LOG_TARGET, error = %jfyi, ctx),
JfyiError::FetchPoV(_) |
JfyiError::SendResponse |
JfyiError::NoSuchPoV |
JfyiError::Runtime(_) => {
JfyiError::UnexpectedPoV
| JfyiError::InvalidValidatorIndex
| JfyiError::NoSuchCachedSession { .. }
| JfyiError::QueryAvailableDataResponseChannel(_)
| JfyiError::QueryChunkResponseChannel(_)
| JfyiError::FailedNodeFeatures(_)
| JfyiError::ErasureCoding(_) => gum::warn!(target: LOG_TARGET, error = %jfyi, ctx),
JfyiError::FetchPoV(_)
| JfyiError::SendResponse
| JfyiError::NoSuchPoV
| JfyiError::Runtime(_) => {
gum::warn_if_frequent!(freq: warn_freq, max_rate: gum::Times::PerHour(100), target: LOG_TARGET, error = ?jfyi, ctx)
},
}
@@ -143,8 +143,9 @@ impl AvailabilityDistributionSubsystem {
// Handle task messages sending:
let message = match action {
Either::Left(subsystem_msg) =>
subsystem_msg.map_err(|e| FatalError::IncomingMessageChannel(e))?,
Either::Left(subsystem_msg) => {
subsystem_msg.map_err(|e| FatalError::IncomingMessageChannel(e))?
},
Either::Right(from_task) => {
let from_task = from_task.ok_or(FatalError::RequesterExhausted)?;
ctx.send_message(from_task).await;
@@ -369,7 +369,7 @@ impl RunningTask {
match response_recv.await {
Ok((bytes, protocol)) => match protocol {
_ if protocol == self.req_v2_protocol_name =>
_ if protocol == self.req_v2_protocol_name => {
match v2::ChunkFetchingResponse::decode(&mut &bytes[..]) {
Ok(chunk_response) => Ok(Option::<ErasureChunk>::from(chunk_response)),
Err(e) => {
@@ -386,8 +386,9 @@ impl RunningTask {
);
Err(TaskError::PeerError)
},
},
_ if protocol == self.req_v1_protocol_name =>
}
},
_ if protocol == self.req_v1_protocol_name => {
match v1::ChunkFetchingResponse::decode(&mut &bytes[..]) {
Ok(chunk_response) => Ok(Option::<ChunkResponse>::from(chunk_response)
.map(|c| c.recombine_into_chunk(&self.request.into()))),
@@ -405,7 +406,8 @@ impl RunningTask {
);
Err(TaskError::PeerError)
},
},
}
},
_ => {
gum::warn!(
target: LOG_TARGET,
@@ -296,15 +296,15 @@ impl TestRun {
self.chunk_responses.get(&req.peer).ok_or(network::RequestFailure::Refused);
if let Ok((resp, protocol)) = response {
let chunk = if protocol ==
&self.req_protocol_names.get_name(Protocol::ChunkFetchingV1)
let chunk = if protocol
== &self.req_protocol_names.get_name(Protocol::ChunkFetchingV1)
{
Into::<Option<v1::ChunkResponse>>::into(
v1::ChunkFetchingResponse::decode(&mut &resp[..]).unwrap(),
)
.map(|c| c.chunk)
} else if protocol ==
&self.req_protocol_names.get_name(Protocol::ChunkFetchingV2)
} else if protocol
== &self.req_protocol_names.get_name(Protocol::ChunkFetchingV2)
{
Into::<Option<ErasureChunk>>::into(
v2::ChunkFetchingResponse::decode(&mut &resp[..]).unwrap(),
@@ -94,8 +94,8 @@ fn check_basic(#[case] node_features: NodeFeatures, #[case] chunk_resp_protocol:
let state =
TestState::new(node_features.clone(), req_protocol_names.clone(), chunk_resp_protocol);
if node_features == node_features_with_mapping_enabled() &&
chunk_resp_protocol == Protocol::ChunkFetchingV1
if node_features == node_features_with_mapping_enabled()
&& chunk_resp_protocol == Protocol::ChunkFetchingV1
{
// For this specific case, chunk fetching is not possible, because the ValidatorIndex is not
// equal to the ChunkIndex and the peer does not send back the actual ChunkIndex.
@@ -128,8 +128,8 @@ fn check_fetch_tries_all(
v.push(None);
}
if node_features == node_features_with_mapping_enabled() &&
chunk_resp_protocol == Protocol::ChunkFetchingV1
if node_features == node_features_with_mapping_enabled()
&& chunk_resp_protocol == Protocol::ChunkFetchingV1
{
// For this specific case, chunk fetching is not possible, because the ValidatorIndex is not
// equal to the ChunkIndex and the peer does not send back the actual ChunkIndex.
@@ -186,8 +186,8 @@ fn check_fetch_retry(#[case] node_features: NodeFeatures, #[case] chunk_resp_pro
v.push(None);
}
if node_features == node_features_with_mapping_enabled() &&
chunk_resp_protocol == Protocol::ChunkFetchingV1
if node_features == node_features_with_mapping_enabled()
&& chunk_resp_protocol == Protocol::ChunkFetchingV1
{
// For this specific case, chunk fetching is not possible, because the ValidatorIndex is not
// equal to the ChunkIndex and the peer does not send back the actual ChunkIndex.