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
3b97fd625a
commit
9f24bd8705
@ -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 New Issue
Block a user