Remove extra commas made redundent after rustfmt (#9404)

* Remove extra commas made redundent after rustfmt
This commit is contained in:
Squirrel
2021-07-22 11:06:17 +01:00
committed by GitHub
parent e18f388dac
commit aafe64315a
101 changed files with 309 additions and 309 deletions
+13 -13
View File
@@ -259,13 +259,13 @@ fn rewards_should_work() {
init_balance_10 + part_for_10 * total_payout_0 * 2 / 3,
2,
);
assert_eq_error_rate!(Balances::total_balance(&11), init_balance_11, 2,);
assert_eq_error_rate!(Balances::total_balance(&11), init_balance_11, 2);
assert_eq_error_rate!(
Balances::total_balance(&20),
init_balance_20 + part_for_20 * total_payout_0 * 1 / 3,
2,
);
assert_eq_error_rate!(Balances::total_balance(&21), init_balance_21, 2,);
assert_eq_error_rate!(Balances::total_balance(&21), init_balance_21, 2);
assert_eq_error_rate!(
Balances::total_balance(&100),
init_balance_100 +
@@ -297,13 +297,13 @@ fn rewards_should_work() {
init_balance_10 + part_for_10 * (total_payout_0 * 2 / 3 + total_payout_1),
2,
);
assert_eq_error_rate!(Balances::total_balance(&11), init_balance_11, 2,);
assert_eq_error_rate!(Balances::total_balance(&11), init_balance_11, 2);
assert_eq_error_rate!(
Balances::total_balance(&20),
init_balance_20 + part_for_20 * total_payout_0 * 1 / 3,
2,
);
assert_eq_error_rate!(Balances::total_balance(&21), init_balance_21, 2,);
assert_eq_error_rate!(Balances::total_balance(&21), init_balance_21, 2);
assert_eq_error_rate!(
Balances::total_balance(&100),
init_balance_100 +
@@ -468,7 +468,7 @@ fn no_candidate_emergency_condition() {
// try trigger new era
mock::run_to_block(20);
assert_eq!(*staking_events().last().unwrap(), Event::StakingElectionFailed,);
assert_eq!(*staking_events().last().unwrap(), Event::StakingElectionFailed);
// No new era is created
assert_eq!(current_era, CurrentEra::<Test>::get());
@@ -607,7 +607,7 @@ fn nominators_also_get_slashed_pro_rata() {
let slash_percent = Perbill::from_percent(5);
let initial_exposure = Staking::eras_stakers(active_era(), 11);
// 101 is a nominator for 11
assert_eq!(initial_exposure.others.first().unwrap().who, 101,);
assert_eq!(initial_exposure.others.first().unwrap().who, 101);
// staked values;
let nominator_stake = Staking::ledger(100).unwrap().active;
@@ -639,8 +639,8 @@ fn nominators_also_get_slashed_pro_rata() {
assert!(nominator_share > 0);
// both stakes must have been decreased pro-rata.
assert_eq!(Staking::ledger(100).unwrap().active, nominator_stake - nominator_share,);
assert_eq!(Staking::ledger(10).unwrap().active, validator_stake - validator_share,);
assert_eq!(Staking::ledger(100).unwrap().active, nominator_stake - nominator_share);
assert_eq!(Staking::ledger(10).unwrap().active, validator_stake - validator_share);
assert_eq!(
balances(&101).0, // free balance
nominator_balance - nominator_share,
@@ -905,7 +905,7 @@ fn cannot_reserve_staked_balance() {
// Confirm account 11 (via controller 10) is totally staked
assert_eq!(Staking::eras_stakers(Staking::active_era().unwrap().index, 11).own, 1000);
// Confirm account 11 cannot reserve as a result
assert_noop!(Balances::reserve(&11, 1), BalancesError::<Test, _>::LiquidityRestrictions,);
assert_noop!(Balances::reserve(&11, 1), BalancesError::<Test, _>::LiquidityRestrictions);
// Give account 11 extra free balance
let _ = Balances::make_free_balance_be(&11, 10000);
@@ -1312,7 +1312,7 @@ fn rebond_works() {
assert_eq!(Staking::active_era().unwrap().index, 2);
// Try to rebond some funds. We get an error since no fund is unbonded.
assert_noop!(Staking::rebond(Origin::signed(10), 500), Error::<Test>::NoUnlockChunk,);
assert_noop!(Staking::rebond(Origin::signed(10), 500), Error::<Test>::NoUnlockChunk);
// Unbond almost all of the funds in stash.
Staking::unbond(Origin::signed(10), 900).unwrap();
@@ -2606,9 +2606,9 @@ fn slashing_nominators_by_span_max() {
let get_span = |account| <Staking as crate::Store>::SlashingSpans::get(&account).unwrap();
assert_eq!(get_span(11).iter().collect::<Vec<_>>(), expected_spans,);
assert_eq!(get_span(11).iter().collect::<Vec<_>>(), expected_spans);
assert_eq!(get_span(101).iter().collect::<Vec<_>>(), expected_spans,);
assert_eq!(get_span(101).iter().collect::<Vec<_>>(), expected_spans);
// second slash: higher era, higher value, same span.
on_offence_in_era(
@@ -3724,7 +3724,7 @@ fn cannot_rebond_to_lower_than_ed() {
);
// now bond a wee bit more
assert_noop!(Staking::rebond(Origin::signed(20), 5), Error::<Test>::InsufficientBond,);
assert_noop!(Staking::rebond(Origin::signed(20), 5), Error::<Test>::InsufficientBond);
})
}