From f969a06c2de199be2c0f2b45c36360016b5609de Mon Sep 17 00:00:00 2001 From: JoJoJet <21144246+JoJoJet@users.noreply.github.com> Date: Wed, 22 Feb 2023 15:25:40 +0000 Subject: [PATCH] Make boxed conditions read-only (#7786) # Objective The `BoxedCondition` type alias does not require the underlying system to be read-only. ## Solution Define the type alias using `ReadOnlySystem` instead of `System`. --- crates/bevy_ecs/src/schedule/condition.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/bevy_ecs/src/schedule/condition.rs b/crates/bevy_ecs/src/schedule/condition.rs index 1ecf637f6560ca..225c54095f520e 100644 --- a/crates/bevy_ecs/src/schedule/condition.rs +++ b/crates/bevy_ecs/src/schedule/condition.rs @@ -1,8 +1,8 @@ use std::borrow::Cow; -use crate::system::{BoxedSystem, CombinatorSystem, Combine, IntoSystem, System}; +use crate::system::{CombinatorSystem, Combine, IntoSystem, ReadOnlySystem, System}; -pub type BoxedCondition = BoxedSystem<(), bool>; +pub type BoxedCondition = Box>; /// A system that determines if one or more scheduled systems should run. ///