Skip to content

Commit 60042cb

Browse files
authored
KCL: Remove unnecessary clone in recast (#7845)
Improves perf by 27% to 38% on my mac, 56-88% on Codspeed.
1 parent 8723ce9 commit 60042cb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rust/kcl-lib/src/unparser.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ impl Program {
6060
for attr in body_item.get_attrs() {
6161
result.push_str(&attr.recast(options, indentation_level));
6262
}
63-
result.push_str(&match body_item.clone() {
63+
result.push_str(&match body_item {
6464
BodyItem::ImportStatement(stmt) => stmt.recast(options, indentation_level),
6565
BodyItem::ExpressionStatement(expression_statement) => {
6666
expression_statement

0 commit comments

Comments
 (0)