Skip to content

Commit

Permalink
Overide .intern() for Interned<dyn Label>
Browse files Browse the repository at this point in the history
  • Loading branch information
JoJoJet authored and geieredgar committed Jul 28, 2023
1 parent 7676619 commit b9fb74f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 2 additions & 5 deletions crates/bevy_ecs/src/schedule/set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ pub trait SystemSet: Debug + Send + Sync + 'static {
}
}

impl SystemSet for Interned<dyn SystemSet> {
impl SystemSet for InternedSystemSet {
fn system_type(&self) -> Option<TypeId> {
(**self).system_type()
}
Expand All @@ -115,10 +115,7 @@ impl SystemSet for Interned<dyn SystemSet> {
Some(self.0)
}

fn intern(&self) -> InternedSystemSet
where
Self: Sized,
{
fn intern(&self) -> Self {
*self
}
}
Expand Down
4 changes: 4 additions & 0 deletions crates/bevy_utils/src/label.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,10 @@ macro_rules! define_label {
fn dyn_static_ref(&self) -> Option<&'static dyn $label_trait_name> {
Some(self.0)
}

fn intern(&self) -> Self {
*self
}
}

impl PartialEq for dyn $label_trait_name {
Expand Down

0 comments on commit b9fb74f

Please sign in to comment.