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

Bug: rename_all for enums doesn't match serde #236

Closed
stegaBOB opened this issue Feb 14, 2024 · 4 comments
Closed

Bug: rename_all for enums doesn't match serde #236

stegaBOB opened this issue Feb 14, 2024 · 4 comments

Comments

@stegaBOB
Copy link
Contributor

#184 fixed the issue for struct fields, but enum variants don't have underscores so they will end up all lowercase with camel and pascal case. Serde's implementation has separate logic for enums and structs, so doing the same thing here would probably fix it.

https://github.com/serde-rs/serde/blob/1d54973b928bd8708a4ad2d90fca1203367ff580/serde_derive/src/internals/case.rs#L57

@escritorio-gustavo escritorio-gustavo added bug Something isn't working P-HIGH This will be treated with high priority and removed bug Something isn't working P-HIGH This will be treated with high priority labels Feb 15, 2024
@escritorio-gustavo
Copy link
Contributor

escritorio-gustavo commented Feb 15, 2024

Hey @stegaBOB, thanks for the report! Can you provide an example of the bug?
I'm trying to reproduce it locally but haven't been able to. It does happen as of #184, but it was due to a problem fixed in #198. After which I haven't been able to reproduce the problem.

If it can't be reproduced after #198, this may be a duplicate of #194

@stegaBOB
Copy link
Contributor Author

Ah! Looking at that fix, it looks like that would do the trick. I should have tried the latest git changes first. Would it be possible to cut a new release?

@escritorio-gustavo
Copy link
Contributor

It might take a while until a relesase comes, @NyxCode has very limited time this month and we also need to merge #233 before releasing

@stegaBOB
Copy link
Contributor Author

Gotcha

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

No branches or pull requests

2 participants