Skip to content

Commit baaf4c8

Browse files
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
1 parent 3f6300d commit baaf4c8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

crates/bevy_ecs/src/system/system_registry.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,11 @@ impl<I, O> RemovedSystem<I, O> {
3838
///
3939
/// These are opaque identifiers, keyed to a specific [`World`],
4040
/// and are created via [`World::register_system`].
41-
#[derive(Eq)]
4241
pub struct SystemId<I = (), O = ()>(Entity, std::marker::PhantomData<fn(I) -> O>);
4342

43+
// A manual impl is used because the trait bounds should ignore the `I` and `O` phantom parameters.
44+
impl<I, O> Eq for SystemId<I, O> {}
45+
4446
// A manual impl is used because the trait bounds should ignore the `I` and `O` phantom parameters.
4547
impl<I, O> Copy for SystemId<I, O> {}
4648

0 commit comments

Comments
 (0)