aboutsummaryrefslogtreecommitdiff
path: root/helix-core
diff options
context:
space:
mode:
authorBlaž Hrastnik2021-02-05 07:06:48 +0000
committerBlaž Hrastnik2021-02-05 07:06:48 +0000
commita924ad288560cff871a4e653e000396c78805252 (patch)
tree8b4cb1f08ceaaecc3ca56e264752521a8d1c296c /helix-core
parentc70080dd686738ab6272dd0b3c421c6621e86e34 (diff)
simplify.
Diffstat (limited to 'helix-core')
-rw-r--r--helix-core/src/selection.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/helix-core/src/selection.rs b/helix-core/src/selection.rs
index 55514864..121267bf 100644
--- a/helix-core/src/selection.rs
+++ b/helix-core/src/selection.rs
@@ -184,6 +184,7 @@ impl Selection {
Self::single(pos, pos)
}
+ // TODO: consume an iterator or a vec to reduce allocations?
#[must_use]
pub fn new(ranges: SmallVec<[Range; 1]>, primary_index: usize) -> Self {
fn normalize(mut ranges: SmallVec<[Range; 1]>, mut primary_index: usize) -> Selection {