Then cargo test simple_function_excessive_arguments:
running 1 test
test functions_write::tests::simple_function_excessive_arguments ... ok
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 72 filtered out
It doesn't fail.
I expected "wrong parameters for callback" as it's done when types you pass from Lua don't match Rust ones.
Now it seems excessive arguments are just ignored, which makes it harder to make sure Lua call sites are correct and in sync with Rust.
Paste the following test to
hlua/hlua/src/functions_write.rs
(mod tests
):Then
cargo test simple_function_excessive_arguments
:It doesn't fail.
I expected "wrong parameters for callback" as it's done when types you pass from Lua don't match Rust ones.
Now it seems excessive arguments are just ignored, which makes it harder to make sure Lua call sites are correct and in sync with Rust.