File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 11/// Return early with an error.
22///
3- /// This macro is equivalent to `return Err(`[`anyhow!($args...)`][anyhow!]`)`.
3+ /// This macro is equivalent to
4+ /// <code>return Err([anyhow!($args\...)][anyhow!])</code>.
45///
56/// The surrounding function's or closure's return value is required to be
6- /// `Result<_,`[` anyhow::Error` ][crate::Error]`>` .
7+ /// <code>Result<_, [ anyhow::Error][crate::Error]></code> .
78///
89/// [anyhow!]: crate::anyhow
910///
@@ -69,11 +70,11 @@ macro_rules! __ensure {
6970 ( $ensure: item) => {
7071 /// Return early with an error if a condition is not satisfied.
7172 ///
72- /// This macro is equivalent to `if !$cond { return
73- /// Err(`[` anyhow!($args...)` ][anyhow!]` ); }` .
73+ /// This macro is equivalent to
74+ /// <code>if !$cond { return Err([ anyhow!($args\ ...)][anyhow!]); }</code> .
7475 ///
7576 /// The surrounding function's or closure's return value is required to be
76- /// `Result<_,`[` anyhow::Error` ][crate::Error]`>` .
77+ /// <code>Result<_, [ anyhow::Error][crate::Error]></code> .
7778 ///
7879 /// Analogously to `assert!`, `ensure!` takes a condition and exits the function
7980 /// if the condition fails. Unlike `assert!`, `ensure!` returns an `Error`
You can’t perform that action at this time.
0 commit comments