mirror of
https://github.com/danog/strum.git
synced 2024-11-30 04:28:59 +01:00
Fix doc comment for EnumIter (#242)
Comment now says that it iterates over variants of the enum rather than variants of `Self`, which would be the iterator.
This commit is contained in:
parent
93d0886377
commit
dd0c2fa785
@ -11,6 +11,7 @@ pub fn enum_iter_inner(ast: &DeriveInput) -> syn::Result<TokenStream> {
|
||||
let vis = &ast.vis;
|
||||
let type_properties = ast.get_type_properties()?;
|
||||
let strum_module_path = type_properties.crate_module_path();
|
||||
let doc_comment = format!("An iterator over the variants of [{}]", name);
|
||||
|
||||
if gen.lifetimes().count() > 0 {
|
||||
return Err(syn::Error::new(
|
||||
@ -65,7 +66,7 @@ pub fn enum_iter_inner(ast: &DeriveInput) -> syn::Result<TokenStream> {
|
||||
let iter_name = syn::parse_str::<Ident>(&format!("{}Iter", name)).unwrap();
|
||||
|
||||
Ok(quote! {
|
||||
#[doc = "An iterator over the variants of [Self]"]
|
||||
#[doc = #doc_comment]
|
||||
#[allow(
|
||||
missing_copy_implementations,
|
||||
missing_debug_implementations,
|
||||
|
Loading…
Reference in New Issue
Block a user