Open RichardWGNR opened 3 months ago
Oh, there's also the exact same problem with the Iden trait But it's not very critical there, because the variant can be renamed via attribute.
hi, how can I use the attribute to rename r#type in the enum_def macro?
Description
Hi,
Do I understand correctly that the enum_def macro casts the r#type structure field to a similar column name?
Unfortunately, I haven't found a way in the source code to achieve renaming the Iden value to a custom value when using the enum_def macro.
So I'm going to tell you all that it's a bug.
p.s. the error in the second screenshot says that the r#type column is not found in the referrals_rewards table.
Expected Behavior
Raw field: r#type Iden column name: Type Query column name (iden str value): type
Actual Behavior
Raw field: r#type Iden field name: RType Query column name (iden str value): r#type
Reproduces How Often
always, when escaping Rust reserved words via r#.
Versions
last