Remove clone.
This commit is contained in:
parent
1e21a7f7e7
commit
54d5b29390
@ -886,20 +886,18 @@ impl Engine {
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
let (fn_name, fn_curry) = fn_ptr.cast::<FnPtr>().take_data();
|
let (fn_name, mut fn_curry) = fn_ptr.cast::<FnPtr>().take_data();
|
||||||
|
|
||||||
let mut curry = fn_curry.clone();
|
|
||||||
|
|
||||||
// Append the new curried arguments to the existing list.
|
// Append the new curried arguments to the existing list.
|
||||||
args_expr
|
args_expr
|
||||||
.iter()
|
.iter()
|
||||||
.skip(1)
|
.skip(1)
|
||||||
.try_for_each(|expr| -> Result<(), Box<EvalAltResult>> {
|
.try_for_each(|expr| -> Result<(), Box<EvalAltResult>> {
|
||||||
curry.push(self.eval_expr(scope, mods, state, lib, this_ptr, expr, level)?);
|
fn_curry.push(self.eval_expr(scope, mods, state, lib, this_ptr, expr, level)?);
|
||||||
Ok(())
|
Ok(())
|
||||||
})?;
|
})?;
|
||||||
|
|
||||||
return Ok(FnPtr::new_unchecked(fn_name, curry).into());
|
return Ok(FnPtr::new_unchecked(fn_name, fn_curry).into());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handle is_shared()
|
// Handle is_shared()
|
||||||
|
Loading…
Reference in New Issue
Block a user