From 30c5741454ddd63bca431af51dc31b72a8e915b8 Mon Sep 17 00:00:00 2001 From: greg Date: Tue, 14 Nov 2023 19:48:40 +0000 Subject: [PATCH] fix some code quality stuff --- k8s-cluster/src/kubernetes.rs | 6 +++--- k8s-cluster/src/main.rs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/k8s-cluster/src/kubernetes.rs b/k8s-cluster/src/kubernetes.rs index 946c5673de6530..d9d7c4ab4a98a3 100644 --- a/k8s-cluster/src/kubernetes.rs +++ b/k8s-cluster/src/kubernetes.rs @@ -281,7 +281,7 @@ impl<'a> Kubernetes<'a> { ..Default::default() }]; - if let Some(_) = &self.metrics { + if self.metrics.is_some() { env_var.push(self.get_metrics_env_var_secret()) } @@ -689,7 +689,7 @@ impl<'a> Kubernetes<'a> { label_selector: &BTreeMap, ) -> Result> { let mut env_vars = self.set_non_bootstrap_environment_variables(); - if let Some(_) = &self.metrics { + if self.metrics.is_some() { env_vars.push(self.get_metrics_env_var_secret()) } @@ -740,7 +740,7 @@ impl<'a> Kubernetes<'a> { label_selector: &BTreeMap, ) -> Result> { let mut env_vars = self.set_non_bootstrap_environment_variables(); - if let Some(_) = &self.metrics { + if self.metrics.is_some() { env_vars.push(self.get_metrics_env_var_secret()) } diff --git a/k8s-cluster/src/main.rs b/k8s-cluster/src/main.rs index 11bae7b8e97bc8..40e92d61516902 100644 --- a/k8s-cluster/src/main.rs +++ b/k8s-cluster/src/main.rs @@ -790,7 +790,7 @@ async fn main() { .value_of("validator_image_name") .expect("Validator image name is required"); - if let Some(_) = &kub_controller.metrics { + if kub_controller.metrics.is_some() { let metrics_secret = match kub_controller.create_metrics_secret() { Ok(secret) => secret, Err(err) => {