From d0c01c2cdd668a577e922886d4058889f3989ce1 Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Tue, 19 Dec 2017 18:38:02 -0800 Subject: [PATCH] update guide example --- guide/src/qs_10.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/guide/src/qs_10.md b/guide/src/qs_10.md index aefd08717..f7c499458 100644 --- a/guide/src/qs_10.md +++ b/guide/src/qs_10.md @@ -115,7 +115,7 @@ session data. # extern crate actix; # extern crate actix_web; use actix_web::*; -use actix_web::middlewares::RequestSession; +use actix_web::middlewares::{RequestSession, SessionStorage, CookieSessionBackend}; fn index(mut req: HttpRequest) -> Result<&'static str> { // access session data @@ -133,8 +133,8 @@ fn main() { # let sys = actix::System::new("basic-example"); HttpServer::new( || Application::new() - .middleware(middlewares::SessionStorage::new( // <- create session middlewares - middlewares::CookieSessionBackend::build(&[0; 32]) // <- create cookie session backend + .middleware(SessionStorage::new( // <- create session middlewares + CookieSessionBackend::build(&[0; 32]) // <- create cookie session backend .secure(false) .finish() )))