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:
Eira Fransham 2024-03-12 23:11:21 +01:00 committed by François
parent 3b97fd625a
commit 9f24bd8705
No known key found for this signature in database

View File

@ -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> {}