Fix loader ordering (#10)

This commit is contained in:
Geometrically
2023-07-28 16:22:38 -07:00
committed by GitHub
parent 0d56127758
commit 10e7b66f38
3 changed files with 6 additions and 18 deletions

View File

@@ -259,18 +259,13 @@ pub async fn retrieve_data(
version.loaders.sort_by(|x, y| {
list.loader
.iter()
.position(|z| {
x.id.split('-').next().unwrap_or_default() == &*z.version
})
.position(|z| x.id == *z.version)
.unwrap_or_default()
.cmp(
&list
.loader
.iter()
.position(|z| {
y.id.split('-').next().unwrap_or_default()
== z.version
})
.position(|z| y.id == z.version)
.unwrap_or_default(),
)
})