eyre-rs / eyre

A trait object based error handling type for easy idiomatic error handling and reporting in Rust applications
Apache License 2.0
1.36k stars 63 forks source link

eyre!() docs reference "Error" instead of "Report" #53

Closed lilyball closed 10 months ago

lilyball commented 3 years ago

https://docs.rs/eyre/0.6.5/eyre/macro.eyre.html

https://github.com/yaahc/eyre/blob/54933ea76d12960fb4b954c81c2d288481ff9b03/src/macros.rs#L129

This appears to have been inherited from anyhow.

Also, when fixing this, it might be nice to add an intra-doc link to this reference.

lilyball commented 3 years ago

ensure!() does too

https://github.com/yaahc/eyre/blob/54933ea76d12960fb4b954c81c2d288481ff9b03/src/macros.rs#L69

ten3roberts commented 1 year ago

Yes, it is likely a leftover.

To ensure that we maintain a drop-in replacement for anyhow, we have aliased the equivalent types such as Report WrapErr etc with Error, Context ...

These re-exports are either hidden or not prominent enough in docs.rs, so while they do work, it may look like the won't, and I do definitely agree that we could increase our own internal consistency and honor Report, and keep Error mostly for compatibility.

thenorili commented 10 months ago

Fixed in PR #87 -- thanks so much for your contribution :D