cleanup
This commit is contained in:
parent
c8825fb99b
commit
877e664df9
|
@ -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(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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue