aboutsummaryrefslogtreecommitdiff
path: root/helix-tui/src/text.rs
diff options
context:
space:
mode:
authorBlaž Hrastnik2022-11-04 12:01:17 +0000
committerBlaž Hrastnik2022-11-04 12:06:28 +0000
commitc2c1280f02b83a468da67d88350c199915427535 (patch)
treecd4306c1b7353bb960608e18c5633aa22c5d0204 /helix-tui/src/text.rs
parent921d3510132b0bd89d4ac0a542371c3ae90e2e02 (diff)
Resolve a bunch of upcoming clippy lints
Diffstat (limited to 'helix-tui/src/text.rs')
-rw-r--r--helix-tui/src/text.rs8
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>>,
}