diff options
| author | bors <bors@rust-lang.org> | 2014-05-27 17:46:48 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-05-27 17:46:48 -0700 |
| commit | 911cc9c35234ab12a4b9a6fc1cb35b52556f242d (patch) | |
| tree | f434006eca9cc58dd01c2a033c505d606d2fced2 /src/libstd/vec.rs | |
| parent | 30bf73fd789ad1414284f59b005e85304ff963ad (diff) | |
| parent | c256dcf8b66fb7100e2d735d6640cf76cb2d22f5 (diff) | |
| download | rust-911cc9c35234ab12a4b9a6fc1cb35b52556f242d.tar.gz rust-911cc9c35234ab12a4b9a6fc1cb35b52556f242d.zip | |
auto merge of #14414 : richo/rust/features/nerf_unused_string_fns, r=alexcrichton
This should block on #14323
Diffstat (limited to 'src/libstd/vec.rs')
| -rw-r--r-- | src/libstd/vec.rs | 17 |
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, |
