@@ -22,6 +22,7 @@ pub struct ParIter<'a, K, V, S> {
2222impl < ' a , K : Sync , V : Sync , S : Sync > ParallelIterator for ParIter < ' a , K , V , S > {
2323 type Item = ( & ' a K , & ' a V ) ;
2424
25+ #[ cfg_attr( feature = "inline-more" , inline) ]
2526 fn drive_unindexed < C > ( self , consumer : C ) -> C :: Result
2627 where
2728 C : UnindexedConsumer < Self :: Item > ,
@@ -38,6 +39,7 @@ impl<'a, K: Sync, V: Sync, S: Sync> ParallelIterator for ParIter<'a, K, V, S> {
3839}
3940
4041impl < K , V , S > Clone for ParIter < ' _ , K , V , S > {
42+ #[ cfg_attr( feature = "inline-more" , inline) ]
4143 fn clone ( & self ) -> Self {
4244 ParIter { map : self . map }
4345 }
@@ -63,6 +65,7 @@ pub struct ParKeys<'a, K, V, S> {
6365impl < ' a , K : Sync , V : Sync , S : Sync > ParallelIterator for ParKeys < ' a , K , V , S > {
6466 type Item = & ' a K ;
6567
68+ #[ cfg_attr( feature = "inline-more" , inline) ]
6669 fn drive_unindexed < C > ( self , consumer : C ) -> C :: Result
6770 where
6871 C : UnindexedConsumer < Self :: Item > ,
@@ -76,6 +79,7 @@ impl<'a, K: Sync, V: Sync, S: Sync> ParallelIterator for ParKeys<'a, K, V, S> {
7679}
7780
7881impl < K , V , S > Clone for ParKeys < ' _ , K , V , S > {
82+ #[ cfg_attr( feature = "inline-more" , inline) ]
7983 fn clone ( & self ) -> Self {
8084 ParKeys { map : self . map }
8185 }
@@ -101,6 +105,7 @@ pub struct ParValues<'a, K, V, S> {
101105impl < ' a , K : Sync , V : Sync , S : Sync > ParallelIterator for ParValues < ' a , K , V , S > {
102106 type Item = & ' a V ;
103107
108+ #[ cfg_attr( feature = "inline-more" , inline) ]
104109 fn drive_unindexed < C > ( self , consumer : C ) -> C :: Result
105110 where
106111 C : UnindexedConsumer < Self :: Item > ,
@@ -114,6 +119,7 @@ impl<'a, K: Sync, V: Sync, S: Sync> ParallelIterator for ParValues<'a, K, V, S>
114119}
115120
116121impl < K , V , S > Clone for ParValues < ' _ , K , V , S > {
122+ #[ cfg_attr( feature = "inline-more" , inline) ]
117123 fn clone ( & self ) -> Self {
118124 ParValues { map : self . map }
119125 }
@@ -141,6 +147,7 @@ pub struct ParIterMut<'a, K, V, S> {
141147impl < ' a , K : Send + Sync , V : Send , S : Send > ParallelIterator for ParIterMut < ' a , K , V , S > {
142148 type Item = ( & ' a K , & ' a mut V ) ;
143149
150+ #[ cfg_attr( feature = "inline-more" , inline) ]
144151 fn drive_unindexed < C > ( self , consumer : C ) -> C :: Result
145152 where
146153 C : UnindexedConsumer < Self :: Item > ,
@@ -178,6 +185,7 @@ pub struct ParValuesMut<'a, K, V, S> {
178185impl < ' a , K : Send , V : Send , S : Send > ParallelIterator for ParValuesMut < ' a , K , V , S > {
179186 type Item = & ' a mut V ;
180187
188+ #[ cfg_attr( feature = "inline-more" , inline) ]
181189 fn drive_unindexed < C > ( self , consumer : C ) -> C :: Result
182190 where
183191 C : UnindexedConsumer < Self :: Item > ,
@@ -212,6 +220,7 @@ pub struct IntoParIter<K, V, S> {
212220impl < K : Send , V : Send , S : Send > ParallelIterator for IntoParIter < K , V , S > {
213221 type Item = ( K , V ) ;
214222
223+ #[ cfg_attr( feature = "inline-more" , inline) ]
215224 fn drive_unindexed < C > ( self , consumer : C ) -> C :: Result
216225 where
217226 C : UnindexedConsumer < Self :: Item > ,
@@ -240,6 +249,7 @@ pub struct ParDrain<'a, K, V, S> {
240249impl < K : Send , V : Send , S : Send > ParallelIterator for ParDrain < ' _ , K , V , S > {
241250 type Item = ( K , V ) ;
242251
252+ #[ cfg_attr( feature = "inline-more" , inline) ]
243253 fn drive_unindexed < C > ( self , consumer : C ) -> C :: Result
244254 where
245255 C : UnindexedConsumer < Self :: Item > ,
@@ -258,24 +268,28 @@ impl<K: fmt::Debug + Eq + Hash, V: fmt::Debug, S: BuildHasher> fmt::Debug
258268
259269impl < K : Sync , V : Sync , S : Sync > HashMap < K , V , S > {
260270 /// Visits (potentially in parallel) immutably borrowed keys in an arbitrary order.
271+ #[ cfg_attr( feature = "inline-more" , inline) ]
261272 pub fn par_keys ( & self ) -> ParKeys < ' _ , K , V , S > {
262273 ParKeys { map : self }
263274 }
264275
265276 /// Visits (potentially in parallel) immutably borrowed values in an arbitrary order.
277+ #[ cfg_attr( feature = "inline-more" , inline) ]
266278 pub fn par_values ( & self ) -> ParValues < ' _ , K , V , S > {
267279 ParValues { map : self }
268280 }
269281}
270282
271283impl < K : Send , V : Send , S : Send > HashMap < K , V , S > {
272284 /// Visits (potentially in parallel) mutably borrowed values in an arbitrary order.
285+ #[ cfg_attr( feature = "inline-more" , inline) ]
273286 pub fn par_values_mut ( & mut self ) -> ParValuesMut < ' _ , K , V , S > {
274287 ParValuesMut { map : self }
275288 }
276289
277290 /// Consumes (potentially in parallel) all values in an arbitrary order,
278291 /// while preserving the map's allocated memory for reuse.
292+ #[ cfg_attr( feature = "inline-more" , inline) ]
279293 pub fn par_drain ( & mut self ) -> ParDrain < ' _ , K , V , S > {
280294 ParDrain { map : self }
281295 }
@@ -303,6 +317,7 @@ impl<K: Send, V: Send, S: Send> IntoParallelIterator for HashMap<K, V, S> {
303317 type Item = ( K , V ) ;
304318 type Iter = IntoParIter < K , V , S > ;
305319
320+ #[ cfg_attr( feature = "inline-more" , inline) ]
306321 fn into_par_iter ( self ) -> Self :: Iter {
307322 IntoParIter { map : self }
308323 }
@@ -312,6 +327,7 @@ impl<'a, K: Sync, V: Sync, S: Sync> IntoParallelIterator for &'a HashMap<K, V, S
312327 type Item = ( & ' a K , & ' a V ) ;
313328 type Iter = ParIter < ' a , K , V , S > ;
314329
330+ #[ cfg_attr( feature = "inline-more" , inline) ]
315331 fn into_par_iter ( self ) -> Self :: Iter {
316332 ParIter { map : self }
317333 }
@@ -321,6 +337,7 @@ impl<'a, K: Send + Sync, V: Send, S: Send> IntoParallelIterator for &'a mut Hash
321337 type Item = ( & ' a K , & ' a mut V ) ;
322338 type Iter = ParIterMut < ' a , K , V , S > ;
323339
340+ #[ cfg_attr( feature = "inline-more" , inline) ]
324341 fn into_par_iter ( self ) -> Self :: Iter {
325342 ParIterMut { map : self }
326343 }
0 commit comments