Skip to content

Commit

Permalink
Merge pull request #45 from mattsse/matt/retain-releases-for-m1
Browse files Browse the repository at this point in the history
fix: retain old releases as well
  • Loading branch information
roynalnaruto authored Jun 20, 2022
2 parents 811f0cc + e08abd3 commit 804cabd
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/releases.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,12 +182,11 @@ pub async fn all_releases(platform: Platform) -> Result<Releases, SolcVmError> {
.await?
.json::<Releases>()
.await?;
releases.builds = releases
releases
.builds
.iter()
.filter(|b| b.version.lt(&MACOS_AARCH64_NATIVE))
.cloned()
.collect();
.retain(|b| b.version.lt(&MACOS_AARCH64_NATIVE));
releases.releases.retain(|v, _| v.lt(&MACOS_AARCH64_NATIVE));

releases.builds.extend_from_slice(&native.builds);
releases.releases.append(&mut native.releases);
return Ok(releases);
Expand Down

0 comments on commit 804cabd

Please sign in to comment.