From 2a7ffe6e0a88d50fb2c9ed3b39c92a1609100d14 Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Tue, 10 Apr 2018 12:22:19 -0700 Subject: [PATCH] update readme --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index d7e972459..5ed02fbad 100644 --- a/README.md +++ b/README.md @@ -27,19 +27,19 @@ Constructor panics if key length is less than 32 bytes. extern crate actix_web; extern crate actix_redis; -use actix_web::*; -use actix_web::middleware::SessionStorage; +use actix_web::{App, server}; +use actix_web::middleware::{Logger, SessionStorage}; use actix_redis::RedisSessionBackend; fn main() { ::std::env::set_var("RUST_LOG", "actix_web=info"); - let _ = env_logger::init(); + env_logger::init(); let sys = actix::System::new("basic-example"); - HttpServer::new( - || Application::new() + server::new( + || App::new() // enable logger - .middleware(middleware::Logger::default()) + .middleware(Logger::default()) // cookie session middleware .middleware(SessionStorage::new( RedisSessionBackend::new("127.0.0.1:6379", &[0; 32])