diff --git a/src/adaptors/mod.rs b/src/adaptors/mod.rs index 77192f26e..6de2ccb09 100644 --- a/src/adaptors/mod.rs +++ b/src/adaptors/mod.rs @@ -629,7 +629,7 @@ pub trait HasCombination<I>: Sized { /// Create a new `TupleCombinations` from a clonable iterator. pub fn tuple_combinations<T, I>(iter: I) -> TupleCombinations<I, T> where - I: Iterator + Clone, + I: Iterator, I::Item: Clone, T: HasCombination<I>, { diff --git a/src/lib.rs b/src/lib.rs index 20226d88a..cba3ad570 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1667,7 +1667,7 @@ pub trait Itertools: Iterator { /// ``` fn tuple_combinations<T>(self) -> TupleCombinations<Self, T> where - Self: Sized + Clone, + Self: Sized, Self::Item: Clone, T: adaptors::HasCombination<Self>, { @@ -1715,7 +1715,7 @@ pub trait Itertools: Iterator { #[cfg(feature = "use_alloc")] fn array_combinations<const K: usize>(self) -> ArrayCombinations<Self, K> where - Self: Sized + Clone, + Self: Sized, Self::Item: Clone, { combinations::array_combinations(self)