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
@@ -421,10 +421,11 @@ fn get_wasm_workspace_root() -> PathBuf {
loop {
match out_dir.parent() {
Some(parent) if out_dir.ends_with("build") => return parent.to_path_buf(),
_ =>
_ => {
if !out_dir.pop() {
break;
},
}
},
}
}
@@ -613,18 +614,18 @@ fn project_enabled_features(
// this heuristic anymore. However, for the transition phase between now and namespaced
// features already being present in nightly, we need this code to make
// runtimes compile with all the possible rustc versions.
if v.len() == 1 &&
v.get(0).map_or(false, |v| *v == format!("dep:{}", f)) &&
std_enabled.as_ref().map(|e| e.iter().any(|ef| ef == *f)).unwrap_or(false)
if v.len() == 1
&& v.get(0).map_or(false, |v| *v == format!("dep:{}", f))
&& std_enabled.as_ref().map(|e| e.iter().any(|ef| ef == *f)).unwrap_or(false)
{
return false;
}
// We don't want to enable the `std`/`default` feature for the wasm build and
// we need to check if the feature is enabled by checking the env variable.
*f != "std" &&
*f != "default" &&
env::var(format!("CARGO_FEATURE_{feature_env}"))
*f != "std"
&& *f != "default"
&& env::var(format!("CARGO_FEATURE_{feature_env}"))
.map(|v| v == "1")
.unwrap_or_default()
})