Fix compile error caused by incorrect feature flag in bevy_state (#14987)

# Objective

The `reflect` module in `bevy_state` is gated behind the `bevy_reflect`
feature, but the type exports from that module in the crate prelude are
erroneously gated behind the `bevy_app` feature, causing a compile error
when the `bevy_reflect` feature is disabled, but the `bevy_app` feature
is enabled.

## Solution

Change the feature gate to `bevy_reflect`.

## Testing

- Discovered by depending on `bevy_state` with `default-features =
false, features = ["bevy_app"]`
- Tested by running `cargo check -p bevy_state --no-default-features
--features bevy_app`
This commit is contained in:
BigWingBeat 2024-08-30 19:57:08 +01:00 committed by GitHub
parent bc13161416
commit ffe0f7f2ba
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -54,7 +54,7 @@ pub mod prelude {
pub use crate::app::AppExtStates; pub use crate::app::AppExtStates;
#[doc(hidden)] #[doc(hidden)]
pub use crate::condition::*; pub use crate::condition::*;
#[cfg(feature = "bevy_app")] #[cfg(feature = "bevy_reflect")]
#[doc(hidden)] #[doc(hidden)]
pub use crate::reflect::{ReflectFreelyMutableState, ReflectState}; pub use crate::reflect::{ReflectFreelyMutableState, ReflectState};
#[doc(hidden)] #[doc(hidden)]