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/num | |
| 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/num')
| -rw-r--r-- | src/libstd/num/strconv.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libstd/num/strconv.rs b/src/libstd/num/strconv.rs index bb2fd2a4e25..8861597bb4c 100644 --- a/src/libstd/num/strconv.rs +++ b/src/libstd/num/strconv.rs @@ -820,6 +820,7 @@ mod bench { use super::test::Bencher; use rand::{XorShiftRng, Rng}; use num::ToStrRadix; + use realstd::result::ResultUnwrap; #[bench] fn to_str_bin(b: &mut Bencher) { @@ -856,6 +857,7 @@ mod bench { use super::test::Bencher; use rand::{XorShiftRng, Rng}; use num::ToStrRadix; + use realstd::result::ResultUnwrap; #[bench] fn to_str_bin(b: &mut Bencher) { @@ -892,6 +894,7 @@ mod bench { use super::test::Bencher; use rand::{XorShiftRng, Rng}; use f64; + use realstd::result::ResultUnwrap; #[bench] fn float_to_str(b: &mut Bencher) { |
