Remove unnecessary manual shrink_to_fit calls

This commit is contained in:
Dániel Buga 2021-01-16 14:02:36 +01:00
parent 18ec4a9a74
commit dc932cdf88

View File

@ -87,7 +87,6 @@ fn from_lit_token(lit: token::Lit) -> Result<LitKind, LitError> {
}
});
error?;
buf.shrink_to_fit();
Symbol::intern(&buf)
} else {
symbol
@ -105,7 +104,6 @@ fn from_lit_token(lit: token::Lit) -> Result<LitKind, LitError> {
}
});
error?;
buf.shrink_to_fit();
LitKind::ByteStr(buf.into())
}
token::ByteStrRaw(_) => {
@ -120,7 +118,6 @@ fn from_lit_token(lit: token::Lit) -> Result<LitKind, LitError> {
}
});
error?;
buf.shrink_to_fit();
buf
} else {
symbol.to_string().into_bytes()