Replies: 2 comments
-
Related but the other way around: creating a function that doesn't take args at #253. |
Beta Was this translation helpful? Give feedback.
0 replies
-
After some hacking it seems a way to do this is to us unit types for all fields: init.call::<(), ()>(()).unwrap(); I'm not sure if that's the best way, so if anybody has something better to suggest I'd love to hear it. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is there any way to use
mlua::Function::call()
(or any other of thecall()
variants) without passing an arguments? I have a function handle already fetched out of a table (that is intended for use as a function not a method) and I had in mind to call it like this:All I get is the compiler yelling at me about not passing args:
On the one had I can understand it's point about wanting type signatures for input arguments and return values, but what if I don't want either?
I know I can fudge this with:
But I was expecting something else and am wondering if I am misunderstanding or missing something.
Beta Was this translation helpful? Give feedback.
All reactions