You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove uses of #[cfg(feature = "track_location")] outside of the implementation of MaybeLocation (#21399)
# Objective
Remove uses of `#[cfg(feature = "track_location")]` outside of the
implementation of `MaybeLocation`.
Reducing the amount of conditional compilation makes the code less
brittle, since compilation errors will be found regardless of whether
the feature is enabled.
We also want to ensure that uses of `MaybeLocation` outside of
`bevy_ecs` don't need their *own* feature flags. Avoiding the flags even
within `bevy_ecs` helps ensure that all use cases are covered, and makes
it easier to move or copy implementations from `bevy_ecs` into other
crates.
## Solution
Remove `#[cfg(feature = "track_location")]` annotations. Use
`.into_option()` in the cases where we want the behavior to depend on
whether the feature is enabled.
0 commit comments