diff --git a/package-lock.json b/package-lock.json index dfa58f0..3d194ce 100644 --- a/package-lock.json +++ b/package-lock.json @@ -21,7 +21,7 @@ "svelte-check": "^4.0.0", "svelte-preprocess": "^6.0.2", "tslib": "^2.7.0", - "typescript": "^5.5.4", + "typescript": "^5.6.2", "vite": "^4.4.4" } }, @@ -1319,9 +1319,9 @@ "dev": true }, "node_modules/typescript": { - "version": "5.5.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz", - "integrity": "sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==", + "version": "5.6.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.2.tgz", + "integrity": "sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==", "dev": true, "bin": { "tsc": "bin/tsc", diff --git a/package.json b/package.json index a347a30..c4b761b 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "svelte-preprocess": "^6.0.2", "tslib": "^2.7.0", "svelte": "^4.2.19", - "typescript": "^5.5.4", + "typescript": "^5.6.2", "vite": "^4.4.4", "@tauri-apps/cli": "^1.6.1" } diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index e457e62..8aefb72 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -58,10 +58,7 @@ async fn load_settings(handle: tauri::AppHandle) -> Result { file.read_to_string(&mut contents) .await .map_err(|e| e.to_string())?; - match serde_json::from_str(&contents) { - Ok(options) => options, - Err(_) => Default::default(), - } + serde_json::from_str(&contents).unwrap_or_default() } else { Default::default() };