summaryrefslogtreecommitdiff
path: root/src/model/str.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2023-01-28 12:01:05 +0100
committerLaurenz <laurmaedje@gmail.com>2023-01-28 12:14:03 +0100
commit28c554ec2185a15e22f0408ce485ed4afe035e03 (patch)
tree622d2d281133c4e6b92633e44bfc1e1301250fb4 /src/model/str.rs
parent23238d4d44881a5b466ab23a32e2a7447f460127 (diff)
Rework math attachments and accents
Diffstat (limited to 'src/model/str.rs')
-rw-r--r--src/model/str.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/model/str.rs b/src/model/str.rs
index 9196a35a..6bfbcebd 100644
--- a/src/model/str.rs
+++ b/src/model/str.rs
@@ -1,5 +1,5 @@
use std::borrow::{Borrow, Cow};
-use std::fmt::{self, Debug, Formatter, Write};
+use std::fmt::{self, Debug, Display, Formatter, Write};
use std::hash::{Hash, Hasher};
use std::ops::{Add, AddAssign, Deref};
@@ -334,6 +334,12 @@ impl Deref for Str {
}
}
+impl Display for Str {
+ fn fmt(&self, f: &mut Formatter) -> fmt::Result {
+ f.pad(self)
+ }
+}
+
impl Debug for Str {
fn fmt(&self, f: &mut Formatter) -> fmt::Result {
f.write_char('"')?;