diff --git a/strum_macros/src/macros/enum_iter.rs b/strum_macros/src/macros/enum_iter.rs index 0e700aa..8497404 100644 --- a/strum_macros/src/macros/enum_iter.rs +++ b/strum_macros/src/macros/enum_iter.rs @@ -71,9 +71,7 @@ pub fn enum_iter_inner(ast: &DeriveInput) -> syn::Result { Ok(quote! { #[doc = #doc_comment] - #[allow( - missing_copy_implementations, - )] + #[derive(Clone, Copy, Eq, PartialEq)] #vis struct #iter_name #ty_generics { idx: usize, back_idx: usize, @@ -159,14 +157,6 @@ pub fn enum_iter_inner(ast: &DeriveInput) -> syn::Result { } } - impl #impl_generics Clone for #iter_name #ty_generics #where_clause { - fn clone(&self) -> #iter_name #ty_generics { - #iter_name { - idx: self.idx, - back_idx: self.back_idx, - marker: self.marker.clone(), - } - } - } + impl #impl_generics ::core::iter::FusedIterator for #iter_name #ty_generics #where_clause { } }) }