We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e8e8318 commit 5af9158Copy full SHA for 5af9158
glib-macros/src/properties.rs
@@ -585,7 +585,8 @@ fn expand_wrapper_notify_prop(props: &[PropDesc]) -> TokenStream2 {
585
quote!(#(#emit_fns)*)
586
}
587
588
-fn name_to_enum_ident(mut name: String) -> syn::Ident {
+fn name_to_enum_ident(name: String) -> syn::Ident {
589
+ let mut name = name.strip_prefix("r#").unwrap_or(&name).to_owned();
590
let mut slice = name.as_mut_str();
591
while let Some(i) = slice.find('-') {
592
let (head, tail) = slice.split_at_mut(i);
@@ -606,6 +607,7 @@ fn expand_properties_enum(props: &[PropDesc]) -> TokenStream2 {
606
607
.iter()
608
.map(|p| {
609
let name: String = p.name.value();
610
+
611
name_to_enum_ident(name)
612
})
613
.collect();
0 commit comments