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
+4 -4
View File
@@ -694,7 +694,7 @@ pub mod pallet {
#[pallet::compact] index: VoteIndex,
) -> DispatchResult {
let who = ensure_signed(origin)?;
ensure!(!total.is_zero(), Error::<T>::ZeroDeposit,);
ensure!(!total.is_zero(), Error::<T>::ZeroDeposit);
let candidate = T::Lookup::lookup(candidate)?;
ensure!(index == Self::vote_index(), Error::<T>::InvalidVoteIndex);
@@ -711,7 +711,7 @@ pub mod pallet {
ensure!(total > leaderboard[0].0, Error::<T>::UnworthyCandidate);
if let Some(p) = Self::members().iter().position(|&(ref c, _)| c == &candidate) {
ensure!(p < expiring.len(), Error::<T>::DuplicatedCandidate,);
ensure!(p < expiring.len(), Error::<T>::DuplicatedCandidate);
}
let voters = Self::all_voters();
@@ -916,12 +916,12 @@ impl<T: Config> Pallet<T> {
ensure!(!Self::presentation_active(), Error::<T>::ApprovalPresentation);
ensure!(index == Self::vote_index(), Error::<T>::InvalidVoteIndex);
ensure!(!candidates_len.is_zero(), Error::<T>::ZeroCandidates,);
ensure!(!candidates_len.is_zero(), Error::<T>::ZeroCandidates);
// Prevent a vote from voters that provide a list of votes that exceeds the candidates
// length since otherwise an attacker may be able to submit a very long list of `votes` that
// far exceeds the amount of candidates and waste more computation than a reasonable voting
// bond would cover.
ensure!(candidates_len >= votes.len(), Error::<T>::TooManyVotes,);
ensure!(candidates_len >= votes.len(), Error::<T>::TooManyVotes);
ensure!(value >= T::MinimumVotingLock::get(), Error::<T>::InsufficientLockedValue);
// Amount to be locked up.