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:
Vendored
+5
-5
@@ -35,7 +35,7 @@ fn is_valid_rust_identifier(id: &str) -> Result<(), String> {
|
||||
if ch.is_xid_start() {
|
||||
for ch in id.chars().skip(1) {
|
||||
if !ch.is_xid_continue() {
|
||||
return Err(format!("Invalid char `{ch}` in `{id}`"))
|
||||
return Err(format!("Invalid char `{ch}` in `{id}`"));
|
||||
}
|
||||
}
|
||||
Ok(())
|
||||
@@ -65,16 +65,16 @@ impl Registry {
|
||||
));
|
||||
}
|
||||
if account_type.network.is_empty() {
|
||||
return Err("network is mandatory.".into())
|
||||
return Err("network is mandatory.".into());
|
||||
}
|
||||
|
||||
if let Err(err) = is_valid_rust_identifier(&account_type.name()) {
|
||||
return Err(format!("network not valid: {err} for {account_type:#?}"))
|
||||
return Err(format!("network not valid: {err} for {account_type:#?}"));
|
||||
}
|
||||
if account_type.decimals.len() != account_type.symbols.len() {
|
||||
return Err(format!(
|
||||
"decimals must be specified for each symbol: {account_type:?}"
|
||||
))
|
||||
));
|
||||
}
|
||||
for (name, decimals) in account_type.symbols.iter().zip(&account_type.decimals) {
|
||||
use Entry::*;
|
||||
@@ -87,7 +87,7 @@ impl Registry {
|
||||
name,
|
||||
e.get().networks.join(", "),
|
||||
network,
|
||||
))
|
||||
));
|
||||
}
|
||||
e.get_mut().networks.push(network);
|
||||
},
|
||||
|
||||
Vendored
+6
-10
@@ -1,23 +1,19 @@
|
||||
# SS58 Registry - Stable Rustfmt Configuration
|
||||
# Only stable features for compatibility
|
||||
|
||||
# Basic
|
||||
hard_tabs = true
|
||||
max_width = 100
|
||||
use_small_heuristics = "Max"
|
||||
|
||||
# Imports
|
||||
imports_granularity = "Crate"
|
||||
reorder_imports = true
|
||||
|
||||
# Consistency
|
||||
newline_style = "Unix"
|
||||
# Format comments
|
||||
comment_width = 100
|
||||
wrap_comments = true
|
||||
|
||||
# Misc
|
||||
chain_width = 80
|
||||
spaces_around_ranges = false
|
||||
binop_separator = "Back"
|
||||
reorder_impl_items = false
|
||||
match_arm_leading_pipes = "Preserve"
|
||||
match_arm_blocks = false
|
||||
match_block_trailing_comma = true
|
||||
trailing_comma = "Vertical"
|
||||
trailing_semicolon = false
|
||||
use_field_init_shorthand = true
|
||||
|
||||
Reference in New Issue
Block a user