File tree Expand file tree Collapse file tree 1 file changed +14
-22
lines changed
apollo-router/src/plugins/connectors Expand file tree Collapse file tree 1 file changed +14
-22
lines changed Original file line number Diff line number Diff line change @@ -116,17 +116,13 @@ impl RequestInputs {
116
116
. unwrap_or_default ( )
117
117
. iter ( )
118
118
. filter_map ( |( key, value) | {
119
- if headers_used. contains ( key. as_str ( ) ) {
120
- return Some ( (
121
- key. as_str ( ) . into ( ) ,
122
- value
123
- . iter ( )
124
- . map ( |s| Value :: String ( s. as_str ( ) . into ( ) ) )
125
- . collect ( ) ,
126
- ) ) ;
127
- }
128
-
129
- None
119
+ headers_used. contains ( key. as_str ( ) ) . then_some ( (
120
+ key. as_str ( ) . into ( ) ,
121
+ value
122
+ . iter ( )
123
+ . map ( |s| Value :: String ( s. as_str ( ) . into ( ) ) )
124
+ . collect ( ) ,
125
+ ) )
130
126
} )
131
127
. collect ( ) ;
132
128
let request_object = json ! ( {
@@ -144,17 +140,13 @@ impl RequestInputs {
144
140
. unwrap_or_default ( )
145
141
. iter ( )
146
142
. filter_map ( |( key, value) | {
147
- if headers_used. contains ( key. as_str ( ) ) {
148
- return Some ( (
149
- key. as_str ( ) . into ( ) ,
150
- value
151
- . iter ( )
152
- . map ( |s| Value :: String ( s. as_str ( ) . into ( ) ) )
153
- . collect ( ) ,
154
- ) ) ;
155
- }
156
-
157
- None
143
+ headers_used. contains ( key. as_str ( ) ) . then_some ( (
144
+ key. as_str ( ) . into ( ) ,
145
+ value
146
+ . iter ( )
147
+ . map ( |s| Value :: String ( s. as_str ( ) . into ( ) ) )
148
+ . collect ( ) ,
149
+ ) )
158
150
} )
159
151
. collect ( ) ;
160
152
let response_object = json ! ( {
You can’t perform that action at this time.
0 commit comments