diff --git a/crates/ecrou/src/distro.rs b/crates/ecrou/src/distro.rs index 3212c94..d8a3249 100644 --- a/crates/ecrou/src/distro.rs +++ b/crates/ecrou/src/distro.rs @@ -359,8 +359,7 @@ fn fetch_ubuntu_meta_releases(url: &str) -> anyhow::Result> { fn fetch_ubuntu_latest_number(url: &str) -> anyhow::Result { fetch_ubuntu_meta_releases(url)? .into_iter() - .filter(|r| r.supported) - .next_back() + .rfind(|r| r.supported) .map(|r| r.number) .ok_or_else(|| anyhow!("no supported Ubuntu release listed in {}", url)) }