mirror of
https://github.com/rm-dr/daisy
synced 2025-07-01 14:43:30 -07:00
Improved formattedtext
This commit is contained in:
@ -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);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user