aboutsummaryrefslogtreecommitdiff
path: root/helix-view/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-view/src
parentf5b0821860940782567a0baa17280aef04f845e3 (diff)
Update to rust 1.58, fix a bunch of optional lints
Diffstat (limited to 'helix-view/src')
-rw-r--r--helix-view/src/info.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/helix-view/src/info.rs b/helix-view/src/info.rs
index b5a002fa..73856154 100644
--- a/helix-view/src/info.rs
+++ b/helix-view/src/info.rs
@@ -16,7 +16,7 @@ pub struct Info {
}
impl Info {
- pub fn new(title: &str, body: Vec<(&str, BTreeSet<KeyEvent>)>) -> Info {
+ pub fn new(title: &str, body: Vec<(&str, BTreeSet<KeyEvent>)>) -> Self {
let body = body
.into_iter()
.map(|(desc, events)| {
@@ -38,7 +38,7 @@ impl Info {
);
}
- Info {
+ Self {
title: title.to_string(),
width: text.lines().map(|l| l.width()).max().unwrap() as u16,
height: body.len() as u16,