diff options
Diffstat (limited to 'src/util')
| -rw-r--r-- | src/util/eco.rs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/util/eco.rs b/src/util/eco.rs index a52a163c..7fe1ac9c 100644 --- a/src/util/eco.rs +++ b/src/util/eco.rs @@ -274,14 +274,20 @@ impl PartialOrd for EcoString { } } -impl Add<&Self> for EcoString { +impl Add for EcoString { type Output = Self; - fn add(self, rhs: &Self) -> Self::Output { + fn add(self, rhs: Self) -> Self::Output { self + rhs.as_str() } } +impl AddAssign for EcoString { + fn add_assign(&mut self, rhs: EcoString) { + self.push_str(&rhs); + } +} + impl Add<&str> for EcoString { type Output = Self; |
