bevy/crates
Christian Hughes 9c004439b8
Remove States::variants and remove enum-only restriction its derive (#9945)
# Objective

The `States::variants` method was once used to construct `OnExit` and
`OnEnter` schedules for every possible value of a given `States` type.
[Since the switch to lazily initialized
schedules](https://github.com/bevyengine/bevy/pull/8028/files#diff-b2fba3a0c86e496085ce7f0e3f1de5960cb754c7d215ed0f087aa556e529f97f),
we no longer need to track every possible value.

This also opens the door to `States` types that aren't enums.

## Solution

- Remove the unused `States::variants` method and its associated type.
- Remove the enum-only restriction on derived States types.

---

## Changelog

- Removed `States::variants` and its associated type.
- Derived `States` can now be datatypes other than enums.

## Migration Guide

- `States::variants` no longer exists. If you relied on this function,
consider using a library that provides enum iterators.
2023-09-30 22:32:39 +00:00
..
bevy_a11y Bump Version after Release (#9106) 2023-07-10 21:19:27 +00:00
bevy_animation Fix morph interpolation (#9927) 2023-09-27 01:46:27 +00:00
bevy_app Only run event systems if they have tangible work to do (#7728) 2023-09-24 00:16:33 +00:00
bevy_asset Fix unused variable warning for simple AssetV2 derives (#9961) 2023-09-29 08:08:13 +00:00
bevy_audio Bevy Asset V2 (#8624) 2023-09-07 02:07:27 +00:00
bevy_core Bevy Asset V2 (#8624) 2023-09-07 02:07:27 +00:00
bevy_core_pipeline skybox.wgsl: Fix precision issues (#9909) 2023-09-23 22:11:59 +00:00
bevy_derive bevy_derive: Fix #[deref] breaking other attributes (#9551) 2023-08-28 17:36:18 +00:00
bevy_diagnostic Improve doc formatting. (#9840) 2023-09-18 19:43:56 +00:00
bevy_dylib Bump Version after Release (#9106) 2023-07-10 21:19:27 +00:00
bevy_dynamic_plugin Bump Version after Release (#9106) 2023-07-10 21:19:27 +00:00
bevy_ecs Remove States::variants and remove enum-only restriction its derive (#9945) 2023-09-30 22:32:39 +00:00
bevy_ecs_compile_fail_tests Fix CI for Rust 1.72 (#9562) 2023-08-25 12:34:24 +00:00
bevy_encase_derive Bump Version after Release (#9106) 2023-07-10 21:19:27 +00:00
bevy_gilrs Refactor EventReader::iter to read (#9631) 2023-08-30 14:20:03 +00:00
bevy_gizmos Fix some typos (#9934) 2023-09-26 19:46:24 +00:00
bevy_gltf Handle empty morph weights when loading gltf (#9867) 2023-09-20 17:40:00 +00:00
bevy_hierarchy Fix typos (#9965) 2023-09-29 12:26:41 +00:00
bevy_input Improve doc formatting. (#9840) 2023-09-18 19:43:56 +00:00
bevy_internal Allow using async_io::block_on in bevy_tasks (#9626) 2023-09-25 19:59:50 +00:00
bevy_log Update tracy-client requirement from 0.15 to 0.16 (#9436) 2023-08-15 07:45:21 +00:00
bevy_macro_utils Add some more helpful errors to BevyManifest when it doesn't find Cargo.toml (#9207) 2023-07-19 12:05:04 +00:00
bevy_macros_compile_fail_tests bevy_derive: Fix #[deref] breaking other attributes (#9551) 2023-08-28 17:36:18 +00:00
bevy_math Automatic batching/instancing of draw commands (#9685) 2023-09-21 22:12:34 +00:00
bevy_mikktspace Fix erronenous glam version (#9653) 2023-08-31 12:55:17 +00:00
bevy_pbr Use EntityHashMap<Entity, T> for render world entity storage for better performance (#9903) 2023-09-27 08:28:28 +00:00
bevy_ptr Put #[repr(transparent)] attr to bevy_ptr types (#9068) 2023-07-14 18:55:15 +00:00
bevy_reflect Add TypePath to the prelude (#9963) 2023-09-29 08:27:30 +00:00
bevy_reflect_compile_fail_tests Fix CI for Rust 1.72 (#9562) 2023-08-25 12:34:24 +00:00
bevy_render Use EntityHashMap<Entity, T> for render world entity storage for better performance (#9903) 2023-09-27 08:28:28 +00:00
bevy_scene Remove useless single tuples and trailing commas (#9720) 2023-09-08 21:46:54 +00:00
bevy_sprite Use EntityHashMap<Entity, T> for render world entity storage for better performance (#9903) 2023-09-27 08:28:28 +00:00
bevy_tasks Allow using async_io::block_on in bevy_tasks (#9626) 2023-09-25 19:59:50 +00:00
bevy_text register TextLayoutInfo and TextFlags type. (#9919) 2023-09-25 18:59:29 +00:00
bevy_time Clarify behaviour of Timer::finished() for repeating timers (#9939) 2023-09-29 21:57:01 +00:00
bevy_transform Rename RemovedComponents::iter/iter_with_id to read/read_with_id (#9778) 2023-09-15 12:37:20 +00:00
bevy_ui Fix typos (#9965) 2023-09-29 12:26:41 +00:00
bevy_utils Use EntityHashMap<Entity, T> for render world entity storage for better performance (#9903) 2023-09-27 08:28:28 +00:00
bevy_window Fix the doc warning attribute and document remaining items for bevy_window (#9933) 2023-09-27 07:08:09 +00:00
bevy_winit macOS Sonoma (14.0) / Xcode 15.0 — Compatibility Fixes + Docs (#9905) 2023-09-27 22:41:16 +00:00