Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Prev Previous commit
Next Next commit
adjust comments and return length
  • Loading branch information
apopiak committed May 12, 2020
commit 3a9fabb4401c71b34e083bee588d1f3e96ffaea7
4 changes: 2 additions & 2 deletions frame/collective/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ impl<T: Trait<I>, I: Instance> ChangeMembers<T::AccountId> for Module<T, I> {
_incoming: &[T::AccountId],
outgoing: &[T::AccountId],
new: &[T::AccountId],
) {
) -> usize {
// remove accounts from all current voting in motions.
let mut outgoing = outgoing.to_vec();
outgoing.sort_unstable();
Expand All @@ -402,7 +402,7 @@ impl<T: Trait<I>, I: Instance> ChangeMembers<T::AccountId> for Module<T, I> {
}
Members::<T, I>::put(new);
Prime::<T, I>::kill();
length
new.len()
}

fn set_prime(prime: Option<T::AccountId>) {
Expand Down
6 changes: 3 additions & 3 deletions frame/support/src/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -956,7 +956,7 @@ pub trait ChangeMembers<AccountId: Clone + Ord, MembersCount = usize> {
///
/// This resets any previous value of prime.
///
/// Returns the actual number of members set. This may differ from `new.len()` for example
/// Returns the actual number of members set. This may differ from `new.len()`
/// if there are errors. Use `ensure_can_change_members` to check for those beforehand.
fn change_members(
incoming: &[AccountId],
Expand All @@ -975,7 +975,7 @@ pub trait ChangeMembers<AccountId: Clone + Ord, MembersCount = usize> {
///
/// This resets any previous value of prime.
///
/// Returns the actual number of members set. This may differ from `new.len()` for example
/// Returns the actual number of members set. This may differ from `sorted_new.len()`
/// if there are errors. Use `ensure_can_change_members` to check for those beforehand.
fn change_members_sorted(
incoming: &[AccountId],
Expand All @@ -988,7 +988,7 @@ pub trait ChangeMembers<AccountId: Clone + Ord, MembersCount = usize> {
///
/// This resets any previous value of prime.
///
/// Returns the actual number of members set. This may differ from `new.len()` for example
/// Returns the actual number of members set. This may differ from `new_members.len()`
/// if there are errors. Use `ensure_can_change_members` to check for those beforehand.
fn set_members_sorted(
new_members: &[AccountId],
Expand Down