failure
failure copied to clipboard
Replace std::error::Error with core_error::Error
Fixes #328
Use core_error::Error, a compatibility Error trait in no_std environment allowing interoperability between various error handling crates, such as snafu. In std environment, core_error simply reexports std::error, so this change should be invisible to std users.
In particular this change does two things:
- It implements
Failon everycore_error::Errorerror. - It implements
core_error::ErroronCompat.
It also replaces other usage of std::error::Error to core_error::Error, but those should have no visible effect.
This is a preliminary PR to get some feedback. In particular, I'm not sure where to document the changes. no_std documentation is pretty scarce in failure.