From f48328edfe06003d86c79f331a7fa6541b78d819 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Sun, 29 Jan 2017 03:02:39 +0100 Subject: [PATCH] style: Remove a bit of unused code. --- components/style/stylist.rs | 33 --------------------------------- 1 file changed, 33 deletions(-) diff --git a/components/style/stylist.rs b/components/style/stylist.rs index 5530bd98554..3d81e3897bc 100644 --- a/components/style/stylist.rs +++ b/components/style/stylist.rs @@ -1151,39 +1151,6 @@ impl ApplicableDeclarationBlock { } } -/// An iterator over the declarations that a given block represent, which is -/// effectively a filter by importance. -pub struct ApplicableDeclarationBlockIter<'a> { - iter: slice::Iter<'a, (PropertyDeclaration, Importance)>, - importance: Importance, -} - -impl<'a> Iterator for ApplicableDeclarationBlockIter<'a> { - type Item = &'a PropertyDeclaration; - - #[inline] - fn next(&mut self) -> Option { - while let Some(&(ref declaration, importance)) = self.iter.next() { - if importance == self.importance { - return Some(declaration) - } - } - None - } -} - -impl<'a> DoubleEndedIterator for ApplicableDeclarationBlockIter<'a> { - #[inline] - fn next_back(&mut self) -> Option { - while let Some(&(ref declaration, importance)) = self.iter.next_back() { - if importance == self.importance { - return Some(declaration) - } - } - None - } -} - #[inline] fn find_push(map: &mut FnvHashMap>, key: Str, value: Rule) {