]> 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 111e0df1d6d5c85d74e0cd13c31933f711403053..830dce1d3cb2eba8494f5877a1ee74f501d6ae5c 100644 (file)
 
 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()) );
 }