Provide a capacity on Selection::new's normalize.
This commit is contained in:
parent
df306fe031
commit
bd607b4cbd
|
@ -214,7 +214,7 @@ pub fn point(pos: usize) -> Self {
|
|||
ranges.sort_unstable_by_key(Range::from);
|
||||
primary_index = ranges.iter().position(|&range| range == primary).unwrap();
|
||||
|
||||
let mut result = SmallVec::new();
|
||||
let mut result = SmallVec::with_capacity(ranges.len()); // approx
|
||||
|
||||
// TODO: we could do with one vec by removing elements as we mutate
|
||||
|
||||
|
|
Loading…
Reference in a new issue