]> git.lizzy.rs Git - rust.git/blobdiff - src/libnum/complex.rs
Replace all ~"" with "".to_owned()
[rust.git] / src / libnum / complex.rs
index 069dd2164f511410614ec970401a88c99d2a1bb0..e1e0102bbdc239fbf8a5f703496765197cdc60f2 100644 (file)
@@ -351,12 +351,12 @@ fn test_to_str() {
         fn test(c : Complex64, s: ~str) {
             assert_eq!(c.to_str(), s);
         }
-        test(_0_0i, ~"0+0i");
-        test(_1_0i, ~"1+0i");
-        test(_0_1i, ~"0+1i");
-        test(_1_1i, ~"1+1i");
-        test(_neg1_1i, ~"-1+1i");
-        test(-_neg1_1i, ~"1-1i");
-        test(_05_05i, ~"0.5+0.5i");
+        test(_0_0i, "0+0i".to_owned());
+        test(_1_0i, "1+0i".to_owned());
+        test(_0_1i, "0+1i".to_owned());
+        test(_1_1i, "1+1i".to_owned());
+        test(_neg1_1i, "-1+1i".to_owned());
+        test(-_neg1_1i, "1-1i".to_owned());
+        test(_05_05i, "0.5+0.5i".to_owned());
     }
 }