Avoid warnings.

This commit is contained in:
Stephen Chung
2020-07-26 13:51:09 +08:00
parent 5e48478496
commit e7af008d74
24 changed files with 464 additions and 225 deletions

View File

@@ -166,9 +166,9 @@ fn test_fn_ptr_curry_call() -> Result<(), Box<EvalAltResult>> {
module.set_raw_fn(
"call_with_arg",
&[TypeId::of::<FnPtr>(), TypeId::of::<INT>()],
|engine: &Engine, module: &Module, args: &mut [&mut Dynamic]| {
|engine: &Engine, lib: &Module, args: &mut [&mut Dynamic]| {
let fn_ptr = std::mem::take(args[0]).cast::<FnPtr>();
fn_ptr.call_dynamic(engine, module, None, [std::mem::take(args[1])])
fn_ptr.call_dynamic(engine, lib, None, [std::mem::take(args[1])])
},
);