File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -238,7 +238,7 @@ pub trait SlicePrelude<T> for Sized? {
238
238
/// assert!(match r { Found(1...4) => true, _ => false, });
239
239
/// ```
240
240
#[ unstable = "waiting on unboxed closures" ]
241
- fn binary_search ( & self , f: | & T | -> Ordering ) -> BinarySearchResult ;
241
+ fn binary_search < F > ( & self , f : F ) -> BinarySearchResult where F : FnMut ( & T ) -> Ordering ;
242
242
243
243
/// Return the number of elements in the slice
244
244
///
@@ -552,7 +552,7 @@ impl<T> SlicePrelude<T> for [T] {
552
552
}
553
553
554
554
#[ unstable]
555
- fn binary_search ( & self , f: | & T | -> Ordering ) -> BinarySearchResult {
555
+ fn binary_search < F > ( & self , mut f : F ) -> BinarySearchResult where F : FnMut ( & T ) -> Ordering {
556
556
let mut base : uint = 0 ;
557
557
let mut lim : uint = self . len ( ) ;
558
558
You can’t perform that action at this time.
0 commit comments