File tree 1 file changed +4
-4
lines changed
library/core/src/iter/adapters
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -297,7 +297,7 @@ where
297
297
let ( blo, bhi) = self . backiter . as_ref ( ) . map_or ( ( 0 , Some ( 0 ) ) , U :: size_hint) ;
298
298
let lo = flo. saturating_add ( blo) ;
299
299
300
- if let Some ( fixed_size) = <<I as Iterator >:: Item as ConstSizeIterable >:: size ( ) {
300
+ if let Some ( fixed_size) = <<I as Iterator >:: Item as ConstSizeIntoIterator >:: size ( ) {
301
301
let ( lower, upper) = self . iter . size_hint ( ) ;
302
302
303
303
let lower = lower. saturating_mul ( fixed_size) . saturating_add ( lo) ;
@@ -474,18 +474,18 @@ where
474
474
}
475
475
}
476
476
477
- trait ConstSizeIterable {
477
+ trait ConstSizeIntoIterator : IntoIterator {
478
478
fn size ( ) -> Option < usize > ;
479
479
}
480
480
481
- impl < T > ConstSizeIterable for T {
481
+ impl < T > ConstSizeIntoIterator for T where T : IntoIterator {
482
482
#[ inline]
483
483
default fn size ( ) -> Option < usize > {
484
484
None
485
485
}
486
486
}
487
487
488
- impl < T , const N : usize > ConstSizeIterable for [ T ; N ] {
488
+ impl < T , const N : usize > ConstSizeIntoIterator for [ T ; N ] {
489
489
#[ inline]
490
490
fn size ( ) -> Option < usize > {
491
491
Some ( N )
You can’t perform that action at this time.
0 commit comments