diff --git a/src/runner/instance.rs b/src/runner/instance.rs index 396752b..d2b5d8e 100644 --- a/src/runner/instance.rs +++ b/src/runner/instance.rs @@ -403,7 +403,7 @@ impl ClassMethods<'_>{ /// return self.methods[index] or create the function in the hashmap and then return it fn get_or_create_function(&mut self,lua:&mlua::Lua,index:&str)->mlua::Result>{ Ok(match self.method_pointers.get_entry(index){ - Some((&static_index_str,function_pointer))=>Some( + Some((&static_index_str,&function_pointer))=>Some( self.methods.entry(static_index_str) .or_insert(lua.create_function(function_pointer)?) .clone()