Skip to content

Commit 3de4e6c

Browse files
committed
impl Debug, Clone for GroupingMapFn
1 parent fef7d3c commit 3de4e6c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/grouping_map.rs

+5
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,13 @@ use std::ops::{Add, Mul};
1313
/// A wrapper to allow for an easy [`into_grouping_map_by`](crate::Itertools::into_grouping_map_by)
1414
pub type MapForGrouping<I, F> = MapSpecialCase<I, GroupingMapFn<F>>;
1515

16+
#[derive(Clone)]
1617
pub struct GroupingMapFn<F>(F);
1718

19+
impl<F> std::fmt::Debug for GroupingMapFn<F> {
20+
debug_fmt_fields!(GroupingMapFn,);
21+
}
22+
1823
impl<V, K, F: FnMut(&V) -> K> MapSpecialCaseFn<V> for GroupingMapFn<F> {
1924
type Out = (K, V);
2025
fn call(&mut self, v: V) -> Self::Out {

0 commit comments

Comments
 (0)