Dump more stuff in the assertion in set_font_size_dependency

This commit is contained in:
Anthony Ramine 2019-11-27 10:13:24 +01:00
parent 858bc5aca6
commit 20bde0efb3

View file

@ -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);
}