fix(fmt): format code with cargo fmt
Some checks failed
Test / frontend-tests (pull_request) Successful in 1m22s
Test / frontend-typecheck (pull_request) Successful in 1m33s
PR Review Automation / review (pull_request) Successful in 3m29s
Test / rust-fmt-check (pull_request) Successful in 10m27s
Test / rust-clippy (pull_request) Failing after 12m9s
Test / rust-tests (pull_request) Successful in 13m37s

This commit is contained in:
Shaun Arman 2026-06-06 13:30:35 -05:00
parent c2e0f47bbe
commit 1d0689556d
2 changed files with 13 additions and 6 deletions

View File

@ -69,8 +69,8 @@ pub async fn add_cluster(
} }
fn extract_context(content: &str) -> Result<String, String> { fn extract_context(content: &str) -> Result<String, String> {
let value: Value = serde_yaml::from_str(content) let value: Value =
.map_err(|e| format!("Invalid kubeconfig YAML: {}", e))?; serde_yaml::from_str(content).map_err(|e| format!("Invalid kubeconfig YAML: {}", e))?;
let contexts = value let contexts = value
.get("contexts") .get("contexts")
@ -88,8 +88,8 @@ fn extract_context(content: &str) -> Result<String, String> {
} }
fn extract_server_url(content: &str) -> Result<String, String> { fn extract_server_url(content: &str) -> Result<String, String> {
let value: Value = serde_yaml::from_str(content) let value: Value =
.map_err(|e| format!("Invalid kubeconfig YAML: {}", e))?; serde_yaml::from_str(content).map_err(|e| format!("Invalid kubeconfig YAML: {}", e))?;
let clusters = value let clusters = value
.get("clusters") .get("clusters")
@ -147,7 +147,8 @@ pub async fn start_port_forward(
let session_id = uuid::Uuid::now_v7().to_string(); let session_id = uuid::Uuid::now_v7().to_string();
let clusters = state.clusters.lock().await; 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))?; .ok_or_else(|| format!("Cluster {} not found", request.cluster_id))?;
let cluster_name = cluster.name.clone(); let cluster_name = cluster.name.clone();

View File

@ -9,7 +9,13 @@ pub struct ClusterClient {
} }
impl ClusterClient { impl ClusterClient {
pub fn new(id: String, name: String, context: String, server_url: String, kubeconfig_content: Arc<String>) -> Self { pub fn new(
id: String,
name: String,
context: String,
server_url: String,
kubeconfig_content: Arc<String>,
) -> Self {
Self { Self {
id, id,
name, name,