From 418b470d4aa4c1d5d46bd95c3e9f661a6ab605bf Mon Sep 17 00:00:00 2001 From: Novattz Date: Sat, 3 Jan 2026 00:24:23 +0100 Subject: [PATCH] format --- src-tauri/src/config.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src-tauri/src/config.rs b/src-tauri/src/config.rs index 188770b..61b609d 100644 --- a/src-tauri/src/config.rs +++ b/src-tauri/src/config.rs @@ -3,10 +3,10 @@ use std::fs; use std::path::PathBuf; use log::info; -/// User configuration structure +// User configuration structure #[derive(Debug, Clone, Serialize, Deserialize)] pub struct Config { - /// Whether to show the disclaimer on startup + // Whether to show the disclaimer on startup pub show_disclaimer: bool, } @@ -18,7 +18,7 @@ impl Default for Config { } } -/// Get the config directory path (~/.config/creamlinux) +// Get the config directory path (~/.config/creamlinux) fn get_config_dir() -> Result { let home = std::env::var("HOME") .map_err(|_| "Failed to get HOME directory".to_string())?; @@ -27,13 +27,13 @@ fn get_config_dir() -> Result { Ok(config_dir) } -/// Get the config file path +// Get the config file path fn get_config_path() -> Result { let config_dir = get_config_dir()?; Ok(config_dir.join("config.json")) } -/// Ensure the config directory exists +// Ensure the config directory exists fn ensure_config_dir() -> Result<(), String> { let config_dir = get_config_dir()?; @@ -46,7 +46,7 @@ fn ensure_config_dir() -> Result<(), String> { Ok(()) } -/// Load configuration from disk +// Load configuration from disk pub fn load_config() -> Result { ensure_config_dir()?; @@ -71,7 +71,7 @@ pub fn load_config() -> Result { Ok(config) } -/// Save configuration to disk +// Save configuration to disk pub fn save_config(config: &Config) -> Result<(), String> { ensure_config_dir()?; @@ -87,7 +87,7 @@ pub fn save_config(config: &Config) -> Result<(), String> { Ok(()) } -/// Update a specific config value +// Update a specific config value pub fn update_config(updater: F) -> Result where F: FnOnce(&mut Config),