Skip to content

Commit

Permalink
fix(pallet-communities): lint
Browse files Browse the repository at this point in the history
  • Loading branch information
pandres95 committed Mar 4, 2024
1 parent 03f50ed commit ff01a3a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pallets/communities/src/functions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ impl<T: Config> Pallet<T> {
poll_index: PollIndexOf<T>,
vote: VoteOf<T>,
) -> DispatchResult {
let info = T::MemberMgmt::get_membership(membership_id.clone(), &who).ok_or(Error::<T>::NotAMember)?;
let info = T::MemberMgmt::get_membership(membership_id.clone(), who).ok_or(Error::<T>::NotAMember)?;
let community_id = CommunityIdOf::<T>::from(membership_id.clone());

if VoteWeight::from(vote.clone()) == 0 {
Expand Down Expand Up @@ -165,7 +165,7 @@ impl<T: Config> Pallet<T> {
membership_id: MembershipIdOf<T>,
poll_index: PollIndexOf<T>,
) -> DispatchResult {
let info = T::MemberMgmt::get_membership(membership_id.clone(), &who).ok_or(Error::<T>::NotAMember)?;
let info = T::MemberMgmt::get_membership(membership_id.clone(), who).ok_or(Error::<T>::NotAMember)?;
let community_id = CommunityIdOf::<T>::from(membership_id.clone());

T::Polls::try_access_poll(poll_index, |poll_status| {
Expand Down
5 changes: 3 additions & 2 deletions pallets/communities/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -275,11 +275,12 @@ pub mod pallet {
pub(super) type Metadata<T: Config> =
StorageMap<_, Blake2_128Concat, CommunityIdOf<T>, CommunityMetadata, ValueQuery>;

/// Stores the count of members, managed by add_member and removefly_member
/// Stores the count of members, managed by add_member and remove_member
#[pallet::storage]
pub(super) type CommunityMembersCount<T> = StorageMap<_, Blake2_128Concat, CommunityIdOf<T>, u32, ValueQuery>;

/// Stores the sum of members' ranks, managed by promote_member and demote_member
/// Stores the sum of members' ranks, managed by promote_member and
/// demote_member
#[pallet::storage]
pub(super) type CommunityRanksSum<T> = StorageMap<_, Blake2_128Concat, CommunityIdOf<T>, u32, ValueQuery>;

Expand Down

0 comments on commit ff01a3a

Please sign in to comment.