-
-
Notifications
You must be signed in to change notification settings - Fork 128
Open
Description
Hello,
Would it be possible to allow the use of ensure!
macro without an error message.
Sometimes I just want to write the assertion test without worrying about creating a pretty error message.
There are many instances where it is preferable to not provide an error message with ensure!
.
- While debugging something and writing quick tests for it.
- While writing assertions.
- While writing unit tests.
- etc.
It would help if that was supported by miette.
Anyhow supports this feature.
The code would look like...
macro_rules! ensure {
($condition: expr) => {
miette::ensure!($condition, "ensure failed");
}
}
Thank you
~ oxcrow
Metadata
Metadata
Assignees
Labels
No labels