diff --git a/ruma-common/src/push/any_push_rule.rs b/ruma-common/src/push/any_push_rule.rs index e6930d1c..68517d5b 100644 --- a/ruma-common/src/push/any_push_rule.rs +++ b/ruma-common/src/push/any_push_rule.rs @@ -37,28 +37,21 @@ pub struct AnyPushRule { impl From for AnyPushRule { fn from(push_rule: PushRule) -> Self { let PushRule { actions, default, enabled, rule_id } = push_rule; - AnyPushRule { actions, default, enabled, rule_id, pattern: None, conditions: None } + Self { actions, default, enabled, rule_id, conditions: None, pattern: None } } } impl From for AnyPushRule { fn from(push_rule: PatternedPushRule) -> Self { let PatternedPushRule { actions, default, enabled, rule_id, pattern } = push_rule; - AnyPushRule { actions, default, enabled, rule_id, pattern: Some(pattern), conditions: None } + Self { actions, default, enabled, rule_id, conditions: None, pattern: Some(pattern) } } } impl From for AnyPushRule { fn from(push_rule: ConditionalPushRule) -> Self { let ConditionalPushRule { actions, default, enabled, rule_id, conditions } = push_rule; - AnyPushRule { - actions, - default, - enabled, - rule_id, - pattern: None, - conditions: Some(conditions), - } + Self { actions, default, enabled, rule_id, conditions: Some(conditions), pattern: None } } }