From ff01a3ab4e3f22e007fb590258b9cdad6c1e23d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Andr=C3=A9s=20Dorado=20Su=C3=A1rez?= Date: Sat, 10 Feb 2024 07:23:42 -0500 Subject: [PATCH] fix(pallet-communities): lint --- pallets/communities/src/functions.rs | 4 ++-- pallets/communities/src/lib.rs | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/pallets/communities/src/functions.rs b/pallets/communities/src/functions.rs index 3e39eea4..9962c6b9 100644 --- a/pallets/communities/src/functions.rs +++ b/pallets/communities/src/functions.rs @@ -83,7 +83,7 @@ impl Pallet { poll_index: PollIndexOf, vote: VoteOf, ) -> DispatchResult { - let info = T::MemberMgmt::get_membership(membership_id.clone(), &who).ok_or(Error::::NotAMember)?; + let info = T::MemberMgmt::get_membership(membership_id.clone(), who).ok_or(Error::::NotAMember)?; let community_id = CommunityIdOf::::from(membership_id.clone()); if VoteWeight::from(vote.clone()) == 0 { @@ -165,7 +165,7 @@ impl Pallet { membership_id: MembershipIdOf, poll_index: PollIndexOf, ) -> DispatchResult { - let info = T::MemberMgmt::get_membership(membership_id.clone(), &who).ok_or(Error::::NotAMember)?; + let info = T::MemberMgmt::get_membership(membership_id.clone(), who).ok_or(Error::::NotAMember)?; let community_id = CommunityIdOf::::from(membership_id.clone()); T::Polls::try_access_poll(poll_index, |poll_status| { diff --git a/pallets/communities/src/lib.rs b/pallets/communities/src/lib.rs index 889eab6b..922e536e 100644 --- a/pallets/communities/src/lib.rs +++ b/pallets/communities/src/lib.rs @@ -275,11 +275,12 @@ pub mod pallet { pub(super) type Metadata = StorageMap<_, Blake2_128Concat, CommunityIdOf, 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 = StorageMap<_, Blake2_128Concat, CommunityIdOf, 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 = StorageMap<_, Blake2_128Concat, CommunityIdOf, u32, ValueQuery>;