File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -127,6 +127,8 @@ mod tests {
127
127
128
128
#[ test]
129
129
fn deserialize_modified_field_order ( ) {
130
+ // field order doesn't matter since we encode field names
131
+
130
132
#[ derive( Serialize , Deserialize , Debug , PartialEq ) ]
131
133
struct TestV1 {
132
134
a : String ,
@@ -160,7 +162,7 @@ mod tests {
160
162
161
163
#[ test]
162
164
fn deserialize_new_fields ( ) {
163
- // fields can be added, but only to the end of the struct
165
+ // new fields can be added at the end
164
166
165
167
#[ derive( Serialize , Deserialize , Debug , PartialEq ) ]
166
168
struct TestV1 {
@@ -190,8 +192,7 @@ mod tests {
190
192
191
193
#[ test]
192
194
fn deserialize_new_fields_in_the_middle ( ) {
193
- // fields can be added, but only to the end of the struct
194
-
195
+ // fields can be added even in the middle
195
196
#[ derive( Serialize , Deserialize , Debug , PartialEq ) ]
196
197
struct TestV1 {
197
198
a : String ,
You can’t perform that action at this time.
0 commit comments