Fix no_module build.

This commit is contained in:
Stephen Chung 2022-11-04 22:00:21 +08:00
parent 470af6af71
commit 54aa89515e
2 changed files with 4 additions and 3 deletions

View File

@ -68,7 +68,9 @@ impl Engine {
self.search_scope_only(global, caches, lib, level, scope, this_ptr, expr) self.search_scope_only(global, caches, lib, level, scope, this_ptr, expr)
} }
#[cfg(feature = "no_module")] #[cfg(feature = "no_module")]
(_, (), ..) => self.search_scope_only(scope, global, lib, this_ptr, expr), (_, (), ..) => {
self.search_scope_only(global, caches, lib, level, scope, this_ptr, expr)
}
// Qualified variable access // Qualified variable access
#[cfg(not(feature = "no_module"))] #[cfg(not(feature = "no_module"))]

View File

@ -3,7 +3,6 @@
#[cfg(feature = "metadata")] #[cfg(feature = "metadata")]
use crate::api::type_names::format_type; use crate::api::type_names::format_type;
use crate::ast::FnAccess; use crate::ast::FnAccess;
use crate::eval::Caches;
use crate::func::{ use crate::func::{
shared_take_or_clone, CallableFunction, FnCallArgs, IteratorFn, RegisterNativeFunction, shared_take_or_clone, CallableFunction, FnCallArgs, IteratorFn, RegisterNativeFunction,
SendSync, SendSync,
@ -1985,7 +1984,7 @@ impl Module {
let orig_constants = std::mem::take(&mut global.constants); let orig_constants = std::mem::take(&mut global.constants);
// Run the script // Run the script
let caches = &mut Caches::new(); let caches = &mut crate::eval::Caches::new();
let result = engine.eval_ast_with_scope_raw(global, caches, 0, &mut scope, ast); let result = engine.eval_ast_with_scope_raw(global, caches, 0, &mut scope, ast);