Skip to content

Commit 22b1984

Browse files
committed
Derive Clone for IntersperseWith
1 parent d55f0fb commit 22b1984

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/intersperse.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
use std::iter::Fuse;
22
use super::size_hint;
33

4-
#[derive(Clone)]
54
/// An iterator adaptor to insert a particular value
65
/// between each element of the adapted iterator.
76
///
@@ -11,7 +10,7 @@ use super::size_hint;
1110
///
1211
/// See [`.intersperse()`](../trait.Itertools.html#method.intersperse) for more information.
1312
#[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
14-
#[derive(Debug)]
13+
#[derive(Clone, Debug)]
1514
pub struct Intersperse<I>
1615
where I: Iterator
1716
{
@@ -87,7 +86,7 @@ impl<I> Iterator for Intersperse<I>
8786
///
8887
/// See [`.intersperse_with()`](../trait.Itertools.html#method.intersperse_with) for more information.
8988
#[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
90-
#[derive(Debug)]
89+
#[derive(Clone, Debug)]
9190
pub struct IntersperseWith<I, ElemF>
9291
where I: Iterator,
9392
ElemF: FnMut() -> I::Item,

0 commit comments

Comments
 (0)