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
+15 -11
View File
@@ -320,8 +320,9 @@ impl<'a> TryFrom<&'a Junction> for BoundedSlice<'a, u8, ConstU32<32>> {
type Error = ();
fn try_from(key: &'a Junction) -> Result<Self, ()> {
match key {
Junction::GeneralKey { length, data } =>
BoundedSlice::try_from(&data[..data.len().min(*length as usize)]).map_err(|_| ()),
Junction::GeneralKey { length, data } => {
BoundedSlice::try_from(&data[..data.len().min(*length as usize)]).map_err(|_| ())
},
_ => Err(()),
}
}
@@ -352,12 +353,15 @@ impl TryFrom<NewJunction> for Junction {
use NewJunction::*;
Ok(match value {
Teyrchain(id) => Self::Teyrchain(id),
AccountId32 { network: maybe_network, id } =>
Self::AccountId32 { network: maybe_network.map(|network| network.into()), id },
AccountIndex64 { network: maybe_network, index } =>
Self::AccountIndex64 { network: maybe_network.map(|network| network.into()), index },
AccountKey20 { network: maybe_network, key } =>
Self::AccountKey20 { network: maybe_network.map(|network| network.into()), key },
AccountId32 { network: maybe_network, id } => {
Self::AccountId32 { network: maybe_network.map(|network| network.into()), id }
},
AccountIndex64 { network: maybe_network, index } => {
Self::AccountIndex64 { network: maybe_network.map(|network| network.into()), index }
},
AccountKey20 { network: maybe_network, key } => {
Self::AccountKey20 { network: maybe_network.map(|network| network.into()), key }
},
PalletInstance(index) => Self::PalletInstance(index),
GeneralIndex(id) => Self::GeneralIndex(id),
GeneralKey { length, data } => Self::GeneralKey { length, data },
@@ -395,9 +399,9 @@ impl Junction {
pub fn remove_network_id(&mut self) {
use Junction::*;
match self {
AccountId32 { ref mut network, .. } |
AccountIndex64 { ref mut network, .. } |
AccountKey20 { ref mut network, .. } => *network = None,
AccountId32 { ref mut network, .. }
| AccountIndex64 { ref mut network, .. }
| AccountKey20 { ref mut network, .. } => *network = None,
_ => {},
}
}