diff options
author | Blaž Hrastnik | 2022-01-14 03:25:59 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2022-01-16 05:19:48 +0000 |
commit | e7eab95b943ff15396c5d512a9c95650ab98a902 (patch) | |
tree | 88a485634f4eb4a98c86fa5e3fc235a0363cf6bc /helix-view | |
parent | f5b0821860940782567a0baa17280aef04f845e3 (diff) |
Update to rust 1.58, fix a bunch of optional lints
Diffstat (limited to 'helix-view')
-rw-r--r-- | helix-view/src/info.rs | 4 |
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, |