@@ -67,9 +67,6 @@ use std::fmt::Write;
67
67
#[ cfg( feature = "use_std" ) ]
68
68
type VecIntoIter < T > = :: std:: vec:: IntoIter < T > ;
69
69
70
- #[ cfg( feature = "use_std" ) ]
71
- type HashMapIntoIter < K , V > = :: std:: collections:: hash_map:: IntoIter < K , V > ;
72
-
73
70
use std:: iter:: FromIterator ;
74
71
75
72
#[ macro_use]
@@ -2196,9 +2193,8 @@ pub trait Itertools: Iterator {
2196
2193
/// use std::collections::HashMap;
2197
2194
///
2198
2195
/// let data = vec![(0, 10), (2, 12), (3, 13), (0, 20), (3, 33), (2, 42)];
2199
- /// let lookup: HashMap<u32,Vec<(u32, u32)>> = data.clone().into_iter().into_group_map_by(|a|
2200
- /// a.0)
2201
- /// .collect();
2196
+ /// let lookup: HashMap<u32,Vec<(u32, u32)>> =
2197
+ /// data.clone().into_iter().into_group_map_by(|a| a.0);
2202
2198
///
2203
2199
/// assert_eq!(lookup[&0], vec![(0,10),(0,20)]);
2204
2200
/// assert_eq!(lookup.get(&1), None);
@@ -2208,11 +2204,12 @@ pub trait Itertools: Iterator {
2208
2204
/// assert_eq!(
2209
2205
/// data.into_iter()
2210
2206
/// .into_group_map_by(|x| x.0)
2207
+ /// .into_iter()
2211
2208
/// .map(|(key, values)| (key, values.into_iter().fold(0,|acc, (_,v)| acc + v )))
2212
2209
/// .collect::<HashMap<u32,u32>>()[&0], 30)
2213
2210
/// ```
2214
2211
#[ cfg( feature = "use_std" ) ]
2215
- fn into_group_map_by < K , V , F > ( self , f : F ) -> HashMapIntoIter < K , Vec < V > >
2212
+ fn into_group_map_by < K , V , F > ( self , f : F ) -> HashMap < K , Vec < V > >
2216
2213
where
2217
2214
Self : Iterator < Item =V > + Sized ,
2218
2215
K : Hash + Eq ,
0 commit comments