mirror of
https://github.com/bevyengine/bevy
synced 2024-11-22 12:43:34 +00:00
SystemId should manually implement Eq
(#12436)
# Objective `System<f32>` currently does not implement `Eq` even though it should ## Solution Manually implement `Eq` like other traits are manually implemented
This commit is contained in:
parent
3f6300dc81
commit
baaf4c8c2d
1 changed files with 3 additions and 1 deletions
|
@ -38,9 +38,11 @@ impl<I, O> RemovedSystem<I, O> {
|
|||
///
|
||||
/// These are opaque identifiers, keyed to a specific [`World`],
|
||||
/// and are created via [`World::register_system`].
|
||||
#[derive(Eq)]
|
||||
pub struct SystemId<I = (), O = ()>(Entity, std::marker::PhantomData<fn(I) -> O>);
|
||||
|
||||
// A manual impl is used because the trait bounds should ignore the `I` and `O` phantom parameters.
|
||||
impl<I, O> Eq for SystemId<I, O> {}
|
||||
|
||||
// A manual impl is used because the trait bounds should ignore the `I` and `O` phantom parameters.
|
||||
impl<I, O> Copy for SystemId<I, O> {}
|
||||
|
||||
|
|
Loading…
Reference in a new issue