We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fc6f092 commit 097398eCopy full SHA for 097398e
src/libcollections/string.rs
@@ -1480,6 +1480,15 @@ impl FromIterator<char> for String {
1480
}
1481
1482
1483
+#[stable(feature = "string_from_iter_by_ref", since = "1.17.0")]
1484
+impl<'a> FromIterator<&'a char> for String {
1485
+ fn from_iter<I: IntoIterator<Item = &'a char>>(iter: I) -> String {
1486
+ let mut buf = String::new();
1487
+ buf.extend(iter);
1488
+ buf
1489
+ }
1490
+}
1491
+
1492
#[stable(feature = "rust1", since = "1.0.0")]
1493
impl<'a> FromIterator<&'a str> for String {
1494
fn from_iter<I: IntoIterator<Item = &'a str>>(iter: I) -> String {
0 commit comments