Hacker News new | ask | show | jobs
by jicea 663 days ago
> Surprisingly, the type wrapped by std::result::Result::Err doesn't need an Error bound:

None of the errors types I create implements the trait Error. I'm just using simple enums with various variants and that's sufficient for me. The crates that I develop are mostly binary crate [1] so implementing the trait Error is maybe more prevalent in libraries crate. Reading the article, it feels a little overkill to me. I like the simple, straightforward approach (the one that you learn in the Book). I don't use anyhow also, I actively try to limit the dependencies I'm using.

[1]: https://github.com/Orange-OpenSource/hurl