Skip to content

Commit f38deac

Browse files
committed
improve code quality
1 parent 79a1930 commit f38deac

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

rust/operator-binary/src/controller.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -578,21 +578,18 @@ pub async fn reconcile_nifi(
578578
.await
579579
.context(FailedToCreatePdbSnafu)?;
580580

581-
let role_name = match &nifi_role {
582-
NifiRole::Node => "node".to_string(),
583-
};
584581
let role_group_listener = build_group_listener(
585582
nifi,
586583
build_recommended_labels(nifi, NIFI_CONTROLLER_NAME, &nifi_role.to_string(), "none"),
587584
listener_class.to_owned(),
588-
group_listener_name(nifi, &role_name),
585+
group_listener_name(nifi, &nifi_role.to_string()),
589586
)
590587
.context(ListenerConfigurationSnafu)?;
591588

592589
cluster_resources
593590
.add(client, role_group_listener)
594591
.await
595-
.with_context(|_| ApplyGroupListenerSnafu)?;
592+
.context(ApplyGroupListenerSnafu)?;
596593
}
597594

598595
// Only add the reporting task in case it is enabled.

0 commit comments

Comments
 (0)