diff options
author | Benjamin Coenen <[email protected]> | 2020-05-21 09:53:29 +0100 |
---|---|---|
committer | Benjamin Coenen <[email protected]> | 2020-05-21 09:53:29 +0100 |
commit | a7c8aa7c60c05db66ba4e89ae9e05c82e62507a5 (patch) | |
tree | e848f47bdf5d031c408df94222f595d2efcb2070 /crates/ra_tt/src | |
parent | c6143742bd4e625d391ac3ea860be7578ab9f53f (diff) | |
parent | a4e6963a2313971fe7bbec97d03bc67266ef68a9 (diff) |
add support of feature flag for runnables #4464
Signed-off-by: Benjamin Coenen <[email protected]>
Diffstat (limited to 'crates/ra_tt/src')
-rw-r--r-- | crates/ra_tt/src/buffer.rs | 4 |
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() { |