File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -402,7 +402,7 @@ impl CodeGenerator<'_> {
402
402
403
403
fn append_field ( & mut self , fq_message_name : & str , field : & Field ) {
404
404
let type_ = field. descriptor . r#type ( ) ;
405
- let repeated = field. descriptor . label == Some ( Label :: Repeated as i32 ) ;
405
+ let repeated = field. descriptor . label ( ) == Label :: Repeated ;
406
406
let deprecated = self . deprecated ( & field. descriptor ) ;
407
407
let optional = self . optional ( & field. descriptor ) ;
408
408
let boxed = self . boxed ( & field. descriptor , fq_message_name, None ) ;
@@ -1069,7 +1069,7 @@ impl CodeGenerator<'_> {
1069
1069
fq_message_name : & str ,
1070
1070
oneof : Option < & str > ,
1071
1071
) -> bool {
1072
- let repeated = field. label == Some ( Label :: Repeated as i32 ) ;
1072
+ let repeated = field. label ( ) == Label :: Repeated ;
1073
1073
let fd_type = field. r#type ( ) ;
1074
1074
if !repeated
1075
1075
&& ( fd_type == Type :: Message || fd_type == Type :: Group )
You can’t perform that action at this time.
0 commit comments