File tree 1 file changed +5
-6
lines changed
1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -801,14 +801,13 @@ impl<T> Vec<T> {
801
801
///
802
802
/// # Example
803
803
/// ```
804
- /// let mut v = vec!["foo".to_string(), "bar".to_string(),
805
- /// "baz".to_string(), "qux".to_string()];
804
+ /// let mut v = vec!["foo", "bar", "baz", "qux"];
806
805
///
807
- /// assert_eq!(v.swap_remove(1), Some("bar".to_string() ));
808
- /// assert_eq!(v, vec!["foo".to_string() , "qux".to_string() , "baz".to_string() ]);
806
+ /// assert_eq!(v.swap_remove(1), Some("bar"));
807
+ /// assert_eq!(v, vec!["foo", "qux", "baz"]);
809
808
///
810
- /// assert_eq!(v.swap_remove(0), Some("foo".to_string() ));
811
- /// assert_eq!(v, vec!["baz".to_string() , "qux".to_string() ]);
809
+ /// assert_eq!(v.swap_remove(0), Some("foo"));
810
+ /// assert_eq!(v, vec!["baz", "qux"]);
812
811
///
813
812
/// assert_eq!(v.swap_remove(2), None);
814
813
/// ```
You can’t perform that action at this time.
0 commit comments