change config format to toml

This commit is contained in:
Infendro committed 2026-10-20 20:58:31 +02:00
1 parent c30ee50898
commit 41ef3db9e5
4 files changed
+58 -3

No files matched your search

+1 -2
View File
@@ -3,7 +3,6 @@ use std::{error::Error, fs};
#[derive(Deserialize)]
pub struct Config {
#[serde(flatten)]
pub auth: Auth,
pub entries: Vec<Entry>,
}
@@ -22,6 +21,6 @@ pub struct Entry {
pub fn load(path: &str) -> Result<Config, Box<dyn Error>> {
let raw = fs::read_to_string(&path)?;
let config = serde_json::from_str(&raw)?;
let config = toml::from_str(&raw)?;
Ok(config)
}