Skip to content

Open-source download manager & offline media toolbox for YouTube, music, social media, learning platforms & 1,800+ sites. Built with Tauri 2.0, Rust & Svelte.

feat: update error message for invalid JSON in update_settings function

Tonho0d1c7275a5fd
diff --git a/src-tauri/src/commands/settings.rs b/src-tauri/src/commands/settings.rs
index 26ba7281..f3e0b6a4 100644
--- a/src-tauri/src/commands/settings.rs
+++ b/src-tauri/src/commands/settings.rs
@@ -14,7 +14,7 @@ pub fn update_settings(app: tauri::AppHandle, partial: String) -> Result<AppSett
let old_hotkey_binding = current.download.hotkey_binding.clone();
let patch: serde_json::Value =
- serde_json::from_str(&partial).map_err(|e| format!("JSON inválido: {}", e))?;
+ serde_json::from_str(&partial).map_err(|e| format!("Invalid JSON: {}", e))?;
let mut current_val =
serde_json::to_value(&current).map_err(|e| format!("Serialize: {}", e))?;
merge_json(&mut current_val, &patch);