Minor refactor.

This commit is contained in:
Stephen Chung
2022-06-09 08:41:51 +08:00
parent e5f6b28abd
commit 285bf23dfa
3 changed files with 13 additions and 22 deletions

View File

@@ -162,7 +162,7 @@ impl Engine {
) -> RhaiResult {
let mut arg_values = arg_values;
self.call_fn_internal(
self._call_fn(
scope,
&mut GlobalRuntimeState::new(self),
&mut Caches::new(),
@@ -215,7 +215,7 @@ impl Engine {
this_ptr: Option<&mut Dynamic>,
arg_values: &mut [Dynamic],
) -> RhaiResult {
self.call_fn_internal(
self._call_fn(
scope,
global,
caches,
@@ -228,7 +228,7 @@ impl Engine {
)
}
/// Call a script function defined in an [`AST`] with multiple [`Dynamic`] arguments.
fn call_fn_internal(
fn _call_fn(
&self,
scope: &mut Scope,
global: &mut GlobalRuntimeState,