about summary refs log tree commit diff
path: root/src/libstd/vec.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstd/vec.rs')
-rw-r--r--src/libstd/vec.rs17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/libstd/vec.rs b/src/libstd/vec.rs
index 3c1e83e1b54..81f6c7c7c9b 100644
--- a/src/libstd/vec.rs
+++ b/src/libstd/vec.rs
@@ -669,7 +669,7 @@ impl<T> Vec<T> {
     /// # Example
     ///
     /// ```rust
-    /// let v = vec!("a".to_owned(), "b".to_owned());
+    /// let v = vec!("a".to_string(), "b".to_string());
     /// for s in v.move_iter() {
     ///     // s has type String, not &String
     ///     println!("{}", s);
@@ -874,13 +874,14 @@ impl<T> Vec<T> {
     ///
     /// # Example
     /// ```rust
-    /// let mut v = vec!("foo".to_owned(), "bar".to_owned(), "baz".to_owned(), "qux".to_owned());
+    /// let mut v = vec!("foo".to_string(), "bar".to_string(),
+    ///                  "baz".to_string(), "qux".to_string());
     ///
-    /// 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(1), Some("bar".to_string()));
+    /// assert_eq!(v, vec!("foo".to_string(), "qux".to_string(), "baz".to_string()));
     ///
-    /// 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(0), Some("foo".to_string()));
+    /// assert_eq!(v, vec!("baz".to_string(), "qux".to_string()));
     ///
     /// assert_eq!(v.swap_remove(2), None);
     /// ```
@@ -1849,9 +1850,9 @@ mod tests {
         let b: ~[u8] = FromVec::from_vec(a);
         assert_eq!(b.as_slice(), &[]);
 
-        let a = vec!["one".to_strbuf(), "two".to_strbuf()];
+        let a = vec!["one".to_string(), "two".to_string()];
         let b: ~[String] = FromVec::from_vec(a);
-        assert_eq!(b.as_slice(), &["one".to_strbuf(), "two".to_strbuf()]);
+        assert_eq!(b.as_slice(), &["one".to_string(), "two".to_string()]);
 
         struct Foo {
             x: uint,