about summary refs log tree commit diff
path: root/src/libstd/path
diff options
context:
space:
mode:
authorRicho Healey <richo@psych0tik.net>2014-04-15 18:17:48 -0700
committerBrian Anderson <banderson@mozilla.com>2014-04-18 17:25:34 -0700
commit919889a1d688a6bbe2edac8705f048f06b1b455c (patch)
tree322a69fa39bdaf37bbfffc84020acbd4c87871d0 /src/libstd/path
parentb75683cadf6c4c55360202cd6a0106be80532451 (diff)
downloadrust-919889a1d688a6bbe2edac8705f048f06b1b455c.tar.gz
rust-919889a1d688a6bbe2edac8705f048f06b1b455c.zip
Replace all ~"" with "".to_owned()
Diffstat (limited to 'src/libstd/path')
-rw-r--r--src/libstd/path/posix.rs5
-rw-r--r--src/libstd/path/windows.rs8
2 files changed, 7 insertions, 6 deletions
diff --git a/src/libstd/path/posix.rs b/src/libstd/path/posix.rs
index 47f9604d63f..4affea37e35 100644
--- a/src/libstd/path/posix.rs
+++ b/src/libstd/path/posix.rs
@@ -459,6 +459,7 @@ mod tests {
     use prelude::*;
     use super::*;
     use str;
+    use str::StrSlice;
 
     macro_rules! t(
         (s: $path:expr, $exp:expr) => (
@@ -766,7 +767,7 @@ mod tests {
         t!(s: "a/b/c", ["d", "e"], "a/b/c/d/e");
         t!(s: "a/b/c", ["d", "/e"], "/e");
         t!(s: "a/b/c", ["d", "/e", "f"], "/e/f");
-        t!(s: "a/b/c", [~"d", ~"e"], "a/b/c/d/e");
+        t!(s: "a/b/c", ["d".to_owned(), "e".to_owned()], "a/b/c/d/e");
         t!(v: b!("a/b/c"), [b!("d"), b!("e")], b!("a/b/c/d/e"));
         t!(v: b!("a/b/c"), [b!("d"), b!("/e"), b!("f")], b!("/e/f"));
         t!(v: b!("a/b/c"), [Vec::from_slice(b!("d")), Vec::from_slice(b!("e"))], b!("a/b/c/d/e"));
@@ -871,7 +872,7 @@ mod tests {
         t!(s: "a/b/c", ["d", "e"], "a/b/c/d/e");
         t!(s: "a/b/c", ["..", "d"], "a/b/d");
         t!(s: "a/b/c", ["d", "/e", "f"], "/e/f");
-        t!(s: "a/b/c", [~"d", ~"e"], "a/b/c/d/e");
+        t!(s: "a/b/c", ["d".to_owned(), "e".to_owned()], "a/b/c/d/e");
         t!(v: b!("a/b/c"), [b!("d"), b!("e")], b!("a/b/c/d/e"));
         t!(v: b!("a/b/c"), [Vec::from_slice(b!("d")), Vec::from_slice(b!("e"))], b!("a/b/c/d/e"));
     }
diff --git a/src/libstd/path/windows.rs b/src/libstd/path/windows.rs
index 58c7aaa2d32..74ca8dc5785 100644
--- a/src/libstd/path/windows.rs
+++ b/src/libstd/path/windows.rs
@@ -1314,9 +1314,9 @@ mod tests {
     #[test]
     fn test_display_str() {
         let path = Path::new("foo");
-        assert_eq!(path.display().to_str(), ~"foo");
+        assert_eq!(path.display().to_str(), "foo".to_owned());
         let path = Path::new(b!("\\"));
-        assert_eq!(path.filename_display().to_str(), ~"");
+        assert_eq!(path.filename_display().to_str(), "".to_owned());
 
         let path = Path::new("foo");
         let mo = path.display().as_maybe_owned();
@@ -1577,7 +1577,7 @@ mod tests {
         t!(s: "a\\b\\c", ["d", "e"], "a\\b\\c\\d\\e");
         t!(s: "a\\b\\c", ["d", "\\e"], "\\e");
         t!(s: "a\\b\\c", ["d", "\\e", "f"], "\\e\\f");
-        t!(s: "a\\b\\c", [~"d", ~"e"], "a\\b\\c\\d\\e");
+        t!(s: "a\\b\\c", ["d".to_owned(), "e".to_owned()], "a\\b\\c\\d\\e");
         t!(v: b!("a\\b\\c"), [b!("d"), b!("e")], b!("a\\b\\c\\d\\e"));
         t!(v: b!("a\\b\\c"), [b!("d"), b!("\\e"), b!("f")], b!("\\e\\f"));
         t!(v: b!("a\\b\\c"), [Vec::from_slice(b!("d")), Vec::from_slice(b!("e"))],
@@ -1718,7 +1718,7 @@ mod tests {
         t!(s: "a\\b\\c", ["d", "e"], "a\\b\\c\\d\\e");
         t!(s: "a\\b\\c", ["..", "d"], "a\\b\\d");
         t!(s: "a\\b\\c", ["d", "\\e", "f"], "\\e\\f");
-        t!(s: "a\\b\\c", [~"d", ~"e"], "a\\b\\c\\d\\e");
+        t!(s: "a\\b\\c", ["d".to_owned(), "e".to_owned()], "a\\b\\c\\d\\e");
         t!(v: b!("a\\b\\c"), [b!("d"), b!("e")], b!("a\\b\\c\\d\\e"));
         t!(v: b!("a\\b\\c"), [Vec::from_slice(b!("d")), Vec::from_slice(b!("e"))],
            b!("a\\b\\c\\d\\e"));