Skip to content

Commit

Permalink
Add doc comment to FromRepr macro (#202)
Browse files Browse the repository at this point in the history
This will help people who have missing_docs denied.
  • Loading branch information
ljoonal committed Jan 8, 2022
1 parent 0c80602 commit ced17d4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions strum_macros/src/macros/from_repr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ pub fn from_repr_inner(ast: &DeriveInput) -> syn::Result<TokenStream> {

Ok(quote! {
impl #impl_generics #name #ty_generics #where_clause {
#[doc = "Try to create [Self] from the raw representation"]
#vis #const_if_possible fn from_repr(discriminant: #discriminant_type) -> Option<#name #ty_generics> {
#(#constant_defs)*
match discriminant {
Expand Down

0 comments on commit ced17d4

Please sign in to comment.