Skip to content

Commit 58b37a4

Browse files
committed
Add a stability specification to the docs for unique and unique_by
This property is an important one, so if the methods guarantee it, that should be specified in the documentation.
1 parent c83cc48 commit 58b37a4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/lib.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -987,6 +987,9 @@ pub trait Itertools : Iterator {
987987
/// Clones of visited elements are stored in a hash set in the
988988
/// iterator.
989989
///
990+
/// The iterator is stable, returning the non-duplicate items in the order
991+
/// in which they occur in the adapted iterator.
992+
///
990993
/// ```
991994
/// use itertools::Itertools;
992995
///
@@ -1009,6 +1012,9 @@ pub trait Itertools : Iterator {
10091012
/// with the keying function `f` by hash and equality.
10101013
/// The keys are stored in a hash set in the iterator.
10111014
///
1015+
/// The iterator is stable, returning the non-duplicate items in the order
1016+
/// in which they occur in the adapted iterator.
1017+
///
10121018
/// ```
10131019
/// use itertools::Itertools;
10141020
///

0 commit comments

Comments
 (0)