fix(fmt): format code with cargo fmt

This commit is contained in:
Shaun Arman 2026-06-06 12:04:21 -05:00
parent 6cb5b58cc9
commit 1a07a1bac4
4 changed files with 13 additions and 24 deletions

View File

@ -337,7 +337,9 @@ pub async fn initiate_oauth(
pending_approvals, pending_approvals,
clusters: Arc::new(tokio::sync::Mutex::new(std::collections::HashMap::new())), clusters: Arc::new(tokio::sync::Mutex::new(std::collections::HashMap::new())),
port_forwards: Arc::new(tokio::sync::Mutex::new(std::collections::HashMap::new())), port_forwards: Arc::new(tokio::sync::Mutex::new(std::collections::HashMap::new())),
refresh_registry: Arc::new(tokio::sync::Mutex::new(crate::kube::RefreshRegistry::new())), refresh_registry: Arc::new(tokio::sync::Mutex::new(
crate::kube::RefreshRegistry::new(),
)),
}; };
while let Some(callback) = callback_rx.recv().await { while let Some(callback) = callback_rx.recv().await {
tracing::info!("Received OAuth callback for state: {}", callback.state); tracing::info!("Received OAuth callback for state: {}", callback.state);

View File

@ -61,10 +61,7 @@ pub async fn add_cluster(
} }
#[tauri::command] #[tauri::command]
pub async fn remove_cluster( pub async fn remove_cluster(id: String, state: State<'_, AppState>) -> Result<(), String> {
id: String,
state: State<'_, AppState>,
) -> Result<(), String> {
let mut clusters = state.clusters.lock().await; let mut clusters = state.clusters.lock().await;
if clusters.remove(&id).is_none() { if clusters.remove(&id).is_none() {
@ -75,9 +72,7 @@ pub async fn remove_cluster(
} }
#[tauri::command] #[tauri::command]
pub async fn list_clusters( pub async fn list_clusters(state: State<'_, AppState>) -> Result<Vec<ClusterInfo>, String> {
state: State<'_, AppState>,
) -> Result<Vec<ClusterInfo>, String> {
let clusters = state.clusters.lock().await; let clusters = state.clusters.lock().await;
let cluster_list: Vec<ClusterInfo> = clusters let cluster_list: Vec<ClusterInfo> = clusters
@ -127,10 +122,7 @@ pub async fn start_port_forward(
} }
#[tauri::command] #[tauri::command]
pub async fn stop_port_forward( pub async fn stop_port_forward(id: String, state: State<'_, AppState>) -> Result<(), String> {
id: String,
state: State<'_, AppState>,
) -> Result<(), String> {
let mut port_forwards = state.port_forwards.lock().await; let mut port_forwards = state.port_forwards.lock().await;
if let Some(session) = port_forwards.get_mut(&id) { if let Some(session) = port_forwards.get_mut(&id) {

View File

@ -6,12 +6,7 @@ pub struct ClusterClient {
} }
impl ClusterClient { impl ClusterClient {
pub fn new( pub fn new(id: String, name: String, context: String, server_url: String) -> Self {
id: String,
name: String,
context: String,
server_url: String,
) -> Self {
Self { Self {
id, id,
name, name,

View File

@ -1,6 +1,6 @@
use std::collections::HashMap; use std::collections::HashMap;
use tokio::sync::RwLock;
use std::sync::Arc; use std::sync::Arc;
use tokio::sync::RwLock;
pub struct RefreshRegistry { pub struct RefreshRegistry {
domains: HashMap<String, Domain>, domains: HashMap<String, Domain>,