@@ -198,14 +198,14 @@ impl RuntimeConfig {
198
198
existing_opts : Option < & HashMap < Authority , ParsedClientTlsOpts > > ,
199
199
host : Authority ,
200
200
newopts : ParsedClientTlsOpts ,
201
- ) -> Option < ( Authority , ParsedClientTlsOpts ) > {
201
+ ) -> ( Authority , ParsedClientTlsOpts ) {
202
202
match existing_opts {
203
- None => Some ( ( host, newopts. clone ( ) ) ) ,
203
+ None => ( host, newopts) ,
204
204
Some ( opts) => match opts. get ( & host) {
205
205
Some ( existing_opts_for_component_and_host) => {
206
- Some ( ( host, existing_opts_for_component_and_host. to_owned ( ) ) )
206
+ ( host, existing_opts_for_component_and_host. to_owned ( ) )
207
207
}
208
- None => Some ( ( host, newopts. clone ( ) ) ) ,
208
+ None => ( host, newopts) ,
209
209
} ,
210
210
}
211
211
}
@@ -214,21 +214,21 @@ impl RuntimeConfig {
214
214
for opts in & opt_layer. client_tls_opts {
215
215
let parsed = parse_client_tls_opts ( opts) . context ( "parsing client tls options" ) ?;
216
216
for component_id in & opts. component_ids {
217
- let existing_opts_for_component = components_map. get ( & component_id. to_string ( ) ) ;
217
+ let existing_opts_for_component = components_map. get ( component_id. as_ref ( ) ) ;
218
218
#[ allow( clippy:: mutable_key_type) ]
219
219
let hostmap = parsed
220
220
. hosts
221
221
. clone ( )
222
222
. into_iter ( )
223
- . filter_map ( |host| {
223
+ . map ( |host| {
224
224
use_existing_if_available (
225
225
existing_opts_for_component,
226
226
host,
227
227
parsed. clone ( ) ,
228
228
)
229
229
} )
230
230
. collect :: < HashMap < Authority , ParsedClientTlsOpts > > ( ) ;
231
- components_map. insert ( component_id. to_string ( ) . to_owned ( ) , hostmap) ;
231
+ components_map. insert ( component_id. to_string ( ) , hostmap) ;
232
232
}
233
233
}
234
234
}
0 commit comments