diff options
Diffstat (limited to 'components/style/stylesheet_set.rs')
-rw-r--r-- | components/style/stylesheet_set.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/components/style/stylesheet_set.rs b/components/style/stylesheet_set.rs index 386cc31c99f..104ada57783 100644 --- a/components/style/stylesheet_set.rs +++ b/components/style/stylesheet_set.rs @@ -90,6 +90,20 @@ where } } +#[cfg(debug_assertions)] +impl<'a, 'b, S> Drop for StylesheetFlusher<'a, 'b, S> +where + 'b: 'a, + S: StylesheetInDocument + PartialEq + 'static, +{ + fn drop(&mut self) { + debug_assert!( + self.iter.next().is_none(), + "You're supposed to fully consume the flusher", + ); + } +} + impl<'a, 'b, S> Iterator for StylesheetFlusher<'a, 'b, S> where 'b: 'a, |