feat(runtime-core) Implement ImportObjectIterator::size_hint.

This commit is contained in:
Ivan Enderlin 2020-04-28 16:32:20 +02:00
parent a4ab71ed0b
commit 5c2db568ed

View File

@ -192,9 +192,16 @@ pub struct ImportObjectIterator {
impl Iterator for ImportObjectIterator {
type Item = (String, String, Export);
fn next(&mut self) -> Option<Self::Item> {
self.elements.pop_front()
}
fn size_hint(&self) -> (usize, Option<usize>) {
let len = self.elements.len();
(len, Some(len))
}
}
impl IntoIterator for ImportObject {