diff options
Diffstat (limited to 'src/combinations_with_replacement.rs')
-rw-r--r-- | src/combinations_with_replacement.rs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/combinations_with_replacement.rs b/src/combinations_with_replacement.rs index 7e7a802..81b13f1 100644 --- a/src/combinations_with_replacement.rs +++ b/src/combinations_with_replacement.rs @@ -1,11 +1,13 @@ use alloc::vec::Vec; use std::fmt; +use std::iter::FusedIterator; use super::lazy_buffer::LazyBuffer; /// An iterator to iterate through all the `n`-length combinations in an iterator, with replacement. /// -/// See [`.combinations_with_replacement()`](../trait.Itertools.html#method.combinations_with_replacement) for more information. +/// See [`.combinations_with_replacement()`](crate::Itertools::combinations_with_replacement) +/// for more information. #[derive(Clone)] pub struct CombinationsWithReplacement<I> where @@ -99,3 +101,9 @@ where } } } + +impl<I> FusedIterator for CombinationsWithReplacement<I> +where + I: Iterator, + I::Item: Clone, +{} |