summaryrefslogtreecommitdiff
path: root/src/util/eco.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/eco.rs')
-rw-r--r--src/util/eco.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/util/eco.rs b/src/util/eco.rs
index 10a1f2ed..645880c4 100644
--- a/src/util/eco.rs
+++ b/src/util/eco.rs
@@ -353,6 +353,16 @@ impl FromIterator<char> for EcoString {
}
}
+impl FromIterator<Self> for EcoString {
+ fn from_iter<T: IntoIterator<Item = Self>>(iter: T) -> Self {
+ let mut s = Self::new();
+ for piece in iter {
+ s.push_str(&piece);
+ }
+ s
+ }
+}
+
impl From<EcoString> for String {
fn from(s: EcoString) -> Self {
match s.0 {