Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

overhaul this crate's interface #57

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 1 addition & 14 deletions src/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ use time::OffsetDateTime as DateTime;
/// assert!(session.data_changed());
/// # Ok(()) }) }
/// ```
#[derive(Debug, Serialize, Deserialize)]
#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct Session {
id: String,
expiry: Option<DateTime>,
Expand All @@ -63,19 +63,6 @@ pub struct Session {
destroy: bool,
}

impl Clone for Session {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this! 🙇‍♂️

fn clone(&self) -> Self {
Self {
cookie_value: None,
id: self.id.clone(),
data: self.data.clone(),
expiry: self.expiry,
destroy: self.destroy,
data_changed: self.data_changed,
}
}
}

impl Default for Session {
fn default() -> Self {
Self::new()
Expand Down