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

fix: avoid conflicts in case of consecutive underscores #321

Merged
merged 2 commits into from
Jan 27, 2024

Conversation

aminya
Copy link
Contributor

@aminya aminya commented Dec 25, 2023

In FromRepr if two fields exist that their only difference is underscores, they are converted to the same discriminant name. This PR fixes the issue by not changing the case of the fields.

Fixes #225

@Peternator7
Copy link
Owner

Hi @aminya, I'm worried this fix will trigger casing warnings with Clippy. I think this change is fine, but we need to #[allow(non_upper_case_globals)] or this will raise compiler warnings

@aminya
Copy link
Contributor Author

aminya commented Jan 22, 2024

@Peternator7 Sure, fixed it in
c1e8815

image

@Peternator7 Peternator7 merged commit 33b93b4 into Peternator7:master Jan 27, 2024
1 check passed
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.

Preserve leading underscores in generated Idents
2 participants