Skip to content

Commit

Permalink
Derive default
Browse files Browse the repository at this point in the history
  • Loading branch information
neekolas committed Feb 22, 2024
1 parent 14bbdf3 commit f3cebcf
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions xmtp_mls/src/groups/group_permissions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -345,8 +345,9 @@ pub(crate) fn policy_group_creator_is_admin() -> PolicySet {
)
}

#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, PartialEq, Default)]
pub enum PreconfiguredPolicies {
#[default]
EveryoneIsAdmin,
GroupCreatorIsAdmin,
}
Expand All @@ -370,12 +371,6 @@ impl PreconfiguredPolicies {
}
}

impl Default for PreconfiguredPolicies {
fn default() -> Self {
PreconfiguredPolicies::EveryoneIsAdmin
}
}

impl std::fmt::Display for PreconfiguredPolicies {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
write!(f, "{:?}", self)
Expand Down

0 comments on commit f3cebcf

Please sign in to comment.