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
@@ -20,10 +20,12 @@ where
{
fn convert_location(location: &Location) -> Option<AccountId> {
match location.unpack() {
(2, [GlobalConsensus(Ethereum { chain_id })]) =>
Some(Self::from_chain_id(chain_id).into()),
(2, [GlobalConsensus(Ethereum { chain_id }), AccountKey20 { network: _, key }]) =>
Some(Self::from_chain_id_with_key(chain_id, *key).into()),
(2, [GlobalConsensus(Ethereum { chain_id })]) => {
Some(Self::from_chain_id(chain_id).into())
},
(2, [GlobalConsensus(Ethereum { chain_id }), AccountKey20 { network: _, key }]) => {
Some(Self::from_chain_id_with_key(chain_id, *key).into())
},
_ => None,
}
}
@@ -185,10 +185,12 @@ where
use Command::*;
use VersionedMessage::*;
match message {
V1(MessageV1 { chain_id, command: RegisterToken { token, fee } }) =>
Ok(Self::convert_register_token(message_id, chain_id, token, fee)),
V1(MessageV1 { chain_id, command: SendToken { token, destination, amount, fee } }) =>
Ok(Self::convert_send_token(message_id, chain_id, token, destination, amount, fee)),
V1(MessageV1 { chain_id, command: RegisterToken { token, fee } }) => {
Ok(Self::convert_register_token(message_id, chain_id, token, fee))
},
V1(MessageV1 { chain_id, command: SendToken { token, destination, amount, fee } }) => {
Ok(Self::convert_send_token(message_id, chain_id, token, destination, amount, fee))
},
V1(MessageV1 {
chain_id,
command: SendNativeToken { token_id, destination, amount, fee },
@@ -309,8 +311,9 @@ where
let (dest_para_id, beneficiary, dest_para_fee) = match destination {
// Final destination is a 32-byte account on AssetHub
Destination::AccountId32 { id } =>
(None, Location::new(0, [AccountId32 { network: None, id }]), 0),
Destination::AccountId32 { id } => {
(None, Location::new(0, [AccountId32 { network: None, id }]), 0)
},
// Final destination is a 32-byte account on a sibling of AssetHub
Destination::ForeignAccountId32 { para_id, id, fee } => (
Some(para_id),
@@ -416,8 +419,9 @@ where
let beneficiary = match destination {
// Final destination is a 32-byte account on AssetHub
Destination::AccountId32 { id } =>
Ok(Location::new(0, [AccountId32 { network: None, id }])),
Destination::AccountId32 { id } => {
Ok(Location::new(0, [AccountId32 { network: None, id }]))
},
// Forwarding to a destination teyrchain is not allowed for PNA and is validated on the
// Ethereum side. https://github.com/Snowfork/snowbridge/blob/e87ddb2215b513455c844463a25323bb9c01ff36/contracts/src/Assets.sol#L216-L224
_ => Err(ConvertMessageError::InvalidDestination),