diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2014-05-01 11:12:16 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-05-07 08:16:14 -0700 |
| commit | d4b5d82a3356630ede4ce1b436cb59760be7b703 (patch) | |
| tree | 8e690f9b6887b1a96ddb44385ef38c453fa7796b /src/libstd/rt | |
| parent | a156534a96a6c401b14c80618c247eaadf876eb7 (diff) | |
| download | rust-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.rs | 2 |
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(); } |
