diff --git a/Cargo.toml b/Cargo.toml index dd0adaa..34e44a4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,9 +19,9 @@ include = [ ] [dependencies] -hyper = "0.13" +hyper = { version = "0.14", features = ["full"] } lazy_static = "1.4" unicase = "2.6" [dev-dependencies] -tokio = { version = "0.2", features = ["full"] } +tokio = { version = "0.3", features = ["full"] } diff --git a/README.md b/README.md index c8a924d..9649d02 100644 --- a/README.md +++ b/README.md @@ -25,8 +25,8 @@ Add these dependencies to your `Cargo.toml` file. ```toml [dependencies] hyper-reverse-proxy = "0.5" -hyper = "0.13" -tokio = { version = "0.2", features = ["full"] } +hyper = { version = "0.14", features = ["full"] } +tokio = { version = "0.3", features = ["full"] } ``` The following example will set up a reverse proxy listening on `127.0.0.1:13900`, diff --git a/src/lib.rs b/src/lib.rs index 83a4678..e34cd0d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -59,7 +59,7 @@ //! // will forward requests to port 13902 //! match hyper_reverse_proxy::call(client_ip, "http://127.0.0.1:13902", req).await { //! Ok(response) => {Ok(response)} -//! Err(error) => {Ok(Response::builder() +//! Err(_error) => {Ok(Response::builder() //! .status(StatusCode::INTERNAL_SERVER_ERROR) //! .body(Body::empty()) //! .unwrap())} @@ -83,11 +83,10 @@ //! //! let server = Server::bind(&addr).serve(make_svc); //! +//! println!("Running server on {:?}", addr); //! if let Err(e) = server.await { //! eprintln!("server error: {}", e); //! } -//! -//! println!("Running server on {:?}", addr); //! } //! ``` //!