Use .take instead of mem::take().

This commit is contained in:
Stephen Chung
2023-04-21 10:20:19 +08:00
parent 2034ddd830
commit f49ce33a88
14 changed files with 72 additions and 57 deletions

View File

@@ -67,7 +67,7 @@ impl Engine {
// Put arguments into scope as variables
scope.extend(fn_def.params.iter().cloned().zip(args.iter_mut().map(|v| {
// Actually consume the arguments instead of cloning them
mem::take(*v)
v.take()
})));
// Push a new call stack frame