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

@@ -175,7 +175,7 @@ fn test_fn_ptr_raw() -> Result<(), Box<EvalAltResult>> {
TypeId::of::<INT>(),
],
move |context, args| {
let fp = std::mem::take(args[1]).cast::<FnPtr>();
let fp = args[1].take().cast::<FnPtr>();
let value = args[2].clone();
let this_ptr = args.get_mut(0).unwrap();