From 57f7ec222ba3ef9e438c4c804104fa6617f0f27d Mon Sep 17 00:00:00 2001 From: Luca Barbato Date: Tue, 30 Oct 2018 23:06:07 +0100 Subject: [PATCH] Apply the variant formatting over the exported name Useful when you want to combine prefixing and formatting. --- src/bindgen/ir/enumeration.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/bindgen/ir/enumeration.rs b/src/bindgen/ir/enumeration.rs index 14aaa41f0..fce01cdd1 100644 --- a/src/bindgen/ir/enumeration.rs +++ b/src/bindgen/ir/enumeration.rs @@ -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| { (