From ef778006cc8114828320663edd0d34f7cb865043 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sat, 3 Dec 2022 13:07:07 +0100 Subject: [PATCH] macros: fix references to `Error` in docstrings --- eyre/src/macros.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/eyre/src/macros.rs b/eyre/src/macros.rs index 50c1dbf..032f82a 100644 --- a/eyre/src/macros.rs +++ b/eyre/src/macros.rs @@ -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!())`. /// /// # Example /// @@ -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!()); }`. /// /// 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 @@ -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`. ///