@@ -2233,6 +2233,10 @@ impl<'a, K, V> Iterator for Iter<'a, K, V> {
2233
2233
self . base . size_hint ( )
2234
2234
}
2235
2235
#[ inline]
2236
+ fn count ( self ) -> usize {
2237
+ self . base . len ( )
2238
+ }
2239
+ #[ inline]
2236
2240
fn fold < B , F > ( self , init : B , f : F ) -> B
2237
2241
where
2238
2242
Self : Sized ,
@@ -2265,6 +2269,10 @@ impl<'a, K, V> Iterator for IterMut<'a, K, V> {
2265
2269
self . base . size_hint ( )
2266
2270
}
2267
2271
#[ inline]
2272
+ fn count ( self ) -> usize {
2273
+ self . base . len ( )
2274
+ }
2275
+ #[ inline]
2268
2276
fn fold < B , F > ( self , init : B , f : F ) -> B
2269
2277
where
2270
2278
Self : Sized ,
@@ -2307,6 +2315,10 @@ impl<K, V> Iterator for IntoIter<K, V> {
2307
2315
self . base . size_hint ( )
2308
2316
}
2309
2317
#[ inline]
2318
+ fn count ( self ) -> usize {
2319
+ self . base . len ( )
2320
+ }
2321
+ #[ inline]
2310
2322
fn fold < B , F > ( self , init : B , f : F ) -> B
2311
2323
where
2312
2324
Self : Sized ,
@@ -2345,6 +2357,10 @@ impl<'a, K, V> Iterator for Keys<'a, K, V> {
2345
2357
self . inner . size_hint ( )
2346
2358
}
2347
2359
#[ inline]
2360
+ fn count ( self ) -> usize {
2361
+ self . inner . len ( )
2362
+ }
2363
+ #[ inline]
2348
2364
fn fold < B , F > ( self , init : B , mut f : F ) -> B
2349
2365
where
2350
2366
Self : Sized ,
@@ -2376,6 +2392,10 @@ impl<'a, K, V> Iterator for Values<'a, K, V> {
2376
2392
self . inner . size_hint ( )
2377
2393
}
2378
2394
#[ inline]
2395
+ fn count ( self ) -> usize {
2396
+ self . inner . len ( )
2397
+ }
2398
+ #[ inline]
2379
2399
fn fold < B , F > ( self , init : B , mut f : F ) -> B
2380
2400
where
2381
2401
Self : Sized ,
@@ -2407,6 +2427,10 @@ impl<'a, K, V> Iterator for ValuesMut<'a, K, V> {
2407
2427
self . inner . size_hint ( )
2408
2428
}
2409
2429
#[ inline]
2430
+ fn count ( self ) -> usize {
2431
+ self . inner . len ( )
2432
+ }
2433
+ #[ inline]
2410
2434
fn fold < B , F > ( self , init : B , mut f : F ) -> B
2411
2435
where
2412
2436
Self : Sized ,
@@ -2445,6 +2469,10 @@ impl<K, V> Iterator for IntoKeys<K, V> {
2445
2469
self . inner . size_hint ( )
2446
2470
}
2447
2471
#[ inline]
2472
+ fn count ( self ) -> usize {
2473
+ self . inner . len ( )
2474
+ }
2475
+ #[ inline]
2448
2476
fn fold < B , F > ( self , init : B , mut f : F ) -> B
2449
2477
where
2450
2478
Self : Sized ,
@@ -2483,6 +2511,10 @@ impl<K, V> Iterator for IntoValues<K, V> {
2483
2511
self . inner . size_hint ( )
2484
2512
}
2485
2513
#[ inline]
2514
+ fn count ( self ) -> usize {
2515
+ self . inner . len ( )
2516
+ }
2517
+ #[ inline]
2486
2518
fn fold < B , F > ( self , init : B , mut f : F ) -> B
2487
2519
where
2488
2520
Self : Sized ,
0 commit comments