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(deserialize): don't handle Option specifically #2630

Merged
merged 1 commit into from
Apr 28, 2024

Conversation

Conaclos
Copy link
Member

Summary

A few days ago, while working on #1859, I found some possible simplification.
Because, I am no longer sure that #1859 is a good idea, I decided to extract the main simplifications in this PR.

The idea is to implement Deserializable for Option.
This allows to remove specific handling of Option in the Deserializable derive macro.

I also simplified the Merge derive macro, which was more complex than it needed to be.

I also removed the implementations that allow an instance to be converted to a partial instance.
It is never used and has a conceptual flaw: it assumes that a field is unset with its default value.

Test Plan

CI should pass.

@Conaclos Conaclos merged commit cf48a89 into main Apr 28, 2024
13 checks passed
@Conaclos Conaclos deleted the conaclos/biome_deserialize/minor-improvements branch April 28, 2024 12:31
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.

1 participant