diff --git a/crates/bevy_ecs/src/system/system_registry.rs b/crates/bevy_ecs/src/system/system_registry.rs index fb2fa9a875eed..99262271e9e17 100644 --- a/crates/bevy_ecs/src/system/system_registry.rs +++ b/crates/bevy_ecs/src/system/system_registry.rs @@ -43,28 +43,34 @@ pub struct SystemId(Entity, std::marker::PhantomData O> // A manual impl is used because the trait bounds should ignore the `I` and `O` phantom parameters. impl Copy for SystemId {} + // A manual impl is used because the trait bounds should ignore the `I` and `O` phantom parameters. impl Clone for SystemId { fn clone(&self) -> Self { *self } } + // A manual impl is used because the trait bounds should ignore the `I` and `O` phantom parameters. impl PartialEq for SystemId { fn eq(&self, other: &Self) -> bool { self.0 == other.0 && self.1 == other.1 } } + // A manual impl is used because the trait bounds should ignore the `I` and `O` phantom parameters. impl std::hash::Hash for SystemId { fn hash(&self, state: &mut H) { self.0.hash(state); } } + impl std::fmt::Debug for SystemId { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - // The PhantomData field is omitted for simplicity. - f.debug_tuple("SystemId").field(&self.0).finish() + f.debug_tuple("SystemId") + .field(&self.0) + .field(&self.1) + .finish() } }