edit comment

This commit is contained in:
Felipe Noronha 2019-02-16 16:10:36 -02:00
parent 16b5769075
commit 48ed13e6ae
2 changed files with 2 additions and 4 deletions

View File

@ -61,8 +61,7 @@ fn main() {
// This is our socket address...
let addr = ([127, 0, 0, 1], 13900).into();
// A `Service` is needed for every connection, so this
// creates one from our `hello_world` function.
// A `Service` is needed for every connection.
let make_svc = make_service_fn(|socket: &AddrStream| {
let remote_addr = socket.remote_addr();
service_fn(move |req: Request<Body>| { // returns BoxFut

View File

@ -54,8 +54,7 @@
//! // This is our socket address...
//! let addr = ([127, 0, 0, 1], 13900).into();
//!
//! // A `Service` is needed for every connection, so this
//! // creates one from our `hello_world` function.
//! // A `Service` is needed for every connection.
//! let make_svc = make_service_fn(|socket: &AddrStream| {
//! let remote_addr = socket.remote_addr();
//! service_fn(move |req: Request<Body>| { // returns BoxFut