Skip to content

Commit

Permalink
Update documentation of GroupingMap
Browse files Browse the repository at this point in the history
  • Loading branch information
Philippe-Cholet committed Mar 19, 2024
1 parent bf8e4aa commit 5a71e63
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/grouping_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ pub type GroupingMapBy<I, F> = GroupingMap<MapForGrouping<I, F>>;
/// It groups elements by their key and at the same time fold each group
/// using some aggregating operation.
///
/// Each method have a `_in`-suffixed version where you can provide a map other than
/// `HashMap::new()` such as:
/// - `BTreeMap::new()` when the values are `Ord` and not necessarily `Hash + Eq`.
/// - `HashMap::default()` to use a different hasher.
/// - `HashMap::with_capacity(100)` to pre-allocate.
///
/// No method on this struct performs temporary allocations.
#[derive(Clone, Debug)]
#[must_use = "GroupingMap is lazy and do nothing unless consumed"]
Expand Down

0 comments on commit 5a71e63

Please sign in to comment.