Skip to content

Commit 0f74169

Browse files
committed
Improve rendering of inline code in macros documentation
1 parent 8ce4560 commit 0f74169

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/macros.rs

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
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&lt;_, [anyhow::Error][crate::Error]&gt;</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&lt;_, [anyhow::Error][crate::Error]&gt;</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`

0 commit comments

Comments
 (0)