about summary refs log tree commit diff
path: root/src/libstd/os.rs
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/os.rs
parentb75683cadf6c4c55360202cd6a0106be80532451 (diff)
downloadrust-919889a1d688a6bbe2edac8705f048f06b1b455c.tar.gz
rust-919889a1d688a6bbe2edac8705f048f06b1b455c.zip
Replace all ~"" with "".to_owned()
Diffstat (limited to 'src/libstd/os.rs')
-rw-r--r--src/libstd/os.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/libstd/os.rs b/src/libstd/os.rs
index dbb95304873..97e01efa3a9 100644
--- a/src/libstd/os.rs
+++ b/src/libstd/os.rs
@@ -1525,7 +1525,7 @@ mod tests {
 
     fn make_rand_name() -> ~str {
         let mut rng = rand::task_rng();
-        let n = ~"TEST" + rng.gen_ascii_str(10u);
+        let n = "TEST".to_owned() + rng.gen_ascii_str(10u);
         assert!(getenv(n).is_none());
         n
     }
@@ -1534,7 +1534,7 @@ mod tests {
     fn test_setenv() {
         let n = make_rand_name();
         setenv(n, "VALUE");
-        assert_eq!(getenv(n), option::Some(~"VALUE"));
+        assert_eq!(getenv(n), option::Some("VALUE".to_owned()));
     }
 
     #[test]
@@ -1551,9 +1551,9 @@ mod tests {
         let n = make_rand_name();
         setenv(n, "1");
         setenv(n, "2");
-        assert_eq!(getenv(n), option::Some(~"2"));
+        assert_eq!(getenv(n), option::Some("2".to_owned()));
         setenv(n, "");
-        assert_eq!(getenv(n), option::Some(~""));
+        assert_eq!(getenv(n), option::Some("".to_owned()));
     }
 
     // Windows GetEnvironmentVariable requires some extra work to make sure
@@ -1561,7 +1561,7 @@ mod tests {
     #[test]
     #[ignore]
     fn test_getenv_big() {
-        let mut s = ~"";
+        let mut s = "".to_owned();
         let mut i = 0;
         while i < 100 {
             s = s + "aaaaaaaaaa";
@@ -1627,10 +1627,10 @@ mod tests {
 
         let mut e = env();
         setenv(n, "VALUE");
-        assert!(!e.contains(&(n.clone(), ~"VALUE")));
+        assert!(!e.contains(&(n.clone(), "VALUE".to_owned())));
 
         e = env();
-        assert!(e.contains(&(n, ~"VALUE")));
+        assert!(e.contains(&(n, "VALUE".to_owned())));
     }
 
     #[test]