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:
@@ -157,9 +157,9 @@ impl<Block: BlockT> StateAction<Block> {
|
||||
/// Check if execution checks that require runtime calls should be skipped.
|
||||
pub fn skip_execution_checks(&self) -> bool {
|
||||
match self {
|
||||
StateAction::ApplyChanges(_) |
|
||||
StateAction::Execute |
|
||||
StateAction::ExecuteIfPossible => false,
|
||||
StateAction::ApplyChanges(_)
|
||||
| StateAction::Execute
|
||||
| StateAction::ExecuteIfPossible => false,
|
||||
StateAction::Skip => true,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -193,8 +193,8 @@ impl<BlockNumber: fmt::Debug + PartialEq> BlockImportStatus<BlockNumber> {
|
||||
/// Returns the imported block number.
|
||||
pub fn number(&self) -> &BlockNumber {
|
||||
match self {
|
||||
BlockImportStatus::ImportedKnown(n, _) |
|
||||
BlockImportStatus::ImportedUnknown(n, _, _) => n,
|
||||
BlockImportStatus::ImportedKnown(n, _)
|
||||
| BlockImportStatus::ImportedUnknown(n, _, _) => n,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -242,8 +242,9 @@ pub async fn import_single_block<B: BlockT, V: Verifier<B>>(
|
||||
) -> BlockImportResult<B> {
|
||||
match verify_single_block_metered(import_handle, block_origin, block, verifier, None).await? {
|
||||
SingleBlockVerificationOutcome::Imported(import_status) => Ok(import_status),
|
||||
SingleBlockVerificationOutcome::Verified(import_parameters) =>
|
||||
import_single_block_metered(import_handle, import_parameters, None).await,
|
||||
SingleBlockVerificationOutcome::Verified(import_parameters) => {
|
||||
import_single_block_metered(import_handle, import_parameters, None).await
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -262,8 +263,9 @@ where
|
||||
trace!(target: LOG_TARGET, "Block already in chain {}: {:?}", number, hash);
|
||||
Ok(BlockImportStatus::ImportedKnown(number, block_origin))
|
||||
},
|
||||
Ok(ImportResult::Imported(aux)) =>
|
||||
Ok(BlockImportStatus::ImportedUnknown(number, aux, block_origin)),
|
||||
Ok(ImportResult::Imported(aux)) => {
|
||||
Ok(BlockImportStatus::ImportedUnknown(number, aux, block_origin))
|
||||
},
|
||||
Ok(ImportResult::MissingState) => {
|
||||
debug!(
|
||||
target: LOG_TARGET,
|
||||
|
||||
@@ -310,8 +310,9 @@ impl<B: BlockT> BlockImportWorker<B> {
|
||||
// Make sure to first process all justifications
|
||||
while let Poll::Ready(justification) = futures::poll!(justification_port.next()) {
|
||||
match justification {
|
||||
Some(ImportJustification(who, hash, number, justification)) =>
|
||||
worker.import_justification(who, hash, number, justification).await,
|
||||
Some(ImportJustification(who, hash, number, justification)) => {
|
||||
worker.import_justification(who, hash, number, justification).await
|
||||
},
|
||||
None => {
|
||||
log::debug!(
|
||||
target: LOG_TARGET,
|
||||
@@ -361,8 +362,9 @@ impl<B: BlockT> BlockImportWorker<B> {
|
||||
});
|
||||
match result {
|
||||
Ok(()) => JustificationImportResult::Success,
|
||||
Err(pezsp_consensus::Error::OutdatedJustification) =>
|
||||
JustificationImportResult::OutdatedJustification,
|
||||
Err(pezsp_consensus::Error::OutdatedJustification) => {
|
||||
JustificationImportResult::OutdatedJustification
|
||||
},
|
||||
Err(_) => JustificationImportResult::Failure,
|
||||
}
|
||||
},
|
||||
|
||||
@@ -127,12 +127,15 @@ impl<B: BlockT> BufferedLinkReceiver<B> {
|
||||
/// Send action for the synchronization to perform.
|
||||
pub fn send_actions(&mut self, msg: BlockImportWorkerMsg<B>, link: &dyn Link<B>) {
|
||||
match msg {
|
||||
BlockImportWorkerMsg::BlocksProcessed(imported, count, results) =>
|
||||
link.blocks_processed(imported, count, results),
|
||||
BlockImportWorkerMsg::JustificationImported(who, hash, number, import_result) =>
|
||||
link.justification_imported(who, &hash, number, import_result),
|
||||
BlockImportWorkerMsg::RequestJustification(hash, number) =>
|
||||
link.request_justification(&hash, number),
|
||||
BlockImportWorkerMsg::BlocksProcessed(imported, count, results) => {
|
||||
link.blocks_processed(imported, count, results)
|
||||
},
|
||||
BlockImportWorkerMsg::JustificationImported(who, hash, number, import_result) => {
|
||||
link.justification_imported(who, &hash, number, import_result)
|
||||
},
|
||||
BlockImportWorkerMsg::RequestJustification(hash, number) => {
|
||||
link.request_justification(&hash, number)
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user