From 72244b74cd0078126e4c5f229ffc47210004e16e Mon Sep 17 00:00:00 2001 From: Stephen Chung Date: Wed, 14 Sep 2022 15:11:37 +0800 Subject: [PATCH] Remove redirection in functions hash map. --- src/module/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/module/mod.rs b/src/module/mod.rs index bbff05d5..73f925f8 100644 --- a/src/module/mod.rs +++ b/src/module/mod.rs @@ -178,7 +178,7 @@ pub struct Module { /// Flattened collection of all [`Module`] variables, including those in sub-modules. all_variables: Option>, /// Functions (both native Rust and scripted). - functions: StraightHashMap>, + functions: StraightHashMap, /// Flattened collection of all functions, native Rust and scripted. /// including those in sub-modules. all_functions: Option>, @@ -1846,7 +1846,7 @@ impl Module { #[inline] #[allow(dead_code)] pub(crate) fn iter_fn(&self) -> impl Iterator { - self.functions.values().map(<_>::as_ref) + self.functions.values() } /// Get an iterator over all script-defined functions in the [`Module`].