-
Notifications
You must be signed in to change notification settings - Fork 757
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
chore: Derive default
for a bunch of types
#1931
Conversation
Which either (IMO) have a natural default, or that only consist of `Option`s. This makes initialization of these types less verbose for the user.
@@ -63,7 +64,7 @@ pub enum PacketNumberSpace { | |||
} | |||
|
|||
#[serde_with::skip_serializing_none] | |||
#[derive(Clone, Serialize, Deserialize, PartialEq, Eq, Debug)] | |||
#[derive(Clone, Serialize, Deserialize, PartialEq, Eq, Debug, Default)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Open question. For your use case, does default obviate the need for new()
?
default
gor a bunch of typesdefault
for a bunch of types
Don't think so? I mostly want to shorten tings like this: |
I interpret that as yes lol. If you're not using new() or with_type() and the |
I think |
Merged, thanks. |
Which either (IMO) have a natural default, or that only consist of
Option
s.This makes initialization of these types less verbose for the user.