This took me all afternoon to find 😅 It caused issues in that internal system we have that starts with L and ends with X.
You can iterate over the fields in a struct either from a &dyn Struct or a StructType however the order was not consistent. When iterating over the fields in a value it used declaration order, whereas the type order was alphabetically. This fixes that so the type ordering is also based on the declaration.
This took me all afternoon to find 😅 It caused issues in that internal system we have that starts with L and ends with X.
You can iterate over the fields in a struct either from a
&dyn Struct
or aStructType
however the order was not consistent. When iterating over the fields in a value it used declaration order, whereas the type order was alphabetically. This fixes that so the type ordering is also based on the declaration.