From e7eab95b943ff15396c5d512a9c95650ab98a902 Mon Sep 17 00:00:00 2001 From: Blaž Hrastnik Date: Fri, 14 Jan 2022 12:25:59 +0900 Subject: Update to rust 1.58, fix a bunch of optional lints --- helix-view/src/info.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'helix-view/src') 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)>) -> Info { + pub fn new(title: &str, body: Vec<(&str, BTreeSet)>) -> 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, -- cgit v1.2.3-70-g09d2