Skip to content

Commit 599ae8c

Browse files
committed
Update documentation for into_group_map[_by]
1 parent 135b297 commit 599ae8c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/lib.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2770,6 +2770,8 @@ pub trait Itertools : Iterator {
27702770
/// Return a `HashMap` of keys mapped to `Vec`s of values. Keys and values
27712771
/// are taken from `(Key, Value)` tuple pairs yielded by the input iterator.
27722772
///
2773+
/// Essentially a shorthand for `.into_grouping_map().collect::<Vec<_>>()`.
2774+
///
27732775
/// ```
27742776
/// use itertools::Itertools;
27752777
///
@@ -2791,8 +2793,8 @@ pub trait Itertools : Iterator {
27912793

27922794
/// Return an `Iterator` on a `HashMap`. Keys mapped to `Vec`s of values. The key is specified
27932795
/// in the closure.
2794-
/// Different to `into_group_map_by` because the key is still present. It is also more general.
2795-
/// You can also fold the `group_map`.
2796+
///
2797+
/// Essentially a shorthand for `.into_grouping_map_by(f).collect::<Vec<_>>()`.
27962798
///
27972799
/// ```
27982800
/// use itertools::Itertools;

0 commit comments

Comments
 (0)