diff --git a/crates/bevy_ecs/src/schedule/condition.rs b/crates/bevy_ecs/src/schedule/condition.rs index 2c291f166d5b2..c6a5c99b8cc68 100644 --- a/crates/bevy_ecs/src/schedule/condition.rs +++ b/crates/bevy_ecs/src/schedule/condition.rs @@ -73,7 +73,7 @@ pub type BoxedCondition = Box>; /// # app.run(&mut world); /// # assert!(world.resource::().0); pub trait SystemCondition: - sealed::SystemCondition + IntoSystem { /// Returns a new run condition that only returns `true` /// if both this one and the passed `and` return `true`. @@ -373,30 +373,10 @@ pub trait SystemCondition: } impl SystemCondition for F where - F: sealed::SystemCondition + F: IntoSystem { } -mod sealed { - use crate::system::{IntoSystem, ReadOnlySystem, SystemInput}; - - pub trait SystemCondition: - IntoSystem - { - // This associated type is necessary to let the compiler - // know that `Self::System` is `ReadOnlySystem`. - type ReadOnlySystem: ReadOnlySystem; - } - - impl SystemCondition for F - where - F: IntoSystem, - F::System: ReadOnlySystem, - { - type ReadOnlySystem = F::System; - } -} - /// A collection of [run conditions](SystemCondition) that may be useful in any bevy app. pub mod common_conditions { use super::{NotSystem, SystemCondition};