fn load_release_target(release_dir: &Path) -> Result<String, Box<dyn std::error::Error>> {
    use serde_derive::Deserialize;
    #[derive(Deserialize, Debug)]
    pub struct ReleaseVersion {
        pub target: String,
        pub commit: String,
        channel: String,
    }

    let mut version_yml = PathBuf::from(release_dir);
    version_yml.push("morgan-release");
    version_yml.push("version.yml");

    let file = File::open(&version_yml)?;
    let version: ReleaseVersion = serde_yaml::from_reader(file)?;
    Ok(version.target)
}
/// Reads the supported TARGET triple for the given release
Reads the supported TARGET triple for the given release
Reads the supported TARGET triple for the given release
fn load_release_target(release_dir: &Path) -> Result<String, Box<dyn std::error::Error>> {
    use serde_derive::Deserialize;
    #[derive(Deserialize, Debug)]
    pub struct ReleaseVersion {
        pub target: String,
        pub commit: String,
        channel: String,
    }
    let mut version_yml = PathBuf::from(release_dir);
    version_yml.push("morgan-release");
    version_yml.push("version.yml");
    let file = File::open(&version_yml)?;
    let version: ReleaseVersion = serde_yaml::from_reader(file)?;
    Ok(version.target)
}
fn load_release_target ( release_dir : & Path ) -> Result < String , Box < dyn std :: error :: Error > > { use serde_derive :: Deserialize ; # [ derive ( Deserialize Debug ) ] pub struct ReleaseVersion { pub target : String , pub commit : String , channel : String , } let mut version_yml = PathBuf :: from ( release_dir ) ; version_yml . push ( " " ) ; version_yml . push ( " " ) ; let file = File :: open ( & version_yml ) ? ; let version : ReleaseVersion = serde_yaml :: from_reader ( file ) ? ; Ok ( version . target ) }
Reads the supported TARGET triple for the given release
Reads the supported TARGET triple for the given release
release_dir
&Path
release_dir
&Path