You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be reasonable to also support 1-argument ensure! with only the condition argument.
ensure!(depth <= MAX_DEPTH);
If the condition is false, the resulting error would be produced from the stringify of the condition expression. This would match the API of the standard library's assert! macro. https://doc.rust-lang.org/std/macro.assert.html
The text was updated successfully, but these errors were encountered:
The
ensure!
macro currently takes a condition argument (bool) followed by format arguments for the error message.https://docs.rs/anyhow/1.0.34/anyhow/macro.ensure.html
It would be reasonable to also support 1-argument
ensure!
with only the condition argument.If the condition is false, the resulting error would be produced from the
stringify
of the condition expression. This would match the API of the standard library'sassert!
macro. https://doc.rust-lang.org/std/macro.assert.htmlThe text was updated successfully, but these errors were encountered: