From 7d8353e31abbc542b19526949291db326362b14a Mon Sep 17 00:00:00 2001 From: WUJingdi Date: Wed, 29 Nov 2023 16:17:30 +0800 Subject: [PATCH] chore: fix ci --- src/tokenizer.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/tokenizer.rs b/src/tokenizer.rs index 995db4ca6..a497b5f38 100644 --- a/src/tokenizer.rs +++ b/src/tokenizer.rs @@ -541,8 +541,7 @@ impl<'a> Tokenizer<'a> { pub fn tokenize(&mut self) -> Result, TokenizerError> { let twl = self.tokenize_with_location()?; - let mut tokens: Vec = vec![]; - tokens.reserve(twl.len()); + let mut tokens: Vec = Vec::with_capacity(twl.len()); for token_with_location in twl { tokens.push(token_with_location.token); }