diff --git a/src/grouping_map.rs b/src/grouping_map.rs index 33ae065d2..0dea42499 100644 --- a/src/grouping_map.rs +++ b/src/grouping_map.rs @@ -27,12 +27,10 @@ impl K> MapSpecialCaseFn for GroupingMapFn { } } -impl K> MapForGrouping { - pub(crate) fn new(iter: I, key_mapper: F) -> Self { - MapSpecialCase { - iter, - f: GroupingMapFn(key_mapper), - } +pub(crate) fn new_map_for_groupingK>(iter: I, key_mapper: F) -> MapForGrouping { + MapSpecialCase { + iter, + f: GroupingMapFn(key_mapper), } } diff --git a/src/lib.rs b/src/lib.rs index 218b3a8b9..b7973248d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -3194,7 +3194,7 @@ pub trait Itertools: Iterator { K: Hash + Eq, F: FnMut(&V) -> K, { - grouping_map::new(grouping_map::MapForGrouping::new(self, key_mapper)) + grouping_map::new(grouping_map::new_map_for_grouping(self, key_mapper)) } /// Return all minimum elements of an iterator.