Skip to content

Commit 63bc659

Browse files
committed
---
yaml --- r: 143334 b: refs/heads/try2 c: b147d70 h: refs/heads/master v: v3
1 parent d23839c commit 63bc659

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 3478589b99b296b1c0014478826f03f848b536bf
8+
refs/heads/try2: b147d70b08f93ea0a13a5331f413d547819b2f4c
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/libstd/result.rs

Lines changed: 6 additions & 8 deletions
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)