async fn read_from(pwd: &PathBuf) -> Result<Config> {
        use tokio::fs;
        let mpath = pwd.join("shipcat.conf");
        trace!("Using config in {}", mpath.display());
        if !mpath.exists() {
            bail!("Config file {} does not exist", mpath.display())
        }
        let data = fs::read_to_string(&mpath).await?;
        let res = serde_yaml::from_str(&data)?;
        Ok(res)
    }
/// Read a config file in an arbitrary path
Read a config file in an arbitrary path
Read a config file in an arbitrary path
async fn read_from(pwd: &PathBuf) -> Result<Config> {
        use tokio::fs;
        let mpath = pwd.join("shipcat.conf");
        trace!("Using config in {}", mpath.display());
        if !mpath.exists() {
            bail!("Config file {} does not exist", mpath.display())
        }
        let data = fs::read_to_string(&mpath).await?;
        let res = serde_yaml::from_str(&data)?;
        Ok(res)
    }
async fn read_from ( pwd : & PathBuf ) -> Result < Config > { use tokio :: fs ; let mpath = pwd . join ( " " ) ; trace ! ( " " mpath display ( ) ) ; if ! mpath . exists ( ) { bail ! ( " " mpath display ( ) ) } let data = fs :: read_to_string ( & mpath ) . await ? ; let res = serde_yaml :: from_str ( & data ) ? ; Ok ( res ) }
Read a config file in an arbitrary path
Read a config file in an arbitrary path
pwd
&PathBuf
pwd
&PathBuf