mirror of
https://github.com/lanyeeee/bilibili-video-downloader.git
synced 2026-05-06 20:02:57 +08:00
perf: 仅在必要时构造下载任务的Future
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user