Skip to content

Commit 493fa04

Browse files
committed
allow Session cookie value to be cloned
1 parent 60aaa4f commit 493fa04

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

src/session.rs

+1-14
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ use time::OffsetDateTime as DateTime;
4949
/// assert!(session.data_changed());
5050
/// # Ok(()) }) }
5151
/// ```
52-
#[derive(Debug, Serialize, Deserialize)]
52+
#[derive(Clone, Debug, Serialize, Deserialize)]
5353
pub struct Session {
5454
id: String,
5555
expiry: Option<DateTime>,
@@ -63,19 +63,6 @@ pub struct Session {
6363
destroy: bool,
6464
}
6565

66-
impl Clone for Session {
67-
fn clone(&self) -> Self {
68-
Self {
69-
cookie_value: None,
70-
id: self.id.clone(),
71-
data: self.data.clone(),
72-
expiry: self.expiry,
73-
destroy: self.destroy,
74-
data_changed: self.data_changed,
75-
}
76-
}
77-
}
78-
7966
impl Default for Session {
8067
fn default() -> Self {
8168
Self::new()

0 commit comments

Comments
 (0)