3434// * The `raw` and `bytes` submodules.
3535// * Boilerplate trait implementations.
3636
37- pub use self :: BinarySearchResult :: * ;
38-
3937use mem:: transmute;
4038use clone:: Clone ;
4139use cmp:: { PartialEq , PartialOrd , Eq , Ord , Ordering , Less , Equal , Greater , Equiv } ;
@@ -219,7 +217,7 @@ pub trait SlicePrelude<T> for Sized? {
219217 /// found; the fourth could match any position in `[1,4]`.
220218 ///
221219 /// ```rust
222- /// use std::slice::{Found, NotFound};
220+ /// use std::slice::BinarySearchResult:: {Found, NotFound};
223221 /// let s = [0i, 1, 1, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55];
224222 /// let s = s.as_slice();
225223 ///
@@ -548,7 +546,7 @@ impl<T> SlicePrelude<T> for [T] {
548546 while lim != 0 {
549547 let ix = base + ( lim >> 1 ) ;
550548 match f ( & self [ ix] ) {
551- Equal => return Found ( ix) ,
549+ Equal => return BinarySearchResult :: Found ( ix) ,
552550 Less => {
553551 base = ix + 1 ;
554552 lim -= 1 ;
@@ -557,7 +555,7 @@ impl<T> SlicePrelude<T> for [T] {
557555 }
558556 lim >>= 1 ;
559557 }
560- return NotFound ( base) ;
558+ return BinarySearchResult :: NotFound ( base) ;
561559 }
562560
563561 #[ inline]
@@ -838,7 +836,7 @@ pub trait OrdSlicePrelude<T: Ord> for Sized? {
838836 /// found; the fourth could match any position in `[1,4]`.
839837 ///
840838 /// ```rust
841- /// use std::slice::{Found, NotFound};
839+ /// use std::slice::BinarySearchResult:: {Found, NotFound};
842840 /// let s = [0i, 1, 1, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55];
843841 /// let s = s.as_slice();
844842 ///
@@ -1517,17 +1515,17 @@ impl BinarySearchResult {
15171515 /// Similar to `Result::ok`.
15181516 pub fn found ( & self ) -> Option < uint > {
15191517 match * self {
1520- Found ( i) => Some ( i) ,
1521- NotFound ( _) => None
1518+ BinarySearchResult :: Found ( i) => Some ( i) ,
1519+ BinarySearchResult :: NotFound ( _) => None
15221520 }
15231521 }
15241522
15251523 /// Convert a `Found` to `None`, `NotFound` to `Some`.
15261524 /// Similar to `Result::err`.
15271525 pub fn not_found ( & self ) -> Option < uint > {
15281526 match * self {
1529- Found ( _) => None ,
1530- NotFound ( i) => Some ( i)
1527+ BinarySearchResult :: Found ( _) => None ,
1528+ BinarySearchResult :: NotFound ( i) => Some ( i)
15311529 }
15321530 }
15331531}
0 commit comments