aboutsummaryrefslogtreecommitdiff
path: root/helix-tui/src
diff options
context:
space:
mode:
authorBlaž Hrastnik2022-01-14 03:25:59 +0000
committerBlaž Hrastnik2022-01-16 05:19:48 +0000
commite7eab95b943ff15396c5d512a9c95650ab98a902 (patch)
tree88a485634f4eb4a98c86fa5e3fc235a0363cf6bc /helix-tui/src
parentf5b0821860940782567a0baa17280aef04f845e3 (diff)
Update to rust 1.58, fix a bunch of optional lints
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