From ca3068a1fc4c96a38a12f2812c13593014c0682f Mon Sep 17 00:00:00 2001 From: Chris Juchem Date: Tue, 4 Jul 2023 15:08:51 -0400 Subject: [PATCH] Derive Eq, PartialEq for Tick (#9020) # Objective - Remove need to call `.get()` on two ticks to compare them for equality. ## Solution - Derive `Eq` and `PartialEq`. --- ## Changelog > `Tick` now implements `Eq` and `PartialEq` --- crates/bevy_ecs/src/component.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/bevy_ecs/src/component.rs b/crates/bevy_ecs/src/component.rs index 2e5700f2fd..4bdc7572e0 100644 --- a/crates/bevy_ecs/src/component.rs +++ b/crates/bevy_ecs/src/component.rs @@ -645,7 +645,7 @@ impl Components { /// A value that tracks when a system ran relative to other systems. /// This is used to power change detection. -#[derive(Copy, Clone, Debug)] +#[derive(Copy, Clone, Debug, Eq, PartialEq)] pub struct Tick { tick: u32, }