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

refactor: generalize serde logic into macro #218

Merged
merged 9 commits into from
Sep 18, 2024
Merged

Conversation

EdJoPaTo
Copy link
Collaborator

This combines all the serde and builder settings for the API structs into a single macro. serde_with::skip_serializing_none allows removing all the #[serde(skip_serializing_if = "Option::is_none")].

Doing something similar for the enums results in more lines before, so I just cleaned them up to use the same order of derives.

Nothing of this PR should be breaking.

@ayrat555 ayrat555 merged commit 91ac379 into master Sep 18, 2024
56 checks passed
@ayrat555 ayrat555 deleted the serde-with-option-none branch September 18, 2024 07:41
@EdJoPaTo
Copy link
Collaborator Author

BTW @Veetaha thanks for the inspiration on this one!

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.

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy