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

Serde impls for VarULE types (Var tuple types, and make_var) #5802

Merged
merged 4 commits into from
Nov 12, 2024

Conversation

Manishearth
Copy link
Member

We were missing these.

This also gives me a much clearer idea of what's needed in #5561. I might go and implement that, but I may also just use what we have for now for DecimalSymbolsV1.

@Manishearth Manishearth requested a review from sffc as a code owner November 9, 2024 04:10
sffc
sffc previously approved these changes Nov 9, 2024
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.

The impls look about right; can you add more tests? Most serde impls I write have a test that puts them inside of a Cow in a struct with #[derive(Serialize, Deserialize)] and then runs them with both JSON and bincode/postcard and tests that they round-trip and borrow/own correctly.

utils/zerovec/derive/examples/make_var.rs Show resolved Hide resolved
utils/zerovec/src/ule/tuplevar.rs Show resolved Hide resolved
utils/zerovec/src/ule/tuplevar.rs Outdated Show resolved Hide resolved
@Manishearth
Copy link
Member Author

Oh yeah I was planning to test more but it was becoming the weekend so i wrapped up.

I'll add tests and fix things when I get a chance.

@Manishearth Manishearth requested a review from sffc November 11, 2024 23:59
@Manishearth
Copy link
Member Author

Added some tests. We do keep hitting rust-lang/rust#130180 :/

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.

Would still like to see tests that also exercise deserialize_with

@Manishearth Manishearth merged commit e0c1e0c into unicode-org:main Nov 12, 2024
28 checks passed
@Manishearth Manishearth deleted the var-serde branch November 12, 2024 00:44
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