@@ -1543,11 +1543,17 @@ impl<'a, K: 'a, V: 'a> Iterator for Iter<'a, K, V> {
15431543 self . next_back ( )
15441544 }
15451545
1546- fn min ( mut self ) -> Option < ( & ' a K , & ' a V ) > {
1546+ fn min ( mut self ) -> Option < ( & ' a K , & ' a V ) >
1547+ where
1548+ ( & ' a K , & ' a V ) : Ord ,
1549+ {
15471550 self . next ( )
15481551 }
15491552
1550- fn max ( mut self ) -> Option < ( & ' a K , & ' a V ) > {
1553+ fn max ( mut self ) -> Option < ( & ' a K , & ' a V ) >
1554+ where
1555+ ( & ' a K , & ' a V ) : Ord ,
1556+ {
15511557 self . next_back ( )
15521558 }
15531559}
@@ -1612,11 +1618,17 @@ impl<'a, K, V> Iterator for IterMut<'a, K, V> {
16121618 self . next_back ( )
16131619 }
16141620
1615- fn min ( mut self ) -> Option < ( & ' a K , & ' a mut V ) > {
1621+ fn min ( mut self ) -> Option < ( & ' a K , & ' a mut V ) >
1622+ where
1623+ ( & ' a K , & ' a mut V ) : Ord ,
1624+ {
16161625 self . next ( )
16171626 }
16181627
1619- fn max ( mut self ) -> Option < ( & ' a K , & ' a mut V ) > {
1628+ fn max ( mut self ) -> Option < ( & ' a K , & ' a mut V ) >
1629+ where
1630+ ( & ' a K , & ' a mut V ) : Ord ,
1631+ {
16201632 self . next_back ( )
16211633 }
16221634}
@@ -1779,11 +1791,17 @@ impl<'a, K, V> Iterator for Keys<'a, K, V> {
17791791 self . next_back ( )
17801792 }
17811793
1782- fn min ( mut self ) -> Option < & ' a K > {
1794+ fn min ( mut self ) -> Option < & ' a K >
1795+ where
1796+ & ' a K : Ord ,
1797+ {
17831798 self . next ( )
17841799 }
17851800
1786- fn max ( mut self ) -> Option < & ' a K > {
1801+ fn max ( mut self ) -> Option < & ' a K >
1802+ where
1803+ & ' a K : Ord ,
1804+ {
17871805 self . next_back ( )
17881806 }
17891807}
@@ -2008,11 +2026,17 @@ impl<'a, K, V> Iterator for Range<'a, K, V> {
20082026 self . next_back ( )
20092027 }
20102028
2011- fn min ( mut self ) -> Option < ( & ' a K , & ' a V ) > {
2029+ fn min ( mut self ) -> Option < ( & ' a K , & ' a V ) >
2030+ where
2031+ ( & ' a K , & ' a V ) : Ord ,
2032+ {
20122033 self . next ( )
20132034 }
20142035
2015- fn max ( mut self ) -> Option < ( & ' a K , & ' a V ) > {
2036+ fn max ( mut self ) -> Option < ( & ' a K , & ' a V ) >
2037+ where
2038+ ( & ' a K , & ' a V ) : Ord ,
2039+ {
20162040 self . next_back ( )
20172041 }
20182042}
@@ -2081,11 +2105,17 @@ impl<K, V, A: Allocator + Clone> Iterator for IntoKeys<K, V, A> {
20812105 self . next_back ( )
20822106 }
20832107
2084- fn min ( mut self ) -> Option < K > {
2108+ fn min ( mut self ) -> Option < K >
2109+ where
2110+ K : Ord ,
2111+ {
20852112 self . next ( )
20862113 }
20872114
2088- fn max ( mut self ) -> Option < K > {
2115+ fn max ( mut self ) -> Option < K >
2116+ where
2117+ K : Ord ,
2118+ {
20892119 self . next_back ( )
20902120 }
20912121}
@@ -2204,11 +2234,17 @@ impl<'a, K, V> Iterator for RangeMut<'a, K, V> {
22042234 self . next_back ( )
22052235 }
22062236
2207- fn min ( mut self ) -> Option < ( & ' a K , & ' a mut V ) > {
2237+ fn min ( mut self ) -> Option < ( & ' a K , & ' a mut V ) >
2238+ where
2239+ ( & ' a K , & ' a mut V ) : Ord ,
2240+ {
22082241 self . next ( )
22092242 }
22102243
2211- fn max ( mut self ) -> Option < ( & ' a K , & ' a mut V ) > {
2244+ fn max ( mut self ) -> Option < ( & ' a K , & ' a mut V ) >
2245+ where
2246+ ( & ' a K , & ' a mut V ) : Ord ,
2247+ {
22122248 self . next_back ( )
22132249 }
22142250}
0 commit comments