diff options
| author | Laurenz <laurmaedje@gmail.com> | 2023-01-28 12:01:05 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2023-01-28 12:14:03 +0100 |
| commit | 28c554ec2185a15e22f0408ce485ed4afe035e03 (patch) | |
| tree | 622d2d281133c4e6b92633e44bfc1e1301250fb4 /src/model/str.rs | |
| parent | 23238d4d44881a5b466ab23a32e2a7447f460127 (diff) | |
Rework math attachments and accents
Diffstat (limited to 'src/model/str.rs')
| -rw-r--r-- | src/model/str.rs | 8 |
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('"')?; |
