fix(distro): take the last supported release with rfind

filter(..).next_back() on a double-ended iterator is denied by newer
clippy, and CI floats on stable, so it went red there while passing
locally.
This commit is contained in:
vhaudiquet committed 2026-10-30 23:12:25 +01:00
1 parent 4affe9230c
commit 5df06ffcc2
1 file changed
+1 -2
+1 -2
View File
@@ -359,8 +359,7 @@ fn fetch_ubuntu_meta_releases(url: &str) -> anyhow::Result<Vec<UbuntuRelease>> {
fn fetch_ubuntu_latest_number(url: &str) -> anyhow::Result<String> {
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))
}