This commit is contained in:
yuni 2024-06-17 02:03:19 +02:00
parent c8825fb99b
commit 877e664df9

View file

@ -483,16 +483,14 @@ impl Preferences {
pub fn save(&self) {
if let Some(path) = get_prefs_path() {
match toml_edit::ser::to_document::<Preferences>(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);
}