Skip to content

Commit

Permalink
Dump more stuff in the assertion in set_font_size_dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
nox committed Nov 27, 2019
1 parent 858bc5a commit 20bde0e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion components/style/rule_cache.rs
Expand Up @@ -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);
}

Expand Down

0 comments on commit 20bde0e

Please sign in to comment.