summaryrefslogtreecommitdiff
path: root/src/util/eco.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2022-10-04 13:42:49 +0200
committerLaurenz <laurmaedje@gmail.com>2022-10-04 13:45:16 +0200
commit5a8534a395b500a25cbc46ee15ec031c8231de59 (patch)
treea525c447c3243fe315c7ed91923e158df131809b /src/util/eco.rs
parent7ef6cb31df0fe1ebec99b1077053a586a349f530 (diff)
Parse basic math syntax
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 {