File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ pub(super) fn request_header_codec_inner(
6666 field_name. span ( ) ,
6767 ) ;
6868 let type_name = if let Some ( value) = & has_option {
69- get_type_name ( * value)
69+ get_type_name ( value)
7070 } else {
7171 get_type_name ( & field. ty )
7272 } ;
@@ -75,7 +75,7 @@ pub(super) fn request_header_codec_inner(
7575 const #static_name: & ' static str = #camel_case_name;
7676 } ,
7777 (
78- if let Some ( _ ) = has_option {
78+ if has_option . is_some ( ) {
7979 if type_name == "CheetahString" {
8080 quote ! {
8181 if let Some ( ref value) = self . #field_name {
@@ -104,8 +104,7 @@ pub(super) fn request_header_codec_inner(
104104 }
105105 }
106106 }
107- } else {
108- if type_name == "CheetahString" {
107+ } else if type_name == "CheetahString" {
109108 quote ! {
110109 map. insert (
111110 cheetah_string:: CheetahString :: from_static_str( Self :: #static_name) ,
@@ -127,7 +126,7 @@ pub(super) fn request_header_codec_inner(
127126 ) ;
128127 }
129128 }
130- } ,
129+ ,
131130 // build FromMap impl
132131 if let Some ( value) = has_option {
133132 if type_name == "CheetahString" || type_name == "String" {
You can’t perform that action at this time.
0 commit comments