From 5d988db5e7c506d95a65141878f7c56b4da21308 Mon Sep 17 00:00:00 2001 From: Ana Gelez Date: Fri, 27 Nov 2020 18:19:43 +0100 Subject: [PATCH] impl Extend for Ruleset --- ruma-common/src/push.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ruma-common/src/push.rs b/ruma-common/src/push.rs index 96e7e51f..9f06740d 100644 --- a/ruma-common/src/push.rs +++ b/ruma-common/src/push.rs @@ -138,6 +138,14 @@ macro_rules! rulekind { } } + impl Extend<$name> for Ruleset { + fn extend>(&mut self, iter: T) { + for rule in iter { + rule.add_to(self); + } + } + } + // The following trait are needed to be able to make // a BTreeSet of the new type