From 0ac7a219f043d3b1c8c239089d9dd6e6c9fa830b Mon Sep 17 00:00:00 2001 From: Marvin Löbel Date: Sun, 4 Aug 2013 01:59:24 +0200 Subject: Updated std::Option, std::Either and std::Result - Made naming schemes consistent between Option, Result and Either - Changed Options Add implementation to work like the maybe monad (return None if any of the inputs is None) - Removed duplicate Option::get and renamed all related functions to use the term `unwrap` instead --- src/libstd/rt/util.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libstd/rt/util.rs') diff --git a/src/libstd/rt/util.rs b/src/libstd/rt/util.rs index a1169954688..40e5c8d4bf1 100644 --- a/src/libstd/rt/util.rs +++ b/src/libstd/rt/util.rs @@ -31,7 +31,7 @@ pub fn num_cpus() -> uint { /// either `RUST_THREADS` or `num_cpus`. pub fn default_sched_threads() -> uint { match os::getenv("RUST_THREADS") { - Some(nstr) => FromStr::from_str(nstr).get(), + Some(nstr) => FromStr::from_str(nstr).unwrap(), None => num_cpus() } } @@ -118,4 +118,4 @@ pub fn get_exit_status() -> int { extern { fn rust_get_exit_status_newrt() -> libc::uintptr_t; } -} \ No newline at end of file +} -- cgit 1.4.1-3-g733a5