diff --git a/src/searcher.rs b/src/searcher.rs index 6e04ac1..12ea994 100644 --- a/src/searcher.rs +++ b/src/searcher.rs @@ -56,7 +56,7 @@ impl StaticSearcher { impl UserData for StaticSearcher { fn add_methods<'lua, M: UserDataMethods<'lua, Self>>(methods: &mut M) { methods.add_meta_method(MetaMethod::Call, |lua_ctx, this, name: String| { - match this.modules.get(&name as &str) { + match this.modules.get(&name.as_str()) { Some(content) => Ok(Value::Function( lua_ctx .load(content)