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

Use serde_with::skip_serializing_none macro to reduce code noise #93

Closed
mfreeborn opened this issue Aug 12, 2022 · 1 comment
Closed
Labels
good first issue Good for newcomers

Comments

@mfreeborn
Copy link
Contributor

Currently, every optional field in every struct (i.e. most fields) is annotated with #[serde(skip_serializing_if = "Option::is_none")].

We can ass a dependency for serde_with and use the skip_serializing_none macro to massively reduce the amount of noise when defining the structs.

@mfreeborn mfreeborn changed the title Use serde_with::skip_serializing_none macro to reduce noise Use serde_with::skip_serializing_none macro to reduce code noise Aug 12, 2022
@mfreeborn mfreeborn added the good first issue Good for newcomers label Aug 12, 2022
@mfreeborn
Copy link
Contributor Author

closed by #94

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant