diff options
Diffstat (limited to 'src/libstd/task.rs')
| -rw-r--r-- | src/libstd/task.rs | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/libstd/task.rs b/src/libstd/task.rs index a0ee08570d9..8b4dbf61c18 100644 --- a/src/libstd/task.rs +++ b/src/libstd/task.rs @@ -49,7 +49,8 @@ use boxed::Box; use comm::channel; use io::{Writer, stdio}; use kinds::{Send, marker}; -use option::{None, Some, Option}; +use option::Option; +use option::Option::{None, Some}; use result::Result; use rustrt::local::Local; use rustrt::task::Task; @@ -172,9 +173,10 @@ impl TaskBuilder { /// # Return value /// /// If the child task executes successfully (without panicking) then the - /// future returns `result::Ok` containing the value returned by the - /// function. If the child task panics then the future returns `result::Err` - /// containing the argument to `panic!(...)` as an `Any` trait object. + /// future returns `result::Result::Ok` containing the value returned by the + /// function. If the child task panics then the future returns + /// `result::Result::Err` containing the argument to `panic!(...)` as an + /// `Any` trait object. #[experimental = "Futures are experimental."] pub fn try_future<T:Send>(self, f: proc():Send -> T) -> Future<Result<T, Box<Any + Send>>> { @@ -268,7 +270,7 @@ mod test { use borrow::IntoCow; use boxed::BoxAny; use prelude::*; - use result::{Ok, Err}; + use result::Result::{Ok, Err}; use result; use std::io::{ChanReader, ChanWriter}; use string::String; @@ -330,7 +332,7 @@ mod test { match try(proc() { "Success!".to_string() }).as_ref().map(|s| s.as_slice()) { - result::Ok("Success!") => (), + result::Result::Ok("Success!") => (), _ => panic!() } } @@ -340,8 +342,8 @@ mod test { match try(proc() { panic!() }) { - result::Err(_) => (), - result::Ok(()) => panic!() + result::Result::Err(_) => (), + result::Result::Ok(()) => panic!() } } |
