Use config folder (#110)

This commit is contained in:
Philip Kristoffersen
2022-05-01 07:14:24 +02:00
committed by GitHub
parent 44bebfc59e
commit 9fdf56d5ed
9 changed files with 117 additions and 18 deletions
+3 -2
View File
@@ -127,8 +127,9 @@ impl MyEguiApp {
});
}
fn save_settings_to_file(settings: &Settings) {
pub fn save_settings_to_file(settings: &Settings) {
let toml = toml::to_string(&settings).unwrap();
std::fs::write("config.toml", toml).unwrap();
let config_path = crate::config::get_config_file();
std::fs::write(config_path, toml).unwrap();
}
}