mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-04-20 20:48:43 +00:00
Return Future + 'static
in GhCrateMeta::launch_baseline_find_tasks
(#573)
So that the borrow checker know that `FuturesUnordered<F>` holds no reference to any data and thus it can further optimize future returned by `GhCrateMeta::find`. Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
30cc94b5bc
commit
b5002de9c4
1 changed files with 1 additions and 1 deletions
|
@ -40,7 +40,7 @@ impl GhCrateMeta {
|
|||
pkg_fmt: PkgFmt,
|
||||
pkg_url: &'a str,
|
||||
repo: Option<&'a str>,
|
||||
) -> impl Iterator<Item = impl Future<Output = FindTaskRes> + 'a> + 'a {
|
||||
) -> impl Iterator<Item = impl Future<Output = FindTaskRes> + 'static> + 'a {
|
||||
// build up list of potential URLs
|
||||
let urls = pkg_fmt.extensions().iter().filter_map(move |ext| {
|
||||
let ctx = Context::from_data_with_repo(&self.data, &self.target_data.target, ext, repo);
|
||||
|
|
Loading…
Add table
Reference in a new issue