File tree 1 file changed +6
-5
lines changed
1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 1
1
/// Return early with an error.
2
2
///
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>.
4
5
///
5
6
/// 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> .
7
8
///
8
9
/// [anyhow!]: crate::anyhow
9
10
///
@@ -69,11 +70,11 @@ macro_rules! __ensure {
69
70
( $ensure: item) => {
70
71
/// Return early with an error if a condition is not satisfied.
71
72
///
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> .
74
75
///
75
76
/// 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> .
77
78
///
78
79
/// Analogously to `assert!`, `ensure!` takes a condition and exits the function
79
80
/// if the condition fails. Unlike `assert!`, `ensure!` returns an `Error`
You can’t perform that action at this time.
0 commit comments