Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src-tauri/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ mod database_tests;
use std::sync::Arc;
use std::time::Duration;
use tauri::{AppHandle, Manager, State};
use tauri::async_runtime::sleep;
use tokio::time::sleep;
use tokio::sync::Mutex;

use database::Database;
Expand Down Expand Up @@ -114,7 +114,7 @@ async fn update_tool_settings(
}

// Stage 3: persist settings and recreate container if installed
let mut state = state.lock().await;
let state = state.lock().await;

// Update ports
if let Some(tool_def) = state.registry.get(&tool_id) {
Expand Down Expand Up @@ -259,7 +259,7 @@ pub fn run() {
app.manage(state);

// Start auto-start tools once Docker is reachable
let state_for_autostart = app.state::<Arc<Mutex<AppState>>>().cloned().unwrap();
let state_for_autostart = app.state::<Arc<Mutex<AppState>>>().inner().clone();
tauri::async_runtime::spawn(async move {
loop {
{
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/src/tools/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ impl ToolRegistry {
tool_id: &str,
defaults: Option<ToolCredentials>,
) -> Result<Option<ToolCredentials>> {
let mut creds = defaults.unwrap_or_else(|| ToolCredentials {
let mut creds = defaults.clone().unwrap_or_else(|| ToolCredentials {
username: None,
password: None,
access_key: None,
Expand Down
Loading