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

Support Deserialization for VarZeroVec<VarZeroSlice> #3643

Merged
merged 4 commits into from
Jul 7, 2023

Conversation

skius
Copy link
Member

@skius skius commented Jul 6, 2023

This was previously unsupported (see first commit).

cc @Manishearth

There might be an easier way? As a warning, this was difficult to figure out, because an inferred type (on let visitor =) caused a difficult to understand type checking overflow error. Adding type annotations fixed that.

@Manishearth Manishearth merged commit b2a1b79 into unicode-org:main Jul 7, 2023
23 checks passed
Manishearth added a commit to Manishearth/icu4x that referenced this pull request Jul 7, 2023
Manishearth added a commit that referenced this pull request Jul 10, 2023
* Revert "Support Deserialization for `VarZeroVec<VarZeroSlice>` (#3643)"

This reverts commit b2a1b79.

* More succinct deserialize impl for Box<VZS>
Copy link
Member

@sffc sffc left a comment

Choose a reason for hiding this comment

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

Just pulling out the actual impls:

impl<'de, 'a, T, F> Deserialize<'de> for VarZeroVec<'a, T, F>

impl<'de, 'a, T, F> Deserialize<'de> for &'a VarZeroSlice<T, F>

impl<'de, 'a, T, F> Deserialize<'de> for Box<VarZeroSlice<T, F>>

Those look like the correct Serde impls to me. LGTM

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.

None yet

4 participants