mirror of
https://github.com/helix-editor/helix.git
synced 2024-11-22 09:26:19 +04:00
Specify capacity on toggle_line_comments
This commit is contained in:
parent
2c1313c064
commit
f979bdc442
@ -63,7 +63,7 @@ pub fn toggle_line_comments(doc: &Rope, selection: &Selection, token: Option<&st
|
||||
let token = token.unwrap_or("//");
|
||||
let comment = Tendril::from(format!("{} ", token));
|
||||
|
||||
let mut lines: Vec<usize> = Vec::new();
|
||||
let mut lines: Vec<usize> = Vec::with_capacity(selection.len());
|
||||
|
||||
let mut min_next_line = 0;
|
||||
for selection in selection {
|
||||
|
Loading…
Reference in New Issue
Block a user