File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -3724,9 +3724,9 @@ impl<T> [T] {
37243724 /// [`is_sorted`]: slice::is_sorted
37253725 #[ unstable( feature = "is_sorted" , reason = "new API" , issue = "53485" ) ]
37263726 #[ must_use]
3727- pub fn is_sorted_by < F > ( & self , mut compare : F ) -> bool
3727+ pub fn is_sorted_by < ' a , F > ( & ' a self , mut compare : F ) -> bool
37283728 where
3729- F : FnMut ( & T , & T ) -> Option < Ordering > ,
3729+ F : FnMut ( & ' a T , & ' a T ) -> Option < Ordering > ,
37303730 {
37313731 self . iter ( ) . is_sorted_by ( |a, b| compare ( * a, * b) )
37323732 }
@@ -3750,9 +3750,9 @@ impl<T> [T] {
37503750 #[ inline]
37513751 #[ unstable( feature = "is_sorted" , reason = "new API" , issue = "53485" ) ]
37523752 #[ must_use]
3753- pub fn is_sorted_by_key < F , K > ( & self , f : F ) -> bool
3753+ pub fn is_sorted_by_key < ' a , F , K > ( & ' a self , f : F ) -> bool
37543754 where
3755- F : FnMut ( & T ) -> K ,
3755+ F : FnMut ( & ' a T ) -> K ,
37563756 K : PartialOrd ,
37573757 {
37583758 self . iter ( ) . is_sorted_by_key ( f)
You can’t perform that action at this time.
0 commit comments