impl Extend for Ruleset

This commit is contained in:
Ana Gelez 2020-11-27 18:19:43 +01:00
parent 0e0491c02b
commit 5d988db5e7

View File

@ -138,6 +138,14 @@ macro_rules! rulekind {
}
}
impl Extend<$name> for Ruleset {
fn extend<T: IntoIterator<Item=$name>>(&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