Replace dep futures-util with helpers::FuturesResolver (#765)

futures-util has too many dependencies and it contains a lot of code of
which we only use `futures_util::stream::{FuturesUnordered, StreamExt}`.

We don't even need most of the functionalities in `FuturesUnordered` as
we just need the output of first future that either returns `Err(_)` or
`Ok(Some(_))`.

So we replace it with ou own homebrew solution (~80 loc) and it's easier
to use.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
Jiahao XU 2023-02-05 16:26:25 +11:00 committed by GitHub
parent 833684b095
commit a13c01b769
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 86 additions and 13 deletions

1
Cargo.lock generated
View file

@ -179,7 +179,6 @@ dependencies = [
"crates_io_api",
"detect-targets",
"either",
"futures-util",
"home",
"itertools",
"jobslot",