From c9b4325c041dfc7c203a401d7a89ac0b3891d098 Mon Sep 17 00:00:00 2001 From: Uncle Stretch Date: Thu, 27 Nov 2025 19:06:18 +0300 Subject: [PATCH] rustfmt slow-clap pallet Signed-off-by: Uncle Stretch --- pallets/slow-clap/Cargo.toml | 2 +- pallets/slow-clap/src/lib.rs | 8 ++++++-- pallets/slow-clap/src/tests.rs | 4 ++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/pallets/slow-clap/Cargo.toml b/pallets/slow-clap/Cargo.toml index 722ea73..0c0eda9 100644 --- a/pallets/slow-clap/Cargo.toml +++ b/pallets/slow-clap/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ghost-slow-clap" -version = "0.4.2" +version = "0.4.3" description = "Applause protocol for the EVM bridge" license.workspace = true authors.workspace = true diff --git a/pallets/slow-clap/src/lib.rs b/pallets/slow-clap/src/lib.rs index e26a924..d051def 100644 --- a/pallets/slow-clap/src/lib.rs +++ b/pallets/slow-clap/src/lib.rs @@ -609,8 +609,12 @@ impl Pallet { let applause_threshold = Perbill::from_parts(T::ApplauseThreshold::get()); let threshold_amount = applause_threshold.mul_floor(TotalExposure::::get()); - let maybe_account_id = T::ExposureListener::get_account_by_index(clap.authority_index as usize); - ensure!(maybe_account_id.is_some(), Error::::NonExistentAuthorityIndex); + let maybe_account_id = + T::ExposureListener::get_account_by_index(clap.authority_index as usize); + ensure!( + maybe_account_id.is_some(), + Error::::NonExistentAuthorityIndex + ); let account_id = maybe_account_id.unwrap(); let new_clapped_amount = T::ExposureListener::get_validator_exposure(&account_id); diff --git a/pallets/slow-clap/src/tests.rs b/pallets/slow-clap/src/tests.rs index 137a33c..99bc6aa 100644 --- a/pallets/slow-clap/src/tests.rs +++ b/pallets/slow-clap/src/tests.rs @@ -531,8 +531,8 @@ fn should_applause_and_take_next_claps() { assert_eq!(Balances::total_balance(&receiver), 0); for i in 0..=3 { assert_ok!(do_clap_from(session_index, network_id, i, false)); - let account_id = TestExposureListener::get_account_by_index(i as usize) - .unwrap_or_default(); + let account_id = + TestExposureListener::get_account_by_index(i as usize).unwrap_or_default(); clapped_amount = TestExposureListener::get_validator_exposure(&account_id) .saturating_add(clapped_amount); assert_clapped_amount(&session_index, &unique_hash, clapped_amount);