From 8b6f54d635e5fde1bc7365b1a46516f0dd8f2ba2 Mon Sep 17 00:00:00 2001 From: IAvecilla Date: Thu, 22 Feb 2024 18:33:13 -0300 Subject: [PATCH] Remove unnecesary clones --- node/tools/src/k8s.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/node/tools/src/k8s.rs b/node/tools/src/k8s.rs index a1abfd01..ba2f39b4 100644 --- a/node/tools/src/k8s.rs +++ b/node/tools/src/k8s.rs @@ -32,7 +32,7 @@ pub async fn get_client() -> anyhow::Result { /// Get the IP addresses and the exposed port of the RPC server of the consensus nodes in the kubernetes cluster. pub async fn get_consensus_nodes_address(client: &Client) -> anyhow::Result> { - let pods: Api = Api::namespaced(client.clone(), DEFAULT_NAMESPACE); + let pods: Api = Api::namespaced(client.to_owned(), DEFAULT_NAMESPACE); let lp = ListParams::default(); let pods = pods.list(&lp).await?; ensure!( @@ -42,7 +42,7 @@ pub async fn get_consensus_nodes_address(client: &Client) -> anyhow::Result = pods .into_iter() .filter_map(|pod| { - let pod_spec = pod.spec.clone().context("Failed to get pod spec").ok()?; + let pod_spec = pod.spec.context("Failed to get pod spec").ok()?; let pod_running_container = pod_spec .containers .first() @@ -156,7 +156,7 @@ pub async fn create_tests_deployment(client: &Client) -> anyhow::Result<()> { ..Default::default() }; - let deployments: Api = Api::namespaced(client.clone(), DEFAULT_NAMESPACE); + let deployments: Api = Api::namespaced(client.to_owned(), DEFAULT_NAMESPACE); let post_params = PostParams::default(); let result = deployments.create(&post_params, &deployment).await?;