aboutsummaryrefslogtreecommitdiff
path: root/helix-tui/src
diff options
context:
space:
mode:
Diffstat (limited to 'helix-tui/src')
-rw-r--r--helix-tui/src/widgets/block.rs10
-rw-r--r--helix-tui/src/widgets/paragraph.rs2
2 files changed, 6 insertions, 6 deletions
diff --git a/helix-tui/src/widgets/block.rs b/helix-tui/src/widgets/block.rs
index d43ad41d..26223c3e 100644
--- a/helix-tui/src/widgets/block.rs
+++ b/helix-tui/src/widgets/block.rs
@@ -15,12 +15,12 @@ pub enum BorderType {
}
impl BorderType {
- pub fn line_symbols(border_type: BorderType) -> line::Set {
+ pub fn line_symbols(border_type: Self) -> line::Set {
match border_type {
- BorderType::Plain => line::NORMAL,
- BorderType::Rounded => line::ROUNDED,
- BorderType::Double => line::DOUBLE,
- BorderType::Thick => line::THICK,
+ Self::Plain => line::NORMAL,
+ Self::Rounded => line::ROUNDED,
+ Self::Double => line::DOUBLE,
+ Self::Thick => line::THICK,
}
}
}
diff --git a/helix-tui/src/widgets/paragraph.rs b/helix-tui/src/widgets/paragraph.rs
index 8bafbb9a..4e839162 100644
--- a/helix-tui/src/widgets/paragraph.rs
+++ b/helix-tui/src/widgets/paragraph.rs
@@ -166,7 +166,7 @@ impl<'a> Widget for Paragraph<'a> {
Box::new(WordWrapper::new(&mut styled, text_area.width, trim))
} else {
let mut line_composer = Box::new(LineTruncator::new(&mut styled, text_area.width));
- if let Alignment::Left = self.alignment {
+ if self.alignment == Alignment::Left {
line_composer.set_horizontal_offset(self.scroll.1);
}
line_composer