about summary refs log tree commit diff
path: root/src/libextra/future.rs
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2013-12-05 18:19:06 -0800
committerAlex Crichton <alex@alexcrichton.com>2013-12-16 17:47:11 -0800
commit529e268ab900f1b6e731af64ce2aeecda3555f4e (patch)
tree7ebb9ed2a7f36455b9550749a442522d45f0dc30 /src/libextra/future.rs
parentbfa9064ba2687eb1d95708f72f41ddd9729a6ba1 (diff)
downloadrust-529e268ab900f1b6e731af64ce2aeecda3555f4e.tar.gz
rust-529e268ab900f1b6e731af64ce2aeecda3555f4e.zip
Fallout of rewriting std::comm
Diffstat (limited to 'src/libextra/future.rs')
-rw-r--r--src/libextra/future.rs8
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");