Improved formattedtext

This commit is contained in:
2023-09-21 12:02:40 -07:00
parent 0c07cb258b
commit 7d78d0d74d
3 changed files with 163 additions and 73 deletions

View File

@ -1,4 +1,5 @@
use std::ops::Add;
use std::ops::AddAssign;
#[derive(Debug)]
@ -30,4 +31,10 @@ impl Add for FormattedText {
fn add(self, other: Self) -> Self::Output {
return FormattedText::new(format!("{}{}", self.text, other.text));
}
}
impl AddAssign for FormattedText where {
fn add_assign(&mut self, other: Self) {
self.text.push_str(&other.text);
}
}