felipenoris / hyper-reverse-proxy

A simple reverse proxy for use with Hyper and Tokio
Apache License 2.0
181 stars 63 forks source link

cannot find trait `Connect` in module `hyper::client::connect` #42

Closed pymongo closed 2 years ago

pymongo commented 2 years ago

hyper::client::connect::Connect seems rename to hyper::client::connect::Connected

ReverseProxy::new(hyper::Client::new())

   Compiling hyper-reverse-proxy v0.5.2-dev (https://github.com/felipenoris/hyper-reverse-proxy#102d50a0)
error[E0432]: unresolved import `hyper::Client`
   --> /home/w/.cargo/git/checkouts/hyper-reverse-proxy-d3515e9b5b577477/102d50a/src/lib.rs:118:19
    |
118 | use hyper::{Body, Client, Error, Request, Response, StatusCode};
    |                   ^^^^^^
    |                   |
    |                   no `Client` in the root
    |                   help: a similar name exists in the module (notice the capitalization): `client`

error[E0405]: cannot find trait `Connect` in module `hyper::client::connect`
   --> /home/w/.cargo/git/checkouts/hyper-reverse-proxy-d3515e9b5b577477/102d50a/src/lib.rs:389:50
    |
389 | pub async fn call<'a, T: hyper::client::connect::Connect + Clone + Send + Sync + 'static>(
    |                                                  ^^^^^^^ not found in `hyper::client::connect`

error[E0405]: cannot find trait `Connect` in module `hyper::client::connect`
   --> /home/w/.cargo/git/checkouts/hyper-reverse-proxy-d3515e9b5b577477/102d50a/src/lib.rs:455:52
    |
455 | pub struct ReverseProxy<T: hyper::client::connect::Connect + Clone + Send + Sync + 'static> {
    |                                                    ^^^^^^^ not found in `hyper::client::connect`

error[E0405]: cannot find trait `Connect` in module `hyper::client::connect`
   --> /home/w/.cargo/git/checkouts/hyper-reverse-proxy-d3515e9b5b577477/102d50a/src/lib.rs:459:33
    |
459 | impl<T: hyper::client::connect::Connect + Clone + Send + Sync + 'static> ReverseProxy<T> {
    |                                 ^^^^^^^ not found in `hyper::client::connect`
pymongo commented 2 years ago

after I add tcp and http1 to my crate hyper features, then compile ok