refactor(config): split into subsections and verify on parsing

This commit is contained in:
oxalica 2024-09-13 07:20:48 -04:00
parent 93d1589730
commit 2775068e49
6 changed files with 123 additions and 77 deletions

View file

@ -33,7 +33,6 @@ fn main() -> Result<()> {
fn parse_config(path: &std::path::Path) -> Result<Config> {
let src = std::fs::read_to_string(path)?;
let config = toml::from_str::<Config>(&src)?;
config.validate()?;
Ok(config)
}