Skip to content

Commit c5c755c

Browse files
committed
Improve tuple_windows() doc (add a reference to pairwise)
As shown in #388, tuple_windows can be hard to find if you come from other environment (python, RxJs, …) since people may expect to find a `pairwise()` method instead.
1 parent 7a97808 commit c5c755c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -561,6 +561,8 @@ pub trait Itertools : Iterator {
561561
/// ```
562562
/// use itertools::Itertools;
563563
/// let mut v = Vec::new();
564+
///
565+
/// // pairwise iteration
564566
/// for (a, b) in (1..5).tuple_windows() {
565567
/// v.push((a, b));
566568
/// }

0 commit comments

Comments
 (0)