From a0eed0a6f8fc8c673abc590b41acfc9c270985ef Mon Sep 17 00:00:00 2001 From: divdeploy <166095818+divdeploy@users.noreply.github.com> Date: Sat, 6 Apr 2024 02:35:57 +0800 Subject: [PATCH] chore: fix some comments (#4004) Signed-off-by: divdeploy --- polkadot/node/core/approval-voting/src/lib.rs | 2 +- substrate/frame/glutton/src/benchmarking.rs | 2 +- substrate/frame/nomination-pools/test-staking/src/lib.rs | 2 +- substrate/frame/society/src/tests.rs | 2 +- substrate/primitives/npos-elections/src/reduce.rs | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/polkadot/node/core/approval-voting/src/lib.rs b/polkadot/node/core/approval-voting/src/lib.rs index 57e9af4a518a..7ecc2b2595bc 100644 --- a/polkadot/node/core/approval-voting/src/lib.rs +++ b/polkadot/node/core/approval-voting/src/lib.rs @@ -1102,7 +1102,7 @@ where // need to handle these newly generated actions before we finalize // completing additional actions in the submitted sequence of actions. // -// Since recursive async functions are not not stable yet, we are +// Since recursive async functions are not stable yet, we are // forced to modify the actions iterator on the fly whenever a new set // of actions are generated by handling a single action. // diff --git a/substrate/frame/glutton/src/benchmarking.rs b/substrate/frame/glutton/src/benchmarking.rs index fa93c7ccc829..0b1309e63304 100644 --- a/substrate/frame/glutton/src/benchmarking.rs +++ b/substrate/frame/glutton/src/benchmarking.rs @@ -85,7 +85,7 @@ benchmarks! { empty_on_idle { }: { - // Enough weight do do nothing. + // Enough weight to do nothing. Glutton::::on_idle(System::::block_number(), T::WeightInfo::empty_on_idle()); } diff --git a/substrate/frame/nomination-pools/test-staking/src/lib.rs b/substrate/frame/nomination-pools/test-staking/src/lib.rs index 98bff537c908..d84e09e32ba3 100644 --- a/substrate/frame/nomination-pools/test-staking/src/lib.rs +++ b/substrate/frame/nomination-pools/test-staking/src/lib.rs @@ -413,7 +413,7 @@ fn pool_slash_e2e() { ] ); - // At this point, 20 are safe from slash, 30 are unlocking but vulnerable to slash, and and + // At this point, 20 are safe from slash, 30 are unlocking but vulnerable to slash, and // another 30 are active and vulnerable to slash. Let's slash half of them. pallet_staking::slashing::do_slash::( &POOL1_BONDED, diff --git a/substrate/frame/society/src/tests.rs b/substrate/frame/society/src/tests.rs index 5f8ecc9a7c52..df8e844cdad9 100644 --- a/substrate/frame/society/src/tests.rs +++ b/substrate/frame/society/src/tests.rs @@ -558,7 +558,7 @@ fn suspended_candidate_rejected_works() { assert_eq!(Balances::reserved_balance(40), 0); assert_eq!(Balances::free_balance(Society::account_id()), 9990); - // Founder manually bestows membership on 50 and and kicks 70. + // Founder manually bestows membership on 50 and kicks 70. assert_ok!(Society::bestow_membership(Origin::signed(10), 50)); assert_eq!(members(), vec![10, 20, 30, 40, 50]); assert_eq!(candidates(), vec![60, 70]); diff --git a/substrate/primitives/npos-elections/src/reduce.rs b/substrate/primitives/npos-elections/src/reduce.rs index 3fd291f88abe..7e1ff8d978f3 100644 --- a/substrate/primitives/npos-elections/src/reduce.rs +++ b/substrate/primitives/npos-elections/src/reduce.rs @@ -319,7 +319,7 @@ fn reduce_all(assignments: &mut Vec>) -> u32 let mut tree: BTreeMap, NodeRef> = BTreeMap::new(); // NOTE: This code can heavily use an index cache. Looking up a pair of (voter, target) in the - // assignments happens numerous times and and we can save time. For now it is written as such + // assignments happens numerous times and we can save time. For now it is written as such // because abstracting some of this code into a function/closure is super hard due to borrow // checks (and most likely needs unsafe code at the end). For now I will keep it as it and // refactor later.