aboutsummaryrefslogtreecommitdiffstats
path: root/components/style/rule_cache.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/style/rule_cache.rs')
-rw-r--r--components/style/rule_cache.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/components/style/rule_cache.rs b/components/style/rule_cache.rs
index 24039fb94f7..117f63f9ea2 100644
--- a/components/style/rule_cache.rs
+++ b/components/style/rule_cache.rs
@@ -26,7 +26,9 @@ pub struct RuleCacheConditions {
impl RuleCacheConditions {
/// Sets the style as depending in the font-size value.
pub fn set_font_size_dependency(&mut self, font_size: NonNegativeLength) {
- debug_assert!(self.font_size.map_or(true, |f| f == font_size));
+ if let Some(f) = &self.font_size {
+ debug_assert_eq!(*f, font_size);
+ }
self.font_size = Some(font_size);
}