@@ -1543,11 +1543,17 @@ impl<'a, K: 'a, V: 'a> Iterator for Iter<'a, K, V> {
1543
1543
self . next_back ( )
1544
1544
}
1545
1545
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
+ {
1547
1550
self . next ( )
1548
1551
}
1549
1552
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
+ {
1551
1557
self . next_back ( )
1552
1558
}
1553
1559
}
@@ -1612,11 +1618,17 @@ impl<'a, K, V> Iterator for IterMut<'a, K, V> {
1612
1618
self . next_back ( )
1613
1619
}
1614
1620
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
+ {
1616
1625
self . next ( )
1617
1626
}
1618
1627
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
+ {
1620
1632
self . next_back ( )
1621
1633
}
1622
1634
}
@@ -1779,11 +1791,17 @@ impl<'a, K, V> Iterator for Keys<'a, K, V> {
1779
1791
self . next_back ( )
1780
1792
}
1781
1793
1782
- fn min ( mut self ) -> Option < & ' a K > {
1794
+ fn min ( mut self ) -> Option < & ' a K >
1795
+ where
1796
+ & ' a K : Ord ,
1797
+ {
1783
1798
self . next ( )
1784
1799
}
1785
1800
1786
- fn max ( mut self ) -> Option < & ' a K > {
1801
+ fn max ( mut self ) -> Option < & ' a K >
1802
+ where
1803
+ & ' a K : Ord ,
1804
+ {
1787
1805
self . next_back ( )
1788
1806
}
1789
1807
}
@@ -2008,11 +2026,17 @@ impl<'a, K, V> Iterator for Range<'a, K, V> {
2008
2026
self . next_back ( )
2009
2027
}
2010
2028
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
+ {
2012
2033
self . next ( )
2013
2034
}
2014
2035
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
+ {
2016
2040
self . next_back ( )
2017
2041
}
2018
2042
}
@@ -2081,11 +2105,17 @@ impl<K, V, A: Allocator + Clone> Iterator for IntoKeys<K, V, A> {
2081
2105
self . next_back ( )
2082
2106
}
2083
2107
2084
- fn min ( mut self ) -> Option < K > {
2108
+ fn min ( mut self ) -> Option < K >
2109
+ where
2110
+ K : Ord ,
2111
+ {
2085
2112
self . next ( )
2086
2113
}
2087
2114
2088
- fn max ( mut self ) -> Option < K > {
2115
+ fn max ( mut self ) -> Option < K >
2116
+ where
2117
+ K : Ord ,
2118
+ {
2089
2119
self . next_back ( )
2090
2120
}
2091
2121
}
@@ -2204,11 +2234,17 @@ impl<'a, K, V> Iterator for RangeMut<'a, K, V> {
2204
2234
self . next_back ( )
2205
2235
}
2206
2236
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
+ {
2208
2241
self . next ( )
2209
2242
}
2210
2243
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
+ {
2212
2248
self . next_back ( )
2213
2249
}
2214
2250
}
0 commit comments