http-rs / http-rs/surf

hyper-client does not actually build

Open
#35 9 comments 5 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
1.5k
Forks
128
PR merge metrics
No merged PRs in 30d

Description

Using
```toml
surf = { version = "1.0.1", features = ["hyper-client"], default-features = false }
```
I get the following compile error:
```
Compiling surf v1.0.1
error[E0432]: unresolved import `hyper_tls`
--> /home/developer/.cargo/registry/src/github.com-1ecc6299db9ec823/surf-1.0.1/src/http_client/hyper.rs:9:5
|
9 | use hyper_tls::HttpsConnector;
| ^^^^^^^^^ use of undeclared type or module `hyper_tls`

error[E0432]: unresolved import `native_tls`
--> /home/developer/.cargo/registry/src/github.com-1ecc6299db9ec823/surf-1.0.1/src/http_client/hyper.rs:10:5
|
10 | use native_tls::TlsConnector;
| ^^^^^^^^^^ use of undeclared type or module `native_tls`

error[E0034]: multiple applicable items in scope
--> /home/developer/.cargo/registry/src/github.com-1ecc6299db9ec823/surf-1.0.1/src/http_client/hyper.rs:76:18
|
76 | .map(|chunk| chunk.map(|chunk| chunk.to_vec()))
| ^^^ multiple `map` found
|
= note: candidate #1 is defined in an impl of the trait `futures_util::future::FutureExt` for the type `_`
= help: to disambiguate the method call, write `futures_util::future::FutureExt::map(Compat01As03::new(body), |chunk| chunk.map(|chunk| chunk.to_vec()))` instead
= note: candidate #2 is defined in an impl of the trait `futures_util::stream::StreamExt` for the type `_`
= help: to disambiguate the method call, write `futures_util::stream::StreamExt::map(Compat01As03::new(body), |chunk| chunk.map(|chunk| chunk.to_vec()))` instead
note: candidate #3 is defined in the trait `std::iter::Iterator`
= help: to disambiguate the method call, write `std::iter::Iterator::map(Compat01As03::new(body), |chunk| chunk.map(|chunk| chunk.to_vec()))` instead

error: aborting due to 3 previous errors
```
which makes sense considering both of tls crates are marked as optional, but are never activated in surf's Cargo.toml.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.