]> git.lizzy.rs Git - rust.git/blobdiff - src/test/run-pass/spawn-types.rs
Replace all ~"" with "".to_owned()
[rust.git] / src / test / run-pass / spawn-types.rs
index eb1c082f2f2e67519fea88455da9d2a426a6d5ee..830dce1d3cb2eba8494f5877a1ee74f501d6ae5c 100644 (file)
   Arnold.
  */
 
-use core::comm::*;
+use std::task;
 
-type ctx = Chan<int>;
+type ctx = Sender<int>;
 
-fn iotask(cx: &ctx, ip: ~str) {
-    assert_eq!(ip, ~"localhost");
+fn iotask(_tx: &ctx, ip: ~str) {
+    assert_eq!(ip, "localhost".to_owned());
 }
 
 pub fn main() {
-    let (p, ch) = stream::<int>();
-    task::spawn(|| iotask(&ch, ~"localhost") );
+    let (tx, _rx) = channel::<int>();
+    task::spawn(proc() iotask(&tx, "localhost".to_owned()) );
 }