From 93707884d25d73f31811a7a3a3cdfe0df51afe35 Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Tue, 8 May 2018 10:48:23 -0700 Subject: [PATCH] fix example --- examples/basic.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/basic.rs b/examples/basic.rs index ef31724a4..cb76627ec 100644 --- a/examples/basic.rs +++ b/examples/basic.rs @@ -8,11 +8,11 @@ extern crate env_logger; extern crate futures; use actix_redis::RedisSessionBackend; -use actix_web::middleware::RequestSession; +use actix_web::middleware::session::{self, RequestSession}; use actix_web::{middleware, server, App, HttpRequest, HttpResponse, Result}; /// simple handler -fn index(mut req: HttpRequest) -> Result { +fn index(req: HttpRequest) -> Result { println!("{:?}", req); // session @@ -36,14 +36,14 @@ fn main() { // enable logger .middleware(middleware::Logger::default()) // cookie session middleware - .middleware(middleware::SessionStorage::new( + .middleware(session::SessionStorage::new( RedisSessionBackend::new("127.0.0.1:6379", &[0; 32]) )) // register simple route, handle all methods .resource("/", |r| r.f(index)) }).bind("0.0.0.0:8080") .unwrap() - .threads(1) + .workers(1) .start(); let _ = sys.run();