pub fn read_config<P: AsRef<Path>>(path: P) -> miette::Result<Config> {
    let contents = std::fs::read_to_string(&path)
        .into_diagnostic()
        .wrap_err(format!(
            "error reading config at {:?}",
            path.as_ref().as_os_str()
        ))?;

    Config::parse(&path.as_ref().to_string_lossy(), &contents)
        .map_err(miette::Report::from)
        .wrap_err(format!(
            "error reading config at {:?}",
            path.as_ref().as_os_str()
        ))
}
/// Read in a config file.
Read in a config file.
Read in a config file .
pub fn read_config<P: AsRef<Path>>(path: P) -> miette::Result<Config> {
    let contents = std::fs::read_to_string(&path)
        .into_diagnostic()
        .wrap_err(format!(
            "error reading config at {:?}",
            path.as_ref().as_os_str()
        ))?;
    Config::parse(&path.as_ref().to_string_lossy(), &contents)
        .map_err(miette::Report::from)
        .wrap_err(format!(
            "error reading config at {:?}",
            path.as_ref().as_os_str()
        ))
}
pub fn read_config < P : AsRef < Path > > ( path : P ) -> miette :: Result < Config > { let contents = std :: fs :: read_to_string ( & path ) . into_diagnostic ( ) . wrap_err ( format ! ( " " path as_ref ( ) as_os_str ( ) ) ) ? ; Config :: parse ( & path . as_ref ( ) . to_string_lossy ( ) , & contents ) . map_err ( miette :: Report :: from ) . wrap_err ( format ! ( " " path as_ref ( ) as_os_str ( ) ) ) }
Read in a config file.
Read in a config file .
path
P
path
P