Skip to content

Commit

Permalink
Apply the variant formatting over the exported name
Browse files Browse the repository at this point in the history
Useful when you want to combine prefixing and formatting.
  • Loading branch information
lu-zero authored and eqrion committed Nov 26, 2018
1 parent e08fb32 commit 57f7ec2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/bindgen/ir/enumeration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,10 @@ impl Item for Enum {
.iter()
.map(|variant| {
EnumVariant::new(
r.apply_to_pascal_case(&variant.name, IdentifierType::EnumVariant(self)),
r.apply_to_pascal_case(
&variant.export_name,
IdentifierType::EnumVariant(self),
),
variant.discriminant.clone(),
variant.body.as_ref().map(|body| {
(
Expand Down

0 comments on commit 57f7ec2

Please sign in to comment.