From dc932cdf88591c20465a493c497e55e988981639 Mon Sep 17 00:00:00 2001 From: =?UTF-8?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 106ffb2a0fdfb..2124f1efb990c 100644 --- a/compiler/rustc_ast/src/util/literal.rs +++ b/compiler/rustc_ast/src/util/literal.rs @@ -87,7 +87,6 @@ impl LitKind { } }); error?; - buf.shrink_to_fit(); Symbol::intern(&buf) } else { symbol @@ -105,7 +104,6 @@ impl LitKind { } }); error?; - buf.shrink_to_fit(); LitKind::ByteStr(buf.into()) } token::ByteStrRaw(_) => { @@ -120,7 +118,6 @@ impl LitKind { } }); error?; - buf.shrink_to_fit(); buf } else { symbol.to_string().into_bytes()