From dc932cdf88591c20465a493c497e55e988981639 Mon Sep 17 00:00:00 2001 From: =?utf8?q?D=C3=A1niel=20Buga?= Date: Sat, 16 Jan 2021 14:02:36 +0100 Subject: [PATCH] Remove unnecessary manual shrink_to_fit calls --- compiler/rustc_ast/src/util/literal.rs | 3 --- 1 file changed, 3 deletions(-) diff --git a/compiler/rustc_ast/src/util/literal.rs b/compiler/rustc_ast/src/util/literal.rs index 106ffb2a0fd..2124f1efb99 100644 --- a/compiler/rustc_ast/src/util/literal.rs +++ b/compiler/rustc_ast/src/util/literal.rs @@ -87,7 +87,6 @@ fn from_lit_token(lit: token::Lit) -> Result { } }); error?; - buf.shrink_to_fit(); Symbol::intern(&buf) } else { symbol @@ -105,7 +104,6 @@ fn from_lit_token(lit: token::Lit) -> Result { } }); error?; - buf.shrink_to_fit(); LitKind::ByteStr(buf.into()) } token::ByteStrRaw(_) => { @@ -120,7 +118,6 @@ fn from_lit_token(lit: token::Lit) -> Result { } }); error?; - buf.shrink_to_fit(); buf } else { symbol.to_string().into_bytes() -- 2.44.0