Skip to content

Commit ee7196c

Browse files
author
Jorge Aparicio
committed
---
yaml --- r: 163765 b: refs/heads/master c: e2a362f h: refs/heads/master i: 163763: 6ba258a v: v3
1 parent 0c5cf34 commit ee7196c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 6ae9b9e54a9eb9711b32d663bb1a044f7540b4b0
2+
refs/heads/master: e2a362f9bbf94eedca42eceea2929e4d96f4eeee
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 8443b09e361b96d1f9b7f45a65ed0d31c0e86e70
55
refs/heads/try: 20cbbffeefc1f35e2ea63afce7b42fbd79611d42

trunk/src/libcore/slice.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ pub trait SlicePrelude<T> for Sized? {
238238
/// assert!(match r { Found(1...4) => true, _ => false, });
239239
/// ```
240240
#[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;
242242

243243
/// Return the number of elements in the slice
244244
///
@@ -552,7 +552,7 @@ impl<T> SlicePrelude<T> for [T] {
552552
}
553553

554554
#[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 {
556556
let mut base : uint = 0;
557557
let mut lim : uint = self.len();
558558

0 commit comments

Comments
 (0)