on master help sign in
Address clippy lint.
commit2100f5a2c07cd58e05b11d124d56e15fe23685d0 authorBlaž Hrastnik <blaz@mxxn.io> dateMon 17 May 2021, 23:01 (5 years ago) parent8f6f329
1 file changed+4−1
helix-view/src/editor.rs+4−1
helix-view/src/editor.rs+4−1
@@ -85,7 +85,10 @@ impl Editor {
8585 let (view, doc) = self.current();
8686
8787 // initialize selection for view
88− let selection = doc.selections.entry(view.id).or_insert(Selection::point(0));
88+ let selection = doc
89+ .selections
90+ .entry(view.id)
91+ .or_insert_with(|| Selection::point(0));
8992 // TODO: reuse align_view
9093 let pos = selection.cursor();
9194 let line = doc.text().char_to_line(pos);