bevy/crates/bevy_asset
Rafał Harabień e69ab92baf Make AssetLoader/Saver Error type bounds compatible with anyhow::Error (#10493)
# Objective

* In Bevy 0.11 asset loaders used `anyhow::Error` for returning errors.
In Bevy 0.12 `AssetLoader` (and `AssetSaver`) have associated `Error`
type. Unfortunately it's type bounds does not allow `anyhow::Error` to
be used despite migration guide claiming otherwise. This makes migration
to 0.12 more challenging. Solve this by changing type bounds for
associated `Error` type.
* Fix #10350

## Solution

Change associated `Error` type bounds to require `Into<Box<dyn
std::error::Error + Send + Sync + 'static>>` to be implemented instead
of `std::error::Error + Send + Sync + 'static`. Both `anyhow::Error` and
errors generated by `thiserror` seems to be fine with such type bound.

---

## Changelog

### Fixed
* Fixed compatibility with `anyhow::Error` in `AssetLoader` and
`AssetSaver` associated `Error` type
2023-11-29 16:41:48 -08:00
..
macros Release 0.12 (#10362) 2023-11-04 17:24:23 +00:00
src Make AssetLoader/Saver Error type bounds compatible with anyhow::Error (#10493) 2023-11-29 16:41:48 -08:00
Cargo.toml Release 0.12 (#10362) 2023-11-04 17:24:23 +00:00