cassandra-rs
cassandra-rs copied to clipboard
[0.16] Move off error_chain
error_chain
was great, but it's a bit outdated now. We should move to anyhow
/thiserror
or other modern error approach.
I've just started trying this library and noticed that I can't use the ?
operator with the Result
type I normally use in my projects (which comes from eyre). I get errors saying some Error
type (one defined by the error_chain macro I assume) doesn't implement the Sync
trait.
What do you think about using eyre
? Or maybe error-stack once it's possible to use without the nightly toolchain.
EDIT: Now that I think about it, it might not be a lot more beneficial to use eyre
over anyhow
so maybe that will be just fine.
Error handling is still quite an active area in Rust; whoever picks this up should take a careful look at the landscape before choosing a library. It should be mature and widely used, and ideally on track to becoming (de-facto) "standard".