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
+13 -9
View File
@@ -564,9 +564,9 @@ pub mod pezpallet {
let call_hash = T::CallHasher::hash_of(&call);
let now = T::BlockNumberProvider::current_block_number();
Self::edit_announcements(&delegate, |ann| {
ann.real != real ||
ann.call_hash != call_hash ||
now.saturating_sub(ann.height) < def.delay
ann.real != real
|| ann.call_hash != call_hash
|| now.saturating_sub(ann.height) < def.delay
})
.map_err(|_| Error::<T>::Unannounced)?;
@@ -987,8 +987,8 @@ impl<T: Config> Pezpallet<T> {
force_proxy_type: Option<T::ProxyType>,
) -> Result<ProxyDefinition<T::AccountId, T::ProxyType, BlockNumberFor<T>>, DispatchError> {
let f = |x: &ProxyDefinition<T::AccountId, T::ProxyType, BlockNumberFor<T>>| -> bool {
&x.delegate == delegate &&
force_proxy_type.as_ref().map_or(true, |y| &x.proxy_type == y)
&x.delegate == delegate
&& force_proxy_type.as_ref().map_or(true, |y| &x.proxy_type == y)
};
Ok(Proxies::<T>::get(real).0.into_iter().find(f).ok_or(Error::<T>::NotProxy)?)
}
@@ -1007,15 +1007,19 @@ impl<T: Config> Pezpallet<T> {
match c.is_sub_type() {
// Proxy call cannot add or remove a proxy with more permissions than it already
// has.
Some(Call::add_proxy { ref proxy_type, .. }) |
Some(Call::remove_proxy { ref proxy_type, .. })
Some(Call::add_proxy { ref proxy_type, .. })
| Some(Call::remove_proxy { ref proxy_type, .. })
if !def.proxy_type.is_superset(proxy_type) =>
false,
{
false
},
// Proxy call cannot remove all proxies or kill pure proxies unless it has full
// permissions.
Some(Call::remove_proxies { .. }) | Some(Call::kill_pure { .. })
if def.proxy_type != T::ProxyType::default() =>
false,
{
false
},
_ => def.proxy_type.filter(c),
}
});