Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix trait bounds for run conditions (bevyengine#7688)
# Objective The trait `Condition<>` is implemented for any type that can be converted into a `ReadOnlySystem` which takes no inputs and returns a bool. However, due to the current implementation, consumers of the trait cannot rely on the fact that `<T as Condition>::System` implements `ReadOnlySystem`. In cases such as the `not` combinator (added in bevyengine#7559), we are required to add redundant `T::System: ReadOnlySystem` trait bounds, even though this should be implied by the `Condition<>` trait. ## Solution Add a hidden associated type which allows the compiler to figure out that the `System` associated type implements `ReadOnlySystem`.
- Loading branch information