Remove `failure` dependancy and favor `std::error::Error`
TheLostLambda opened this issue · 0 comments
Hello,
I've recently come across this crate and am quite a fan! With that being said, during my use of the crate, I discovered that I couldn't use the ?
operator in the context of a function returning Result<(), Box<dyn std::error::Error>>
. This seems to have become a somewhat idiomatic way of dealing with errors in Rust.
The failure
crate, while certainly having its upsides, has had its use in libraries discouraged (due to a lack of stabilization) and the standard library has been gradually incorporating fixes that the crate was intended to provide.
Finally, failure pulls in backtrace
as a dependency, which breaks cross compilation from Linux -> macOS, which is what has brought me here. I'd suggest replacing the failure
crate with the std::error
implementation and would be more than happy to make a pull request.
Let me know what you think!