We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c0888a5 commit 9b44e94Copy full SHA for 9b44e94
src/assert.rs
@@ -344,6 +344,9 @@ macro_rules! try_or_err {
344
/// ```
345
#[macro_export]
346
macro_rules! invariant {
347
+ ($invariant: expr $(,)?) => {
348
+ $crate::invariant!($invariant, $crate::VipersError::InvariantFailed);
349
+ };
350
($invariant: expr, $err_code: ident $(,)?) => {
351
$crate::invariant!($invariant, crate::ErrorCode::$err_code);
352
};
0 commit comments