From 877e664df9ebfd28e3295dbf94b1512b2b39020f Mon Sep 17 00:00:00 2001 From: yuni Date: Mon, 17 Jun 2024 02:03:19 +0200 Subject: [PATCH] cleanup --- src/var.rs | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/var.rs b/src/var.rs index 20cdcad..a593c37 100644 --- a/src/var.rs +++ b/src/var.rs @@ -483,16 +483,14 @@ impl Preferences { pub fn save(&self) { if let Some(path) = get_prefs_path() { match toml_edit::ser::to_document::(self) { - Ok(doc) => { - match fs::write(path.clone(), doc.to_string()) { - Ok(_) => { - info!("Saved preferences to {path}."); - } - Err(error) => { - error!("Error while writing preferences: {:?}", error); - } + Ok(doc) => match fs::write(path.clone(), doc.to_string()) { + Ok(_) => { + info!("Saved preferences to {path}."); } - } + Err(error) => { + error!("Error while writing preferences: {:?}", error); + } + }, Err(error) => { error!("Error while writing preferences: {:?}", error); }