mirror of
https://github.com/bevyengine/bevy
synced 2024-11-22 12:43:34 +00:00
1b1934f4fb
# Objective `CameraProjectionPlugin<T>`'s bounds are `T: CameraProjection`. But the bounds for `CameraProjectionPlugin` implementing `Plugin` are `T: CameraProjection + Component + GetTypeRegistration`. This means that if `T` is valid for `CameraProjectionPlugin`'s bounds, but not the plugin implementation's bounds, then `CameraProjectionPlugin` would not implement `Plugin`. Which is weird because you'd expect a struct with `Plugin` in the name to implement `Plugin`. ## Solution Make `CameraProjectionPlugin<T>`'s bounds `T: CameraProjection + Component + GetTypeRegistration`. I also rearranged some of the code. --- ## Changelog - Changed `CameraProjectionPlugin<T>`'s bounds to `T: CameraProjection + Component + GetTypeRegistration` ## Migration Guide `CameraProjectionPlugin<T>`'s trait bounds now require `T` to implement `CameraProjection`, `Component`, and `GetTypeRegistration`. This shouldn't affect most existing code as `CameraProjectionPlugin<T>` never implemented `Plugin` unless those bounds were met. |
||
---|---|---|
.. | ||
macros | ||
src | ||
Cargo.toml |