diff options
| author | Tim Chevalier <chevalier@alum.wellesley.edu> | 2012-04-02 15:34:49 -0700 |
|---|---|---|
| committer | Tim Chevalier <chevalier@alum.wellesley.edu> | 2012-04-02 16:12:49 -0700 |
| commit | 21be1379d561b6679a8a2ea47dce88f948c5acca (patch) | |
| tree | 25b911b9e5071d1512a3e5ff5d66b91716645c75 /src/libcore/result.rs | |
| parent | 987bc2362926d0672a01e8d5964940743df48cb6 (diff) | |
| download | rust-21be1379d561b6679a8a2ea47dce88f948c5acca.tar.gz rust-21be1379d561b6679a8a2ea47dce88f948c5acca.zip | |
Rename some core::option functions
from_maybe => get_with_default maybe => with_option may => with_option_do I know these names are kind of ridiculous, but it's the best I could think of. Feel free to bikeshed. Closes #2081
Diffstat (limited to 'src/libcore/result.rs')
| -rw-r--r-- | src/libcore/result.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/libcore/result.rs b/src/libcore/result.rs index a3f7cc3a4d8..3957bd31a10 100644 --- a/src/libcore/result.rs +++ b/src/libcore/result.rs @@ -20,10 +20,9 @@ If the result is an error pure fn get<T: copy, U>(res: result<T, U>) -> T { alt res { ok(t) { t } - err(_) { - // FIXME: Serialize the error value - // and include it in the fail message (maybe just note it) - fail "get called on error result"; + err(the_err) { + // FIXME: have a run-fail test for this + unchecked{ fail #fmt("get called on error result: %?", the_err); } } } } |
