-
Notifications
You must be signed in to change notification settings - Fork 155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How can we improve map_callback_return_to_option_ms
?
#639
Comments
See the line pointing to #391. There are two links:
The first link points to the code used in the So the second link shows a compile-time alternative to the whole The motivation for multiple return types was Note: The generic parameter Hope it helps! I'm not very proud to have such code in the code base, I hope there'll be a better solution. |
I'll get the |
It happens to me again and again that I stumble over the following runtime error:
Cmds can return only Msg, Option<Msg> or ()!
The cause is in the
map_callback_return_to_option_ms!
macro.It would be great if we were able to catch this errors at compile time.
I know very little about macros, so can someone help to explain how that could be improved?
The text was updated successfully, but these errors were encountered: