Skip to content

Commit

Permalink
Update documentation for into_group_map[_by]
Browse files Browse the repository at this point in the history
  • Loading branch information
phimuemue committed Aug 15, 2021
1 parent 135b297 commit 599ae8c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/lib.rs
Expand Up @@ -2770,6 +2770,8 @@ pub trait Itertools : Iterator {
/// Return a `HashMap` of keys mapped to `Vec`s of values. Keys and values
/// are taken from `(Key, Value)` tuple pairs yielded by the input iterator.
///
/// Essentially a shorthand for `.into_grouping_map().collect::<Vec<_>>()`.
///
/// ```
/// use itertools::Itertools;
///
Expand All @@ -2791,8 +2793,8 @@ pub trait Itertools : Iterator {

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

0 comments on commit 599ae8c

Please sign in to comment.