Remove base set error variants of ScheduleBuildError (#8269)

# Objective

With the removal of base sets, some variants of `ScheduleBuildError` can
never occur and should be removed.

## Solution

- Remove the obsolete variants of `ScheduleBuildError`.
- Also fix a doc comment which mentioned base sets.

---

## Changelog

### Removed

- Remove `ScheduleBuildError::SystemInMultipleBaseSets` and
`ScheduleBuildError::SetInMultipleBaseSets`.
This commit is contained in:
Edgar Geier 2023-03-30 22:32:50 +02:00 committed by GitHub
parent 3533c3dae9
commit a1d771a772
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 15 deletions

View file

@ -1495,20 +1495,6 @@ pub enum ScheduleBuildError {
/// Tried to run a schedule before all of its systems have been initialized.
#[error("Systems in schedule have not been initialized.")]
Uninitialized,
/// Tried to add a system to multiple base sets.
#[error("System `{system:?}` is in the base sets {first_set:?} and {second_set:?}, but systems can only belong to one base set.")]
SystemInMultipleBaseSets {
system: String,
first_set: String,
second_set: String,
},
/// Tried to add a set to multiple base sets.
#[error("Set `{set:?}` is in the base sets {first_set:?} and {second_set:?}, but sets can only belong to one base set.")]
SetInMultipleBaseSets {
set: String,
first_set: String,
second_set: String,
},
}
/// Specifies how schedule construction should respond to detecting a certain kind of issue.

View file

@ -68,7 +68,7 @@ pub struct OnTransition<S: States> {
/// A [`SystemSet`] that will run within `CoreSet::Update` when this state is active.
///
/// This set, when created via `App::add_state`, is configured with both a base set and a run condition.
/// This set, when created via `App::add_state`, is configured with a run condition.
/// If all you want is the run condition, use the [`in_state`](crate::schedule::common_conditions::in_state)
/// [condition](super::Condition) directly.
#[derive(SystemSet, Clone, Debug, PartialEq, Eq, Hash)]