Skip to content

Commit b147d70

Browse files
committed
std: cleanup imports in result::tests
1 parent 3478589 commit b147d70

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

src/libstd/result.rs

+6-8
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
use clone::Clone;
1616
use cmp::Eq;
1717
use either;
18-
use either::Either;
1918
use iterator::IteratorUtil;
2019
use option::{None, Option, Some};
2120
use vec;
@@ -39,7 +38,7 @@ impl<T, E> Result<T, E> {
3938
* result variants are converted to `either::Left`.
4039
*/
4140
#[inline]
42-
pub fn to_either(self)-> Either<E, T>{
41+
pub fn to_either(self)-> either::Either<E, T>{
4342
match self {
4443
Ok(t) => either::Right(t),
4544
Err(e) => either::Left(e),
@@ -341,17 +340,16 @@ pub fn iter_vec2<S,T,U>(ss: &[S], ts: &[T],
341340

342341
#[cfg(test)]
343342
mod tests {
344-
use result::{Err, Ok, Result};
345-
use result;
343+
use super::*;
346344
use either;
347345

348-
pub fn op1() -> result::Result<int, ~str> { result::Ok(666) }
346+
pub fn op1() -> Result<int, ~str> { Ok(666) }
349347

350-
pub fn op2(i: int) -> result::Result<uint, ~str> {
351-
result::Ok(i as uint + 1u)
348+
pub fn op2(i: int) -> Result<uint, ~str> {
349+
Ok(i as uint + 1u)
352350
}
353351

354-
pub fn op3() -> result::Result<int, ~str> { result::Err(~"sadface") }
352+
pub fn op3() -> Result<int, ~str> { Err(~"sadface") }
355353

356354
#[test]
357355
pub fn chain_success() {

0 commit comments

Comments
 (0)