mirror of
https://github.com/dtolnay/thiserror.git
synced 2025-04-04 13:27:38 +03:00
Rather than having separate traits implementing as_display method, replace DisplayAsDisplay and PathAsDisplay traits with a AsDisplay trait. The difference between those two traits is in the result returned by the as_display method. With AsDisplay trait this is captured by an associated type. The main motivation for the change is making it simpler to support no_std builds in the future. Previously, PathAsDisplay would have to be handled specially in such builds on the side of macro expansion. Now, thiserror-impl doesn’t need to be aware of any complications around AsDisplay since they are all contained in thiserror crate. |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
LICENSE-APACHE | ||
LICENSE-MIT |