From 8fad462d8c4ba5ad4ab1b645ea13cef7f5f6ba3a Mon Sep 17 00:00:00 2001 From: Devin Ragotzy Date: Sat, 30 Jan 2021 12:00:57 -0500 Subject: [PATCH] Fix push rule precedence when converting to RulesIter --- ruma-common/src/push.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ruma-common/src/push.rs b/ruma-common/src/push.rs index fae24e41..92200a7e 100644 --- a/ruma-common/src/push.rs +++ b/ruma-common/src/push.rs @@ -108,10 +108,10 @@ impl Iterator for RulesetIter { type Item = AnyPushRule; fn next(&mut self) -> Option { - 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()))