mirror of
https://github.com/fluencelabs/wasmer
synced 2024-12-05 02:20:19 +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 {
|
||||
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 {
|
||||
|
Loading…
Reference in New Issue
Block a user