From 48e70139978582e4100e11a8e18fb8b12565737d Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Mon, 9 Apr 2018 07:57:50 -0700 Subject: [PATCH] update guide examples --- examples/basics/src/main.rs | 4 +--- guide/src/qs_10.md | 3 +-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/examples/basics/src/main.rs b/examples/basics/src/main.rs index 510f02cef..5b64f112a 100644 --- a/examples/basics/src/main.rs +++ b/examples/basics/src/main.rs @@ -105,9 +105,7 @@ fn main() { .middleware(middleware::Logger::default()) // cookie session middleware .middleware(middleware::SessionStorage::new( - middleware::CookieSessionBackend::build(&[0; 32]) - .secure(false) - .finish() + middleware::CookieSessionBackend::new(&[0; 32]).secure(false) )) // register favicon .resource("/favicon.ico", |r| r.f(favicon)) diff --git a/guide/src/qs_10.md b/guide/src/qs_10.md index d4b4addf9..1b2a7f2fa 100644 --- a/guide/src/qs_10.md +++ b/guide/src/qs_10.md @@ -203,9 +203,8 @@ fn main() { server::new( || App::new() .middleware(SessionStorage::new( // <- create session middleware - CookieSessionBackend::build(&[0; 32]) // <- create cookie session backend + CookieSessionBackend::new(&[0; 32]) // <- create cookie session backend .secure(false) - .finish() ))) .bind("127.0.0.1:59880").unwrap() .start();