-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# Objective - Fixes the issue described in this comment: #16680 (comment). ## Solution - Cache one-shot systems by `S: IntoSystem` (which is const-asserted to be a ZST) rather than `S::System`. ## Testing Added a new unit test named `cached_system_into_same_system_type` to `system_registry.rs`. --- ## Migration Guide The `CachedSystemId` resource has been changed: ```rust // Before: let cached_id = CachedSystemId::<S::System>(id); assert!(id == cached_id.0); // After: let cached_id = CachedSystemId::<S>::new(id); assert!(id == SystemId::from_entity(cached_id.entity)); ```
- Loading branch information
1 parent
f3db44b
commit 0a841ba
Showing
1 changed file
with
62 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters