Skip to content

Commit

Permalink
Free function should take IntoIterator
Browse files Browse the repository at this point in the history
  • Loading branch information
phimuemue committed Sep 4, 2020
1 parent 9dfac5c commit 8a562f8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cons_tuples_impl.rs
Expand Up @@ -57,8 +57,8 @@ impl<I, J> Clone for ConsTuples<I, J>

/// Create an iterator that maps for example iterators of
/// `((A, B), C)` to `(A, B, C)`.
pub fn cons_tuples<I, J>(iterable: I) -> ConsTuples<I, J>
where I: Iterator<Item=J>
pub fn cons_tuples<I, J>(iterable: I) -> ConsTuples<I::IntoIter, J>
where I: IntoIterator<Item=J>
{
ConsTuples { iter: iterable.into_iter() }
}

0 comments on commit 8a562f8

Please sign in to comment.