Skip to content

Commit

Permalink
style_derive: Make parse derive work with C like enums.
Browse files Browse the repository at this point in the history
  • Loading branch information
canova committed Dec 16, 2017
1 parent f7440bf commit 3ad2687
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion components/style_derive/parse.rs
Expand Up @@ -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),
}
});

Expand Down

0 comments on commit 3ad2687

Please sign in to comment.