diff options
Diffstat (limited to 'helix-tui/src/text.rs')
-rw-r--r-- | helix-tui/src/text.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/helix-tui/src/text.rs b/helix-tui/src/text.rs index 1bfe5ee1..ccdafad5 100644 --- a/helix-tui/src/text.rs +++ b/helix-tui/src/text.rs @@ -53,14 +53,14 @@ use std::borrow::Cow; use unicode_segmentation::UnicodeSegmentation; /// A grapheme associated to a style. -#[derive(Debug, Clone, PartialEq)] +#[derive(Debug, Clone, PartialEq, Eq)] pub struct StyledGrapheme<'a> { pub symbol: &'a str, pub style: Style, } /// A string where all graphemes have the same style. -#[derive(Debug, Clone, PartialEq)] +#[derive(Debug, Clone, PartialEq, Eq)] pub struct Span<'a> { pub content: Cow<'a, str>, pub style: Style, @@ -209,7 +209,7 @@ impl<'a> From<Cow<'a, str>> for Span<'a> { } /// A string composed of clusters of graphemes, each with their own style. -#[derive(Debug, Default, Clone, PartialEq)] +#[derive(Debug, Default, Clone, PartialEq, Eq)] pub struct Spans<'a>(pub Vec<Span<'a>>); impl<'a> Spans<'a> { @@ -297,7 +297,7 @@ impl<'a> From<&Spans<'a>> for String { /// text.extend(Text::styled("Some more lines\nnow with more style!", style)); /// assert_eq!(6, text.height()); /// ``` -#[derive(Debug, Default, Clone, PartialEq)] +#[derive(Debug, Default, Clone, PartialEq, Eq)] pub struct Text<'a> { pub lines: Vec<Spans<'a>>, } |