From 20bde0efb3b3264dbe9a58725c96e6cd4c33b1f9 Mon Sep 17 00:00:00 2001 From: Anthony Ramine Date: Wed, 27 Nov 2019 10:13:24 +0100 Subject: [PATCH] Dump more stuff in the assertion in set_font_size_dependency --- components/style/rule_cache.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); }