Skip to content
Permalink
Browse files

style_derive: Make parse derive work with C like enums.

  • Loading branch information
canova committed Dec 16, 2017
1 parent f7440bf commit 3ad2687c0b21227ef41702599f1f5f85f4cb4884
Showing with 2 additions and 1 deletion.
  1. +2 −1 components/style_derive/parse.rs
@@ -20,9 +20,10 @@ pub fn derive(input: DeriveInput) -> Tokens {
);

let identifier = cg::to_css_identifier(variant.ident.as_ref());
let ident = &variant.ident;
match_body = quote! {
#match_body
#identifier => Ok(#name::#variant),
#identifier => Ok(#name::#ident),
}
});

0 comments on commit 3ad2687

Please sign in to comment.
You can’t perform that action at this time.