mirror of
https://github.com/Blah-IM/blahrs.git
synced 2025-07-13 17:25:34 +00:00
refactor(config): split into subsections and verify on parsing
This commit is contained in:
parent
93d1589730
commit
2775068e49
6 changed files with 123 additions and 77 deletions
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue