File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -383,7 +383,7 @@ impl<'b> CodeGenerator<'_, 'b> {
383383
384384 fn append_field ( & mut self , fq_message_name : & str , field : & Field ) {
385385 let type_ = field. descriptor . r#type ( ) ;
386- let repeated = field. descriptor . label == Some ( Label :: Repeated as i32 ) ;
386+ let repeated = field. descriptor . label ( ) == Label :: Repeated ;
387387 let deprecated = self . deprecated ( & field. descriptor ) ;
388388 let optional = self . optional ( & field. descriptor ) ;
389389 let boxed = self
Original file line number Diff line number Diff line change @@ -141,7 +141,7 @@ impl<'a> Context<'a> {
141141 oneof : Option < & str > ,
142142 field : & FieldDescriptorProto ,
143143 ) -> bool {
144- let repeated = field. label == Some ( Label :: Repeated as i32 ) ;
144+ let repeated = field. label ( ) == Label :: Repeated ;
145145 let fd_type = field. r#type ( ) ;
146146 if !repeated
147147 && ( fd_type == Type :: Message || fd_type == Type :: Group )
You can’t perform that action at this time.
0 commit comments