mirror of
https://github.com/ilyakooo0/helix.git
synced 2024-09-20 12:37:32 +03:00
Address clippy lint.
This commit is contained in:
parent
8f6f329057
commit
2100f5a2c0
@ -85,7 +85,10 @@ pub fn switch(&mut self, id: DocumentId, action: Action) {
|
||||
let (view, doc) = self.current();
|
||||
|
||||
// initialize selection for view
|
||||
let selection = doc.selections.entry(view.id).or_insert(Selection::point(0));
|
||||
let selection = doc
|
||||
.selections
|
||||
.entry(view.id)
|
||||
.or_insert_with(|| Selection::point(0));
|
||||
// TODO: reuse align_view
|
||||
let pos = selection.cursor();
|
||||
let line = doc.text().char_to_line(pos);
|
||||
|
Loading…
Reference in New Issue
Block a user