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

@@ -133,12 +133,11 @@ macro_rules! make_func {
Box::new(move |_: &Engine, _: &Module, args: &mut FnCallArgs| {
// The arguments are assumed to be of the correct number and types!
#[allow(unused_variables, unused_mut)]
let mut drain = args.iter_mut();
let mut _drain = args.iter_mut();
$(
// Downcast every element, panic in case of a type mismatch (which shouldn't happen).
// Call the user-supplied function using ($convert) to access it either by value or by reference.
let $par = ($convert)(drain.next().unwrap());
let $par = ($convert)(_drain.next().unwrap());
)*
// Call the function with each parameter value