From 1d0689556ddf370f03901f6a3e649d455e38891e Mon Sep 17 00:00:00 2001 From: Shaun Arman Date: Sat, 6 Jun 2026 13:30:35 -0500 Subject: [PATCH] fix(fmt): format code with cargo fmt --- src-tauri/src/commands/kube.rs | 11 ++++++----- src-tauri/src/kube/client.rs | 8 +++++++- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src-tauri/src/commands/kube.rs b/src-tauri/src/commands/kube.rs index b997cb2e..f25e5529 100644 --- a/src-tauri/src/commands/kube.rs +++ b/src-tauri/src/commands/kube.rs @@ -69,8 +69,8 @@ pub async fn add_cluster( } fn extract_context(content: &str) -> Result { - let value: Value = serde_yaml::from_str(content) - .map_err(|e| format!("Invalid kubeconfig YAML: {}", e))?; + let value: Value = + serde_yaml::from_str(content).map_err(|e| format!("Invalid kubeconfig YAML: {}", e))?; let contexts = value .get("contexts") @@ -88,8 +88,8 @@ fn extract_context(content: &str) -> Result { } fn extract_server_url(content: &str) -> Result { - let value: Value = serde_yaml::from_str(content) - .map_err(|e| format!("Invalid kubeconfig YAML: {}", e))?; + let value: Value = + serde_yaml::from_str(content).map_err(|e| format!("Invalid kubeconfig YAML: {}", e))?; let clusters = value .get("clusters") @@ -147,7 +147,8 @@ pub async fn start_port_forward( let session_id = uuid::Uuid::now_v7().to_string(); let clusters = state.clusters.lock().await; - let cluster = clusters.get(&request.cluster_id) + let cluster = clusters + .get(&request.cluster_id) .ok_or_else(|| format!("Cluster {} not found", request.cluster_id))?; let cluster_name = cluster.name.clone(); diff --git a/src-tauri/src/kube/client.rs b/src-tauri/src/kube/client.rs index 0a507052..81f11cf7 100644 --- a/src-tauri/src/kube/client.rs +++ b/src-tauri/src/kube/client.rs @@ -9,7 +9,13 @@ pub struct ClusterClient { } impl ClusterClient { - pub fn new(id: String, name: String, context: String, server_url: String, kubeconfig_content: Arc) -> Self { + pub fn new( + id: String, + name: String, + context: String, + server_url: String, + kubeconfig_content: Arc, + ) -> Self { Self { id, name,