fn load_config() -> Result<Config, ()> {
    let path = try_parse_config_from_args();

    let content = fs::read_to_string(&path).unwrap();

    Config::load(path, content.as_str()).map(|config| {
        let logging_level = config
            .debug
            .as_ref()
            .map_or(None, |dc| dc.logging.as_deref());
        init_logger(logging_level);

        config
    })
}
/// Load yaml config from a raw path.
Load yaml config from a raw path.
Load yaml config from a raw path .
fn load_config() -> Result<Config, ()> {
    let path = try_parse_config_from_args();
    let content = fs::read_to_string(&path).unwrap();
    Config::load(path, content.as_str()).map(|config| {
        let logging_level = config
            .debug
            .as_ref()
            .map_or(None, |dc| dc.logging.as_deref());
        init_logger(logging_level);
        config
    })
}
fn load_config ( ) -> Result < Config , ( ) > { let path = try_parse_config_from_args ( ) ; let content = fs :: read_to_string ( & path ) . unwrap ( ) ; Config :: load ( path , content . as_str ( ) ) . map ( | config | { let logging_level = config . debug . as_ref ( ) . map_or ( None , | dc | dc . logging . as_deref ( ) ) ; init_logger ( logging_level ) ; config } ) }
Load yaml config from a raw path.
Load yaml config from a raw path .