Set the capacity of the Vec used in gather_captures()
to the number of captures expected
This commit is contained in:
parent
ea8c4e3af2
commit
9354d358fd
|
@ -262,7 +262,7 @@ impl Stack {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn gather_captures(&self, engine_state: &EngineState, captures: &[VarId]) -> Stack {
|
pub fn gather_captures(&self, engine_state: &EngineState, captures: &[VarId]) -> Stack {
|
||||||
let mut vars = vec![];
|
let mut vars = Vec::with_capacity(captures.len());
|
||||||
|
|
||||||
let fake_span = Span::new(0, 0);
|
let fake_span = Span::new(0, 0);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user