diff --git a/src/searcher.rs b/src/searcher.rs index e415d12..aa4a16d 100644 --- a/src/searcher.rs +++ b/src/searcher.rs @@ -1,4 +1,3 @@ -use rlua::prelude::LuaError; use rlua::{Context, Function, MetaMethod, RegistryKey, Table, UserData, UserDataMethods, Value}; use std::collections::HashMap; use std::fs::File; @@ -270,9 +269,9 @@ impl<'a> AddSearcher for Context<'a> { let transform = Box::new(|path| { let mut content = String::new(); let mut file = File::open(path) - .map_err(|e| LuaError::RuntimeError(format!("io error: {:#?}", e)))?; + .map_err(|e| rlua::Error::RuntimeError(format!("io error: {:#?}", e)))?; file.read_to_string(&mut content) - .map_err(|e| LuaError::RuntimeError(format!("io error: {:#?}", e)))?; + .map_err(|e| rlua::Error::RuntimeError(format!("io error: {:#?}", e)))?; Ok(content) }); self.add_path_searcher_poly(modules, transform)