Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
dharjeezy committed Sep 26, 2024
1 parent c0d0c19 commit 404e938
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
7 changes: 5 additions & 2 deletions substrate/frame/membership/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -376,10 +376,13 @@ impl<T: Config<I>, I: 'static> Pallet<T, I> {
fn try_state_membership() -> Result<(), sp_runtime::TryRuntimeError> {
let members = Members::<T, I>::get();
if let Some(prime) = Prime::<T, I>::get() {
ensure!(members.contains(&prime),"`Prime` must be a member of `Members` in storage");
ensure!(members.contains(&prime), "`Prime` must be a member of `Members` in storage");
}

ensure!(members.len() <= T::MaxMembers::get() as usize, "`Member` cannot be greater than `MaxMember`");
ensure!(
members.len() <= T::MaxMembers::get() as usize,
"`Member` cannot be greater than `MaxMember`"
);
Ok(())
}
}
Expand Down
5 changes: 2 additions & 3 deletions substrate/frame/membership/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ impl ExtBuilder {
members: bounded_vec![10, 20, 30],
..Default::default()
}
.assimilate_storage(&mut t)
.unwrap();
.assimilate_storage(&mut t)
.unwrap();
t.into()
}

Expand All @@ -122,7 +122,6 @@ impl ExtBuilder {
}
}


#[cfg(feature = "runtime-benchmarks")]
pub(crate) fn new_bench_ext() -> sp_io::TestExternalities {
frame_system::GenesisConfig::<Test>::default().build_storage().unwrap().into()
Expand Down

0 comments on commit 404e938

Please sign in to comment.