bevy/crates/bevy_render
Johan Klokkhammer Helsing dea292d199 Derive thiserror::Error for HexColorError (#2740)
# Objective

- Make it easy to use HexColorError with `thiserror`, i.e. converting it into other error types.

Makes this possible:

```rust
#[derive(Debug, thiserror::Error)]
pub enum LdtkError {
    #[error("An error occured while deserializing")]
    Json(#[from] serde_json::Error),
    #[error("An error occured while parsing a color")]
    HexColor(#[from] bevy::render::color::HexColorError),
}
```

## Solution

- Derive thiserror::Error the same way we do elsewhere (see query.rs for instance)
2021-08-30 21:56:13 +00:00
..
src Derive thiserror::Error for HexColorError (#2740) 2021-08-30 21:56:13 +00:00
Cargo.toml Not me ... us (#2654) 2021-08-15 20:08:52 +00:00