Skip to content

fix(generator): add serde rename in case of rust keyword conflict#94

Merged
lerouxrgd merged 3 commits intolerouxrgd:masterfrom
vdorokhin:master
Mar 7, 2026
Merged

fix(generator): add serde rename in case of rust keyword conflict#94
lerouxrgd merged 3 commits intolerouxrgd:masterfrom
vdorokhin:master

Conversation

@vdorokhin
Copy link
Copy Markdown
Contributor

This patch fixes serde rename attribute not being properly added when field names conflict with Rust keywords but have different casing (e.g., "Type" vs "type").

When an Avro field name like Type (capital T) conflicts with a Rust keyword (type), the code generator renames it to r#type for the Rust field name, but fails to add the #[serde(rename = "Type")] attribute because the existing logic didnt handle this case correctly

@lerouxrgd lerouxrgd merged commit ce1c079 into lerouxrgd:master Mar 7, 2026
2 checks passed
@lerouxrgd
Copy link
Copy Markdown
Owner

Thanks for the fix !

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