1
0
mirror of https://github.com/actix/actix-extras.git synced 2024-11-23 15:51:06 +01:00

Implement Clone for CookieSession. (#201)

This commit is contained in:
Luca Palmieri 2021-10-18 13:03:14 +01:00 committed by GitHub
parent a08b96529f
commit d0f2075ce9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View File

@ -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

View File

@ -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<CookieSessionInner>);
impl CookieSession {