diff options
| author | bors <bors@rust-lang.org> | 2014-11-08 14:41:37 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-11-08 14:41:37 +0000 |
| commit | fa2983a1b7fc77dad37d49dcebeda3c25aac1e3f (patch) | |
| tree | 110ad35766eb817dcfb473fdcceda3f1e5c2996f | |
| parent | 34af03681f2be9aa3ad0fdb567c27ff9f096db39 (diff) | |
| parent | 0741dd795a5cad8b7bb24d07200235f8fb7d84e6 (diff) | |
| download | rust-fa2983a1b7fc77dad37d49dcebeda3c25aac1e3f.tar.gz rust-fa2983a1b7fc77dad37d49dcebeda3c25aac1e3f.zip | |
auto merge of #18735 : utkarshkukreti/rust/remove-unnecessary-to_string-from-vec-docs, r=huonw
I don't think they're needed.
| -rw-r--r-- | src/libcollections/vec.rs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/libcollections/vec.rs b/src/libcollections/vec.rs index 78ed5e97069..76399d42b8b 100644 --- a/src/libcollections/vec.rs +++ b/src/libcollections/vec.rs @@ -801,14 +801,13 @@ impl<T> Vec<T> { /// /// # Example /// ``` - /// let mut v = vec!["foo".to_string(), "bar".to_string(), - /// "baz".to_string(), "qux".to_string()]; + /// let mut v = vec!["foo", "bar", "baz", "qux"]; /// - /// 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(1), Some("bar")); + /// assert_eq!(v, vec!["foo", "qux", "baz"]); /// - /// 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(0), Some("foo")); + /// assert_eq!(v, vec!["baz", "qux"]); /// /// assert_eq!(v.swap_remove(2), None); /// ``` |
