mirror of
https://github.com/mii443/wasmer.git
synced 2025-12-09 14:18:20 +00:00
Uncomment code
This commit is contained in:
@@ -236,13 +236,13 @@ impl<'a, I> ExportsIterator<'a, I>
|
||||
where
|
||||
I: Iterator<Item = (&'a String, &'a Extern)> + Sized,
|
||||
{
|
||||
// /// Get only the functions.
|
||||
// pub fn functions(self) -> impl Iterator<Item = (&'a String, &'a Function)> + Sized {
|
||||
// self.iter.filter_map(|(name, export)| match export {
|
||||
// Extern::Function(function) => Some((name, function)),
|
||||
// _ => None,
|
||||
// })
|
||||
// }
|
||||
/// Get only the functions.
|
||||
pub fn functions(self) -> impl Iterator<Item = (&'a String, &'a Function)> + Sized {
|
||||
self.iter.filter_map(|(name, export)| match export {
|
||||
Extern::Function(function) => Some((name, function)),
|
||||
_ => None,
|
||||
})
|
||||
}
|
||||
|
||||
/// Get only the memories.
|
||||
pub fn memories(self) -> impl Iterator<Item = (&'a String, &'a Memory)> + Sized {
|
||||
@@ -252,21 +252,21 @@ where
|
||||
})
|
||||
}
|
||||
|
||||
// /// Get only the globals.
|
||||
// pub fn globals(self) -> impl Iterator<Item = (&'a String, &'a Global)> + Sized {
|
||||
// self.iter.filter_map(|(name, export)| match export {
|
||||
// Extern::Global(global) => Some((name, global)),
|
||||
// _ => None,
|
||||
// })
|
||||
// }
|
||||
/// Get only the globals.
|
||||
pub fn globals(self) -> impl Iterator<Item = (&'a String, &'a Global)> + Sized {
|
||||
self.iter.filter_map(|(name, export)| match export {
|
||||
Extern::Global(global) => Some((name, global)),
|
||||
_ => None,
|
||||
})
|
||||
}
|
||||
|
||||
// /// Get only the tables.
|
||||
// pub fn tables(self) -> impl Iterator<Item = (&'a String, &'a Table)> + Sized {
|
||||
// self.iter.filter_map(|(name, export)| match export {
|
||||
// Extern::Table(table) => Some((name, table)),
|
||||
// _ => None,
|
||||
// })
|
||||
// }
|
||||
/// Get only the tables.
|
||||
pub fn tables(self) -> impl Iterator<Item = (&'a String, &'a Table)> + Sized {
|
||||
self.iter.filter_map(|(name, export)| match export {
|
||||
Extern::Table(table) => Some((name, table)),
|
||||
_ => None,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
impl FromIterator<(String, Extern)> for Exports {
|
||||
|
||||
Reference in New Issue
Block a user