Skip to content

Commit bac9fd7

Browse files
committed
Fix for lint warning
1 parent 2be9c93 commit bac9fd7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/tokenizer.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -535,8 +535,8 @@ impl<'a> Tokenizer<'a> {
535535
pub fn tokenize(&mut self) -> Result<Vec<Token>, TokenizerError> {
536536
let twl = self.tokenize_with_location()?;
537537

538-
let mut tokens: Vec<Token> = vec![];
539-
tokens.reserve(twl.len());
538+
let mut tokens: Vec<Token> = Vec::with_capacity(twl.len());
539+
540540
for token_with_location in twl {
541541
tokens.push(token_with_location.token);
542542
}

0 commit comments

Comments
 (0)