From 22b19842abb82cb7841ec367ec0917693a889f04 Mon Sep 17 00:00:00 2001 From: Alexander Hirsch Date: Tue, 5 May 2020 09:44:26 +0200 Subject: [PATCH] Derive Clone for IntersperseWith --- src/intersperse.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/intersperse.rs b/src/intersperse.rs index a92ad99df..4cd2fa5a8 100644 --- a/src/intersperse.rs +++ b/src/intersperse.rs @@ -1,7 +1,6 @@ use std::iter::Fuse; use super::size_hint; -#[derive(Clone)] /// An iterator adaptor to insert a particular value /// between each element of the adapted iterator. /// @@ -11,7 +10,7 @@ use super::size_hint; /// /// See [`.intersperse()`](../trait.Itertools.html#method.intersperse) for more information. #[must_use = "iterator adaptors are lazy and do nothing unless consumed"] -#[derive(Debug)] +#[derive(Clone, Debug)] pub struct Intersperse where I: Iterator { @@ -87,7 +86,7 @@ impl Iterator for Intersperse /// /// See [`.intersperse_with()`](../trait.Itertools.html#method.intersperse_with) for more information. #[must_use = "iterator adaptors are lazy and do nothing unless consumed"] -#[derive(Debug)] +#[derive(Clone, Debug)] pub struct IntersperseWith where I: Iterator, ElemF: FnMut() -> I::Item,