aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--crates/ra_tt/src/buffer.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/crates/ra_tt/src/buffer.rs b/crates/ra_tt/src/buffer.rs
index 14b3f707d..5967f44cd 100644
--- a/crates/ra_tt/src/buffer.rs
+++ b/crates/ra_tt/src/buffer.rs
@@ -42,7 +42,9 @@ impl<'t> TokenBuffer<'t> {
42 buffers: &mut Vec<Box<[Entry<'t>]>>, 42 buffers: &mut Vec<Box<[Entry<'t>]>>,
43 next: Option<EntryPtr>, 43 next: Option<EntryPtr>,
44 ) -> usize { 44 ) -> usize {
45 let mut entries = vec![]; 45 // Must contain everything in tokens and then the Entry::End
46 let start_capacity = tokens.len() + 1;
47 let mut entries = Vec::with_capacity(start_capacity);
46 let mut children = vec![]; 48 let mut children = vec![];
47 49
48 for (idx, tt) in tokens.iter().enumerate() { 50 for (idx, tt) in tokens.iter().enumerate() {