3 ms·
I'd like to see error-chain standardized into the standard library as well. It seems by far the most sensible approach to building Error types.
by JoshTriplett 10y ago
I'd like to see error-chain standardized into the standard library as well. It seems by far the most sensible approach to building Error types.
- shepmaster 10y agoConversely, I really hope it doesn't. error-chain doesn't implement `PartialEq` which means that I can no longer write tests for my failure types. I'm a big believer in quick-error instead.
- JoshTriplett 10y agoThere are some good `assert_match` macros that allow you to pattern-match error cases instead. Might also be possible for error-chain to implement PartialEq if you didn't want some of its generalized error-boxing bits. If that's something you need, you might file an issue.
- twic 10y agoI'd prefer it if that didn't happen, or at least not for a few years. error-chain involves some pretty hairy macros, which would feel out of place in the standard library. I'd like to wait and see if the community can come up with something more transparent before canonising error-chain.