diff options
| author | Brian Anderson <banderson@mozilla.com> | 2014-08-07 18:30:03 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2014-08-13 15:27:40 -0700 |
| commit | c3b9d5df6250ef021acf993576d52dd7a29a6bba (patch) | |
| tree | b07d460080b90b3e3d22e350b2b46b4768a3ef07 | |
| parent | bc450b17e3bfe1c195f8f286a3228cca1f706a74 (diff) | |
| download | rust-c3b9d5df6250ef021acf993576d52dd7a29a6bba.tar.gz rust-c3b9d5df6250ef021acf993576d52dd7a29a6bba.zip | |
Address some review feedback
| -rw-r--r-- | src/libcore/slice.rs | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/src/libcore/slice.rs b/src/libcore/slice.rs index 5acb55de6f1..93dafc153b6 100644 --- a/src/libcore/slice.rs +++ b/src/libcore/slice.rs @@ -48,7 +48,7 @@ use ptr::RawPtr; use mem; use mem::size_of; use kinds::marker; -use raw::{Repr}; +use raw::Repr; // Avoid conflicts with *both* the Slice trait (buggy) and the `slice::raw` module. use RawSlice = raw::Slice; @@ -227,19 +227,17 @@ pub trait ImmutableSlice<'a, T> { #[deprecated = "use binary_search"] fn bsearch(&self, f: |&T| -> Ordering) -> Option<uint>; - /** - * Binary search a sorted vector with a comparator function. - * - * The comparator function should implement an order consistent - * with the sort order of the underlying vector, returning an - * order code that indicates whether its argument is `Less`, - * `Equal` or `Greater` the desired target. - * - * If the value is found then `Found` is returned, containing the - * index of the matching element; if the value is not found then - * `NotFound` is returned, containing the index where a matching - * element could be inserted while maintaining sorted order. - */ + /// Binary search a sorted vector with a comparator function. + /// + /// The comparator function should implement an order consistent + /// with the sort order of the underlying vector, returning an + /// order code that indicates whether its argument is `Less`, + /// `Equal` or `Greater` the desired target. + /// + /// If the value is found then `Found` is returned, containing the + /// index of the matching element; if the value is not found then + /// `NotFound` is returned, containing the index where a matching + /// element could be inserted while maintaining sorted order. #[unstable] fn binary_search(&self, f: |&T| -> Ordering) -> BinarySearchResult; |
