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();