diff options
Diffstat (limited to 'src/libextra/future.rs')
| -rw-r--r-- | src/libextra/future.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/libextra/future.rs b/src/libextra/future.rs index 1a2ac398132..eb61b7781f1 100644 --- a/src/libextra/future.rs +++ b/src/libextra/future.rs @@ -25,7 +25,6 @@ #[allow(missing_doc)]; -use std::comm::{PortOne, oneshot}; use std::util::replace; /// A type encapsulating the result of a computation which may not be complete @@ -104,7 +103,7 @@ impl<A> Future<A> { } impl<A:Send> Future<A> { - pub fn from_port(port: PortOne<A>) -> Future<A> { + pub fn from_port(port: Port<A>) -> Future<A> { /*! * Create a future from a port * @@ -125,7 +124,7 @@ impl<A:Send> Future<A> { * value of the future. */ - let (port, chan) = oneshot(); + let (port, chan) = Chan::new(); do spawn { chan.send(blk()); @@ -139,7 +138,6 @@ impl<A:Send> Future<A> { mod test { use future::Future; - use std::comm::oneshot; use std::task; #[test] @@ -150,7 +148,7 @@ mod test { #[test] fn test_from_port() { - let (po, ch) = oneshot(); + let (po, ch) = Chan::new(); ch.send(~"whale"); let mut f = Future::from_port(po); assert_eq!(f.get(), ~"whale"); |
