]> git.lizzy.rs Git - rust.git/blobdiff - src/test/run-pass/issue-4241.rs
Replace all ~"" with "".to_owned()
[rust.git] / src / test / run-pass / issue-4241.rs
index f6c29658e6a31e7b56b3933c7bed5472a07a18cb..f3e37921ba4202ba1b5aea3290abc4d74c6ef89d 100644 (file)
@@ -8,7 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// ignore-fast
 // ignore-test needs networking
 
 extern crate extra;
@@ -98,12 +97,12 @@ enum Result {
 }
 
 priv fn cmd_to_str(cmd: ~[~str]) -> ~str {
-  let mut res = ~"*";
+  let mut res = "*".to_owned();
   res.push_str(cmd.len().to_str());
   res.push_str("\r\n");
     for s in cmd.iter() {
-    res.push_str([~"$", s.len().to_str(), ~"\r\n",
-                  (*s).clone(), ~"\r\n"].concat() );
+    res.push_str(["$".to_owned(), s.len().to_str(), "\r\n".to_owned(),
+                  (*s).clone(), "\r\n".to_owned()].concat() );
     }
   res
 }
@@ -118,7 +117,7 @@ fn query(cmd: ~[~str], sb: TcpSocketBuf) -> Result {
 
 fn query2(cmd: ~[~str]) -> Result {
   let _cmd = cmd_to_str(cmd);
-    io::with_str_reader(~"$3\r\nXXX\r\n")(|sb| {
+    io::with_str_reader("$3\r\nXXX\r\n".to_owned())(|sb| {
     let res = parse_response(@sb as @io::Reader);
     println!("{:?}", res);
     res