We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9a5b50d commit 6dfca3eCopy full SHA for 6dfca3e
1 file changed
portablemc/src/download.rs
@@ -622,11 +622,13 @@ async fn download_many(
622
// Sort our entries in order to download big files first, this is allowing better
623
// parallelization at start and avoid too much blocking at the end. Because our
624
// indices vector will pop the first index from the end, we put big files at the
625
- // end, and so sort by ascending size.
+ // end, and so sort by ascending size. We also put
626
indices.sort_by(|&a_index, &b_index| {
627
match (entries[a_index].expected_size, entries[b_index].expected_size) {
628
(Some(a), Some(b)) => Ord::cmp(&a, &b),
629
- _ => Ordering::Equal,
+ (Some(_), None) => Ordering::Less,
630
+ (None, Some(_)) => Ordering::Greater,
631
+ (None, None) => Ordering::Equal,
632
}
633
});
634
0 commit comments