File tree 1 file changed +16
-0
lines changed
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 {
1772
1772
}
1773
1773
}
1774
1774
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
+
1775
1784
#[ stable( feature = "herd_cows" , since = "1.19.0" ) ]
1776
1785
impl < ' a > FromIterator < Cow < ' a , str > > for String {
1777
1786
fn from_iter < I : IntoIterator < Item = Cow < ' a , str > > > ( iter : I ) -> String {
@@ -1815,6 +1824,13 @@ impl<'a> Extend<&'a str> for String {
1815
1824
}
1816
1825
}
1817
1826
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
+
1818
1834
#[ stable( feature = "extend_string" , since = "1.4.0" ) ]
1819
1835
impl Extend < String > for String {
1820
1836
fn extend < I : IntoIterator < Item = String > > ( & mut self , iter : I ) {
You can’t perform that action at this time.
0 commit comments