@@ -2,7 +2,7 @@ use crate::bounds::{BoundingBox, RenderBoundingBox};
22use crate :: transform:: ApplyTransform ;
33use crate :: uuid:: NodeId ;
44use crate :: { AlphaBlending , math:: quad:: Quad } ;
5- use dyn_any:: StaticType ;
5+ use dyn_any:: { StaticType , StaticTypeSized } ;
66use glam:: DAffine2 ;
77use std:: hash:: Hash ;
88
@@ -203,6 +203,18 @@ impl<T: Hash> Hash for Table<T> {
203203 for element in & self . element {
204204 element. hash ( state) ;
205205 }
206+ for transform in & self . transform {
207+ transform. to_cols_array ( ) . map ( |x| x. to_bits ( ) ) . hash ( state) ;
208+ }
209+ for alpha_blending in & self . alpha_blending {
210+ alpha_blending. hash ( state) ;
211+ }
212+ }
213+ }
214+
215+ impl < T : PartialEq > PartialEq for Table < T > {
216+ fn eq ( & self , other : & Self ) -> bool {
217+ self . element == other. element && self . transform == other. transform && self . alpha_blending == other. alpha_blending
206218 }
207219}
208220
@@ -220,14 +232,8 @@ impl<T> ApplyTransform for Table<T> {
220232 }
221233}
222234
223- impl < T : PartialEq > PartialEq for Table < T > {
224- fn eq ( & self , other : & Self ) -> bool {
225- self . element . len ( ) == other. element . len ( ) && { self . element . iter ( ) . zip ( other. element . iter ( ) ) . all ( |( a, b) | a == b) }
226- }
227- }
228-
229- unsafe impl < T : StaticType + ' static > StaticType for Table < T > {
230- type Static = Table < T > ;
235+ unsafe impl < T : StaticTypeSized > StaticType for Table < T > {
236+ type Static = Table < T :: Static > ;
231237}
232238
233239impl < T > FromIterator < TableRow < T > > for Table < T > {
0 commit comments