Hi,
my library compiles and runs fine when compiling normally (it depends on reqwest = { version = "0.10.6", features = ["rustls-tls", "blocking"] }), but when i run cargo publish --dry-run i get these errors:
Compiling hyper-rustls v0.20.0
Compiling reqwest v0.10.6
error[E0277]: the trait bound `hyper_tls::client::HttpsConnector<_>: std::convert::From<(connect::HttpConnector, tokio_tls::TlsConnector)>` is not satisfied
--> /Users/leopard2a5/.cargo/registry/src/github.com-1ecc6299db9ec823/reqwest-0.10.6/src/connect.rs:345:32
|
345 | let mut http = hyper_tls::HttpsConnector::from((http, tls_connector));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::convert::From<(connect::HttpConnector, tokio_tls::TlsConnector)>` is not implemented for `hyper_tls::client::HttpsConnector<_>`
|
= help: the following implementations were found:
<hyper_tls::client::HttpsConnector<T> as std::convert::From<(T, tokio_native_tls::TlsConnector)>>
= note: required by `std::convert::From::from`
error[E0599]: no method named `set_nodelay` found for reference `&native_tls::TlsStream<tokio_native_tls::AllowStd<_>>` in the current scope
--> /Users/leopard2a5/.cargo/registry/src/github.com-1ecc6299db9ec823/reqwest-0.10.6/src/connect.rs:350:42
|
350 | stream.get_ref().set_nodelay(false)?;
| ^^^^^^^^^^^ method not found in `&native_tls::TlsStream<tokio_native_tls::AllowStd<_>>`
error[E0277]: the trait bound `hyper_tls::client::HttpsConnector<_>: std::convert::From<(connect::HttpConnector, tokio_tls::TlsConnector)>` is not satisfied
--> /Users/leopard2a5/.cargo/registry/src/github.com-1ecc6299db9ec823/reqwest-0.10.6/src/connect.rs:414:36
|
414 | let mut http = hyper_tls::HttpsConnector::from((http, tls_connector));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::convert::From<(connect::HttpConnector, tokio_tls::TlsConnector)>` is not implemented for `hyper_tls::client::HttpsConnector<_>`
|
= help: the following implementations were found:
<hyper_tls::client::HttpsConnector<T> as std::convert::From<(T, tokio_native_tls::TlsConnector)>>
= note: required by `std::convert::From::from`
error: aborting due to 3 previous errors
Some errors have detailed explanations: E0277, E0599.
For more information about an error, try `rustc --explain E0277`.
error: could not compile `reqwest`.
Can you help me with this?
Love your crate, thank you!
i'm also seeing this issue when building my crate today
Hi, same problem here. In doubt I also tried with the example code and I have the same error.
i believe this PR to hyper-tls will fix the issue we're seeing
For anyone looking for a temporary workaround, specify that you want hyper-tls =0.4.1 in your Cargo.toml by adding this:
hyper-tls = { version = "=0.4.1" }
I was also experiencing this issue building a project that depends on reqwest today, but adding the hyper-tls = { version = "=0.4.1" } referenced by @carols10cents solved the issue for me.
Yea, this was a mistake in hyper-tls. I've just published hyper-tls v0.4.3 which should be all fixed. Sorry all!
Most helpful comment
For anyone looking for a temporary workaround, specify that you want hyper-tls =0.4.1 in your Cargo.toml by adding this: