@@ -1291,12 +1291,22 @@ impl<'a, T> Iterator for Iter<'a, T> {
12911291 fn next ( & mut self ) -> Option < & ' a T > {
12921292 self . iter . next ( )
12931293 }
1294+
12941295 fn size_hint ( & self ) -> ( usize , Option < usize > ) {
12951296 self . iter . size_hint ( )
12961297 }
1298+
12971299 fn last ( mut self ) -> Option < & ' a T > {
12981300 self . next_back ( )
12991301 }
1302+
1303+ fn min ( mut self ) -> Option < & ' a T > {
1304+ self . next ( )
1305+ }
1306+
1307+ fn max ( mut self ) -> Option < & ' a T > {
1308+ self . next_back ( )
1309+ }
13001310}
13011311#[ stable( feature = "rust1" , since = "1.0.0" ) ]
13021312impl < ' a , T > DoubleEndedIterator for Iter < ' a , T > {
@@ -1321,6 +1331,7 @@ impl<T> Iterator for IntoIter<T> {
13211331 fn next ( & mut self ) -> Option < T > {
13221332 self . iter . next ( ) . map ( |( k, _) | k)
13231333 }
1334+
13241335 fn size_hint ( & self ) -> ( usize , Option < usize > ) {
13251336 self . iter . size_hint ( )
13261337 }
@@ -1359,6 +1370,14 @@ impl<'a, T> Iterator for Range<'a, T> {
13591370 fn last ( mut self ) -> Option < & ' a T > {
13601371 self . next_back ( )
13611372 }
1373+
1374+ fn min ( mut self ) -> Option < & ' a T > {
1375+ self . next ( )
1376+ }
1377+
1378+ fn max ( mut self ) -> Option < & ' a T > {
1379+ self . next_back ( )
1380+ }
13621381}
13631382
13641383#[ stable( feature = "btree_range" , since = "1.17.0" ) ]
@@ -1429,6 +1448,10 @@ impl<'a, T: Ord> Iterator for Difference<'a, T> {
14291448 } ;
14301449 ( self_len. saturating_sub ( other_len) , Some ( self_len) )
14311450 }
1451+
1452+ fn min ( mut self ) -> Option < & ' a T > {
1453+ self . next ( )
1454+ }
14321455}
14331456
14341457#[ stable( feature = "fused" , since = "1.26.0" ) ]
@@ -1460,6 +1483,10 @@ impl<'a, T: Ord> Iterator for SymmetricDifference<'a, T> {
14601483 // the number of elements to less than half the range of usize.
14611484 ( 0 , Some ( a_len + b_len) )
14621485 }
1486+
1487+ fn min ( mut self ) -> Option < & ' a T > {
1488+ self . next ( )
1489+ }
14631490}
14641491
14651492#[ stable( feature = "fused" , since = "1.26.0" ) ]
@@ -1516,6 +1543,10 @@ impl<'a, T: Ord> Iterator for Intersection<'a, T> {
15161543 IntersectionInner :: Answer ( Some ( _) ) => ( 1 , Some ( 1 ) ) ,
15171544 }
15181545 }
1546+
1547+ fn min ( mut self ) -> Option < & ' a T > {
1548+ self . next ( )
1549+ }
15191550}
15201551
15211552#[ stable( feature = "fused" , since = "1.26.0" ) ]
@@ -1541,6 +1572,10 @@ impl<'a, T: Ord> Iterator for Union<'a, T> {
15411572 // No checked_add - see SymmetricDifference::size_hint.
15421573 ( max ( a_len, b_len) , Some ( a_len + b_len) )
15431574 }
1575+
1576+ fn min ( mut self ) -> Option < & ' a T > {
1577+ self . next ( )
1578+ }
15441579}
15451580
15461581#[ stable( feature = "fused" , since = "1.26.0" ) ]
0 commit comments