diff --git a/lib/js-api/src/exports.rs b/lib/js-api/src/exports.rs index 0ada990f2..7f3f9765a 100644 --- a/lib/js-api/src/exports.rs +++ b/lib/js-api/src/exports.rs @@ -236,13 +236,13 @@ impl<'a, I> ExportsIterator<'a, I> where I: Iterator + Sized, { - // /// Get only the functions. - // pub fn functions(self) -> impl Iterator + 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 + 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 + Sized { @@ -252,21 +252,21 @@ where }) } - // /// Get only the globals. - // pub fn globals(self) -> impl Iterator + 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 + 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 + 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 + Sized { + self.iter.filter_map(|(name, export)| match export { + Extern::Table(table) => Some((name, table)), + _ => None, + }) + } } impl FromIterator<(String, Extern)> for Exports {