diff --git a/lib/wasix/src/runtime/resolver/backend_source.rs b/lib/wasix/src/runtime/resolver/backend_source.rs index 3456fbb08f6..04916162749 100644 --- a/lib/wasix/src/runtime/resolver/backend_source.rs +++ b/lib/wasix/src/runtime/resolver/backend_source.rs @@ -364,14 +364,12 @@ fn decode_summary( let WebQueryGetPackageVersion { v2: WebQueryGetPackageVersionDistribution { - webc_version: v2_webc_version, pirita_sha256_hash: v2_pirita_sha256_hash, pirita_download_url: v2_pirita_download_url, webc_manifest: v2_manifest, }, v3: WebQueryGetPackageVersionDistribution { - webc_version: v3_webc_version, pirita_sha256_hash: v3_pirita_sha256_hash, pirita_download_url: v3_pirita_download_url, webc_manifest: v3_manifest, @@ -379,17 +377,17 @@ fn decode_summary( .. } = pkg_version; - let (webc_version, pirita_sha256_hash, pirita_download_url, manifest) = + let (version, pirita_sha256_hash, pirita_download_url, manifest) = if preferred_webc_version == webc::Version::V3 { ( - v3_webc_version, + webc::Version::V3, v3_pirita_sha256_hash, v3_pirita_download_url, v3_manifest, ) } else { ( - v2_webc_version, + webc::Version::V2, v2_pirita_sha256_hash, v2_pirita_download_url, v2_manifest, @@ -413,8 +411,6 @@ fn decode_summary( let webc_sha256 = WebcHash::parse_hex(&hash).context("invalid webc sha256 hash in manifest")?; - let version: webc::Version = webc_version.unwrap_or_default().into(); - Ok(PackageSummary { pkg: PackageInfo::from_manifest(id, &manifest, version)?, dist: DistributionInfo { webc, webc_sha256 }, @@ -705,8 +701,6 @@ impl From for webc::Version { #[derive(Debug, serde::Serialize, serde::Deserialize, Clone)] pub struct WebQueryGetPackageVersionDistribution { - #[serde(rename = "webcVersion")] - pub webc_version: Option, #[serde(rename = "piritaDownloadUrl")] pub pirita_download_url: Option, #[serde(rename = "piritaSha256Hash")]