mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-05-04 11:10:02 +00:00
Optimize GhCrateMeta::find
: use FuturesUnordered
(#321)
* Optimize `GhCrateMeta::find` using `FuturesUnordered` * Optimize `MultiFetcher`: Impl `with_capacity` use it in `resolve_inner` to avoid over-reservation * Enable feature "std" of dep futures-util Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
4def4d08fd
commit
16b16c482c
4 changed files with 11 additions and 7 deletions
|
@ -169,10 +169,10 @@ async fn resolve_inner(
|
|||
manifest.bin,
|
||||
);
|
||||
|
||||
let mut fetchers = MultiFetcher::default();
|
||||
|
||||
let desired_targets = opts.desired_targets.get().await;
|
||||
|
||||
let mut fetchers = MultiFetcher::with_capacity(desired_targets.len() * 2);
|
||||
|
||||
for target in desired_targets {
|
||||
debug!("Building metadata for target: {target}");
|
||||
let mut target_meta = meta.clone_without_overrides();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue