Skip to content
Myr

Link from `bail!` and `ensure!` to `anyhow!`

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by David Tolnay · committed by David Tolnay · parent ec15c61 · Browse files · 1 file+3 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+3 added−2 removed

  • other:+3 added−2 removed

1 file+3 added−2 removed

modified:src/macros.rs+3 added-2 removed
1/// Return early with an error.2///3/// This macro is equivalent to `return Err(anyhow!($args...))`.3/// This macro is equivalent to `return Err(`[`anyhow!($args...)`][anyhow!]`)`.4///5/// The surrounding function's or closure's return value is required to be6/// `Result<_,`[`anyhow::Error`][crate::Error]`>`.7///
56 unmodified lines
64}6566/// Return early with an error if a condition is not satisfied.67///68/// This macro is equivalent to `if !$cond { return Err(anyhow!($args...)); }`.68/// This macro is equivalent to `if !$cond { return69/// Err(`[`anyhow!($args...)`][anyhow!]`); }`.70///71/// The surrounding function's or closure's return value is required to be72/// `Result<_,`[`anyhow::Error`][crate::Error]`>`.73///
103 unmodified lines