File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -3724,9 +3724,9 @@ impl<T> [T] {
3724
3724
/// [`is_sorted`]: slice::is_sorted
3725
3725
#[ unstable( feature = "is_sorted" , reason = "new API" , issue = "53485" ) ]
3726
3726
#[ 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
3728
3728
where
3729
- F : FnMut ( & T , & T ) -> Option < Ordering > ,
3729
+ F : FnMut ( & ' a T , & ' a T ) -> Option < Ordering > ,
3730
3730
{
3731
3731
self . iter ( ) . is_sorted_by ( |a, b| compare ( * a, * b) )
3732
3732
}
@@ -3750,9 +3750,9 @@ impl<T> [T] {
3750
3750
#[ inline]
3751
3751
#[ unstable( feature = "is_sorted" , reason = "new API" , issue = "53485" ) ]
3752
3752
#[ 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
3754
3754
where
3755
- F : FnMut ( & T ) -> K ,
3755
+ F : FnMut ( & ' a T ) -> K ,
3756
3756
K : PartialOrd ,
3757
3757
{
3758
3758
self . iter ( ) . is_sorted_by_key ( f)
You can’t perform that action at this time.
0 commit comments