We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 108e2a3 commit 71ea773Copy full SHA for 71ea773
crates/trigger/src/runtime_config.rs
@@ -196,11 +196,12 @@ impl RuntimeConfig {
196
for opts in &opt_layer.client_tls_opts {
197
let parsed = parse_client_tls_opts(opts).context("parsing client tls options")?;
198
for component_id in &opts.component_ids {
199
- let mut hostmap: HashMap<Authority, ParsedClientTlsOpts> = HashMap::new();
200
- for host in &parsed.hosts {
201
- hostmap.insert(host.to_owned(), parsed.clone());
202
- }
203
-
+ let hostmap = parsed
+ .hosts
+ .clone()
+ .into_iter()
+ .map(|host| (host, parsed.clone()))
204
+ .collect::<HashMap<Authority, ParsedClientTlsOpts>>();
205
components_map.insert(component_id.to_owned(), hostmap);
206
}
207
0 commit comments