File tree Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Expand file tree Collapse file tree 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> {
10041004 /// # Examples
10051005 ///
10061006 /// ```
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");
10121008 /// ```
10131009 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
10141010 fn concat ( & self ) -> U ;
@@ -1018,11 +1014,7 @@ pub trait SliceConcatExt<T: ?Sized, U> {
10181014 /// # Examples
10191015 ///
10201016 /// ```
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");
10261018 /// ```
10271019 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
10281020 fn connect ( & self , sep : & T ) -> U ;
You can’t perform that action at this time.
0 commit comments