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
+11 -11
View File
@@ -1608,9 +1608,9 @@ impl<T: Config<I>, I: 'static> Pezpallet<T, I> {
let approved = candidacy.tally.clear_approval();
let rejected = candidacy.tally.clear_rejection();
match (maybe_vote, approved, rejected) {
(None, _, _) |
(Some(Vote { approve: true, .. }), false, true) |
(Some(Vote { approve: false, .. }), true, false) => {
(None, _, _)
| (Some(Vote { approve: true, .. }), false, true)
| (Some(Vote { approve: false, .. }), true, false) => {
// Can't do much if the punishment doesn't work out.
if Self::strike_member(&skeptic).is_ok() {
candidacy.skeptic_struck = true;
@@ -1640,9 +1640,9 @@ impl<T: Config<I>, I: 'static> Pezpallet<T, I> {
// Check defender skeptic voted and that their vote was with the majority.
let skeptic_vote = DefenderVotes::<T, I>::get(round, &skeptic);
match (skeptic_vote, tally.more_approvals(), tally.more_rejections()) {
(None, _, _) |
(Some(Vote { approve: true, .. }), false, true) |
(Some(Vote { approve: false, .. }), true, false) => {
(None, _, _)
| (Some(Vote { approve: true, .. }), false, true)
| (Some(Vote { approve: false, .. }), true, false) => {
// Punish skeptic and challenge them next.
let _ = Self::strike_member(&skeptic);
let founder = Founder::<T, I>::get();
@@ -1738,9 +1738,9 @@ impl<T: Config<I>, I: 'static> Pezpallet<T, I> {
bids.retain(|bid| {
// We only accept a zero bid as the first selection.
total_cost.saturating_accrue(bid.value);
let accept = selections < max_selections &&
(!bid.value.is_zero() || selections == 0) &&
total_cost <= pot;
let accept = selections < max_selections
&& (!bid.value.is_zero() || selections == 0)
&& total_cost <= pot;
if accept {
let candidacy = Candidacy {
round,
@@ -1877,8 +1877,8 @@ impl<T: Config<I>, I: 'static> Pezpallet<T, I> {
let next_head = NextHead::<T, I>::get()
.filter(|old| {
old.round > candidacy.round ||
old.round == candidacy.round && old.bid < candidacy.bid
old.round > candidacy.round
|| old.round == candidacy.round && old.bid < candidacy.bid
})
.unwrap_or_else(|| IntakeRecord {
who: candidate.clone(),
@@ -282,8 +282,8 @@ pub fn from_original<T: Config<I>, I: Instance + 'static>(
// The founder must be the first member in Society V2. If we find the founder not in index
// zero, we swap it with the first member.
if member == Founder::<T, I>::get().defensive_ok_or("founder must always be set")? &&
member_count > 0
if member == Founder::<T, I>::get().defensive_ok_or("founder must always be set")?
&& member_count > 0
{
let member_to_swap = MemberByIndex::<T, I>::get(0)
.defensive_ok_or("member_count > 0, we must have at least 1 member")?;
+3 -2
View File
@@ -230,8 +230,9 @@ pub fn next_intake() {
Period::Voting { more, .. } => System::run_to_block::<AllPalletsWithSystem>(
System::block_number() + more + claim_period,
),
Period::Claim { more, .. } =>
System::run_to_block::<AllPalletsWithSystem>(System::block_number() + more),
Period::Claim { more, .. } => {
System::run_to_block::<AllPalletsWithSystem>(System::block_number() + more)
},
Period::Intake { .. } => {},
}
}