fabaccess-bffh/bffhd/config/dhall.rs

8 lines
209 B
Rust
Raw Normal View History

2022-03-20 21:22:15 +01:00
use std::path::Path;
use crate::Config;
pub fn read_config_file(path: impl AsRef<Path>) -> Result<Config, serde_dhall::Error> {
serde_dhall::from_file(path)
.parse()
.map_err(Into::into)
}