From 94458de56efa7f0430daaadf64ad17212496821c Mon Sep 17 00:00:00 2001 From: peicuiping Date: Sat, 4 May 2024 18:21:00 +0800 Subject: [PATCH] chore: fix some comments Signed-off-by: peicuiping --- libs/traits/src/lib.rs | 2 +- libs/traits/src/swaps.rs | 2 +- pallets/liquidity-pools/src/lib.rs | 2 +- pallets/pool-fees/src/lib.rs | 2 +- pallets/pool-system/src/solution.rs | 2 +- pallets/pool-system/src/tranches.rs | 4 ++-- runtime/integration-tests/src/generic/cases/block_rewards.rs | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/libs/traits/src/lib.rs b/libs/traits/src/lib.rs index be11870b37..4d425cd891 100644 --- a/libs/traits/src/lib.rs +++ b/libs/traits/src/lib.rs @@ -66,7 +66,7 @@ pub mod benchmarking; /// ## Overview /// The crowdloan reward mechanism is separated from the crowdloan claiming /// process, the latter being generic, acting as a kind of proxy to the -/// rewarding mechanism, that is specific to to each crowdloan campaign. The aim +/// rewarding mechanism, that is specific to each crowdloan campaign. The aim /// of this pallet is to ensure that a claim for a reward payout is well-formed, /// checking for replay attacks, spams or invalid claim (e.g. unknown /// contributor, exceeding reward amount, ...). diff --git a/libs/traits/src/swaps.rs b/libs/traits/src/swaps.rs index 05d77e54c5..8e9358eb89 100644 --- a/libs/traits/src/swaps.rs +++ b/libs/traits/src/swaps.rs @@ -160,7 +160,7 @@ pub trait Swaps { ) -> Result, DispatchError>; /// Cancel a swap partially or completely. The amount should be expressed in - /// the same currency as the the currency_out of the pending amount. + /// the same currency as the currency_out of the pending amount. /// - If there was no previous swap, it errors outs. /// - If there was a swap with other currency out, it errors outs. /// - If there was a swap with same currency out: diff --git a/pallets/liquidity-pools/src/lib.rs b/pallets/liquidity-pools/src/lib.rs index 1041ca87c4..d3941ddcb0 100644 --- a/pallets/liquidity-pools/src/lib.rs +++ b/pallets/liquidity-pools/src/lib.rs @@ -857,7 +857,7 @@ pub mod pallet { Ok(general_index.index) } - /// Returns the local currency identifier from from its general index. + /// Returns the local currency identifier from its general index. /// /// Requires the currency to be registered in the `AssetRegistry`. /// diff --git a/pallets/pool-fees/src/lib.rs b/pallets/pool-fees/src/lib.rs index 5e1f4f2c0f..6d9c5cd246 100644 --- a/pallets/pool-fees/src/lib.rs +++ b/pallets/pool-fees/src/lib.rs @@ -546,7 +546,7 @@ pub mod pallet { }) } - /// Return the the last fee id and bump it for the next query + /// Return the last fee id and bump it for the next query pub(crate) fn generate_fee_id() -> Result { LastFeeId::::try_mutate(|last_fee_id| { last_fee_id.ensure_add_assign(One::one())?; diff --git a/pallets/pool-system/src/solution.rs b/pallets/pool-system/src/solution.rs index a22a73656f..abcc9bcd38 100644 --- a/pallets/pool-system/src/solution.rs +++ b/pallets/pool-system/src/solution.rs @@ -70,7 +70,7 @@ impl PoolState { /// Removes an unhealthy state /// /// * If the state was not present yet, it will not be removed, - /// it it was present if will be removed. + /// if it was present it will be removed. /// /// * If there are no more unhealthy states, the state will /// be switched to healthy diff --git a/pallets/pool-system/src/tranches.rs b/pallets/pool-system/src/tranches.rs index ff285ecc02..89645c96c3 100644 --- a/pallets/pool-system/src/tranches.rs +++ b/pallets/pool-system/src/tranches.rs @@ -2065,7 +2065,7 @@ pub mod test { fn replace_tranche_less_interest_than_next_works() { let mut tranches = default_tranches(); - // ensure we have an interest rate lower than the the left side tranche with a + // ensure we have an interest rate lower than the left side tranche with a // lower index, e.g. lower than 10% at index 1 let int_per_sec = Rate::one() / Rate::saturating_from_integer(SECS_PER_YEAR); let min_risk_buffer = Perquintill::from_rational(4u64, 5); @@ -2145,7 +2145,7 @@ pub mod test { let mut tranches = default_tranches(); let min_risk_buffer = Perquintill::from_rational(4u64, 5); - // ensure we have an interest rate larger than the the right-side tranche with a + // ensure we have an interest rate larger than the right-side tranche with a // greater index, e.g. larger than 5% at index 2 let int_per_sec = Rate::saturating_from_rational(6u64, 100) / Rate::saturating_from_integer(SECS_PER_YEAR) diff --git a/runtime/integration-tests/src/generic/cases/block_rewards.rs b/runtime/integration-tests/src/generic/cases/block_rewards.rs index 48fb58ca6b..d94b8503a5 100644 --- a/runtime/integration-tests/src/generic/cases/block_rewards.rs +++ b/runtime/integration-tests/src/generic/cases/block_rewards.rs @@ -138,7 +138,7 @@ fn apply_and_check_session( // The event exists in this list: dbg!(frame_system::Pallet::::events()) - // But not in in this list (that is the implementation of find_event()), + // But not in this list (that is the implementation of find_event()), // so try_into returns an Err for it. dbg!(frame_system::Pallet::::events() .into_iter()