Fix builds.

This commit is contained in:
Stephen Chung 2022-11-25 12:27:05 +08:00
parent ccc3d51e0f
commit 6db9870fb1

View File

@ -1960,9 +1960,14 @@ impl Module {
pub fn iter_script_fn_info( pub fn iter_script_fn_info(
&self, &self,
) -> impl Iterator<Item = (FnNamespace, FnAccess, &str, usize)> { ) -> impl Iterator<Item = (FnNamespace, FnAccess, &str, usize)> {
self.iter_fn() self.iter_fn().filter(|&f| f.func.is_script()).map(|f| {
.filter(|&f| f.func.is_script()) (
.map(|f| (f.namespace, f.access, f.name.as_str(), f.num_params)) f.metadata.namespace,
f.metadata.access,
f.metadata.name.as_str(),
f.metadata.num_params,
)
})
} }
/// _(internals)_ Get an iterator over all script-defined functions in the [`Module`]. /// _(internals)_ Get an iterator over all script-defined functions in the [`Module`].