perf: 仅在必要时构造下载任务的Future

This commit is contained in:
lanyeeee
2025-09-06 05:16:09 +08:00
parent 5ed41ef7b6
commit dd86eb9e41

View File

@@ -170,7 +170,7 @@ impl DownloadTask {
let download_task = async {
download_task_option
.get_or_insert(Box::pin(self.download()))
.get_or_insert_with(|| Box::pin(self.download()))
.await;
};