rm superfluous lifetime annotation

This commit is contained in:
Andy Weidenbaum 2021-02-04 15:30:06 +11:00
parent d74b008050
commit a7c9fbdba8

View File

@ -41,14 +41,14 @@ impl UserData for Searcher {
}
/// Extend `rlua::Context` to support `require`ing Lua modules by name.
pub trait AddSearcher<'a> {
pub trait AddSearcher {
/// Add a `HashMap` of Lua modules indexed by module name to Luas
/// `package.searchers` table in an `rlua::Context`, with lookup
/// functionality provided by the `rlua_searcher::Searcher` struct.
fn add_searcher(&self, modules: HashMap<String, String>) -> Result<()>;
}
impl<'a> AddSearcher<'a> for Context<'a> {
impl<'a> AddSearcher for Context<'a> {
fn add_searcher(&self, modules: HashMap<String, String>) -> Result<()> {
let globals = self.globals();
let searchers: Table = globals.get::<_, Table>("package")?.get("searchers")?;