Skip to content

Commit b56b0cf

Browse files
committed
chore: Use borrows
1 parent 5e08d1d commit b56b0cf

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

rust/operator-binary/src/hbase_controller.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -993,11 +993,8 @@ fn build_rolegroup_statefulset(
993993

994994
// Vector sidecar shall be the last container in the list
995995
if merged_config.logging().enable_vector_agent {
996-
if let Some(vector_aggregator_config_map_name) = hbase
997-
.spec
998-
.cluster_config
999-
.vector_aggregator_config_map_name
1000-
.to_owned()
996+
if let Some(vector_aggregator_config_map_name) =
997+
&hbase.spec.cluster_config.vector_aggregator_config_map_name
1001998
{
1002999
pod_builder.add_container(
10031000
product_logging::framework::vector_container(
@@ -1011,7 +1008,7 @@ fn build_rolegroup_statefulset(
10111008
.with_memory_request("128Mi")
10121009
.with_memory_limit("128Mi")
10131010
.build(),
1014-
&vector_aggregator_config_map_name,
1011+
vector_aggregator_config_map_name,
10151012
)
10161013
.context(ConfigureLoggingSnafu)?,
10171014
);

rust/operator-binary/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ fn references_config_map(
203203

204204
hbase.spec.cluster_config.zookeeper_config_map_name == config_map.name_any()
205205
|| hbase.spec.cluster_config.hdfs_config_map_name == config_map.name_any()
206-
|| match hbase.spec.cluster_config.authorization.to_owned() {
206+
|| match &hbase.spec.cluster_config.authorization {
207207
Some(hbase_authorization) => {
208208
hbase_authorization.opa.config_map_name == config_map.name_any()
209209
}

0 commit comments

Comments
 (0)