We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ef6d535 commit b606399Copy full SHA for b606399
crates/ra_tt/src/buffer.rs
@@ -42,7 +42,9 @@ impl<'t> TokenBuffer<'t> {
42
buffers: &mut Vec<Box<[Entry<'t>]>>,
43
next: Option<EntryPtr>,
44
) -> usize {
45
- let mut entries = vec![];
+ // 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);
48
let mut children = vec![];
49
50
for (idx, tt) in tokens.iter().enumerate() {
0 commit comments