diff --git a/README.md b/README.md index e7205893d..093a0b949 100644 --- a/README.md +++ b/README.md @@ -19,13 +19,10 @@ extern crate actix_http; use actix_http::{h1, Response, ServiceConfig}; fn main() { - env::set_var("RUST_LOG", "framed_hello=info"); - env_logger::init(); - Server::new().bind("framed_hello", "127.0.0.1:8080", || { IntoFramed::new(|| h1::Codec::new(ServiceConfig::default())) // <- create h1 codec - .and_then(TakeItem::new().map_err(|_| ())) // <- read one request - .and_then(|(_req, _framed): (_, Framed<_, _>)| { // <- send response and close conn + .and_then(TakeItem::new().map_err(|_| ())) // <- read one request + .and_then(|(_req, _framed): (_, Framed<_, _>)| { // <- send response and close conn SendResponse::send(_framed, Response::Ok().body("Hello world!")) .map_err(|_| ()) .map(|_| ())