don't use rlua::prelude
This commit is contained in:
parent
0b09ac03d6
commit
f816aeaf6b
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user