]> 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 67d1836b545cf90e398e085883b7135c66cb6371..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) = Chan::<int>::new();
-    task::spawn(proc() iotask(&ch, ~"localhost") );
+    let (tx, _rx) = channel::<int>();
+    task::spawn(proc() iotask(&tx, "localhost".to_owned()) );
 }