fabaccess-bffh/bffhd/config/dhall.rs

7 lines
192 B
Rust
Raw Normal View History

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