From a1d771a772a864d862a5fed1f8ef19313072177b Mon Sep 17 00:00:00 2001 From: Edgar Geier Date: Thu, 30 Mar 2023 22:32:50 +0200 Subject: [PATCH] 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`. --- crates/bevy_ecs/src/schedule/schedule.rs | 14 -------------- crates/bevy_ecs/src/schedule/state.rs | 2 +- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/crates/bevy_ecs/src/schedule/schedule.rs b/crates/bevy_ecs/src/schedule/schedule.rs index 303ac8dd29..68447daf8e 100644 --- a/crates/bevy_ecs/src/schedule/schedule.rs +++ b/crates/bevy_ecs/src/schedule/schedule.rs @@ -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. diff --git a/crates/bevy_ecs/src/schedule/state.rs b/crates/bevy_ecs/src/schedule/state.rs index 326c99d2af..12a001b17b 100644 --- a/crates/bevy_ecs/src/schedule/state.rs +++ b/crates/bevy_ecs/src/schedule/state.rs @@ -68,7 +68,7 @@ pub struct OnTransition { /// 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)]