Use split_first_mut instead of split_at_mut.

This commit is contained in:
Stephen Chung
2020-08-18 23:19:26 +08:00
parent c5360db185
commit 6a3e123306
2 changed files with 6 additions and 6 deletions

View File

@@ -521,13 +521,13 @@ impl Engine {
let result = if _is_method {
// Method call of script function - map first argument to `this`
let (first, rest) = args.split_at_mut(1);
let (first, rest) = args.split_first_mut().unwrap();
self.call_script_fn(
scope,
mods,
state,
lib,
&mut Some(first[0]),
&mut Some(*first),
fn_name,
func,
rest,