You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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!
The text was updated successfully, but these errors were encountered:
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 returningResult<(), 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 thefailure
crate with thestd::error
implementation and would be more than happy to make a pull request.Let me know what you think!
The text was updated successfully, but these errors were encountered: