perf: 移除不必要的 Vec,略微提升性能 (#682)

This commit is contained in:
ᴀᴍᴛᴏᴀᴇʀ
2026-03-24 17:15:11 +08:00
committed by GitHub
parent 04448c6d8f
commit 3a2df55314

View File

@@ -171,7 +171,7 @@ pub async fn fetch_video_details(
Ok::<_, anyhow::Error>(())
})
.collect::<FuturesUnordered<_>>();
tasks.try_collect::<Vec<_>>().await?;
tasks.try_collect::<()>().await?;
video_source.log_fetch_video_end();
Ok(())
}
@@ -688,7 +688,7 @@ pub async fn fetch_page_subtitle(
tokio::fs::write(path, subtitle.body.to_string()).await
})
.collect::<FuturesUnordered<_>>();
tasks.try_collect::<Vec<()>>().await?;
tasks.try_collect::<()>().await?;
Ok(ExecutionStatus::Succeeded)
}
@@ -750,7 +750,7 @@ pub async fn fetch_upper_face(
Ok::<(), anyhow::Error>(())
})
.collect::<FuturesUnordered<_>>();
tasks.try_collect::<Vec<()>>().await?;
tasks.try_collect::<()>().await?;
Ok(ExecutionStatus::Succeeded)
}
@@ -772,7 +772,7 @@ pub async fn generate_upper_nfo(
)
})
.collect::<FuturesUnordered<_>>();
tasks.try_collect::<Vec<()>>().await?;
tasks.try_collect::<()>().await?;
Ok(ExecutionStatus::Succeeded)
}