]> git.lizzy.rs Git - rust.git/blobdiff - src/libcollections/hashmap.rs
Replace all ~"" with "".to_owned()
[rust.git] / src / libcollections / hashmap.rs
index 46b93242685e4380c3006e08c7a2bff7eda6ecee..30875804823673fb544e4505667a458f8ab5c828 100644 (file)
@@ -1962,9 +1962,9 @@ fn test_find_equiv() {
         let mut m = HashMap::new();
 
         let (foo, bar, baz) = (1,2,3);
-        m.insert(~"foo", foo);
-        m.insert(~"bar", bar);
-        m.insert(~"baz", baz);
+        m.insert("foo".to_owned(), foo);
+        m.insert("bar".to_owned(), bar);
+        m.insert("baz".to_owned(), baz);
 
 
         assert_eq!(m.find_equiv(&("foo")), Some(&foo));
@@ -2223,8 +2223,8 @@ fn test_show() {
 
         let set_str = format!("{}", set);
 
-        assert!(set_str == ~"{1, 2}" || set_str == ~"{2, 1}");
-        assert_eq!(format!("{}", empty), ~"{}");
+        assert!(set_str == "{1, 2}".to_owned() || set_str == "{2, 1}".to_owned());
+        assert_eq!(format!("{}", empty), "{}".to_owned());
     }
 }