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 554453c commit 49c8d6fCopy full SHA for 49c8d6f
crates/djls-templates/src/parser.rs
@@ -17,8 +17,8 @@ impl Parser {
17
}
18
19
pub fn parse(&mut self) -> (Vec<Node>, Vec<ParseError>) {
20
- let mut nodelist = Vec::new();
21
- let mut errors = Vec::new();
+ let mut nodelist = Vec::with_capacity(self.tokens.len() / 2);
+ let mut errors = Vec::with_capacity(4);
22
23
while !self.is_at_end() {
24
match self.next_node() {
@@ -93,6 +93,7 @@ impl Parser {
93
for part in parts {
94
bits.push(part.to_owned());
95
96
+
97
let span = token.content_span_or_fallback();
98
99
Ok(Node::Tag { name, bits, span })
0 commit comments