Skip to content

fix: avoid conflicts in case of consecutive underscores#321

Merged
Peternator7 merged 2 commits intoPeternator7:masterfrom
aminya:underscores
Jan 27, 2024
Merged

fix: avoid conflicts in case of consecutive underscores#321
Peternator7 merged 2 commits intoPeternator7:masterfrom
aminya:underscores

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
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