diff options
| author | Laurenz <laurmaedje@gmail.com> | 2022-11-08 15:31:15 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2022-11-08 16:37:07 +0100 |
| commit | 12a59963b08b68cc39dcded4d3d3e6a6631c2732 (patch) | |
| tree | 3d20b014ada1ac06d2e74611a1798d7fb18dca33 /library/src/text | |
| parent | a7a4cae2948176119e8995bd8e1868f2d0e65029 (diff) | |
Reduce style chain bloat
Diffstat (limited to 'library/src/text')
| -rw-r--r-- | library/src/text/mod.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/library/src/text/mod.rs b/library/src/text/mod.rs index a8164727..c2a67547 100644 --- a/library/src/text/mod.rs +++ b/library/src/text/mod.rs @@ -25,7 +25,7 @@ use self::quotes::*; use crate::prelude::*; /// A single run of text with the same style. -#[derive(Debug, Clone, Hash)] +#[derive(Clone, Hash)] pub struct TextNode(pub EcoString); impl TextNode { @@ -169,6 +169,12 @@ impl TextNode { } } +impl Debug for TextNode { + fn fmt(&self, f: &mut Formatter) -> fmt::Result { + write!(f, "Text({:?})", self.0) + } +} + /// A lowercased font family like "arial". #[derive(Clone, Eq, PartialEq, Hash)] pub struct FontFamily(EcoString); |
