initialise `output` with a maximum possible length

This commit is contained in:
jesopo 2023-03-22 10:29:06 +00:00
parent f976d410b3
commit a16648b351
1 changed files with 1 additions and 1 deletions

View File

@ -38,7 +38,7 @@ impl<'a> TakeWord<'a> for &'a [u8] {
fn tag_decode(input: &str) -> String {
let mut escaped = false;
let mut output = String::new();
let mut output = String::with_capacity(input.len());
for char in input.chars() {
if escaped {