From 818fa87800bc69b0c00ad2202c788cc3eeff3cef Mon Sep 17 00:00:00 2001 From: JoJoJet <21144246+JoJoJet@users.noreply.github.com> Date: Thu, 2 Mar 2023 19:38:50 -0500 Subject: [PATCH 1/5] revise docs for system set marker traits --- crates/bevy_ecs/src/schedule/set.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/crates/bevy_ecs/src/schedule/set.rs b/crates/bevy_ecs/src/schedule/set.rs index ad882f11c1897..0da8dcda1bd65 100644 --- a/crates/bevy_ecs/src/schedule/set.rs +++ b/crates/bevy_ecs/src/schedule/set.rs @@ -37,14 +37,15 @@ pub trait SystemSet: DynHash + Debug + Send + Sync + 'static { fn dyn_clone(&self) -> Box; } -/// A system set that is never contained in another set. -/// Systems and other system sets may only belong to one base set. +/// A marker trait for `SystemSet` types where `is_base` returns `true`. +/// This should only be implemented for types that satisfy this requirement. /// -/// This should only be implemented for types that return `true` from [`SystemSet::is_base`]. +/// A base set is a system set that is never contained in another set. +/// Systems and other system sets may only belong to one base set. pub trait BaseSystemSet: SystemSet {} -/// System sets that are *not* base sets. This should not be implemented for -/// any types that implement [`BaseSystemSet`]. +/// A marker trait for `SystemSet` types where `is_base` returns `false`. +/// This should only be implemented for types that satisfy this requirement. pub trait FreeSystemSet: SystemSet {} impl PartialEq for dyn SystemSet { From 802c632d8a5d444947d0a51277f154748cf38ac2 Mon Sep 17 00:00:00 2001 From: JoJoJet <21144246+JoJoJet@users.noreply.github.com> Date: Thu, 2 Mar 2023 19:44:40 -0500 Subject: [PATCH 2/5] marker traits are automatically implemented --- crates/bevy_ecs/src/schedule/set.rs | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/crates/bevy_ecs/src/schedule/set.rs b/crates/bevy_ecs/src/schedule/set.rs index 0da8dcda1bd65..8597002b139ff 100644 --- a/crates/bevy_ecs/src/schedule/set.rs +++ b/crates/bevy_ecs/src/schedule/set.rs @@ -37,15 +37,18 @@ pub trait SystemSet: DynHash + Debug + Send + Sync + 'static { fn dyn_clone(&self) -> Box; } -/// A marker trait for `SystemSet` types where `is_base` returns `true`. -/// This should only be implemented for types that satisfy this requirement. +/// A marker trait for `SystemSet` types where [`is_base`] returns `true`. +/// This should only be implemented for types that satisfy this requirement, +/// and is automatically implented for applicable types by `#[derive(SystemSet)]` /// -/// A base set is a system set that is never contained in another set. -/// Systems and other system sets may only belong to one base set. +/// [`is_base`]: SystemSet::is_base pub trait BaseSystemSet: SystemSet {} -/// A marker trait for `SystemSet` types where `is_base` returns `false`. -/// This should only be implemented for types that satisfy this requirement. +/// A marker trait for `SystemSet` types where [`is_base`] returns `false`. +/// This should only be implemented for types that satisfy this requirement, +/// and is automatically implented for applicable types by `#[derive(SystemSet)]` +/// +/// [`is_base`]: SystemSet::is_base pub trait FreeSystemSet: SystemSet {} impl PartialEq for dyn SystemSet { From bd27e2fad18ab18063d9bacbc93c12ef3ab33440 Mon Sep 17 00:00:00 2001 From: JoJoJet <21144246+JoJoJet@users.noreply.github.com> Date: Thu, 2 Mar 2023 19:45:58 -0500 Subject: [PATCH 3/5] sentences --- crates/bevy_ecs/src/schedule/set.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/bevy_ecs/src/schedule/set.rs b/crates/bevy_ecs/src/schedule/set.rs index 8597002b139ff..956a2f386e54e 100644 --- a/crates/bevy_ecs/src/schedule/set.rs +++ b/crates/bevy_ecs/src/schedule/set.rs @@ -38,15 +38,15 @@ pub trait SystemSet: DynHash + Debug + Send + Sync + 'static { } /// A marker trait for `SystemSet` types where [`is_base`] returns `true`. -/// This should only be implemented for types that satisfy this requirement, -/// and is automatically implented for applicable types by `#[derive(SystemSet)]` +/// This should only be implemented for types that satisfy this requirement. +/// It is automatically implented for applicable types by `#[derive(SystemSet)]`. /// /// [`is_base`]: SystemSet::is_base pub trait BaseSystemSet: SystemSet {} /// A marker trait for `SystemSet` types where [`is_base`] returns `false`. -/// This should only be implemented for types that satisfy this requirement, -/// and is automatically implented for applicable types by `#[derive(SystemSet)]` +/// This should only be implemented for types that satisfy this requirement. +/// It is automatically implented for applicable types by `#[derive(SystemSet)]`. /// /// [`is_base`]: SystemSet::is_base pub trait FreeSystemSet: SystemSet {} From e20950d1429fb870a459aab5b6405a1bbda1fb34 Mon Sep 17 00:00:00 2001 From: JoJoJet <21144246+JoJoJet@users.noreply.github.com> Date: Thu, 2 Mar 2023 19:49:18 -0500 Subject: [PATCH 4/5] use more specific language --- crates/bevy_ecs/src/schedule/set.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/bevy_ecs/src/schedule/set.rs b/crates/bevy_ecs/src/schedule/set.rs index 956a2f386e54e..ff6d939f6c58d 100644 --- a/crates/bevy_ecs/src/schedule/set.rs +++ b/crates/bevy_ecs/src/schedule/set.rs @@ -39,14 +39,14 @@ pub trait SystemSet: DynHash + Debug + Send + Sync + 'static { /// A marker trait for `SystemSet` types where [`is_base`] returns `true`. /// This should only be implemented for types that satisfy this requirement. -/// It is automatically implented for applicable types by `#[derive(SystemSet)]`. +/// It is automatically implented for base set types by `#[derive(SystemSet)]`. /// /// [`is_base`]: SystemSet::is_base pub trait BaseSystemSet: SystemSet {} /// A marker trait for `SystemSet` types where [`is_base`] returns `false`. /// This should only be implemented for types that satisfy this requirement. -/// It is automatically implented for applicable types by `#[derive(SystemSet)]`. +/// It is automatically implented for non-base set types by `#[derive(SystemSet)]`. /// /// [`is_base`]: SystemSet::is_base pub trait FreeSystemSet: SystemSet {} From a33ffefa075d0a48889d18f3e215a08e9323dc4b Mon Sep 17 00:00:00 2001 From: JoJoJet <21144246+JoJoJet@users.noreply.github.com> Date: Fri, 3 Mar 2023 09:15:58 -0500 Subject: [PATCH 5/5] Fix typos Co-authored-by: James Liu --- crates/bevy_ecs/src/schedule/set.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/bevy_ecs/src/schedule/set.rs b/crates/bevy_ecs/src/schedule/set.rs index ff6d939f6c58d..23058a3de9fbc 100644 --- a/crates/bevy_ecs/src/schedule/set.rs +++ b/crates/bevy_ecs/src/schedule/set.rs @@ -39,14 +39,14 @@ pub trait SystemSet: DynHash + Debug + Send + Sync + 'static { /// A marker trait for `SystemSet` types where [`is_base`] returns `true`. /// This should only be implemented for types that satisfy this requirement. -/// It is automatically implented for base set types by `#[derive(SystemSet)]`. +/// It is automatically implemented for base set types by `#[derive(SystemSet)]`. /// /// [`is_base`]: SystemSet::is_base pub trait BaseSystemSet: SystemSet {} /// A marker trait for `SystemSet` types where [`is_base`] returns `false`. /// This should only be implemented for types that satisfy this requirement. -/// It is automatically implented for non-base set types by `#[derive(SystemSet)]`. +/// It is automatically implemented for non-base set types by `#[derive(SystemSet)]`. /// /// [`is_base`]: SystemSet::is_base pub trait FreeSystemSet: SystemSet {}