File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
library/core/src/iter/adapters Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -297,7 +297,7 @@ where
297297 let ( blo, bhi) = self . backiter . as_ref ( ) . map_or ( ( 0 , Some ( 0 ) ) , U :: size_hint) ;
298298 let lo = flo. saturating_add ( blo) ;
299299
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 ( ) {
301301 let ( lower, upper) = self . iter . size_hint ( ) ;
302302
303303 let lower = lower. saturating_mul ( fixed_size) . saturating_add ( lo) ;
@@ -474,18 +474,18 @@ where
474474 }
475475}
476476
477- trait ConstSizeIterable {
477+ trait ConstSizeIntoIterator : IntoIterator {
478478 fn size ( ) -> Option < usize > ;
479479}
480480
481- impl < T > ConstSizeIterable for T {
481+ impl < T > ConstSizeIntoIterator for T where T : IntoIterator {
482482 #[ inline]
483483 default fn size ( ) -> Option < usize > {
484484 None
485485 }
486486}
487487
488- impl < T , const N : usize > ConstSizeIterable for [ T ; N ] {
488+ impl < T , const N : usize > ConstSizeIntoIterator for [ T ; N ] {
489489 #[ inline]
490490 fn size ( ) -> Option < usize > {
491491 Some ( N )
You can’t perform that action at this time.
0 commit comments