Skip to content

Commit

Permalink
macros: fix references to Error in docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
birkenfeld authored and thenorili committed Nov 22, 2023
1 parent ec98ce3 commit ef77800
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions eyre/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 `Error`
/// if the condition fails. Unlike `assert!`, `ensure!` returns an `eyre::Result`
/// rather than panicking.
///
/// # Example
Expand Down Expand Up @@ -131,7 +131,7 @@ macro_rules! ensure {

/// Construct an ad-hoc error from a string.
///
/// This evaluates to an `Error`. It can take either just a string, or a format
/// This evaluates to a `Report`. It can take either just a string, or a format
/// string with arguments. It also can take any custom type which implements
/// `Debug` and `Display`.
///
Expand Down

0 comments on commit ef77800

Please sign in to comment.