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`.
This commit is contained in:
JoJoJet 2023-02-22 15:25:40 +00:00
parent 3ec87e49ca
commit 588af17aa3

View File

@ -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<dyn ReadOnlySystem<In = (), Out = bool>>;
/// A system that determines if one or more scheduled systems should run.
///