@@ -2236,6 +2236,10 @@ impl<'a, K, V> Iterator for Iter<'a, K, V> {
2236
2236
self . base . size_hint ( )
2237
2237
}
2238
2238
#[ inline]
2239
+ fn count ( self ) -> usize {
2240
+ self . base . len ( )
2241
+ }
2242
+ #[ inline]
2239
2243
fn fold < B , F > ( self , init : B , f : F ) -> B
2240
2244
where
2241
2245
Self : Sized ,
@@ -2268,6 +2272,10 @@ impl<'a, K, V> Iterator for IterMut<'a, K, V> {
2268
2272
self . base . size_hint ( )
2269
2273
}
2270
2274
#[ inline]
2275
+ fn count ( self ) -> usize {
2276
+ self . base . len ( )
2277
+ }
2278
+ #[ inline]
2271
2279
fn fold < B , F > ( self , init : B , f : F ) -> B
2272
2280
where
2273
2281
Self : Sized ,
@@ -2310,6 +2318,10 @@ impl<K, V> Iterator for IntoIter<K, V> {
2310
2318
self . base . size_hint ( )
2311
2319
}
2312
2320
#[ inline]
2321
+ fn count ( self ) -> usize {
2322
+ self . base . len ( )
2323
+ }
2324
+ #[ inline]
2313
2325
fn fold < B , F > ( self , init : B , f : F ) -> B
2314
2326
where
2315
2327
Self : Sized ,
@@ -2348,6 +2360,10 @@ impl<'a, K, V> Iterator for Keys<'a, K, V> {
2348
2360
self . inner . size_hint ( )
2349
2361
}
2350
2362
#[ inline]
2363
+ fn count ( self ) -> usize {
2364
+ self . inner . len ( )
2365
+ }
2366
+ #[ inline]
2351
2367
fn fold < B , F > ( self , init : B , mut f : F ) -> B
2352
2368
where
2353
2369
Self : Sized ,
@@ -2379,6 +2395,10 @@ impl<'a, K, V> Iterator for Values<'a, K, V> {
2379
2395
self . inner . size_hint ( )
2380
2396
}
2381
2397
#[ inline]
2398
+ fn count ( self ) -> usize {
2399
+ self . inner . len ( )
2400
+ }
2401
+ #[ inline]
2382
2402
fn fold < B , F > ( self , init : B , mut f : F ) -> B
2383
2403
where
2384
2404
Self : Sized ,
@@ -2410,6 +2430,10 @@ impl<'a, K, V> Iterator for ValuesMut<'a, K, V> {
2410
2430
self . inner . size_hint ( )
2411
2431
}
2412
2432
#[ inline]
2433
+ fn count ( self ) -> usize {
2434
+ self . inner . len ( )
2435
+ }
2436
+ #[ inline]
2413
2437
fn fold < B , F > ( self , init : B , mut f : F ) -> B
2414
2438
where
2415
2439
Self : Sized ,
@@ -2448,6 +2472,10 @@ impl<K, V> Iterator for IntoKeys<K, V> {
2448
2472
self . inner . size_hint ( )
2449
2473
}
2450
2474
#[ inline]
2475
+ fn count ( self ) -> usize {
2476
+ self . inner . len ( )
2477
+ }
2478
+ #[ inline]
2451
2479
fn fold < B , F > ( self , init : B , mut f : F ) -> B
2452
2480
where
2453
2481
Self : Sized ,
@@ -2486,6 +2514,10 @@ impl<K, V> Iterator for IntoValues<K, V> {
2486
2514
self . inner . size_hint ( )
2487
2515
}
2488
2516
#[ inline]
2517
+ fn count ( self ) -> usize {
2518
+ self . inner . len ( )
2519
+ }
2520
+ #[ inline]
2489
2521
fn fold < B , F > ( self , init : B , mut f : F ) -> B
2490
2522
where
2491
2523
Self : Sized ,
0 commit comments