[minor] Simplify some ExprStringLiteral creation logic (#15775)

This commit is contained in:
Alex Waygood
2025-01-27 18:51:13 +00:00
committed by GitHub
parent 9bf138c45a
commit 9c938442e5
3 changed files with 12 additions and 18 deletions

View File

@@ -79,7 +79,7 @@ impl Transformer for Normalizer {
if can_join {
string.value = ast::StringLiteralValue::single(ast::StringLiteral {
value: string.value.to_str().to_string().into_boxed_str(),
value: Box::from(string.value.to_str()),
range: string.range,
flags: StringLiteralFlags::empty(),
});