about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorErick Tryzelaar <erick.tryzelaar@gmail.com>2013-07-26 18:36:51 -0700
committerErick Tryzelaar <erick.tryzelaar@gmail.com>2013-07-27 23:41:09 -0700
commit2a68c719f4a32123fbd428fe280f41af47d00fea (patch)
treea5aaa1c62e6c19672955e417ab534e522a62dd95 /src/test
parentaad53cb6e298192cc75cd5769a1b997a3457666c (diff)
to_either + fixes
Diffstat (limited to 'src/test')
-rw-r--r--src/test/bench/core-std.rs2
-rw-r--r--src/test/bench/shootout-fasta.rs4
-rw-r--r--src/test/bench/shootout-k-nucleotide-pipes.rs2
-rw-r--r--src/test/run-fail/result-get-fail.rs2
-rw-r--r--src/test/run-pass/cleanup-copy-mode.rs4
-rw-r--r--src/test/run-pass/issue-4016.rs3
6 files changed, 8 insertions, 9 deletions
diff --git a/src/test/bench/core-std.rs b/src/test/bench/core-std.rs
index 0d93bdb6f94..754181f9cd8 100644
--- a/src/test/bench/core-std.rs
+++ b/src/test/bench/core-std.rs
@@ -75,7 +75,7 @@ fn read_line() {
         .push_rel(&Path("src/test/bench/shootout-k-nucleotide.data"));
 
     for int::range(0, 3) |_i| {
-        let reader = result::unwrap(io::file_reader(&path));
+        let reader = io::file_reader(&path).unwrap();
         while !reader.eof() {
             reader.read_line();
         }
diff --git a/src/test/bench/shootout-fasta.rs b/src/test/bench/shootout-fasta.rs
index 5d05817e512..4597212b390 100644
--- a/src/test/bench/shootout-fasta.rs
+++ b/src/test/bench/shootout-fasta.rs
@@ -124,8 +124,8 @@ fn main() {
     };
 
     let writer = if os::getenv("RUST_BENCH").is_some() {
-        result::unwrap(io::file_writer(&Path("./shootout-fasta.data"),
-                                       [io::Truncate, io::Create]))
+        io::file_writer(&Path("./shootout-fasta.data"),
+                        [io::Truncate, io::Create]).unwrap()
     } else {
         io::stdout()
     };
diff --git a/src/test/bench/shootout-k-nucleotide-pipes.rs b/src/test/bench/shootout-k-nucleotide-pipes.rs
index 46b882f7b82..8b4664ac060 100644
--- a/src/test/bench/shootout-k-nucleotide-pipes.rs
+++ b/src/test/bench/shootout-k-nucleotide-pipes.rs
@@ -161,7 +161,7 @@ fn main() {
        // get to this massive data set, but include_bin! chokes on it (#2598)
        let path = Path(env!("CFG_SRC_DIR"))
            .push_rel(&Path("src/test/bench/shootout-k-nucleotide.data"));
-       result::unwrap(io::file_reader(&path))
+       io::file_reader(&path).unwrap()
    } else {
       io::stdin()
    };
diff --git a/src/test/run-fail/result-get-fail.rs b/src/test/run-fail/result-get-fail.rs
index cb9cce3249f..6e5005fe03d 100644
--- a/src/test/run-fail/result-get-fail.rs
+++ b/src/test/run-fail/result-get-fail.rs
@@ -13,5 +13,5 @@
 use std::result;
 
 fn main() {
-  error!(result::get(&result::Err::<int,~str>(~"kitty")));
+  error!(result::Err::<int,~str>(~"kitty").get());
 }
diff --git a/src/test/run-pass/cleanup-copy-mode.rs b/src/test/run-pass/cleanup-copy-mode.rs
index 2446e9057c2..45375efe9d6 100644
--- a/src/test/run-pass/cleanup-copy-mode.rs
+++ b/src/test/run-pass/cleanup-copy-mode.rs
@@ -16,7 +16,7 @@ use std::task;
 fn adder(x: @int, y: @int) -> int { return *x + *y; }
 fn failer() -> @int { fail!(); }
 pub fn main() {
-    assert!(result::is_err(&task::try(|| {
+    assert!(task::try(|| {
         adder(@2, failer()); ()
-    })));
+    }).is_err());
 }
diff --git a/src/test/run-pass/issue-4016.rs b/src/test/run-pass/issue-4016.rs
index 6b0dd6cb947..c4178961d9e 100644
--- a/src/test/run-pass/issue-4016.rs
+++ b/src/test/run-pass/issue-4016.rs
@@ -11,14 +11,13 @@
 
 extern mod extra;
 
-use std::result;
 use extra::json;
 use extra::serialize::Decodable;
 
 trait JD : Decodable<json::Decoder> { }
 
 fn exec<T: JD>() {
-    let doc = result::unwrap(json::from_str(""));
+    let doc = json::from_str("").unwrap();
     let mut decoder = json::Decoder(doc);
     let _v: T = Decodable::decode(&mut decoder);
     fail!()