diff --git a/actix-session/CHANGES.md b/actix-session/CHANGES.md index dae19b7cc..981d5624d 100644 --- a/actix-session/CHANGES.md +++ b/actix-session/CHANGES.md @@ -2,6 +2,9 @@ ## Unreleased - 2020-xx-xx * Minimum supported Rust version (MSRV) is now 1.51. +* Impl `Clone` for `CookieSession`. [#201] + +[#201]: https://github.com/actix/actix-extras/pull/201 ## 0.5.0-beta.2 - 2020-06-27 diff --git a/actix-session/src/cookie.rs b/actix-session/src/cookie.rs index 594644de5..3a39bc423 100644 --- a/actix-session/src/cookie.rs +++ b/actix-session/src/cookie.rs @@ -30,11 +30,13 @@ pub enum CookieSessionError { impl ResponseError for CookieSessionError {} +#[derive(Copy, Clone)] enum CookieSecurity { Signed, Private, } +#[derive(Clone)] struct CookieSessionInner { key: Key, security: CookieSecurity, @@ -197,6 +199,7 @@ impl CookieSessionInner { /// .secure(true)) /// .service(web::resource("/").to(|| HttpResponse::Ok())); /// ``` +#[derive(Clone)] pub struct CookieSession(Rc); impl CookieSession {