diff options
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('"')?; |
