initialise `output` with a maximum possible length
This commit is contained in:
parent
f976d410b3
commit
a16648b351
|
@ -38,7 +38,7 @@ impl<'a> TakeWord<'a> for &'a [u8] {
|
||||||
|
|
||||||
fn tag_decode(input: &str) -> String {
|
fn tag_decode(input: &str) -> String {
|
||||||
let mut escaped = false;
|
let mut escaped = false;
|
||||||
let mut output = String::new();
|
let mut output = String::with_capacity(input.len());
|
||||||
|
|
||||||
for char in input.chars() {
|
for char in input.chars() {
|
||||||
if escaped {
|
if escaped {
|
||||||
|
|
Loading…
Reference in New Issue