Fix push rule precedence when converting to RulesIter

This commit is contained in:
Devin Ragotzy 2021-01-30 12:00:57 -05:00 committed by GitHub
parent bba442580d
commit 8fad462d8c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -108,10 +108,10 @@ impl Iterator for RulesetIter {
type Item = AnyPushRule;
fn next(&mut self) -> Option<Self::Item> {
self.content
self.override_
.next()
.map(|x| x.0.into())
.or_else(|| self.override_.next().map(|x| x.0.into()))
.or_else(|| self.content.next().map(|x| x.0.into()))
.or_else(|| self.room.next().map(|x| x.0.into()))
.or_else(|| self.sender.next().map(|x| x.0.into()))
.or_else(|| self.underride.next().map(|x| x.0.into()))