Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove failure dependancy and favor std::error::Error #23

Closed
TheLostLambda opened this issue Dec 21, 2019 · 0 comments · Fixed by #25
Closed

Remove failure dependancy and favor std::error::Error #23

TheLostLambda opened this issue Dec 21, 2019 · 0 comments · Fixed by #25

Comments

@TheLostLambda
Copy link
Contributor

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants
@TheLostLambda and others