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
@@ -690,8 +690,9 @@ mod tests {
let entry = self.storage.entry(key.clone());
let result = match (entry, take_old) {
(Entry::Vacant(_), _) => WriteOutcome::New,
(Entry::Occupied(entry), false) =>
WriteOutcome::Overwritten(entry.remove().len() as u32),
(Entry::Occupied(entry), false) => {
WriteOutcome::Overwritten(entry.remove().len() as u32)
},
(Entry::Occupied(entry), true) => WriteOutcome::Taken(entry.remove()),
};
if let Some(value) = value {
@@ -133,16 +133,17 @@ impl LoadedModule {
match export.name() {
"call" => call_found = true,
"deploy" => deploy_found = true,
_ =>
_ => {
return Err(
"unknown function export: expecting only deploy and call functions",
),
)
},
}
// Check the signature.
// Both "call" and "deploy" have the () -> () function type.
// We still support () -> (i32) for backwards compatibility.
if !(ft.params().is_empty() &&
(ft.results().is_empty() || ft.results() == [WasmiValueType::I32]))
if !(ft.params().is_empty()
&& (ft.results().is_empty() || ft.results() == [WasmiValueType::I32]))
{
return Err("entry point has wrong signature");
}
@@ -194,9 +195,9 @@ impl LoadedModule {
ExternType::Func(_) => {
import.ty().func().ok_or("expected a function")?;
if !<T as Config>::ChainExtension::enabled() &&
(import.name().as_bytes() == b"seal_call_chain_extension" ||
import.name().as_bytes() == b"call_chain_extension")
if !<T as Config>::ChainExtension::enabled()
&& (import.name().as_bytes() == b"seal_call_chain_extension"
|| import.name().as_bytes() == b"call_chain_extension")
{
return Err(
"Module uses chain extensions but chain extensions are disabled",
@@ -364,8 +364,9 @@ impl<T: Config> Token<T> for RuntimeCosts {
DelegateCallBase => T::WeightInfo::seal_delegate_call(),
CallTransferSurcharge => cost_args!(seal_call, 1, 0),
CallInputCloned(len) => cost_args!(seal_call, 0, len),
Instantiate { input_data_len, salt_len } =>
T::WeightInfo::seal_instantiate(input_data_len, salt_len),
Instantiate { input_data_len, salt_len } => {
T::WeightInfo::seal_instantiate(input_data_len, salt_len)
},
HashSha256(len) => T::WeightInfo::seal_hash_sha2_256(len),
HashKeccak256(len) => T::WeightInfo::seal_hash_keccak_256(len),
HashBlake256(len) => T::WeightInfo::seal_hash_blake2_256(len),
@@ -481,8 +482,9 @@ impl<'a, E: Ext + 'a> Runtime<'a, E> {
ReturnFlags::from_bits(*flags).ok_or(Error::<E::T>::InvalidCallFlags)?;
return Ok(ExecReturnValue { flags, data: data.to_vec() });
},
Termination =>
return Ok(ExecReturnValue { flags: ReturnFlags::empty(), data: Vec::new() }),
Termination => {
return Ok(ExecReturnValue { flags: ReturnFlags::empty(), data: Vec::new() })
},
SupervisorError(error) => return Err((*error).into()),
}
}
@@ -2271,8 +2273,9 @@ pub mod env {
Environment::new(ctx, memory, id, input_ptr, input_len, output_ptr, output_len_ptr);
let ret = match chain_extension.call(env)? {
RetVal::Converging(val) => Ok(val),
RetVal::Diverging { flags, data } =>
Err(TrapReason::Return(ReturnData { flags: flags.bits(), data })),
RetVal::Diverging { flags, data } => {
Err(TrapReason::Return(ReturnData { flags: flags.bits(), data }))
},
};
ctx.chain_extension = Some(chain_extension);
ret