mirror of
https://github.com/danog/strum.git
synced 2024-11-30 04:28:59 +01:00
Add doc comment to FromRepr macro (#202)
This will help people who have missing_docs denied.
This commit is contained in:
parent
0c80602333
commit
ced17d4c58
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user