diff --git a/src/routes/maven.rs b/src/routes/maven.rs index e5641106..ae19b7cf 100644 --- a/src/routes/maven.rs +++ b/src/routes/maven.rs @@ -191,7 +191,7 @@ async fn find_version( .partition::, _>(|el| db_loaders.contains(el)); let matched = all_versions - .into_iter() + .iter() .filter(|x| { let mut bool = x.inner.version_number == vnumber; @@ -206,7 +206,7 @@ async fn find_version( }) .collect::>(); - Ok(matched.get(0).cloned()) + Ok(matched.get(0).or_else(|| exact_matches.get(0)).copied().cloned()) } fn find_file<'a>(