diff options
| author | Aaron Turon <aturon@mozilla.com> | 2014-12-30 10:51:18 -0800 |
|---|---|---|
| committer | Aaron Turon <aturon@mozilla.com> | 2014-12-30 17:06:08 -0800 |
| commit | 6abfac083feafc73e5d736177755cce3bfb7153f (patch) | |
| tree | d5502fab0dd68ea96057616eb20d90a2c9050218 /src/libcore | |
| parent | 6e1879eaf1cb5e727eb134a3e27018f7535852eb (diff) | |
| download | rust-6abfac083feafc73e5d736177755cce3bfb7153f.tar.gz rust-6abfac083feafc73e5d736177755cce3bfb7153f.zip | |
Fallout from stabilization
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/iter.rs | 2 | ||||
| -rw-r--r-- | src/libcore/slice.rs | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/libcore/iter.rs b/src/libcore/iter.rs index a185ec56a00..b0fd52896fe 100644 --- a/src/libcore/iter.rs +++ b/src/libcore/iter.rs @@ -478,7 +478,7 @@ pub trait IteratorExt<A>: Iterator<A> { /// /// ``` /// let vec = vec![1i, 2i, 3i, 4i]; - /// let (even, odd): (Vec<int>, Vec<Int>) = vec.into_iter().partition(|&n| n % 2 == 0); + /// let (even, odd): (Vec<int>, Vec<int>) = vec.into_iter().partition(|&n| n % 2 == 0); /// assert_eq!(even, vec![2, 4]); /// assert_eq!(odd, vec![1, 3]); /// ``` diff --git a/src/libcore/slice.rs b/src/libcore/slice.rs index 38d8977c0aa..1bf05247a67 100644 --- a/src/libcore/slice.rs +++ b/src/libcore/slice.rs @@ -46,6 +46,8 @@ use num::Int; use ops::{FnMut, mod}; use option::Option; use option::Option::{None, Some}; +use result::Result; +use result::Result::{Ok, Err}; use ptr; use ptr::PtrExt; use mem; @@ -237,7 +239,7 @@ impl<T> SliceExt<T> for [T] { } #[unstable] - fn binary_search_by<F>(&self, mut f: F) -> Result where + fn binary_search_by<F>(&self, mut f: F) -> Result<uint, uint> where F: FnMut(&T) -> Ordering { let mut base : uint = 0; @@ -255,7 +257,7 @@ impl<T> SliceExt<T> for [T] { } lim >>= 1; } - Err(base); + Err(base) } #[inline] |
