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
@@ -14,12 +14,12 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
use pezkuwi_subxt::OnlineClient;
use pezkuwi_subxt_signer::sr25519::dev;
use pezpallet_revive_eth_rpc::subxt_client::{
self, revive::calls::types::InstantiateWithCode, SrcChainConfig,
};
use pezsp_weights::Weight;
use pezkuwi_subxt::OnlineClient;
use pezkuwi_subxt_signer::sr25519::dev;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
@@ -14,9 +14,9 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
use pezpallet_revive_eth_rpc::subxt_client::{self, system::calls::types::Remark, SrcChainConfig};
use pezkuwi_subxt::OnlineClient;
use pezkuwi_subxt_signer::sr25519::dev;
use pezpallet_revive_eth_rpc::subxt_client::{self, system::calls::types::Remark, SrcChainConfig};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
+10 -7
View File
@@ -185,9 +185,10 @@ impl From<ClientError> for ErrorObjectOwned {
match err {
ClientError::SubxtError(pezkuwi_subxt::Error::OtherRpcClientError(
pezkuwi_subxt::ext::pezkuwi_subxt_rpcs::Error::User(err),
)) |
ClientError::RpcError(pezkuwi_subxt::ext::pezkuwi_subxt_rpcs::Error::User(err)) =>
ErrorObjectOwned::owned::<Vec<u8>>(err.code, err.message, None),
))
| ClientError::RpcError(pezkuwi_subxt::ext::pezkuwi_subxt_rpcs::Error::User(err)) => {
ErrorObjectOwned::owned::<Vec<u8>>(err.code, err.message, None)
},
ClientError::TransactError(EthTransactError::Data(data)) => {
let msg = match decode_revert_reason(&data) {
Some(reason) => format!("execution reverted: {reason}"),
@@ -197,10 +198,12 @@ impl From<ClientError> for ErrorObjectOwned {
let data = format!("0x{}", hex::encode(data));
ErrorObjectOwned::owned::<String>(REVERT_CODE, msg, Some(data))
},
ClientError::TransactError(EthTransactError::Message(msg)) =>
ErrorObjectOwned::owned::<String>(CALL_EXECUTION_FAILED_CODE, msg, None),
_ =>
ErrorObjectOwned::owned::<String>(CALL_EXECUTION_FAILED_CODE, err.to_string(), None),
ClientError::TransactError(EthTransactError::Message(msg)) => {
ErrorObjectOwned::owned::<String>(CALL_EXECUTION_FAILED_CODE, msg, None)
},
_ => {
ErrorObjectOwned::owned::<String>(CALL_EXECUTION_FAILED_CODE, err.to_string(), None)
},
}
}
}
@@ -75,8 +75,9 @@ impl RuntimeApi {
block: BlockNumberOrTagOrHash,
) -> Result<EthTransactInfo<Balance>, ClientError> {
let timestamp_override = match block {
BlockNumberOrTagOrHash::BlockTag(BlockTag::Pending) =>
Some(Timestamp::current().as_millis()),
BlockNumberOrTagOrHash::BlockTag(BlockTag::Pending) => {
Some(Timestamp::current().as_millis())
},
_ => None,
};
@@ -28,7 +28,10 @@ use pezsp_core::H256;
/// A wrapper around the Bizinikiwi Storage API.
#[derive(Clone)]
pub struct StorageApi(StorageClientAt<SrcChainConfig, OnlineClient<SrcChainConfig>>, #[expect(dead_code)] H256);
pub struct StorageApi(
StorageClientAt<SrcChainConfig, OnlineClient<SrcChainConfig>>,
#[expect(dead_code)] H256,
);
impl StorageApi {
/// Create a new instance of the StorageApi.
@@ -225,8 +225,9 @@ impl<B: BlockInfoProvider> ReceiptProvider<B> {
/// Check if the block is before the earliest block.
pub fn is_before_earliest_block(&self, at: &BlockNumberOrTag) -> bool {
match at {
BlockNumberOrTag::U256(block_number) =>
self.receipt_extractor.is_before_earliest_block(block_number.as_u32()),
BlockNumberOrTag::U256(block_number) => {
self.receipt_extractor.is_before_earliest_block(block_number.as_u32())
},
BlockNumberOrTag::BlockTag(_) => false,
}
}
@@ -617,15 +618,17 @@ mod tests {
async fn count(pool: &SqlitePool, table: &str, block_hash: Option<H256>) -> usize {
let count: i64 = match block_hash {
None =>
None => {
sqlx::query_scalar(&format!("SELECT COUNT(*) FROM {table}"))
.fetch_one(pool)
.await,
Some(hash) =>
.await
},
Some(hash) => {
sqlx::query_scalar(&format!("SELECT COUNT(*) FROM {table} WHERE block_hash = ?"))
.bind(hash.as_ref())
.fetch_one(pool)
.await,
.await
},
}
.unwrap();
+10 -5
View File
@@ -209,8 +209,8 @@ async fn submit_bizinikiwi_transactions(
log::trace!(target: LOG_TARGET, "Bizinikiwi tx {i} submitted");
while let Some(status) = progress.next().await {
match status {
Ok(TxStatus::InFinalizedBlock(block)) |
Ok(TxStatus::InBestBlock(block)) => {
Ok(TxStatus::InFinalizedBlock(block))
| Ok(TxStatus::InBestBlock(block)) => {
log::trace!(target: LOG_TARGET,
"Bizinikiwi tx {i} included in block {:?}",
block.block_hash()
@@ -250,8 +250,9 @@ async fn verify_transactions_in_single_block(
let block_tx_hashes = match &block.transactions {
HashesOrTransactionInfos::Hashes(hashes) => hashes.clone(),
HashesOrTransactionInfos::TransactionInfos(infos) =>
infos.iter().map(|info| info.hash).collect(),
HashesOrTransactionInfos::TransactionInfos(infos) => {
infos.iter().map(|info| info.hash).collect()
},
};
if let Some(missing_hash) =
@@ -780,7 +781,11 @@ async fn test_runtime_pallets_address_upload_code(client: Arc<WsClient>) -> anyh
let code_hash = H256(pezsp_io::hashing::keccak_256(&bytecode));
let query = subxt_client::storage().revive().pristine_code();
let block_hash: pezsp_core::H256 = get_bizinikiwi_block_hash(receipt.block_number).await?;
let stored_code: Vec<u8> = node_client.storage().at(block_hash).fetch(&query, (code_hash,)).await
let stored_code: Vec<u8> = node_client
.storage()
.at(block_hash)
.fetch(&query, (code_hash,))
.await
.expect("Code with hash should exist in storage")
.decode()?;
assert_eq!(stored_code, bytecode, "Stored code should match the uploaded bytecode");