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

Remove redundant serde Serialize, Deserialize and default attributes #929

Merged
merged 1 commit into from
May 12, 2023

Conversation

n1ghtmare
Copy link
Collaborator

These should match the NATS go client.

@caspervonb
Copy link
Collaborator

This is in reference to #898?

@n1ghtmare
Copy link
Collaborator Author

This is in reference to #898?

Yeah, I was going through all the fields, testing and comparing with the NATS Go client. I couldn't find fields that didn't need [serde(default)], but I found the ones here in this PR.

async-nats/src/jetstream/stream.rs Outdated Show resolved Hide resolved
@n1ghtmare n1ghtmare changed the title Skip serialization of optional fields Remove redundant serde Serialize and default attributes Apr 25, 2023
@n1ghtmare n1ghtmare requested a review from Jarema April 25, 2023 15:39
Copy link
Collaborator

@caspervonb caspervonb left a comment

Choose a reason for hiding this comment

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

Think you can take off Serialize from a few more types, like Account related things and see stream related types as-well.

@n1ghtmare n1ghtmare changed the title Remove redundant serde Serialize and default attributes Remove redundant serde Serialize, Deserialize and default attributes May 4, 2023
@n1ghtmare n1ghtmare requested a review from caspervonb May 4, 2023 11:53
@n1ghtmare
Copy link
Collaborator Author

@caspervonb Thanks, great catch. Indeed I found a few more and I've updated them accordingly. It's possible that I missed some, but most should be taken care of.

@n1ghtmare n1ghtmare force-pushed the n1ghtmare/serde-default branch 2 times, most recently from e9333b7 to db39f9c Compare May 11, 2023 11:32
@n1ghtmare n1ghtmare requested a review from caspervonb May 12, 2023 12:39
@n1ghtmare n1ghtmare self-assigned this May 12, 2023
Copy link
Member

@Jarema Jarema left a comment

Choose a reason for hiding this comment

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

LGTM!

@Jarema
Copy link
Member

Jarema commented May 12, 2023

@n1ghtmare But please shorten the commit message. If you want to put more info in, do that in body.

@n1ghtmare
Copy link
Collaborator Author

@Jarema Thank you so much. I've shortened the commit message.

@Jarema Jarema merged commit ab3ae79 into nats-io:main May 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants