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:
@@ -311,8 +311,8 @@ pub mod pezpallet {
|
||||
);
|
||||
|
||||
let to_seconds = |w: &Weight| {
|
||||
w.ref_time() as f32 /
|
||||
pezframe_support::weights::constants::WEIGHT_REF_TIME_PER_SECOND as f32
|
||||
w.ref_time() as f32
|
||||
/ pezframe_support::weights::constants::WEIGHT_REF_TIME_PER_SECOND as f32
|
||||
};
|
||||
|
||||
log::debug!(
|
||||
@@ -1099,8 +1099,8 @@ impl<T: Config> Pezpallet<T> {
|
||||
// All candidates/members/runners-up who are no longer retaining a position as a
|
||||
// seat holder will lose their bond.
|
||||
candidates_and_deposit.iter().for_each(|(c, d)| {
|
||||
if new_members_ids_sorted.binary_search(c).is_err() &&
|
||||
new_runners_up_ids_sorted.binary_search(c).is_err()
|
||||
if new_members_ids_sorted.binary_search(c).is_err()
|
||||
&& new_runners_up_ids_sorted.binary_search(c).is_err()
|
||||
{
|
||||
let (imbalance, _) = T::Currency::slash_reserved(c, *d);
|
||||
T::LoserCandidate::on_unbalanced(imbalance);
|
||||
@@ -1268,11 +1268,12 @@ impl<T: Config> Pezpallet<T> {
|
||||
// - Members and candidates sets are disjoint;
|
||||
// - Members and runners-ups sets are disjoint.
|
||||
fn try_state_members_disjoint() -> Result<(), TryRuntimeError> {
|
||||
match Self::intersects(&Pezpallet::<T>::members_ids(), &Self::candidates_ids()) &&
|
||||
Self::intersects(&Pezpallet::<T>::members_ids(), &Self::runners_up_ids())
|
||||
match Self::intersects(&Pezpallet::<T>::members_ids(), &Self::candidates_ids())
|
||||
&& Self::intersects(&Pezpallet::<T>::members_ids(), &Self::runners_up_ids())
|
||||
{
|
||||
true =>
|
||||
Err("Members set should be disjoint from candidates and runners-up sets".into()),
|
||||
true => {
|
||||
Err("Members set should be disjoint from candidates and runners-up sets".into())
|
||||
},
|
||||
false => Ok(()),
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -211,8 +211,8 @@ where
|
||||
let bugged_deposits = all_accounts
|
||||
.iter()
|
||||
.filter(|account| {
|
||||
account_deposited_sums.get(&account).unwrap_or(&Zero::zero()) >
|
||||
account_reserved_before.get(&account).unwrap_or(&Zero::zero())
|
||||
account_deposited_sums.get(&account).unwrap_or(&Zero::zero())
|
||||
> account_reserved_before.get(&account).unwrap_or(&Zero::zero())
|
||||
})
|
||||
.count();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user