]> git.lizzy.rs Git - rust.git/blobdiff - src/libstd/vec.rs
Replace all ~"" with "".to_owned()
[rust.git] / src / libstd / vec.rs
index 5480805478c0a7188e2f16f0ff8861a5bb6b65d1..585bed83101dd75b0288b8002a08ed57a1da9b9d 100644 (file)
@@ -626,7 +626,7 @@ pub fn as_mut_slice<'a>(&'a mut self) -> &'a mut [T] {
     /// # Example
     ///
     /// ```rust
-    /// let v = vec!(~"a", ~"b");
+    /// let v = vec!("a".to_owned(), "b".to_owned());
     /// for s in v.move_iter() {
     ///     // s has type ~str, not &~str
     ///     println!("{}", s);
@@ -830,13 +830,13 @@ pub fn mut_last<'a>(&'a mut self) -> Option<&'a mut T> {
     ///
     /// # Example
     /// ```rust
-    /// let mut v = vec!(~"foo", ~"bar", ~"baz", ~"qux");
+    /// let mut v = vec!("foo".to_owned(), "bar".to_owned(), "baz".to_owned(), "qux".to_owned());
     ///
-    /// assert_eq!(v.swap_remove(1), Some(~"bar"));
-    /// assert_eq!(v, vec!(~"foo", ~"qux", ~"baz"));
+    /// assert_eq!(v.swap_remove(1), Some("bar".to_owned()));
+    /// assert_eq!(v, vec!("foo".to_owned(), "qux".to_owned(), "baz".to_owned()));
     ///
-    /// assert_eq!(v.swap_remove(0), Some(~"foo"));
-    /// assert_eq!(v, vec!(~"baz", ~"qux"));
+    /// assert_eq!(v.swap_remove(0), Some("foo".to_owned()));
+    /// assert_eq!(v, vec!("baz".to_owned(), "qux".to_owned()));
     ///
     /// assert_eq!(v.swap_remove(2), None);
     /// ```