bail!() and ensure!() docs incorrectly claim it's equivalent to Err(From::from($err)) #54
Labels
C-documentation
Category: Improvements or additions to documentation
C-enhancement
Category: New feature or request
good first issue
Good for newcomers
help wanted
Extra attention is needed
The docs on
bail!()
andensure!()
claim that these macros are equivalent to code returningErr(From::from($err))
:https://github.com/yaahc/eyre/blob/54933ea76d12960fb4b954c81c2d288481ff9b03/src/macros.rs#L3
https://github.com/yaahc/eyre/blob/54933ea76d12960fb4b954c81c2d288481ff9b03/src/macros.rs#L66
This appears to have been inherited from
anyhow
originally, althoughanyhow
has since updated its docs.These macros should instead claim that they're equivalent to
Err(eyre!($err))
(or possiblyErr(eyre!($args...))
likeanyhow
's current docs). Also, like current anyhow, it would be nice to use intra-doc links here.The text was updated successfully, but these errors were encountered: