summaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2022-02-17 23:54:00 +0100
committerLaurenz <laurmaedje@gmail.com>2022-02-18 01:06:20 +0100
commitacae6e2a54f11b27bae343a15d9eff952323fe28 (patch)
tree60b7f021a66436f9035441f40be965ffb9df3897 /src/util
parent980f898d553bec35bd94171d47fd86cb13e39b23 (diff)
List label styling
Diffstat (limited to 'src/util')
-rw-r--r--src/util/eco_string.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/util/eco_string.rs b/src/util/eco_string.rs
index 953508ce..e3c8fc8a 100644
--- a/src/util/eco_string.rs
+++ b/src/util/eco_string.rs
@@ -366,6 +366,16 @@ impl From<EcoString> for String {
}
}
+impl FromIterator<char> for EcoString {
+ fn from_iter<T: IntoIterator<Item = char>>(iter: T) -> Self {
+ let mut s = Self::new();
+ for c in iter {
+ s.push(c);
+ }
+ s
+ }
+}
+
#[cfg(test)]
mod tests {
use super::*;