Minor refactor.
This commit is contained in:
@@ -178,7 +178,7 @@ impl Engine {
|
||||
#[cfg(not(feature = "no_closure"))]
|
||||
crate::func::call::ensure_no_data_race(name, &mut args, false)?;
|
||||
|
||||
let result = self.call_script_fn(
|
||||
self.call_script_fn(
|
||||
scope,
|
||||
global,
|
||||
state,
|
||||
@@ -189,8 +189,6 @@ impl Engine {
|
||||
rewind_scope,
|
||||
Position::NONE,
|
||||
0,
|
||||
);
|
||||
|
||||
result
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@@ -227,9 +227,9 @@ impl Engine {
|
||||
ast.as_ref(),
|
||||
];
|
||||
let lib = if lib.first().map(|m: &&Module| m.is_empty()).unwrap_or(true) {
|
||||
&lib[0..0]
|
||||
&[]
|
||||
} else {
|
||||
&lib
|
||||
&lib[..]
|
||||
};
|
||||
self.eval_global_statements(scope, global, &mut state, statements, lib, level)
|
||||
}
|
||||
|
Reference in New Issue
Block a user