diff --git a/src/adaptors/multi_product.rs b/src/adaptors/multi_product.rs index 8e5a261a7..e071b875d 100644 --- a/src/adaptors/multi_product.rs +++ b/src/adaptors/multi_product.rs @@ -13,18 +13,24 @@ use crate::size_hint; /// See [`.multi_cartesian_product()`](crate::Itertools::multi_cartesian_product) /// for more information. #[must_use = "iterator adaptors are lazy and do nothing unless consumed"] -pub struct MultiProduct(Option>) +pub struct MultiProduct( + /// `None` once the iterator has ended. + Option>, +) where I: Iterator + Clone, I::Item: Clone; #[derive(Clone)] +/// Internals for `MultiProduct`. struct MultiProductInner where I: Iterator + Clone, I::Item: Clone, { + /// Holds the iterators. iters: Vec>, + /// It is `None` at the beginning then it holds the current item of each iterator. cur: Option>, }