Skip to content

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

@TheLostLambda

Description

@TheLostLambda

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions