Do not build index for multiple packages to avoid Engine creation regression.

This commit is contained in:
Stephen Chung
2020-05-08 13:27:51 +08:00
parent e6fabe58cc
commit e0745ef069
4 changed files with 52 additions and 45 deletions

View File

@@ -3,7 +3,7 @@
use crate::any::{Dynamic, Variant};
use crate::calc_fn_hash;
use crate::engine::{Engine, FnAny, FnCallArgs, FunctionsLib, ScriptedFunction};
use crate::engine::{Engine, FnAny, FnCallArgs, FunctionsLib, NativeFunction, ScriptedFunction};
use crate::parser::{FnDef, AST};
use crate::result::EvalAltResult;
use crate::scope::{Entry as ScopeEntry, EntryType as ScopeEntryType, Scope};
@@ -25,11 +25,6 @@ use crate::stdlib::{
vec::Vec,
};
#[cfg(not(feature = "sync"))]
type NativeFunction = Rc<Box<FnAny>>;
#[cfg(feature = "sync")]
type NativeFunction = Arc<Box<FnAny>>;
/// A trait that encapsulates a module resolution service.
pub trait ModuleResolver {
/// Resolve a module based on a path string.