-
-
Notifications
You must be signed in to change notification settings - Fork 75
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
feature req: defmt::expect! macro like unwrap! #867
Comments
It would be useful indeed. Are you interested in implementing it? |
I'll have a go at it, not familiar with the internals of defmt however since there is a copypaste-ready implementation and I can have a look at |
So I had a quick look at noticed that So this seems to be more an issue of discoverability then missing features. What to do there. I propose we make |
Agree
and agree |
See related issue: knurling-rs#867 Its easy to assume unwrap! can not have a message like std's expect. Adding an expect macro will help both autocomplete guide programmers looking for one and those who discount the unwrap entry in the defmt api docs based on their knowledge that std's unwrap can not have a message. The documentation of the expect alias highlights that unwrap works with a message to and points to the unwrap macro docs for details.
PR #872 for the alias |
The
unwrap!
macro got implemented see , in that issue aexpect!
macro is also proposed and an implementation sketched out . Only theunwrap!
macro got implemented however. Is there a reason for this?To me an
expect!
macro would be very useful .The text was updated successfully, but these errors were encountered: