about summary refs log tree commit diff
path: root/src/libstd/rt
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-05-01 11:12:16 -0700
committerAlex Crichton <alex@alexcrichton.com>2014-05-07 08:16:14 -0700
commitd4b5d82a3356630ede4ce1b436cb59760be7b703 (patch)
tree8e690f9b6887b1a96ddb44385ef38c453fa7796b /src/libstd/rt
parenta156534a96a6c401b14c80618c247eaadf876eb7 (diff)
downloadrust-d4b5d82a3356630ede4ce1b436cb59760be7b703.tar.gz
rust-d4b5d82a3356630ede4ce1b436cb59760be7b703.zip
core: Add unwrap()/unwrap_err() methods to Result
These implementations must live in libstd right now because the fmt module has
not been migrated yet. This will occur in a later PR.

Just to be clear, there are new extension traits, but they are not necessary
once the std::fmt module has migrated to libcore, which is a planned migration
in the future.
Diffstat (limited to 'src/libstd/rt')
-rw-r--r--src/libstd/rt/task.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstd/rt/task.rs b/src/libstd/rt/task.rs
index 5b29de5a8c1..909df5618aa 100644
--- a/src/libstd/rt/task.rs
+++ b/src/libstd/rt/task.rs
@@ -436,7 +436,7 @@ mod test {
     #[test]
     fn rng() {
         use rand::{StdRng, Rng};
-        let mut r = StdRng::new().unwrap();
+        let mut r = StdRng::new().ok().unwrap();
         let _ = r.next_u32();
     }