diff --git a/src/lib.rs b/src/lib.rs index 489c0aa65..5a1248d5a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1565,6 +1565,11 @@ pub trait Itertools: Iterator { /// Iterator element can be any homogeneous tuple of type `Self::Item` with /// size up to 12. /// + /// # Guarantees + /// + /// If the adapted iterator is deterministic, + /// this iterator adapter yields items in a reliable order. + /// /// ``` /// use itertools::Itertools; /// @@ -1592,11 +1597,6 @@ pub trait Itertools: Iterator { /// let it: TupleCombinations, (u32, u32, u32)> = (1..5).tuple_combinations(); /// itertools::assert_equal(it, vec![(1, 2, 3), (1, 2, 4), (1, 3, 4), (2, 3, 4)]); /// ``` - /// - /// # Guarantees - /// - /// If the adapted iterator is deterministic, - /// this iterator adapter yields items in a reliable order. fn tuple_combinations(self) -> TupleCombinations where Self: Sized + Clone, @@ -1612,6 +1612,11 @@ pub trait Itertools: Iterator { /// Iterator element type is `Vec`. The iterator produces a new `Vec` per iteration, /// and clones the iterator elements. /// + /// # Guarantees + /// + /// If the adapted iterator is deterministic, + /// this iterator adapter yields items in a reliable order. + /// /// ``` /// use itertools::Itertools; /// @@ -1635,11 +1640,6 @@ pub trait Itertools: Iterator { /// vec![2, 2], /// ]); /// ``` - /// - /// # Guarantees - /// - /// If the adapted iterator is deterministic, - /// this iterator adapter yields items in a reliable order. #[cfg(feature = "use_alloc")] fn combinations(self, k: usize) -> Combinations where