aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_tt/src/buffer.rs
diff options
context:
space:
mode:
authorBenjamin Coenen <[email protected]>2020-05-21 09:53:29 +0100
committerBenjamin Coenen <[email protected]>2020-05-21 09:53:29 +0100
commita7c8aa7c60c05db66ba4e89ae9e05c82e62507a5 (patch)
treee848f47bdf5d031c408df94222f595d2efcb2070 /crates/ra_tt/src/buffer.rs
parentc6143742bd4e625d391ac3ea860be7578ab9f53f (diff)
parenta4e6963a2313971fe7bbec97d03bc67266ef68a9 (diff)
add support of feature flag for runnables #4464
Signed-off-by: Benjamin Coenen <[email protected]>
Diffstat (limited to 'crates/ra_tt/src/buffer.rs')
-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() {