parser: create config.toml if needed

This commit is contained in:
k
2024-07-15 19:07:00 +02:00
parent ad51edbe07
commit 1be22713f9
2 changed files with 9 additions and 5 deletions

View File

@@ -27,7 +27,7 @@ impl Config {
const PATH: &'static str = "config.toml";
pub fn read() -> Self {
File::open(Self::PATH).unwrap();
fs::write(Self::PATH, "").unwrap();
let string = fs::read_to_string(Self::PATH).unwrap();