mirror of
https://github.com/fluencelabs/wasmer
synced 2025-04-25 02:12:13 +00:00
feat(runtime-core) Implement ImportObjectIterator::size_hint
.
This commit is contained in:
parent
a4ab71ed0b
commit
5c2db568ed
@ -192,9 +192,16 @@ pub struct ImportObjectIterator {
|
|||||||
|
|
||||||
impl Iterator for ImportObjectIterator {
|
impl Iterator for ImportObjectIterator {
|
||||||
type Item = (String, String, Export);
|
type Item = (String, String, Export);
|
||||||
|
|
||||||
fn next(&mut self) -> Option<Self::Item> {
|
fn next(&mut self) -> Option<Self::Item> {
|
||||||
self.elements.pop_front()
|
self.elements.pop_front()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn size_hint(&self) -> (usize, Option<usize>) {
|
||||||
|
let len = self.elements.len();
|
||||||
|
|
||||||
|
(len, Some(len))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl IntoIterator for ImportObject {
|
impl IntoIterator for ImportObject {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user