Skip to content

Commit

Permalink
macros: more fixes to docstrings
Browse files Browse the repository at this point in the history
Fixes #53 and #54
  • Loading branch information
birkenfeld committed Dec 3, 2022
1 parent 4eb7811 commit 6a8addd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/macros.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/// Return early with an error.
///
/// This macro is equivalent to `return Err(From::from($err))`.
/// This macro is equivalent to `return Err(eyre!(<args>))`.
///
/// # Example
///
Expand Down Expand Up @@ -63,10 +63,10 @@ macro_rules! bail {

/// Return early with an error if a condition is not satisfied.
///
/// This macro is equivalent to `if !$cond { return Err(From::from($err)); }`.
/// This macro is equivalent to `if !$cond { return Err(eyre!(<other args>)); }`.
///
/// Analogously to `assert!`, `ensure!` takes a condition and exits the function
/// if the condition fails. Unlike `assert!`, `ensure!` returns an `Err(Report)`
/// if the condition fails. Unlike `assert!`, `ensure!` returns an `eyre::Result`
/// rather than panicking.
///
/// # Example
Expand Down

0 comments on commit 6a8addd

Please sign in to comment.