File tree 1 file changed +2
-10
lines changed
1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -1004,11 +1004,7 @@ pub trait SliceConcatExt<T: ?Sized, U> {
1004
1004
/// # Examples
1005
1005
///
1006
1006
/// ```
1007
- /// let v = vec!["hello", "world"];
1008
- ///
1009
- /// let s: String = v.concat();
1010
- ///
1011
- /// println!("{}", s); // prints "helloworld"
1007
+ /// assert_eq!(["hello", "world"].concat(), "helloworld");
1012
1008
/// ```
1013
1009
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1014
1010
fn concat ( & self ) -> U ;
@@ -1018,11 +1014,7 @@ pub trait SliceConcatExt<T: ?Sized, U> {
1018
1014
/// # Examples
1019
1015
///
1020
1016
/// ```
1021
- /// let v = vec!["hello", "world"];
1022
- ///
1023
- /// let s: String = v.connect(" ");
1024
- ///
1025
- /// println!("{}", s); // prints "hello world"
1017
+ /// assert_eq!(["hello", "world"].connect(" "), "hello world");
1026
1018
/// ```
1027
1019
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1028
1020
fn connect ( & self , sep : & T ) -> U ;
You can’t perform that action at this time.
0 commit comments