*: Replace implementations of `Display` and `Error` on errors with `thiserror`
I would argue that a generated implementation of Display and Error via thiserror is faster to write and easier to maintain. Thus I advocate for using thiserror for most of not all libp2p error types.
I got this
This means adding another error related dependency, that has no no_std support. :/
Ref https://github.com/dtolnay/thiserror/pull/64
@mxinden thoughts?
This means adding another error related dependency, that has no
no_stdsupport. :/
We already depend on thiserror in most libp2p-xxx crates, e.g. libp2p-swarm and libp2p-core. In addition, in case we ever decide to be no_std compatible, I don't think it is particularly hard to revert this change, in the sense that it would not be particularly interwoven with other functionality.
I don't have much experience with no_std. With the discussions in https://github.com/libp2p/rust-libp2p/issues/627 in mind, I wonder whether this is a goal we can achieve in the first place. @dignifiedquire do you think no_std is a goal worth striving for?
if we already depend on it, then nvm in regards to this specific instance
@demfabris still want to tackle this one? :innocent:
Yep @mxinden 👍🏻
I'll close this as stale. I don't think it worth having an issue around to track this.