diff --git a/pallets/proposals/src/impls/immutable_votes.rs b/pallets/proposals/src/impls/immutable_votes.rs index da9904c7..6e8c7069 100644 --- a/pallets/proposals/src/impls/immutable_votes.rs +++ b/pallets/proposals/src/impls/immutable_votes.rs @@ -24,7 +24,7 @@ impl ImmutableIndividualVotes { .expect("milestone_keys and outer_votes have been bound by the same binding; qed"); } - Self { inner: outer_votes } + Self { votes: outer_votes } } /// Insert the vote from an individual on a milestone. @@ -34,7 +34,7 @@ impl ImmutableIndividualVotes { account_id: &AccountIdOf, vote: bool, ) -> Result<(), DispatchError> { - if let Some(votes) = self.inner.get_mut(&milestone_key) { + if let Some(votes) = self.votes.get_mut(&milestone_key) { if let Some(_existing_vote) = votes.get_mut(account_id) { return Err(Error::::VotesAreImmutable.into()); } else { @@ -53,7 +53,7 @@ impl ImmutableIndividualVotes { /// Used when a milestone is submitted. /// Skips if the milestone is not found. pub(crate) fn clear_milestone_votes(&mut self, milestone_key: MilestoneKey) { - if let Some(btree) = self.inner.get_mut(&milestone_key) { + if let Some(btree) = self.votes.get_mut(&milestone_key) { *btree = Default::default() } } @@ -61,12 +61,12 @@ impl ImmutableIndividualVotes { /// Take a mutable reference to the inner individual votes item. #[allow(dead_code)] pub(crate) fn as_mut(&mut self) -> &mut IndividualVotes { - &mut self.inner + &mut self.votes } } impl AsRef> for ImmutableIndividualVotes { fn as_ref(&self) -> &IndividualVotes { - &self.inner + &self.votes } } diff --git a/pallets/proposals/src/lib.rs b/pallets/proposals/src/lib.rs index 28d68e00..c0b77573 100644 --- a/pallets/proposals/src/lib.rs +++ b/pallets/proposals/src/lib.rs @@ -584,7 +584,7 @@ pub struct Whitelist { #[derive(Encode, Decode, PartialEq, Eq, Clone, Debug, TypeInfo, MaxEncodedLen)] #[scale_info(skip_type_params(T))] pub struct ImmutableIndividualVotes { - inner: IndividualVotes, + votes: IndividualVotes, } pub trait WeightInfoT {