Skip to content

Commit e2981ad

Browse files
committed
fix: remove insert loops
1 parent ed4379f commit e2981ad

1 file changed

Lines changed: 11 additions & 12 deletions

File tree

rust/operator-binary/src/controller/build/properties/config_properties.rs

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -192,13 +192,12 @@ pub fn build(
192192
}
193193

194194
// Authentication properties (only contributes when authentication is enabled).
195-
for (k, v) in cluster
196-
.cluster_config
197-
.authentication
198-
.config_properties(&role)
199-
{
200-
props.insert(k, v);
201-
}
195+
props.extend(
196+
cluster
197+
.cluster_config
198+
.authentication
199+
.config_properties(&role),
200+
);
202201

203202
// Discovery URI.
204203
if let Some(coordinator_ref) = cluster.cluster_config.coordinator_pod_refs.first() {
@@ -215,11 +214,11 @@ pub fn build(
215214
}
216215

217216
// Graceful shutdown.
218-
for (k, v) in crate::controller::build::graceful_shutdown::graceful_shutdown_config_properties(
219-
cluster, role,
220-
) {
221-
props.insert(k, v);
222-
}
217+
props.extend(
218+
crate::controller::build::graceful_shutdown::graceful_shutdown_config_properties(
219+
cluster, role,
220+
),
221+
);
223222

224223
// Fault-tolerant execution.
225224
if let Some(fte) = &cluster.cluster_config.fault_tolerant_execution {

0 commit comments

Comments
 (0)