diff --git a/src/searcher.rs b/src/searcher.rs index e19b9e8..b263682 100644 --- a/src/searcher.rs +++ b/src/searcher.rs @@ -1,6 +1,7 @@ use rlua::prelude::LuaError; use rlua::{Context, MetaMethod, RegistryKey, Table, UserData, UserDataMethods, Value}; use std::collections::HashMap; +use std::fs::File; use std::io::Read; use std::path::Path; @@ -108,7 +109,7 @@ where }; let mut content = String::new(); - let mut file = std::fs::File::open(path) + let mut file = File::open(path) .map_err(|e| LuaError::RuntimeError(format!("io error: {:#?}", e)))?; file.read_to_string(&mut content) .map_err(|e| LuaError::RuntimeError(format!("io error: {:#?}", e)))?;