Skip to content

Commit

Permalink
Remove base set error variants of ScheduleBuildError (#8269)
Browse files Browse the repository at this point in the history
# 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`.
  • Loading branch information
geieredgar authored Mar 30, 2023
1 parent 3533c3d commit a1d771a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 15 deletions.
14 changes: 0 additions & 14 deletions crates/bevy_ecs/src/schedule/schedule.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_ecs/src/schedule/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down

0 comments on commit a1d771a

Please sign in to comment.