File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -55,6 +55,7 @@ fn serialize_fields(
55
55
. iter ( )
56
56
. filter ( |field| !field. skip_serializing_if . is_always ( ) )
57
57
. map ( |field| {
58
+ // index should only be none if the field is always skipped, so this should never panic
58
59
let index = field. index . expect ( "index must be set for fields that are not skipped" ) + offset;
59
60
let member = & field. member ;
60
61
let serialize_member = match & field. serialize_with {
@@ -223,6 +224,7 @@ fn match_fields(
223
224
. map ( |field| {
224
225
let label = field. label . clone ( ) ;
225
226
let ident = format_ident ! ( "{}" , & field. label) ;
227
+ // index should only be none if the field is always skipped, so this should never panic
226
228
let index = field. index . expect ( "index must be set for fields that are not skipped" ) + offset;
227
229
let span = field. original_span ;
228
230
You can’t perform that action at this time.
0 commit comments