Skip to content

Commit

Permalink
Move guarantees before doctests
Browse files Browse the repository at this point in the history
More visible that way.
  • Loading branch information
Philippe-Cholet authored and jswrenn committed May 13, 2024
1 parent a4de4dc commit 49ad027
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
///
Expand Down Expand Up @@ -1592,11 +1597,6 @@ pub trait Itertools: Iterator {
/// let it: TupleCombinations<Range<u32>, (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<T>(self) -> TupleCombinations<Self, T>
where
Self: Sized + Clone,
Expand All @@ -1612,6 +1612,11 @@ pub trait Itertools: Iterator {
/// Iterator element type is `Vec<Self::Item>`. 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;
///
Expand All @@ -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<Self>
where
Expand Down

0 comments on commit 49ad027

Please sign in to comment.