chore: switch from yaml to toml
All checks were successful
Continuous Integration / Lint, Check & Test (push) Successful in 1m47s
Continuous Integration / Build Package (push) Successful in 2m20s

This commit is contained in:
Konstantin Fickel 2026-03-29 19:14:51 +02:00
parent ed493cff29
commit 8d07a86fc4
Signed by: kfickel
GPG key ID: A793722F9933C1A5
7 changed files with 66 additions and 32 deletions

View file

@ -27,7 +27,7 @@ impl Settings {
if config_path.exists() {
let content = fs::read_to_string(&config_path)?;
let settings: Settings = serde_yaml::from_str(&content)?;
let settings: Settings = toml::from_str(&content)?;
Ok(settings)
} else {
Ok(Settings::default())
@ -36,9 +36,9 @@ impl Settings {
fn config_path() -> PathBuf {
if let Some(proj_dirs) = ProjectDirs::from("", "", "streamd") {
proj_dirs.config_dir().join("config.yaml")
proj_dirs.config_dir().join("config.toml")
} else {
PathBuf::from("~/.config/streamd/config.yaml")
PathBuf::from("~/.config/streamd/config.toml")
}
}
}

View file

@ -14,8 +14,8 @@ pub enum StreamdError {
#[error("IO error: {0}")]
IoError(#[from] std::io::Error),
#[error("YAML error: {0}")]
YamlError(#[from] serde_yaml::Error),
#[error("TOML error: {0}")]
TomlError(#[from] toml::de::Error),
}
impl From<StreamdError> for miette::Report {