File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -1772,6 +1772,15 @@ impl FromIterator<String> for String {
17721772 }
17731773}
17741774
1775+ #[ stable( feature = "box_str2" , since = "1.45.0" ) ]
1776+ impl FromIterator < Box < str > > for String {
1777+ fn from_iter < I : IntoIterator < Item = Box < str > > > ( iter : I ) -> String {
1778+ let mut buf = String :: new ( ) ;
1779+ buf. extend ( iter) ;
1780+ buf
1781+ }
1782+ }
1783+
17751784#[ stable( feature = "herd_cows" , since = "1.19.0" ) ]
17761785impl < ' a > FromIterator < Cow < ' a , str > > for String {
17771786 fn from_iter < I : IntoIterator < Item = Cow < ' a , str > > > ( iter : I ) -> String {
@@ -1815,6 +1824,13 @@ impl<'a> Extend<&'a str> for String {
18151824 }
18161825}
18171826
1827+ #[ stable( feature = "box_str2" , since = "1.45.0" ) ]
1828+ impl Extend < Box < str > > for String {
1829+ fn extend < I : IntoIterator < Item = Box < str > > > ( & mut self , iter : I ) {
1830+ iter. into_iter ( ) . for_each ( move |s| self . push_str ( & s) ) ;
1831+ }
1832+ }
1833+
18181834#[ stable( feature = "extend_string" , since = "1.4.0" ) ]
18191835impl Extend < String > for String {
18201836 fn extend < I : IntoIterator < Item = String > > ( & mut self , iter : I ) {
You can’t perform that action at this time.
0 commit comments