@@ -1727,52 +1727,44 @@ impl<K, V> Clone for Values<'_, K, V> {
17271727#[ unstable( feature = "btree_drain_filter" , issue = "70530" ) ]
17281728pub struct DrainFilter < ' a , K , V , F >
17291729where
1730- K : ' a + Ord , // This Ord bound should be removed before stabilization.
1730+ K : ' a ,
17311731 V : ' a ,
17321732 F : ' a + FnMut ( & K , & mut V ) -> bool ,
17331733{
17341734 pred : F ,
17351735 inner : DrainFilterInner < ' a , K , V > ,
17361736}
1737- pub ( super ) struct DrainFilterInner < ' a , K , V >
1738- where
1739- K : ' a + Ord ,
1740- V : ' a ,
1741- {
1737+ pub ( super ) struct DrainFilterInner < ' a , K : ' a , V : ' a > {
17421738 length : & ' a mut usize ,
17431739 cur_leaf_edge : Option < Handle < NodeRef < marker:: Mut < ' a > , K , V , marker:: Leaf > , marker:: Edge > > ,
17441740}
17451741
17461742#[ unstable( feature = "btree_drain_filter" , issue = "70530" ) ]
1747- impl < ' a , K , V , F > Drop for DrainFilter < ' a , K , V , F >
1743+ impl < K , V , F > Drop for DrainFilter < ' _ , K , V , F >
17481744where
1749- K : ' a + Ord ,
1750- V : ' a ,
1751- F : ' a + FnMut ( & K , & mut V ) -> bool ,
1745+ F : FnMut ( & K , & mut V ) -> bool ,
17521746{
17531747 fn drop ( & mut self ) {
17541748 self . for_each ( drop) ;
17551749 }
17561750}
17571751
17581752#[ unstable( feature = "btree_drain_filter" , issue = "70530" ) ]
1759- impl < ' a , K , V , F > fmt:: Debug for DrainFilter < ' a , K , V , F >
1753+ impl < K , V , F > fmt:: Debug for DrainFilter < ' _ , K , V , F >
17601754where
1761- K : ' a + fmt:: Debug + Ord ,
1762- V : ' a + fmt:: Debug ,
1763- F : ' a + FnMut ( & K , & mut V ) -> bool ,
1755+ K : fmt:: Debug ,
1756+ V : fmt:: Debug ,
1757+ F : FnMut ( & K , & mut V ) -> bool ,
17641758{
17651759 fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
17661760 f. debug_tuple ( "DrainFilter" ) . field ( & self . inner . peek ( ) ) . finish ( )
17671761 }
17681762}
17691763
17701764#[ unstable( feature = "btree_drain_filter" , issue = "70530" ) ]
1771- impl < ' a , K , V , F > Iterator for DrainFilter < ' a , K , V , F >
1765+ impl < K , V , F > Iterator for DrainFilter < ' _ , K , V , F >
17721766where
1773- K : ' a + Ord ,
1774- V : ' a ,
1775- F : ' a + FnMut ( & K , & mut V ) -> bool ,
1767+ F : FnMut ( & K , & mut V ) -> bool ,
17761768{
17771769 type Item = ( K , V ) ;
17781770
@@ -1785,11 +1777,7 @@ where
17851777 }
17861778}
17871779
1788- impl < ' a , K , V > DrainFilterInner < ' a , K , V >
1789- where
1790- K : ' a + Ord ,
1791- V : ' a ,
1792- {
1780+ impl < ' a , K : ' a , V : ' a > DrainFilterInner < ' a , K , V > {
17931781 /// Allow Debug implementations to predict the next element.
17941782 pub ( super ) fn peek ( & self ) -> Option < ( & K , & V ) > {
17951783 let edge = self . cur_leaf_edge . as_ref ( ) ?;
@@ -1828,12 +1816,7 @@ where
18281816}
18291817
18301818#[ unstable( feature = "btree_drain_filter" , issue = "70530" ) ]
1831- impl < K , V , F > FusedIterator for DrainFilter < ' _ , K , V , F >
1832- where
1833- K : Ord ,
1834- F : FnMut ( & K , & mut V ) -> bool ,
1835- {
1836- }
1819+ impl < K , V , F > FusedIterator for DrainFilter < ' _ , K , V , F > where F : FnMut ( & K , & mut V ) -> bool { }
18371820
18381821#[ stable( feature = "btree_range" , since = "1.17.0" ) ]
18391822impl < ' a , K , V > Iterator for Range < ' a , K , V > {
0 commit comments