Skip to content

Commit

Permalink
Derive Clone for IntersperseWith
Browse files Browse the repository at this point in the history
  • Loading branch information
gin-ahirsch committed May 5, 2020
1 parent d55f0fb commit 22b1984
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions 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.
///
Expand All @@ -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<I>
where I: Iterator
{
Expand Down Expand Up @@ -87,7 +86,7 @@ impl<I> Iterator for Intersperse<I>
///
/// 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<I, ElemF>
where I: Iterator,
ElemF: FnMut() -> I::Item,
Expand Down

0 comments on commit 22b1984

Please sign in to comment.