aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/servoparser/mod.rs
diff options
context:
space:
mode:
authorCorey Farwell <coreyf@rwell.org>2017-09-13 20:23:58 -0400
committerCorey Farwell <coreyf@rwell.org>2017-09-13 20:29:27 -0400
commit9cd45353648bb18a432d5d682c835cfe1af7a1ea (patch)
tree1093c9faf8164a72f89cf335970d0a61a887b1dd /components/script/dom/servoparser/mod.rs
parentcad3aff508fdf47036237ead519791f180e1ea3d (diff)
downloadservo-9cd45353648bb18a432d5d682c835cfe1af7a1ea.tar.gz
servo-9cd45353648bb18a432d5d682c835cfe1af7a1ea.zip
Implement `size_hint` for more iterators.
``` implement size hint for more iterators because why not we like fast things ```
Diffstat (limited to 'components/script/dom/servoparser/mod.rs')
-rw-r--r--components/script/dom/servoparser/mod.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/components/script/dom/servoparser/mod.rs b/components/script/dom/servoparser/mod.rs
index 241179ed624..d0e08664e73 100644
--- a/components/script/dom/servoparser/mod.rs
+++ b/components/script/dom/servoparser/mod.rs
@@ -487,6 +487,10 @@ impl<I> Iterator for FragmentParsingResult<I>
next.remove_self();
Some(next)
}
+
+ fn size_hint(&self) -> (usize, Option<usize>) {
+ self.inner.size_hint()
+ }
}
#[derive(HeapSizeOf, JSTraceable, PartialEq)]